Package antlr

Class RuleBlock


  • public class RuleBlock
    extends AlternativeBlock
    A list of alternatives and info contained in the rule definition.
    • Field Detail

      • ruleName

        protected java.lang.String ruleName
      • argAction

        protected java.lang.String argAction
      • throwsSpec

        protected java.lang.String throwsSpec
      • returnAction

        protected java.lang.String returnAction
      • testLiterals

        protected boolean testLiterals
      • labeledElements

        Vector labeledElements
      • lock

        protected boolean[] lock
      • exceptionSpecs

        java.util.Hashtable exceptionSpecs
      • defaultErrorHandler

        protected boolean defaultErrorHandler
      • ignoreRule

        protected java.lang.String ignoreRule
    • Constructor Detail

      • RuleBlock

        public RuleBlock​(Grammar g,
                         java.lang.String r)
        Construct a named rule.
      • RuleBlock

        public RuleBlock​(Grammar g,
                         java.lang.String r,
                         int line,
                         boolean doAutoGen_)
        Construct a named rule with line number information
    • Method Detail

      • addExceptionSpec

        public void addExceptionSpec​(ExceptionSpec ex)
      • findExceptionSpec

        public ExceptionSpec findExceptionSpec​(java.lang.String label)
      • getDefaultErrorHandler

        public boolean getDefaultErrorHandler()
      • getIgnoreRule

        public java.lang.String getIgnoreRule()
      • getRuleName

        public java.lang.String getRuleName()
      • getTestLiterals

        public boolean getTestLiterals()
      • isLexerAutoGenRule

        public boolean isLexerAutoGenRule()
      • setDefaultErrorHandler

        public void setDefaultErrorHandler​(boolean value)