net.sf.parser4j.parser.entity.parsestate
Class ParseStack
java.lang.Object
net.sf.parser4j.parser.entity.parsestate.ParseStack
- All Implemented Interfaces:
- java.lang.Comparable<ParseStack>
public class ParseStack
- extends java.lang.Object
- implements java.lang.Comparable<ParseStack>
parse stack
- Author:
- luc peuvrier
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ParseStack
public ParseStack()
ParseStack
public ParseStack(int stateNumber)
resetId
public static void resetId()
throws ParserException
- FOR TESTS ONLY
- Throws:
ParserException
getSize
public int getSize()
getStateNumberStack
public int[] getStateNumberStack()
getParseNodeStack
public IParseNode[] getParseNodeStack()
getId
public int getId()
- Returns:
- id number of this parse stack
getStateNumber
public int getStateNumber()
shift
public void shift(IParseNode parseNode,
int toState,
boolean forReduce)
reduce
public void reduce(int matchedLength)
getMatchedParseNode
public IParseNode[] getMatchedParseNode(int matchedLength)
getNotWhiteIndexes
public int[] getNotWhiteIndexes()
getParseNode
public IParseNode[] getParseNode()
getParseNodeList
public java.util.List<IParseNode> getParseNodeList()
copy
public ParseStack copy()
setMatchAll
public void setMatchAll(IParseNode matchAllParseNode)
- set this stack match all the input
- Parameters:
matchAllParseNode
- match all parse node
isMatchAll
public boolean isMatchAll()
- Returns:
- true if all the input matched
getMatchAllParseNode
public IParseNode getMatchAllParseNode()
- Returns:
- match all parse node if
matchAll
is true, else null
resetParseNodeTreeDepth
public void resetParseNodeTreeDepth()
getParseNodeTreeDepth
public int getParseNodeTreeDepth()
compareTo
public int compareTo(ParseStack parseStack)
- Specified by:
compareTo
in interface java.lang.Comparable<ParseStack>
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
Copyright © 2008-2009 Luc Peuvrier. All Rights Reserved.