|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.util.Tool
xtc.parser.Rats
public class Rats
The command line interface to Rats!, the packrat parser generator for Java.
| Field Summary |
|---|
| Fields inherited from class xtc.util.Tool |
|---|
runtime |
| Constructor Summary | |
|---|---|
Rats()
Create a new instance of Rats!. |
|
| Method Summary | |
|---|---|
String |
getCopy()
Get this tool's copyright. |
String |
getExplanation()
Get this tool's explanation. |
String |
getName()
Get this tool's name. |
void |
init()
Initialize this tool. |
static void |
main(String[] args)
Run the packrat parser generator with the specified arguments. |
Node |
parse(Reader in,
File file)
Parse the specified file. |
void |
prepare()
Prepare for processing. |
void |
process(Node node)
Process the specified AST node. |
| Methods inherited from class xtc.util.Tool |
|---|
diagnose, getVersion, locate, printHeader, process, run, wrapUp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Rats()
| Method Detail |
|---|
public String getName()
Tool
getName in class Toolpublic String getCopy()
ToolConstants.FULL_COPY.
getCopy in class Toolpublic String getExplanation()
Toolnull to indicate that there is no explanation.
getExplanation in class Toolpublic void init()
TooloptionSilent for silent
operation,optionVerbose for verbose
operation,optionNoExit for not exiting
the Java virtual machine,Runtime.INPUT_DIRECTORY
for the file search path,Runtime.OUTPUT_DIRECTORY for the
output directory,Runtime.INPUT_ENCODING for the
character encoding when reading files,Runtime.OUTPUT_ENCODING for the
character encoding when writing files,optionDiagnostics for printing
tool diagnostics,optionPerformance for
collecting performance statistics,optionMeasureParser for
measuring parser performance only.optionMeasureProcessing for
measuring processing performance only.optionGC for performing
GC,runsWarmUp with a default of 2
for the number of warm-up runs,runsTotal with a default
of 12 for the total number of runs.
init in class Toolpublic void prepare()
ToolRuntime.initDefaultValues(). It
also checks that the optionSilent and
optionVerbose flags are not both set at the same
time.
prepare in class ToolTool.wrapUp()
public Node parse(Reader in,
File file)
throws IOException,
ParseException
Tool
parse in class Toolin - The input stream for the file.file - The corresponding file.
null if no tree has been generated.
IOException - Signals an I/O error.
ParseException - Signals a parse error.public void process(Node node)
ToolTool.parse(Reader,File) has completed successfuly, has
returned a node (and not null), and no errors have
been reported through Runtime.error(), Runtime.error(String), or Runtime.error(String,Node)
while parsing. The default implementation of this method does
nothing.
process in class Toolnode - The node.public static void main(String[] args)
args - The command line arguments.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||