|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.parser4j.parser.entity.parsestate.AbstractParseState
public abstract class AbstractParseState
Field Summary | |
---|---|
protected Logger |
_log
|
protected boolean |
acceptAmbiguity
true if accept ambiguity |
protected int |
maxNumberOfAlternative
|
protected ParseStackSet2 |
parseStackSet
set of parse stack of this parse state. use map to obtains existing equals element |
protected boolean[] |
stringTokenRecognition
for each state define if it is string token recognition |
protected boolean[] |
tokenRecognition
for each state define if it is token recognition |
Constructor Summary | |
---|---|
AbstractParseState(boolean acceptAmbiguity,
int maxNumberOfAlternative,
boolean[] tokenRecognition,
boolean[] stringTokenRecognition,
ParsingToStringUtil parsingToStringUtil)
|
|
AbstractParseState(ParsingToStringUtil parsingToStringUtil)
|
Method Summary | |
---|---|
boolean |
add(ParseStack parseStack)
|
void |
clear()
clear the parser stack set |
IParseNode |
getMatchParseNode()
|
java.util.List<IParseNode> |
getParseNodeList()
|
boolean |
hasAlternativeForAmbiguity()
|
boolean |
isEmpty()
|
java.util.Iterator<ParseStack> |
iterator()
|
boolean |
remove(ParseStack parseStack)
|
int |
size()
|
ParseStack[] |
toArray()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Logger _log
protected final boolean acceptAmbiguity
protected final ParseStackSet2 parseStackSet
protected final boolean[] tokenRecognition
protected final boolean[] stringTokenRecognition
protected int maxNumberOfAlternative
Constructor Detail |
---|
public AbstractParseState(boolean acceptAmbiguity, int maxNumberOfAlternative, boolean[] tokenRecognition, boolean[] stringTokenRecognition, ParsingToStringUtil parsingToStringUtil)
public AbstractParseState(ParsingToStringUtil parsingToStringUtil)
Method Detail |
---|
public boolean add(ParseStack parseStack) throws ParserException, HasAmbiguityParserException
add
in interface IParseState
ParserException
HasAmbiguityParserException
- reject ambiguitypublic void clear()
IParseState
clear
in interface IParseState
public boolean remove(ParseStack parseStack)
remove
in interface IParseState
public IParseNode getMatchParseNode()
public java.util.Iterator<ParseStack> iterator()
iterator
in interface java.lang.Iterable<ParseStack>
public boolean isEmpty()
isEmpty
in interface IParseState
public int size()
size
in interface IParseState
public ParseStack[] toArray()
toArray
in interface IParseState
public boolean hasAlternativeForAmbiguity()
public java.util.List<IParseNode> getParseNodeList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |