antlr.preprocessor
class Grammar extends Object
Field Summary | |
---|---|
protected boolean | alreadyExpanded |
protected Tool | antlrTool |
protected String | exportVocab |
protected String | fileName |
protected Hierarchy | hier |
protected String | importVocab |
protected String | memberAction |
protected String | name |
protected IndexedVector | options |
protected String | preambleAction |
protected boolean | predefined |
protected IndexedVector | rules |
protected boolean | specifiedVocabulary |
protected String | superClass if not derived from another grammar, might still specify a non-ANTLR
class to derive from like this "class T extends Parser(MyParserClass);" |
protected String | superGrammar |
protected String | tokenSection |
protected String | type |
Constructor Summary | |
---|---|
Grammar(Tool tool, String name, String superGrammar, IndexedVector rules) |
Method Summary | |
---|---|
void | addOption(Option o) |
void | addRule(Rule r) |
void | expandInPlace() Copy all nonoverridden rules, vocabulary, and options into this grammar from
supergrammar chain. |
String | getFileName() |
String | getName() |
IndexedVector | getOptions() |
IndexedVector | getRules() |
Grammar | getSuperGrammar() |
String | getSuperGrammarName() |
String | getType() |
void | inherit(Option o, Grammar superG) |
void | inherit(Rule r, Grammar superG) |
void | inherit(String memberAction, Grammar superG) |
boolean | isPredefined() |
void | setFileName(String f) |
void | setHierarchy(Hierarchy hier) |
void | setMemberAction(String a) |
void | setOptions(IndexedVector options) |
void | setPreambleAction(String a) |
void | setPredefined(boolean b) |
void | setTokenSection(String tk) |
void | setType(String t) |
String | toString() |