|
Generic Interpreter 1.2 Public API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgi.Lexicon
gi.Grammar
This class implements a Grammar.
| Method Summary | |
void |
interpret(String[] arguments)
Interprets by command-line arguments using this Grammar. |
| Methods inherited from class gi.Lexicon |
interpret, interpret, interpret, interpret, interpret, interpret |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void interpret(String[] arguments)
Interprets by command-line arguments using this Grammar. When interpreting, the parser used will be (in order):
The first I/O, lexical, syntax or semantic error that occurs when interpreting is printed to the standard error stream.
- The parser most recently constructed by preceding command-line arguments.
- The parser originally around this
Grammar.- An LR(1) parser.
interpret in class Lexiconarguments - the command-line arguments controlling the interpreter.
The following arguments may appear zero or more times, are processed in order, and have the following effects:If no
-t,--terminals- Print the set of terminals in this
Grammarbefore subsequent syntax analyses.-l,--lexical- Print terminals in this
Grammargrabbed during subsequent syntax analyses.-f,--firstfollow- Print first and follow sets precomputed during subsequent syntax analyses.
-s,--syntax- Print parsing decisions made during subsequent syntax analyses.
-c,--conflict- Print parsing conflicts encountered during subsequent syntax analyses.
-p,--parsetree,--tree- Print each
ParseTreeproduced by subsequent syntax analyses.-v,--verbose- Print maximum debugging. Equivalent to
-tlfscp.--ll1- Construct an
LL(1) parseraround thisGrammar.--lr0- Construct an
LR(0) parseraround thisGrammar.--slr1- Construct an
SLR(1) parseraround thisGrammar.--lr1- Construct an
LR(1) parseraround thisGrammar.-- Interpret the standard input stream using this
Grammar.filename- Interpret source file
filenameusing thisGrammar.filenamearguments are given, the standard input stream is interpreted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||