Package antlr.preprocessor
Class Grammar
java.lang.Object
antlr.preprocessor.Grammar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Toolprotected Stringprotected Stringprotected Hierarchyprotected Stringprotected Stringprotected Stringprotected IndexedVectorprotected Stringprotected booleanprotected IndexedVectorprotected booleanprotected Stringif not derived from another grammar, might still specify a non-ANTLR class to derive from like this "class T extends Parser(MyParserClass);"protected Stringprotected Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidCopy all nonoverridden rules, vocabulary, and options into this grammar from supergrammar chain.getName()getRules()getType()voidvoidvoidbooleanvoidvoidsetHierarchy(Hierarchy hier) voidvoidsetOptions(IndexedVector options) voidvoidsetPredefined(boolean b) voidvoidtoString()
-
Field Details
-
name
-
fileName
-
superGrammar
-
type
-
rules
-
options
-
tokenSection
-
preambleAction
-
memberAction
-
hier
-
predefined
protected boolean predefined -
alreadyExpanded
protected boolean alreadyExpanded -
specifiedVocabulary
protected boolean specifiedVocabulary -
superClass
if not derived from another grammar, might still specify a non-ANTLR class to derive from like this "class T extends Parser(MyParserClass);" -
importVocab
-
exportVocab
-
antlrTool
-
-
Constructor Details
-
Grammar
-
-
Method Details
-
addOption
-
addRule
-
expandInPlace
public void expandInPlace()Copy all nonoverridden rules, vocabulary, and options into this grammar from supergrammar chain. The change is made in place; e.g., this grammar's vector of rules gets bigger. This has side-effects: all grammars on path to root of hierarchy are expanded also. -
getFileName
-
getName
-
getOptions
-
getRules
-
getSuperGrammar
-
getSuperGrammarName
-
getType
-
inherit
-
inherit
-
inherit
-
isPredefined
public boolean isPredefined() -
setFileName
-
setHierarchy
-
setMemberAction
-
setOptions
-
setPreambleAction
-
setPredefined
public void setPredefined(boolean b) -
setTokenSection
-
setType
-
toString
-