|
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
This class implements a Lexicon.
| Method Summary | |
Object |
interpret()
Interprets the standard input stream using this Lexicon. |
Object |
interpret(File source)
Interprets a source file using this Lexicon. |
Object |
interpret(InputStream source)
Interprets a source byte stream using this Lexicon. |
Object |
interpret(PipedWriter source)
Interprets a source pipe using this Lexicon. |
Object |
interpret(Reader source)
Interprets a source character stream using this Lexicon. |
Object |
interpret(String source)
Interprets a source string using this Lexicon. |
void |
interpret(String[] arguments)
Lexical analysis by command-line arguments using this Lexicon. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public Object interpret()
throws gi.Lexicon.Exception
Interprets the standard input stream using this Lexicon.
ParseTree constructed by interpreting the standard input stream.
Lexicon.Exception - if an I/O, lexical, syntax or semantic error occurs.
public Object interpret(File source)
throws FileNotFoundException,
gi.Lexicon.Exception
Interprets a source file using this Lexicon.
source - the source file.
ParseTree constructed by interpreting source.
FileNotFoundException - if the source file cannot be found.
Lexicon.Exception - if an I/O, lexical, syntax or semantic error occurs.
public Object interpret(InputStream source)
throws gi.Lexicon.Exception
Interprets a source byte stream using this Lexicon.
source - the source byte stream.
ParseTree constructed by interpreting source.
Lexicon.Exception - if an I/O, lexical, syntax or semantic error occurs.
public Object interpret(PipedWriter source)
throws IOException,
gi.Lexicon.Exception
Interprets a source pipe using this Lexicon.
source - the source pipe.
ParseTree constructed by interpreting source.
IOException - if the source pipe cannot be connected.
Lexicon.Exception - if an I/O, lexical, syntax or semantic error occurs.
public Object interpret(Reader source)
throws gi.Lexicon.Exception
Interprets a source character stream using this Lexicon.
source - the source character stream.
ParseTree constructed by interpreting source.
Lexicon.Exception - if an I/O, lexical, syntax or semantic error occurs.
public Object interpret(String source)
throws gi.Lexicon.Exception
Interprets a source string using this Lexicon.
source - the source string.
ParseTree constructed by interpreting source.
Lexicon.Exception - if an I/O, lexical, syntax or semantic error occurs.public void interpret(String[] arguments)
Lexical analysis by command-line arguments using this Lexicon. The first I/O or lexical error that occurs during lexical analysis is printed to the standard error stream.
arguments - 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
Lexiconbefore subsequent lexical analyses.-l,--lexical- Print terminals in this
Lexicongrabbed during subsequent lexical analyses.-v,--verbose- Print maximum debugging. Equivalent to
-tl.-- Lexically analyze the standard input stream using this
Lexicon.filename- Lexically analyze source file
filenameusing thisLexicon.filenamearguments are given, the standard input stream is lexically analyzed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||