|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.Tool
public class Tool
The main ANTLR entry point. Read a grammar and generate a parser.
Field Summary | |
---|---|
protected boolean |
debug
|
protected boolean |
depend
|
protected boolean |
forceAllFilesToOutputDir
|
protected boolean |
generate_DFA_dot
|
protected boolean |
generate_NFA_dot
|
protected java.util.List |
grammarFileNames
|
static boolean |
internalOption_PrintDFA
|
static boolean |
internalOption_PrintGrammarTree
|
static boolean |
internalOption_ShowNFConfigsInDFA
|
static boolean |
internalOption_watchNFAConversion
|
protected java.lang.String |
libDirectory
|
protected java.lang.String |
outputDirectory
|
protected boolean |
printGrammar
|
protected boolean |
profile
|
protected boolean |
report
|
protected boolean |
trace
|
static java.lang.String |
UNINITIALIZED_DIR
|
static java.lang.String |
VERSION
|
Constructor Summary | |
---|---|
Tool()
|
|
Tool(java.lang.String[] args)
|
Method Summary | |
---|---|
protected void |
generateDFAs(Grammar g)
|
protected void |
generateNFAs(Grammar g)
|
static java.lang.String |
getCurrentTimeStamp()
Return a time stamp string accurate to sec: yyyy-mm-dd hh:mm:ss |
java.lang.String |
getFileDirectory(java.lang.String fileName)
Return the directory containing the grammar file for this grammar. |
Grammar |
getGrammar(java.lang.String grammarFileName)
|
java.lang.String |
getLibraryDirectory()
|
java.io.BufferedReader |
getLibraryFile(java.lang.String fileName)
Open a file in the -lib dir. |
java.io.File |
getOutputDirectory(java.lang.String fileNameWithPath)
|
java.io.Writer |
getOutputFile(Grammar g,
java.lang.String fileName)
This method is used by all code generators to create new output files. |
static void |
main(java.lang.String[] args)
|
void |
panic()
If the tool needs to panic/exit, how do we do that? |
void |
process()
|
void |
processArgs(java.lang.String[] args)
|
protected void |
processGrammar(Grammar grammar)
|
void |
setOutputDirectory(java.lang.String outputDirectory)
|
protected void |
writeDOTFile(Grammar g,
java.lang.String name,
java.lang.String dot)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
public static final java.lang.String UNINITIALIZED_DIR
protected java.util.List grammarFileNames
protected boolean generate_NFA_dot
protected boolean generate_DFA_dot
protected java.lang.String outputDirectory
protected java.lang.String libDirectory
protected boolean debug
protected boolean trace
protected boolean profile
protected boolean report
protected boolean printGrammar
protected boolean depend
protected boolean forceAllFilesToOutputDir
public static boolean internalOption_PrintGrammarTree
public static boolean internalOption_PrintDFA
public static boolean internalOption_ShowNFConfigsInDFA
public static boolean internalOption_watchNFAConversion
Constructor Detail |
---|
public Tool()
public Tool(java.lang.String[] args)
Method Detail |
---|
public static void main(java.lang.String[] args)
public void processArgs(java.lang.String[] args)
public void process()
public Grammar getGrammar(java.lang.String grammarFileName) throws java.io.IOException, antlr.TokenStreamException, antlr.RecognitionException
java.io.IOException
antlr.TokenStreamException
antlr.RecognitionException
protected void processGrammar(Grammar grammar)
protected void generateDFAs(Grammar g)
protected void generateNFAs(Grammar g)
protected void writeDOTFile(Grammar g, java.lang.String name, java.lang.String dot) throws java.io.IOException
java.io.IOException
public void setOutputDirectory(java.lang.String outputDirectory)
public java.io.Writer getOutputFile(Grammar g, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public java.io.File getOutputDirectory(java.lang.String fileNameWithPath)
public java.io.BufferedReader getLibraryFile(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public java.lang.String getLibraryDirectory()
public java.lang.String getFileDirectory(java.lang.String fileName)
public void panic()
public static java.lang.String getCurrentTimeStamp()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |