net.sf.parser4j.parser.entity.parsenode
Class AbstractNonTerminalParseNode
java.lang.Object
net.sf.parser4j.parser.entity.parsenode.AbstractParseNode
net.sf.parser4j.parser.entity.parsenode.AbstractNonTerminalParseNode
- All Implemented Interfaces:
- IParseNode
- Direct Known Subclasses:
- AlternativeParseNode, ConcatParseNode, EmptyParseNode
public abstract class AbstractNonTerminalParseNode
- extends AbstractParseNode
common to all non terminal parse node
- Author:
- luc peuvrier
Fields inherited from class net.sf.parser4j.parser.entity.parsenode.AbstractParseNode |
_log, beginColumnNumber, beginLineNumber, computeSyntaxNode, data, dataByAlternative, endColumnNumber, endLineNumber, fileName, grammarSymbolIdentifier, intermediate, matchIdentifier, parseSession, parsingToStringUtil, syntaxNode, whiteSpace |
Methods inherited from class net.sf.parser4j.parser.entity.parsenode.AbstractParseNode |
addErrorStatus, addErrorStatus, getBeginColumnNumber, getBeginLineNumber, getEndColumnNumber, getEndLineNumber, getErrorStatusList, getFileName, getGrammarSymbolIdentifier, getMyIdentifier, getName, getParseNodeType, getParseStackId, hasDataComputed, isInError, isIntermediate, isNonTerminal, isTerminal, isWhiteSpace, setData, setInTextInformation, setMatchIdentifier, setWhiteSpace, toString, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
sonParseNodes
protected IParseNode[] sonParseNodes
notWhiteIndexes
protected int[] notWhiteIndexes
AbstractNonTerminalParseNode
public AbstractNonTerminalParseNode(EnumNodeType parseNodeType,
IParseNode[] parseNodes,
int[] notWhiteIndexes,
int grammarSymbolIdentifier,
ParseSession parseSession,
int parseStackId,
ParsingToStringUtil parsingToStringUtil,
boolean intermediate,
boolean computeSyntaxNode)
- construct setting this parse node type and sons
- Parameters:
parseNodeType
- this parse node typeparseNodes
- this parse node sons parse nodenotWhiteIndexes
- grammarSymbolIdentifier
- parseSession
- parseStackId
-
getSonParseNodes
public IParseNode[] getSonParseNodes()
getNotWhiteIndexes
public int[] getNotWhiteIndexes()
getNumberOfAlternative
public int getNumberOfAlternative()
- Returns:
- number of alternative of this parse node
getAlternativeParseNodeArray
public IParseNode[] getAlternativeParseNodeArray()
unreferenceSon
public void unreferenceSon()
throws ParserException
- Description copied from interface:
IParseNode
- make this parse not no more reference its son
- Throws:
ParserException
assertSonReferenced
public void assertSonReferenced()
throws ParserException
- Throws:
ParserException
setData
public void setData()
throws ParserException
- Throws:
ParserException
setAlternativeParseNode
public boolean setAlternativeParseNode(IParseNode alternativeParseNode,
int maxNumberOfAlternative)
throws ParserException,
TooMuchAlternativeParserException
- Description copied from interface:
IParseNode
- set alternative parse node, special case for terminal ( see
implementation )
- Returns:
- true if alternative added, false if not added when alternative
parse node is same instance than this
- Throws:
ParserException
TooMuchAlternativeParserException
getUniqData
public IParseNodeData getUniqData()
throws ParserException
- Returns:
- uniq data associated to this parse node
- Throws:
ParserException
getDataByAlternative
public IParseNodeData[] getDataByAlternative()
throws ParserException
- Returns:
- data associated to this parse node by alternative
- Throws:
ParserException
setSonParseNodes
protected void setSonParseNodes(IParseNode[] array)
getSyntaxNode
public SyntaxNode getSyntaxNode()
throws ParserException
- Throws:
ParserException
accept
public void accept(IParseNodeVisitor visitor)
throws ParserException
- Description copied from interface:
IParseNode
- to visit this parse node
- Parameters:
visitor
- the parse node visitor
- Throws:
ParserException
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractParseNode
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class AbstractParseNode
Copyright © 2008-2009 Luc Peuvrier. All Rights Reserved.