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 booleanexpandedprotected StringfileNameprotected IndexedVectorgrammarsprotected StringheaderActionprotected IndexedVectoroptionsprotected Tooltool
-
Constructor Summary
Constructors Constructor Description GrammarFile(Tool tool, String f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGrammar(Grammar g)voidaddHeaderAction(String a)voidgenerateExpandedFile()IndexedVectorgetGrammars()StringgetName()StringnameForExpandedGrammarFile(String f)voidsetExpanded(boolean exp)voidsetOptions(IndexedVector o)StringtoString()
-
-
-
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)
-
-