net.hydromatic.clapham.parser.wirth
Class WirthParser

java.lang.Object
  extended by 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
 

Field Summary
 Token jj_nt
           
 Token token
           
 WirthParserTokenManager token_source
           
 
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
 
Constructor Summary
WirthParser(InputStream stream)
           
WirthParser(InputStream stream, String encoding)
           
WirthParser(Reader stream)
           
WirthParser(WirthParserTokenManager tm)
           
 
Method Summary
 void disable_tracing()
           
 void enable_tracing()
           
 EbnfNode Expression()
           
 EbnfNode Factor()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 IdentifierNode Identifier()
           
 LiteralNode Literal()
           
 ProductionNode Production()
           
 void ReInit(InputStream stream)
           
 void ReInit(InputStream stream, String encoding)
           
 void ReInit(Reader stream)
           
 void ReInit(WirthParserTokenManager tm)
           
 List<ProductionNode> Syntax()
          Syntactical Descriptions *
 EbnfNode Term()
           
static
<E extends EbnfNode>
void
toString(StringBuilder buf, String start, List<E> list, String end)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public WirthParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt
Constructor Detail

WirthParser

public WirthParser(InputStream stream)

WirthParser

public WirthParser(InputStream stream,
                   String encoding)

WirthParser

public WirthParser(Reader stream)

WirthParser

public WirthParser(WirthParserTokenManager tm)
Method Detail

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()

SourceForge.net_Logo