Package antlr.preprocessor
Class GrammarFile
- java.lang.Object
-
- antlr.preprocessor.GrammarFile
-
public class GrammarFile extends Object
Stores header action, grammar preamble, file options, and list of grammars in the file
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
expanded
protected String
fileName
protected IndexedVector
grammars
protected String
headerAction
protected IndexedVector
options
protected Tool
tool
-
Constructor Summary
Constructors Constructor Description GrammarFile(Tool tool, String f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGrammar(Grammar g)
void
addHeaderAction(String a)
void
generateExpandedFile()
IndexedVector
getGrammars()
String
getName()
String
nameForExpandedGrammarFile(String f)
void
setExpanded(boolean exp)
void
setOptions(IndexedVector o)
String
toString()
-
-
-
Field Detail
-
fileName
protected String fileName
-
headerAction
protected String headerAction
-
options
protected IndexedVector options
-
grammars
protected IndexedVector grammars
-
expanded
protected boolean expanded
-
tool
protected Tool tool
-
-
Method Detail
-
addGrammar
public void addGrammar(Grammar g)
-
generateExpandedFile
public void generateExpandedFile() throws IOException
- Throws:
IOException
-
getGrammars
public IndexedVector getGrammars()
-
getName
public String getName()
-
setExpanded
public void setExpanded(boolean exp)
-
addHeaderAction
public void addHeaderAction(String a)
-
setOptions
public void setOptions(IndexedVector o)
-
-