|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.hydromatic.clapham.parser.bnf.BnfParser
public class BnfParser
Parser for grammars in Backus-Naur Form (BNF) notation.
The supported grammar is Backus-Naur Form, extended with '*' (closure operator), '+' (mandatory repetition), but is not the grammar officially known as 'Extended Backus-Naur Form' (EBNF).
Field Summary | |
---|---|
Token |
jj_nt
Next token. |
Token |
token
Current token. |
BnfParserTokenManager |
token_source
Generated Token Manager. |
Fields inherited from interface net.hydromatic.clapham.parser.bnf.BnfParserConstants |
---|
ASTERISK, BAR, BRACKETED_IDENTIFIER, COLCOLEQ, DEFAULT, DIGIT, EOF, HOOK, IDENTIFIER, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, LETTER, LITERAL, LPAREN, MULTI_LINE_COMMENT, PLUS, QUOT, RPAREN, SINGLE_LINE_COMMENT, tokenImage |
Constructor Summary | |
---|---|
BnfParser(BnfParserTokenManager tm)
Constructor with generated Token Manager. |
|
BnfParser(java.io.InputStream stream)
Constructor with InputStream. |
|
BnfParser(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding |
|
BnfParser(java.io.Reader stream)
Constructor. |
Method Summary | ||
---|---|---|
void |
disable_tracing()
Disable tracing. |
|
void |
enable_tracing()
Enable tracing. |
|
EbnfNode |
Expression()
|
|
EbnfNode |
Factor()
|
|
EbnfNode |
Factor2()
|
|
EbnfNode |
Factor3()
|
|
ParseException |
generateParseException()
Generate ParseException. |
|
Token |
getNextToken()
Get the next Token. |
|
Token |
getToken(int index)
Get the specific Token. |
|
IdentifierNode |
Identifier()
|
|
LiteralNode |
Literal()
|
|
ProductionNode |
Production()
|
|
void |
ReInit(BnfParserTokenManager tm)
Reinitialise. |
|
void |
ReInit(java.io.InputStream stream)
Reinitialise. |
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise. |
|
void |
ReInit(java.io.Reader stream)
Reinitialise. |
|
java.util.List<ProductionNode> |
Syntax()
Syntactical Descriptions * |
|
EbnfNode |
Term()
|
|
static
|
toString(java.lang.StringBuilder buf,
java.lang.String start,
java.util.List<E> list,
java.lang.String end)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public BnfParserTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
---|
public BnfParser(java.io.InputStream stream)
public BnfParser(java.io.InputStream stream, java.lang.String encoding)
public BnfParser(java.io.Reader stream)
public BnfParser(BnfParserTokenManager tm)
Method Detail |
---|
public static <E extends EbnfNode> void toString(java.lang.StringBuilder buf, java.lang.String start, java.util.List<E> list, java.lang.String end)
public final java.util.List<ProductionNode> Syntax() throws ParseException
ParseException
public final ProductionNode Production() throws ParseException
ParseException
public final EbnfNode Expression() throws ParseException
ParseException
public final EbnfNode Term() throws ParseException
ParseException
public final EbnfNode Factor() throws ParseException
ParseException
public final EbnfNode Factor2() throws ParseException
ParseException
public final EbnfNode Factor3() throws ParseException
ParseException
public final IdentifierNode Identifier() throws ParseException
ParseException
public final LiteralNode Literal() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(BnfParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |