net.hydromatic.clapham.parser.wirth
Class WirthParser
java.lang.Object
net.hydromatic.clapham.parser.wirth.WirthParser
- All Implemented Interfaces:
- WirthParserConstants
public class WirthParser
- extends Object
- implements WirthParserConstants
Parser for grammars in Wirth Syntax Notation.
Wirth Syntax
Notation (WSN) is an alternative to Backus-Naur Form.
- Author:
- Julian Hyde
-
-
Fields inherited from interface net.hydromatic.clapham.parser.wirth.WirthParserConstants |
BAR, DEFAULT, DIGIT, DOT, EOF, EQ, IDENTIFIER, LBRACE, LBRACKET, LETTER, LITERAL, LPAREN, QUOT, RBRACE, RBRACKET, RPAREN, tokenImage |
token_source
public WirthParserTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
WirthParser
public WirthParser(InputStream stream)
WirthParser
public WirthParser(InputStream stream,
String encoding)
WirthParser
public WirthParser(Reader stream)
WirthParser
public WirthParser(WirthParserTokenManager tm)
toString
public static <E extends EbnfNode> void toString(StringBuilder buf,
String start,
List<E> list,
String end)
Syntax
public final List<ProductionNode> Syntax()
throws ParseException
- Syntactical Descriptions *
- Throws:
ParseException
Production
public final ProductionNode Production()
throws ParseException
- Throws:
ParseException
Expression
public final EbnfNode Expression()
throws ParseException
- Throws:
ParseException
Term
public final EbnfNode Term()
throws ParseException
- Throws:
ParseException
Factor
public final EbnfNode Factor()
throws ParseException
- Throws:
ParseException
Identifier
public final IdentifierNode Identifier()
throws ParseException
- Throws:
ParseException
Literal
public final LiteralNode Literal()
throws ParseException
- Throws:
ParseException
ReInit
public void ReInit(InputStream stream)
ReInit
public void ReInit(InputStream stream,
String encoding)
ReInit
public void ReInit(Reader stream)
ReInit
public void ReInit(WirthParserTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()