Package org.antlr.v4.runtime.atn

Examples of org.antlr.v4.runtime.atn.RangeTransition.label()


          edgeST.add("label", getEdgeLabel(label));
        }
        else if ( edge instanceof RangeTransition ) {
          edgeST = stlib.getInstanceOf("edge");
          RangeTransition range = (RangeTransition)edge;
          String label = range.label().toString();
          if ( isLexer ) label = range.toString();
          else if ( grammar!=null ) label = range.label().toString(grammar.getVocabulary());
          edgeST.add("label", getEdgeLabel(label));
        }
        else {
View Full Code Here


        else if ( edge instanceof RangeTransition ) {
          edgeST = stlib.getInstanceOf("edge");
          RangeTransition range = (RangeTransition)edge;
          String label = range.label().toString();
          if ( isLexer ) label = range.toString();
          else if ( grammar!=null ) label = range.label().toString(grammar.getVocabulary());
          edgeST.add("label", getEdgeLabel(label));
        }
        else {
          edgeST = stlib.getInstanceOf("edge");
          edgeST.add("label", getEdgeLabel(edge.toString()));
View Full Code Here

          boolean not = st instanceof NotSetTransition;
          if ( g.isLexer() ) {
            buf.append("-").append(not?"~":"").append(st.toString()).append("->").append(getStateString(t.target)).append('\n');
          }
          else {
            buf.append("-").append(not?"~":"").append(st.label().toString(g.getVocabulary())).append("->").append(getStateString(t.target)).append('\n');
          }
        }
        else if ( t instanceof AtomTransition ) {
          AtomTransition a = (AtomTransition)t;
          String label = g.getTokenDisplayName(a.label);
View Full Code Here

          edgeST.add("label", getEdgeLabel(label));
        }
        else if ( edge instanceof SetTransition ) {
          edgeST = stlib.getInstanceOf("edge");
          SetTransition set = (SetTransition)edge;
          String label = set.label().toString();
          if ( isLexer ) label = set.label().toString(true);
          else if ( grammar!=null ) label = set.label().toString(grammar.getVocabulary());
          if ( edge instanceof NotSetTransition ) label = "~"+label;
          edgeST.add("label", getEdgeLabel(label));
        }
View Full Code Here

        }
        else if ( edge instanceof SetTransition ) {
          edgeST = stlib.getInstanceOf("edge");
          SetTransition set = (SetTransition)edge;
          String label = set.label().toString();
          if ( isLexer ) label = set.label().toString(true);
          else if ( grammar!=null ) label = set.label().toString(grammar.getVocabulary());
          if ( edge instanceof NotSetTransition ) label = "~"+label;
          edgeST.add("label", getEdgeLabel(label));
        }
        else if ( edge instanceof RangeTransition ) {
View Full Code Here

        else if ( edge instanceof SetTransition ) {
          edgeST = stlib.getInstanceOf("edge");
          SetTransition set = (SetTransition)edge;
          String label = set.label().toString();
          if ( isLexer ) label = set.label().toString(true);
          else if ( grammar!=null ) label = set.label().toString(grammar.getVocabulary());
          if ( edge instanceof NotSetTransition ) label = "~"+label;
          edgeST.add("label", getEdgeLabel(label));
        }
        else if ( edge instanceof RangeTransition ) {
          edgeST = stlib.getInstanceOf("edge");
View Full Code Here

        for (int j = interval.a; j <= interval.b; j++) {
          Transition matchTransition = decision.transition(j).target.transition(0);
          if (matchTransition instanceof NotSetTransition) {
            throw new UnsupportedOperationException("Not yet implemented.");
          } else {
            matchSet.addAll(matchTransition.label());
          }
        }

        Transition newTransition;
        if (matchSet.getIntervals().size() == 1) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.