| |
|
| java.lang.Object org.antlr.Tool
Tool | public class Tool (Code) | | The main ANTLR entry point. Read a grammar and generate a parser.
|
UNINITIALIZED_DIR | final public static String UNINITIALIZED_DIR(Code) | | |
debug | protected boolean debug(Code) | | |
depend | protected boolean depend(Code) | | |
forceAllFilesToOutputDir | protected boolean forceAllFilesToOutputDir(Code) | | |
generate_DFA_dot | protected boolean generate_DFA_dot(Code) | | |
generate_NFA_dot | protected boolean generate_NFA_dot(Code) | | |
grammarFileNames | protected List grammarFileNames(Code) | | |
internalOption_PrintDFA | public static boolean internalOption_PrintDFA(Code) | | |
internalOption_PrintGrammarTree | public static boolean internalOption_PrintGrammarTree(Code) | | |
internalOption_ShowNFConfigsInDFA | public static boolean internalOption_ShowNFConfigsInDFA(Code) | | |
internalOption_watchNFAConversion | public static boolean internalOption_watchNFAConversion(Code) | | |
printGrammar | protected boolean printGrammar(Code) | | |
profile | protected boolean profile(Code) | | |
report | protected boolean report(Code) | | |
trace | protected boolean trace(Code) | | |
getCurrentTimeStamp | public static String getCurrentTimeStamp()(Code) | | Return a time stamp string accurate to sec: yyyy-mm-dd hh:mm:ss
|
getFileDirectory | public String getFileDirectory(String fileName)(Code) | | Return the directory containing the grammar file for this grammar.
normally this is a relative path from current directory. People will
often do "java org.antlr.Tool grammars/*.g3" So the file will be
"grammars/foo.g3" etc... This method returns "grammars".
|
getLibraryDirectory | public String getLibraryDirectory()(Code) | | |
getOutputFile | public Writer getOutputFile(Grammar g, String fileName) throws IOException(Code) | | This method is used by all code generators to create new output
files. If the outputDir set by -o is not present it will be created.
The final filename is sensitive to the output directory and
the directory where the grammar file was found. If -o is /tmp
and the original grammar file was foo/t.g then output files
go in /tmp/foo.
The output dir -o spec takes precedence if it's absolute.
E.g., if the grammar file dir is absolute the output dir is given
precendence. "-o /tmp /usr/lib/t.g" results in "/tmp/T.java" as
output (assuming t.g holds T.java).
If no -o is specified, then just write to the directory where the
grammar file was found.
If outputDirectory==null then write a String.
|
panic | public void panic()(Code) | | If the tool needs to panic/exit, how do we do that?
|
process | public void process()(Code) | | |
processGrammar | protected void processGrammar(Grammar grammar)(Code) | | |
setOutputDirectory | public void setOutputDirectory(String outputDirectory)(Code) | | |
|
|
|