Package antlr.preprocessor
Class Grammar
java.lang.Object
antlr.preprocessor.Grammar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected Tool
protected String
protected String
protected Hierarchy
protected String
protected String
protected String
protected IndexedVector
protected String
protected boolean
protected IndexedVector
protected boolean
protected String
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
protected String
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
Copy all nonoverridden rules, vocabulary, and options into this grammar from supergrammar chain.getName()
getRules()
getType()
void
void
void
boolean
void
void
setHierarchy
(Hierarchy hier) void
void
setOptions
(IndexedVector options) void
void
setPredefined
(boolean b) void
void
toString()
-
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
-