Package antlr

Class ParseTreeRule

All Implemented Interfaces:
AST, Serializable

public class ParseTreeRule extends ParseTree
See Also:
  • Field Details

    • INVALID_ALT

      public static final int INVALID_ALT
      See Also:
    • ruleName

      protected String ruleName
    • altNumber

      protected int altNumber
  • Constructor Details

    • ParseTreeRule

      public ParseTreeRule(String ruleName)
    • ParseTreeRule

      public ParseTreeRule(String ruleName, int altNumber)
  • Method Details

    • getRuleName

      public String getRuleName()
    • getLeftmostDerivation

      protected int getLeftmostDerivation(StringBuffer buf, int step)
      Do a step-first walk, building up a buffer of tokens until you've reached a particular step and print out any rule subroots insteads of descending.
      Specified by:
      getLeftmostDerivation in class ParseTree
    • toString

      public String toString()
      Specified by:
      toString in interface AST
      Overrides:
      toString in class BaseAST