Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Package Attributes

antlr.MakeGrammar Class Reference

Inheritance diagram for antlr.MakeGrammar:
antlr.DefineGrammarSymbols antlr.ANTLRGrammarParseBehavior

List of all members.

Public Member Functions

 MakeGrammar (Tool tool_, String[] args_, LLkAnalyzer analyzer_)
void abortGrammar ()
void beginAlt (boolean doAutoGen_)
void beginChildList ()
void beginExceptionGroup ()
void beginExceptionSpec (Token label)
void beginSubRule (Token label, Token start, boolean not)
void beginTree (Token tok) throws SemanticException
BlockContext context ()
void defineRuleName (Token r, String access, boolean ruleAutoGen, String docComment) throws SemanticException
void endAlt ()
void endChildList ()
void endExceptionGroup ()
void endExceptionSpec ()
void endGrammar ()
void endRule (String rule)
void endSubRule ()
void endTree ()
void hasError ()
void noAutoGenSubRule ()
void oneOrMoreSubRule ()
void optionalSubRule ()
void refAction (Token action)
void setUserExceptions (String thr)
void refArgAction (Token action)
void refCharLiteral (Token lit, Token label, boolean inverted, int autoGenType, boolean lastInRule)
void refCharRange (Token t1, Token t2, Token label, int autoGenType, boolean lastInRule)
void refTokensSpecElementOption (Token tok, Token option, Token value)
void refElementOption (Token option, Token value)
void refExceptionHandler (Token exTypeAndName, Token action)
void refInitAction (Token action)
void refMemberAction (Token act)
void refPreambleAction (Token act)
void refReturnAction (Token returnAction)
void refRule (Token idAssign, Token r, Token label, Token args, int autoGenType)
void refSemPred (Token pred)
void refStringLiteral (Token lit, Token label, int autoGenType, boolean lastInRule)
void refToken (Token idAssign, Token t, Token label, Token args, boolean inverted, int autoGenType, boolean lastInRule)
void refTokenRange (Token t1, Token t2, Token label, int autoGenType, boolean lastInRule)
void refTreeSpecifier (Token treeSpec)
void refWildcard (Token t, Token label, int autoGenType)
void reset ()
void setArgOfRuleRef (Token argAction)
void setRuleOption (Token key, Token value)
void setSubruleOption (Token key, Token value)
void synPred ()
void zeroOrMoreSubRule ()

Static Public Member Functions

static RuleBlock createNextTokenRule (Grammar g, Vector lexRules, String rname)
static void setBlock (AlternativeBlock b, AlternativeBlock src)

Protected Member Functions

void addElementToCurrentAlt (AlternativeElement e)

Protected Attributes

Stack blocks = new LList()
RuleRefElement lastRuleRef
RuleEndElement ruleEnd
RuleBlock ruleBlock
int nested = 0
boolean grammarError = false

Package Attributes

ExceptionSpec currentExceptionSpec = null

Constructor & Destructor Documentation

antlr.MakeGrammar.MakeGrammar ( Tool  tool_,
String[]  args_,
LLkAnalyzer  analyzer_ 
)

Member Function Documentation

void antlr.MakeGrammar.abortGrammar (  ) 

Abort the processing of a grammar (due to syntax errors)

Reimplemented from antlr.DefineGrammarSymbols.

References antlr.Tool.error(), antlr.Grammar.getClassName(), antlr.DefineGrammarSymbols.grammar, and antlr.DefineGrammarSymbols.tool.

Referenced by antlr.MakeGrammar.endGrammar().

void antlr.MakeGrammar.beginAlt ( boolean  doAutoGen_  ) 
void antlr.MakeGrammar.beginChildList (  ) 
void antlr.MakeGrammar.beginExceptionGroup (  ) 

Add an exception group to a rule (currently a no-op)

Reimplemented from antlr.DefineGrammarSymbols.

References antlr.MakeGrammar.context(), antlr.Tool.panic(), and antlr.DefineGrammarSymbols.tool.

void antlr.MakeGrammar.beginExceptionSpec ( Token  label  ) 

Add an exception spec to an exception group or rule block

Reimplemented from antlr.DefineGrammarSymbols.

References antlr.MakeGrammar.currentExceptionSpec, antlr.Token.getText(), and antlr.Token.setText().

void antlr.MakeGrammar.endExceptionGroup (  ) 

Reimplemented from antlr.DefineGrammarSymbols.

void antlr.MakeGrammar.endGrammar (  ) 

Called at the end of processing a grammar

Reimplemented from antlr.DefineGrammarSymbols.

References antlr.MakeGrammar.abortGrammar(), and antlr.MakeGrammar.grammarError.

void antlr.MakeGrammar.hasError (  ) 

Remember that a major error occured in the grammar

Reimplemented from antlr.DefineGrammarSymbols.

References antlr.MakeGrammar.grammarError.

void antlr.MakeGrammar.noAutoGenSubRule (  ) 
void antlr.MakeGrammar.refArgAction ( Token  action  ) 
void antlr.MakeGrammar.refExceptionHandler ( Token  exTypeAndName,
Token  action 
)
void antlr.MakeGrammar.refInitAction ( Token  action  ) 
void antlr.MakeGrammar.refMemberAction ( Token  act  ) 
void antlr.MakeGrammar.refPreambleAction ( Token  act  ) 

Reimplemented from antlr.DefineGrammarSymbols.

void antlr.MakeGrammar.refTreeSpecifier ( Token  treeSpec  ) 
void antlr.MakeGrammar.refWildcard ( Token  t,
Token  label,
int  autoGenType 
)
void antlr.MakeGrammar.setArgOfRuleRef ( Token  argAction  ) 
void antlr.MakeGrammar.setRuleOption ( Token  key,
Token  value 
)
void antlr.MakeGrammar.setSubruleOption ( Token  key,
Token  value 
)
void antlr.MakeGrammar.setUserExceptions ( String  thr  ) 

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties