net.sf.parser4j.parser.service
Class Parser
java.lang.Object
net.sf.parser4j.parser.service.Parser
public class Parser
- extends java.lang.Object
The parser framework !
- Author:
- luc peuvrier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENDING_STATE_NUMBER
public static final int ENDING_STATE_NUMBER
- special ending state number: 0 by Start to -1 when match all input
- See Also:
- Constant Field Values
ENDING_STATE
public static final ToStateAndWhiteSpaceFlag ENDING_STATE
Parser
public Parser(ParserData parserData,
IParserListener listener)
throws ParserException
- Throws:
ParserException
Parser
public Parser(ParserData parserData,
boolean matchClassOptional,
IParserListener listener)
throws ParserException
- Throws:
ParserException
setMaxNumberOfAlternative
public void setMaxNumberOfAlternative(int maxNumberOfAlternative)
- Parameters:
maxNumberOfAlternative
- the maxNumberOfAlternative to set
setPreserveParseNode
public void setPreserveParseNode(boolean preserveParseNode)
setComputeSyntaxNode
public void setComputeSyntaxNode(boolean computeSyntaxNode)
isPreserveParseNode
public boolean isPreserveParseNode()
getParseSession
public ParseSession getParseSession()
- Returns:
- the parseSession
parse
public ParseResult parse(ParserFileReader parserFileReader,
boolean syntaxAcceptAmbiguity,
boolean lexAcceptAmbiguity)
throws ParserException,
HasAmbiguityParserException
- do parsing close reader after parsing
- Parameters:
parserFileReader
- reader of input to parsesyntaxAcceptAmbiguity
- true if accept ambiguity in syntax analysislexAcceptAmbiguity
- true if accept ambiguity in lexical analysis
- Returns:
- parsing result
- Throws:
ParserException
- for errors
HasAmbiguityParserException
- reject ambiguity
hasAlternativeForAmbiguity
public boolean hasAlternativeForAmbiguity()
Copyright © 2008-2009 Luc Peuvrier. All Rights Reserved.