Public Member Functions | |
RuleBlock (Grammar g, String r) | |
RuleBlock (Grammar g, String r, int line, boolean doAutoGen_) | |
void | addExceptionSpec (ExceptionSpec ex) |
ExceptionSpec | findExceptionSpec (Token label) |
ExceptionSpec | findExceptionSpec (String label) |
void | generate () |
boolean | getDefaultErrorHandler () |
RuleEndElement | getEndElement () |
String | getIgnoreRule () |
String | getRuleName () |
boolean | getTestLiterals () |
boolean | isLexerAutoGenRule () |
Lookahead | look (int k) |
void | prepareForAnalysis () |
void | setDefaultErrorHandler (boolean value) |
void | setEndElement (RuleEndElement re) |
void | setOption (Token key, Token value) |
String | toString () |
Protected Attributes | |
String | ruleName |
String | argAction = null |
String | throwsSpec = null |
String | returnAction = null |
RuleEndElement | endNode |
boolean | testLiterals = false |
boolean[] | lock |
Lookahead | cache [] |
boolean | defaultErrorHandler = true |
String | ignoreRule = null |
Package Attributes | |
Vector | labeledElements |
Hashtable | exceptionSpecs |
A list of alternatives and info contained in the rule definition.
antlr.RuleBlock.RuleBlock | ( | Grammar | g, | |
String | r | |||
) |
Construct a named rule.
References antlr.RuleBlock.cache, antlr.RuleBlock.exceptionSpecs, antlr.RuleBlock.labeledElements, antlr.Grammar.maxk, antlr.RuleBlock.ruleName, and antlr.AlternativeBlock.setAutoGen().
antlr.RuleBlock.RuleBlock | ( | Grammar | g, | |
String | r, | |||
int | line, | |||
boolean | doAutoGen_ | |||
) |
Construct a named rule with line number information
References antlr.AlternativeBlock.setAutoGen().
void antlr.RuleBlock.addExceptionSpec | ( | ExceptionSpec | ex | ) |
ExceptionSpec antlr.RuleBlock.findExceptionSpec | ( | Token | label | ) |
References antlr.RuleBlock.exceptionSpecs, and antlr.Token.getText().
Referenced by antlr.RuleBlock.addExceptionSpec(), antlr.PythonCodeGenerator.genRule(), antlr.JavaCodeGenerator.genRule(), antlr.DiagnosticCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), and antlr.CppCodeGenerator.genRule().
ExceptionSpec antlr.RuleBlock.findExceptionSpec | ( | String | label | ) |
References antlr.RuleBlock.exceptionSpecs.
void antlr.RuleBlock.generate | ( | ) |
Reimplemented from antlr.AlternativeBlock.
References antlr.CodeGenerator.gen(), antlr.Grammar.generator, and antlr.GrammarElement.grammar.
boolean antlr.RuleBlock.getDefaultErrorHandler | ( | ) |
References antlr.RuleBlock.defaultErrorHandler.
Referenced by antlr.PythonCodeGenerator.genNextToken(), antlr.JavaCodeGenerator.genNextToken(), antlr.CSharpCodeGenerator.genNextToken(), antlr.CppCodeGenerator.genNextToken(), antlr.PythonCodeGenerator.genRule(), antlr.JavaCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), and antlr.CppCodeGenerator.genRule().
RuleEndElement antlr.RuleBlock.getEndElement | ( | ) |
References antlr.RuleBlock.endNode.
String antlr.RuleBlock.getIgnoreRule | ( | ) |
String antlr.RuleBlock.getRuleName | ( | ) |
References antlr.RuleBlock.ruleName.
Referenced by antlr.LLkAnalyzer.FOLLOW(), antlr.PythonCodeGenerator.genAlt(), antlr.JavaCodeGenerator.genAlt(), antlr.CSharpCodeGenerator.genAlt(), antlr.CppCodeGenerator.genAlt(), antlr.LLkAnalyzer.look(), antlr.PythonCodeGenerator.mapTreeId(), antlr.JavaCodeGenerator.mapTreeId(), antlr.CSharpCodeGenerator.mapTreeId(), antlr.CppCodeGenerator.mapTreeId(), antlr.actions.python.ActionLexer.mAST_ITEM(), antlr.actions.java.ActionLexer.mAST_ITEM(), antlr.actions.csharp.ActionLexer.mAST_ITEM(), antlr.actions.cpp.ActionLexer.mAST_ITEM(), antlr.actions.python.ActionLexer.mTEXT_ITEM(), antlr.actions.java.ActionLexer.mTEXT_ITEM(), antlr.actions.csharp.ActionLexer.mTEXT_ITEM(), antlr.actions.cpp.ActionLexer.mTEXT_ITEM(), antlr.actions.python.ActionLexer.mTREE_ELEMENT(), antlr.actions.java.ActionLexer.mTREE_ELEMENT(), antlr.actions.csharp.ActionLexer.mTREE_ELEMENT(), and antlr.actions.cpp.ActionLexer.mTREE_ELEMENT().
boolean antlr.RuleBlock.getTestLiterals | ( | ) |
boolean antlr.RuleBlock.isLexerAutoGenRule | ( | ) |
References antlr.RuleBlock.ruleName.
Lookahead antlr.RuleBlock.look | ( | int | k | ) |
Reimplemented from antlr.AlternativeBlock.
References antlr.GrammarElement.grammar, antlr.LLkGrammarAnalyzer.look(), and antlr.Grammar.theLLkAnalyzer.
void antlr.RuleBlock.prepareForAnalysis | ( | ) |
Reimplemented from antlr.AlternativeBlock.
References antlr.GrammarElement.grammar, antlr.RuleBlock.lock, and antlr.Grammar.maxk.
Referenced by antlr.MakeGrammar.createNextTokenRule().
void antlr.RuleBlock.setDefaultErrorHandler | ( | boolean | value | ) |
References antlr.RuleBlock.defaultErrorHandler.
Referenced by antlr.MakeGrammar.createNextTokenRule(), and antlr.MakeGrammar.defineRuleName().
void antlr.RuleBlock.setEndElement | ( | RuleEndElement | re | ) |
References antlr.RuleBlock.endNode.
Referenced by antlr.MakeGrammar.createNextTokenRule(), and antlr.MakeGrammar.defineRuleName().
Reimplemented from antlr.AlternativeBlock.
References antlr.Grammar.antlrTool, antlr.RuleBlock.defaultErrorHandler, antlr.Tool.error(), antlr.AlternativeBlock.generateAmbigWarnings, antlr.Token.getColumn(), antlr.Grammar.getFilename(), antlr.Token.getLine(), antlr.Token.getText(), antlr.TokenManager.getTokenSymbol(), antlr.GrammarElement.grammar, antlr.RuleBlock.ignoreRule, antlr.Tool.panic(), antlr.RuleBlock.ruleName, antlr.TokenSymbol.setParaphrase(), antlr.RuleBlock.testLiterals, and antlr.Grammar.tokenManager.
Referenced by antlr.MakeGrammar.setRuleOption().
String antlr.RuleBlock.toString | ( | ) | [virtual] |
Reimplemented from antlr.AlternativeBlock.
References antlr.RuleEndElement.cache, antlr.RuleBlock.cache, antlr.RuleBlock.endNode, antlr.TokenManager.getVocabulary(), antlr.GrammarElement.grammar, antlr.Grammar.maxk, antlr.RuleBlock.ruleName, antlr.Grammar.tokenManager, and antlr.Lookahead.toString().
Referenced by antlr.Grammar.toString().
String antlr.RuleBlock.argAction = null [protected] |
Lookahead antlr.RuleBlock.cache[] [protected] |
Referenced by antlr.LLkAnalyzer.look(), antlr.RuleBlock.RuleBlock(), and antlr.RuleBlock.toString().
boolean antlr.RuleBlock.defaultErrorHandler = true [protected] |
RuleEndElement antlr.RuleBlock.endNode [protected] |
Referenced by antlr.LLkAnalyzer.FOLLOW(), antlr.HTMLCodeGenerator.genFollowSetForRuleBlock(), antlr.DocBookCodeGenerator.genFollowSetForRuleBlock(), antlr.DiagnosticCodeGenerator.genFollowSetForRuleBlock(), antlr.PythonCodeGenerator.genRule(), antlr.JavaCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), antlr.CppCodeGenerator.genRule(), antlr.RuleBlock.getEndElement(), antlr.CodeGenerator.getFOLLOWBitSet(), antlr.LLkAnalyzer.look(), antlr.RuleBlock.setEndElement(), and antlr.RuleBlock.toString().
Hashtable antlr.RuleBlock.exceptionSpecs [package] |
String antlr.RuleBlock.ignoreRule = null [protected] |
Referenced by antlr.RuleBlock.getIgnoreRule(), and antlr.RuleBlock.setOption().
Vector antlr.RuleBlock.labeledElements [package] |
Referenced by antlr.PythonCodeGenerator.genBlockPreamble(), antlr.JavaCodeGenerator.genBlockPreamble(), antlr.CSharpCodeGenerator.genBlockPreamble(), antlr.CppCodeGenerator.genBlockPreamble(), antlr.PythonCodeGenerator.mapTreeId(), antlr.JavaCodeGenerator.mapTreeId(), antlr.CSharpCodeGenerator.mapTreeId(), antlr.CppCodeGenerator.mapTreeId(), and antlr.RuleBlock.RuleBlock().
boolean [] antlr.RuleBlock.lock [protected] |
Referenced by antlr.LLkAnalyzer.look(), and antlr.RuleBlock.prepareForAnalysis().
String antlr.RuleBlock.returnAction = null [protected] |
Referenced by antlr.PythonCodeGenerator.gen(), antlr.JavaCodeGenerator.gen(), antlr.DiagnosticCodeGenerator.gen(), antlr.CSharpCodeGenerator.gen(), antlr.CppCodeGenerator.gen(), antlr.PythonCodeGenerator.genRule(), antlr.JavaCodeGenerator.genRule(), antlr.DiagnosticCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), antlr.CppCodeGenerator.genRule(), and antlr.CppCodeGenerator.genRuleHeader().
String antlr.RuleBlock.ruleName [protected] |
Referenced by antlr.MakeGrammar.addElementToCurrentAlt(), antlr.RuleBlock.addExceptionSpec(), antlr.JavaCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), antlr.RuleBlock.getRuleName(), antlr.RuleBlock.isLexerAutoGenRule(), antlr.RuleBlock.RuleBlock(), antlr.RuleBlock.setOption(), and antlr.RuleBlock.toString().
boolean antlr.RuleBlock.testLiterals = false [protected] |
Referenced by antlr.RuleBlock.getTestLiterals(), and antlr.RuleBlock.setOption().
String antlr.RuleBlock.throwsSpec = null [protected] |
Referenced by antlr.JavaCodeGenerator.genRule(), and antlr.CSharpCodeGenerator.genRule().