net.sf.parser4j.parser.entity
Class ParseResult

java.lang.Object
  extended by net.sf.parser4j.parser.entity.ParseResult

public class ParseResult
extends java.lang.Object

parse result

Author:
luc peuvrier

Constructor Summary
ParseResult(java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
          set error state at creation
 
Method Summary
 int getColumnNumber()
           
 IParseNodeData[] getDataByAlternative()
           
 java.util.List<IParseNodeInErrorStatus> getErrorStatusList()
           
 java.util.Set<java.lang.String> getExpectedNonTerminal()
           
 java.util.Set<TerminalCharRange> getExpectedTerminal()
           
 java.lang.String getFileName()
           
 int getLineNumber()
           
 java.util.Map<java.lang.Integer,NonTerminal> getNonTerminalByIdentifierMap()
           
 ParseStack[] getParseStacks()
           
 int getReduceErrorColumnNumber()
           
 int getReduceErrorLineNumber()
           
 IParseNode getResultParseNode()
           
 boolean[] getStringTokenRecognition()
           
 ParseStack[] getTokenParseStacks()
           
 boolean[] getTokenRecognition()
           
 IParseNodeData getUniqData()
           
 boolean isInError()
           
 boolean isParseError()
           
 boolean isPreserveParseNode()
           
 boolean isReduceError()
           
 void setInFileInformation(java.lang.String fileName, int lineNumber, int columnNumber)
          set line number and column number in input text file for syntax error
 void setlastTerminalValueRead(int lastTerminalValueRead)
           
 void setParseError(boolean parseError)
          set syntax error state
 void setParseStacks(ParseStack[] parseStacks, ParseStack[] tokenParseStacks, boolean[] tokenRecognition, boolean[] stringTokenRecognition)
           
 void setPreserveParseNode(boolean preserveParseNode)
           
 void setReduceErrorInfo(java.util.List<IParseNodeInErrorStatus> errorStatusList)
          set the reduce error informations
 void setResultParseNode(IParseNode resultParseNode)
          set the resulting parse tree root node
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParseResult

public ParseResult(java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
set error state at creation

Parameters:
nonTerminalByIdentifierMap -
Method Detail

setResultParseNode

public void setResultParseNode(IParseNode resultParseNode)
set the resulting parse tree root node

Parameters:
resultParseNode -

setlastTerminalValueRead

public void setlastTerminalValueRead(int lastTerminalValueRead)
Parameters:
lastTerminalValueRead - the last terminal value read to set

setInFileInformation

public void setInFileInformation(java.lang.String fileName,
                                 int lineNumber,
                                 int columnNumber)
set line number and column number in input text file for syntax error

Parameters:
fileName -
lineNumber - line in file where is syntax error
columnNumber - column in file where is syntax error
fileName - file name where is syntax error

setParseError

public void setParseError(boolean parseError)
set syntax error state

Parameters:
parseError - true if syntax parsing error

setReduceErrorInfo

public void setReduceErrorInfo(java.util.List<IParseNodeInErrorStatus> errorStatusList)
set the reduce error informations

Parameters:
errorStatusList - the error status for error cause of reduce error

isInError

public boolean isInError()
Returns:
true if error during parsing

getResultParseNode

public IParseNode getResultParseNode()
Returns:
the resulting parse tree root node if no syntax error

getUniqData

public IParseNodeData getUniqData()
                           throws ParserException
Throws:
ParserException

getDataByAlternative

public IParseNodeData[] getDataByAlternative()
                                      throws ParserException
Throws:
ParserException

isParseError

public boolean isParseError()
Returns:
true if syntax parsing error

isReduceError

public boolean isReduceError()
Returns:
true if reduce error while parsing

getFileName

public java.lang.String getFileName()
Returns:
file name where is syntax error

getColumnNumber

public int getColumnNumber()
Returns:
column number in input text file for syntax error

getLineNumber

public int getLineNumber()
Returns:
line number in input text file for syntax error

getExpectedNonTerminal

public java.util.Set<java.lang.String> getExpectedNonTerminal()
Returns:
expected non terminal not found in input text file for syntax error

getExpectedTerminal

public java.util.Set<TerminalCharRange> getExpectedTerminal()
Returns:
expected terminal not found in input text file for syntax error

getErrorStatusList

public java.util.List<IParseNodeInErrorStatus> getErrorStatusList()
Returns:
the error status list

getReduceErrorLineNumber

public int getReduceErrorLineNumber()
Returns:
line number in input text file for reduce error

getReduceErrorColumnNumber

public int getReduceErrorColumnNumber()
Returns:
column number in input text file for reduce error

setParseStacks

public void setParseStacks(ParseStack[] parseStacks,
                           ParseStack[] tokenParseStacks,
                           boolean[] tokenRecognition,
                           boolean[] stringTokenRecognition)

getParseStacks

public ParseStack[] getParseStacks()
Returns:
the parseStacks

getTokenParseStacks

public ParseStack[] getTokenParseStacks()
Returns:
the tokenParseStacks

getTokenRecognition

public boolean[] getTokenRecognition()
Returns:
the tokenRecognition

getStringTokenRecognition

public boolean[] getStringTokenRecognition()

getNonTerminalByIdentifierMap

public java.util.Map<java.lang.Integer,NonTerminal> getNonTerminalByIdentifierMap()

setPreserveParseNode

public void setPreserveParseNode(boolean preserveParseNode)

isPreserveParseNode

public boolean isPreserveParseNode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008-2009 Luc Peuvrier. All Rights Reserved.