net.sf.parser4j.kernelgenerator.entity.grammarnode
Interface IGrammarNode

All Superinterfaces:
java.lang.Comparable<IGrammarNode>
All Known Implementing Classes:
AbstractGrammarNode, AbstractGrammarNodeConcat, AbstractMularyGrammarNode, AbstractNonTerminalNode, AbstractTerminalNode, GrammarNodeAlternative, GrammarNodeAlternativeSpringBean, GrammarNodeConcat, GrammarNodeConcatSpringBean, GrammarNodeEmpty, GrammarNodeEmptySpringBean, GrammarNodeNull, GrammarNodeString, GrammarNodeStringSpringBean, GrammarNodeTerminalChar, GrammarNodeTerminalCharRange, GrammarNodeTerminalCharRangeSpringBean, GrammarNodeTerminalCharSet, GrammarNodeTerminalCharSpringBean, GrammarNodeTerminalSetOfTerminal, GrammarNodeTerminalSetOfTerminalSpringBean

public interface IGrammarNode
extends java.lang.Comparable<IGrammarNode>

grammar node interface

Author:
luc peuvrier

Method Summary
 void accept(IGrammarNodeVisitor grammarNodeVisitor)
          visit by a visitor
 java.util.List<OperandGrammarNode> expectedNonTerminal(int recognitionPointIndex)
           
 EnumNodeType getGrammarNodeType()
           
 java.lang.String getMatchClassSimpleName()
           
 int getNonTerminalIdentifier()
           
 java.lang.String getNonTerminalName()
           
 int[] getRightPart()
           
 boolean isEmptyNonTerminal()
           
 boolean isEmptyType()
           
 boolean isIntermediate()
           
 boolean isNonTerminal()
           
 boolean isStringTerminal()
           
 boolean isStringToken()
           
 boolean isTerminal()
           
 boolean isToken()
           
 boolean match(int recognitionPointIndex)
           
 void setMatchClassSimpleName(java.lang.String matchClassSimpleName)
           
 void setNonTerminalIdentifier(int nonTerminalIdentifier, boolean intermediate)
           
 void setNonTerminalName(java.lang.String nonTerminalName)
           
 void setOperandList(java.util.List<OperandGrammarNode> operandList)
           
 void setStringToken(boolean stringToken)
           
 void setToken(boolean token)
           
 java.util.Iterator<TerminalCharRange> terminalValuesIterator()
           
 java.lang.String toDefinitionString()
           
 java.lang.String toString()
          Returns a string full representation of the object.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getNonTerminalIdentifier

int getNonTerminalIdentifier()
Returns:
non terminal identifier

getNonTerminalName

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

setNonTerminalIdentifier

void setNonTerminalIdentifier(int nonTerminalIdentifier,
                              boolean intermediate)
Parameters:
nonTerminalIdentifier - non terminal identifier
intermediate -

setNonTerminalName

void setNonTerminalName(java.lang.String nonTerminalName)
Parameters:
nonTerminalName - non terminal name

setOperandList

void setOperandList(java.util.List<OperandGrammarNode> operandList)

getGrammarNodeType

EnumNodeType getGrammarNodeType()
Returns:
grammar node type

isTerminal

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

isNonTerminal

boolean isNonTerminal()

isStringTerminal

boolean isStringTerminal()

isEmptyType

boolean isEmptyType()

setToken

void setToken(boolean token)

isToken

boolean isToken()
Returns:
true if this grammar node define a token

setStringToken

void setStringToken(boolean stringToken)

isStringToken

boolean isStringToken()

terminalValuesIterator

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

setMatchClassSimpleName

void setMatchClassSimpleName(java.lang.String matchClassSimpleName)
Parameters:
matchClassSimpleName - match manager class simple name

getMatchClassSimpleName

java.lang.String getMatchClassSimpleName()
Returns:
match manager class simple name

match

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

expectedNonTerminal

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

getRightPart

int[] getRightPart()
Returns:
right part of the rule represented by this grammar node

isEmptyNonTerminal

boolean isEmptyNonTerminal()
Returns:
true if non terminal can be an empty derivation

accept

void accept(IGrammarNodeVisitor grammarNodeVisitor)
            throws GrammarNodeVisitException
visit by a visitor

Parameters:
grammarNodeVisitor -
Throws:
GrammarNodeVisitException

toString

java.lang.String toString()
Returns a string full representation of the object.

Overrides:
toString in class java.lang.Object
Returns:

toDefinitionString

java.lang.String toDefinitionString()

isIntermediate

boolean isIntermediate()


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