|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParserI
Generic parser interface.
This interface is used to implement any kind of parser which reads tokens
from an input source stream (implementing the LexerI
interface).
LexerI
,
ParseTreeI
,
SymbolTableI
,
ParserWithParseTreeI
,
ParserWithSymbolTableI
Field Summary | |
---|---|
static java.lang.String |
REV
Revision information. |
Method Summary | |
---|---|
void |
close()
Closes the input stream. |
boolean |
parse()
Parses the input stream, performing syntactical analysis on the stream of input tokens. |
void |
setInput(LexerI in)
Establishes the lexical analyzer (lexer) input stream from which to read tokens during parsing. |
void |
setSourceName(java.lang.String fname)
Establishes the input source filename. |
Field Detail |
---|
static final java.lang.String REV
Method Detail |
---|
void setInput(LexerI in)
in
- The lexer input stream from which to read tokens.void setSourceName(java.lang.String fname)
fname
- The source filename.void close()
It is typically not necessary to invoke this method since the input stream is usually closed automatically once parsing has completed, unless it is necessary to close the input stream deliberately or prematurely.
Note that this method does not throw any exceptions.
boolean parse() throws java.lang.Exception
java.lang.Exception
- Thrown if an I/O error or parsing error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |