|
Object-oriented Parser System v3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectUtils
Main
public class Main
command line for the parser generator (only the first letter of each option is significant). The options are to facilitate experiments with the algorithms; they must be used in proper order and they do not interlock on errors.
| -actions name | generate builder interface from a parser | ||||
| -build new name file [builder-class [scanner-class]] | use parser to build a new tree | ||||
| -Build new name file [builder-class [scanner-class]] | ... and show trace | ||||
| -check name | check grammar for unlimited recursion | ||||
| -Check name | ... and for LL(1) | ||||
| -dump name | dump a parser | ||||
| -Dump name | ... and include lookahead | ||||
| -epilog name | output epilog from a parser | ||||
| -follow name | show lookahead and follow sets for a parser | ||||
| -Functional | toggle the functional flag, which is off by default.
| ||||
| -generate [path]name.style | generate frontend with LL(1) parser, shorthand for -Input boot style.ser -lookahead boot -build name boot [path]name.style oops3.StyleBuilder -lookahead name -Check name -write name name.ser -prolog name -main name.ser Tree -scanner name -tree name Tree -epilog name | ||||
| -Generate [path]name.style | ... and do not store null for no input | ||||
| -input name file | input a serialized tree | ||||
| -Input name resource | ... from a resource, not a file | ||||
| -lookahead name | add lookahead to a parser | ||||
| -main resource [builder-class] | output compiler main program to load resource | ||||
| -Main resource [builder-class] | ... and do not store null for no input | ||||
| -observe new name file [observer-class scanner-class] | use parser to observe recognition | ||||
| -Observe new name file [observer-class scanner-class] | ... and show trace | ||||
| -prolog name | output prolog from a parser | ||||
| -Print name | print patterns and rules from a parser | ||||
| -recognize name file | use parser to recognize | ||||
| -Recognize name file | ... and show trace | ||||
| -scanner name | use JLex to generate a scanner from a parser | ||||
| -Scanner name | show input for JLex from a parser | ||||
| -tree name [builder-class] | generate tree factory source from a parser | ||||
| -write name file | write serialized form to file | ||||
|
if the | |||||
| -generate [path]name.style | generate frontend with functional LL(n) parser, shorthand for -Input boot style.ser -lookahead boot -build name boot [path]name.style oops3.StyleBuilder -prolog name -scanner name -write name -main name mopsTreeFactory -tree name mopsTreeFactory -epilog name | ||||
| -Generate [path]name.style | ... and do not store null for no input | ||||
| -main name [builder-class] | output main program | ||||
| -Main name [builder-class] | ... and do not store null for no input | ||||
-Scanner name
| output scanner based on regular expressions, see | scanner.
-scanner name
| ... and output token parsers
| -write name
| output functional LL(n) parser, see | mops.
|
| Field Summary | |
|---|---|
protected boolean |
functional
set to use functional parser. |
protected HashMap<String,Object> |
map
a bit of a hack: commands is used recursively. |
protected PrintWriter |
out
|
| Fields inherited from class Utils |
|---|
error |
| Fields inherited from interface Symbols |
|---|
badInput, endOfFile, firstSymbol, noInput |
| Constructor Summary | |
|---|---|
Main()
|
|
| Method Summary | |
|---|---|
void |
commands(String... args)
run commands as described above. |
protected boolean |
isTrue(String who,
boolean bool)
mark unexpected false as an error. |
static void |
main(String... args)
run a command line, exit code 1 if there was an error or exception. |
protected Object |
notNull(String who,
Object pointer)
mark unexpected null pointer as an error. |
| Methods inherited from class Utils |
|---|
className, error, error, fromString, getError, message, testScanner, toChars, toString, toString, warning, warning |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HashMap<String,Object> map
commands is used recursively.
protected PrintWriter out
protected boolean functional
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
public void commands(String... args)
throws Exception
Exception
protected Object notNull(String who,
Object pointer)
error.
protected boolean isTrue(String who,
boolean bool)
error.
public static void main(String... args)
|
(c) 2008 Axel T. Schreiner |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||