net.sf.parser4j.kernelgenerator.entity.state
Class RecognitionPoint

java.lang.Object
  extended by net.sf.parser4j.kernelgenerator.entity.state.RecognitionPoint
All Implemented Interfaces:
java.lang.Comparable<RecognitionPoint>

public class RecognitionPoint
extends java.lang.Object
implements java.lang.Comparable<RecognitionPoint>

recognition point: point of recognition in IGrammarNode ( a basic rule )

Author:
luc peuvrier

Constructor Summary
RecognitionPoint(IGrammarNode grammarNode, int recognitionPointIndex, boolean token)
           
 
Method Summary
 int compareTo(RecognitionPoint recognitionPoint)
           
 ParserDataRecognitionPoint computeParserDataRecognitionPoint()
           
 boolean equals(java.lang.Object obj)
           
 java.util.List<OperandGrammarNode> expectedNonTerminal()
           
 IGrammarNode getGrammarNode()
           
 int getNodeType()
           
 int getNonTerminalIdentifier()
           
 java.lang.String getNonTerminalName()
           
 int getRecognitionPointIndex()
           
 int hashCode()
           
 boolean isIntermediate()
           
 boolean isStringTerminal()
           
 boolean isStringTokenGrammarNode()
           
 boolean isTerminal()
           
 boolean isToken()
           
 boolean isTokenGrammarNode()
           
 boolean match()
           
 RecognitionPoint nextRecognitionPoint()
           
 java.util.Iterator<TerminalCharRange> terminalValuesIterator()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecognitionPoint

public RecognitionPoint(IGrammarNode grammarNode,
                        int recognitionPointIndex,
                        boolean token)
Method Detail

getGrammarNode

public IGrammarNode getGrammarNode()

getRecognitionPointIndex

public int getRecognitionPointIndex()

isTerminal

public boolean isTerminal()
Returns:
true is this is for a terminal grammar node

isStringTerminal

public boolean isStringTerminal()
Returns:
true is this is for a string terminal grammar node

expectedNonTerminal

public java.util.List<OperandGrammarNode> expectedNonTerminal()
Returns:
list of expected grammar node for this recognition point index
Throws:
java.lang.IllegalArgumentException - bad recognition point index value

terminalValuesIterator

public java.util.Iterator<TerminalCharRange> terminalValuesIterator()
Returns:
iterator on terminal values

getNonTerminalIdentifier

public int getNonTerminalIdentifier()
Returns:
non terminal value

getNonTerminalName

public java.lang.String getNonTerminalName()
Returns:
non terminal name

getNodeType

public int getNodeType()

isToken

public boolean isToken()

isTokenGrammarNode

public boolean isTokenGrammarNode()

isStringTokenGrammarNode

public boolean isStringTokenGrammarNode()

match

public boolean match()
Returns:
true if match for this recognition point index value
Throws:
java.lang.IllegalArgumentException - bad recognition point index value

nextRecognitionPoint

public RecognitionPoint nextRecognitionPoint()

computeParserDataRecognitionPoint

public ParserDataRecognitionPoint computeParserDataRecognitionPoint()

isIntermediate

public boolean isIntermediate()

compareTo

public int compareTo(RecognitionPoint recognitionPoint)
Specified by:
compareTo in interface java.lang.Comparable<RecognitionPoint>

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

toString

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


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