net.sf.parser4j.kernelgenerator.entity.grammarnode
Class AbstractGrammarNode
java.lang.Object
net.sf.parser4j.kernelgenerator.entity.grammarnode.AbstractGrammarNode
- All Implemented Interfaces:
- java.lang.Comparable<IGrammarNode>, IGrammarNode
- Direct Known Subclasses:
- AbstractNonTerminalNode, AbstractTerminalNode, GrammarNodeNull
public abstract class AbstractGrammarNode
- extends java.lang.Object
- implements IGrammarNode
- Author:
- luc peuvrier
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
nonTerminalName
protected java.lang.String nonTerminalName
- non terminal name
matchClassSimpleName
protected java.lang.String matchClassSimpleName
emptyNonTerminal
protected java.lang.Boolean emptyNonTerminal
AbstractGrammarNode
protected AbstractGrammarNode(EnumNodeType grammarNodeType)
getGrammarNodeType
public EnumNodeType getGrammarNodeType()
- Specified by:
getGrammarNodeType
in interface IGrammarNode
- Returns:
- grammar node type
setNonTerminalIdentifier
public void setNonTerminalIdentifier(int nonTerminalIdentifier,
boolean intermediate)
- Specified by:
setNonTerminalIdentifier
in interface IGrammarNode
- Parameters:
nonTerminalIdentifier
- non terminal identifier
setNonTerminalName
public void setNonTerminalName(java.lang.String nonTerminalName)
- Specified by:
setNonTerminalName
in interface IGrammarNode
- Parameters:
nonTerminalName
- non terminal name
getNonTerminalIdentifier
public int getNonTerminalIdentifier()
- Specified by:
getNonTerminalIdentifier
in interface IGrammarNode
- Returns:
- non terminal identifier
getNonTerminalName
public java.lang.String getNonTerminalName()
- Specified by:
getNonTerminalName
in interface IGrammarNode
- Returns:
- non terminal name
getMatchClassSimpleName
public java.lang.String getMatchClassSimpleName()
- Specified by:
getMatchClassSimpleName
in interface IGrammarNode
- Returns:
- match manager class simple name
setMatchClassSimpleName
public void setMatchClassSimpleName(java.lang.String matchClassSimpleName)
- Specified by:
setMatchClassSimpleName
in interface IGrammarNode
- Parameters:
matchClassSimpleName
- match manager class simple name
setToken
public void setToken(boolean token)
- Specified by:
setToken
in interface IGrammarNode
isToken
public boolean isToken()
- Specified by:
isToken
in interface IGrammarNode
- Returns:
- true if this grammar node define a token
isStringToken
public boolean isStringToken()
- Specified by:
isStringToken
in interface IGrammarNode
setStringToken
public void setStringToken(boolean stringToken)
- Specified by:
setStringToken
in interface IGrammarNode
isTerminal
public boolean isTerminal()
- Specified by:
isTerminal
in interface IGrammarNode
- Returns:
- true is this grammar node is a terminal
isNonTerminal
public boolean isNonTerminal()
- Specified by:
isNonTerminal
in interface IGrammarNode
isStringTerminal
public boolean isStringTerminal()
- Specified by:
isStringTerminal
in interface IGrammarNode
isEmptyType
public boolean isEmptyType()
- Specified by:
isEmptyType
in interface IGrammarNode
badRecognitionPointIndex
protected void badRecognitionPointIndex(int recognitionPointIndex)
- throws IllegalArgumentException because of bad recognition point index
value
- Parameters:
recognitionPointIndex
-
- Throws:
java.lang.IllegalArgumentException
- bad recognition point index value
isEmptyNonTerminal
public boolean isEmptyNonTerminal()
- Specified by:
isEmptyNonTerminal
in interface IGrammarNode
- Returns:
- true if non terminal can be an empty derivation
isIntermediate
public boolean isIntermediate()
- Specified by:
isIntermediate
in interface IGrammarNode
compareTo
public int compareTo(IGrammarNode grammarNode)
- Specified by:
compareTo
in interface java.lang.Comparable<IGrammarNode>
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
characterValueToString
protected java.lang.String characterValueToString(int value)
nonTerminalToString
protected java.lang.String nonTerminalToString()
matchClassToString
protected java.lang.String matchClassToString()
toString
public java.lang.String toString()
- Description copied from interface:
IGrammarNode
- Returns a string full representation of the object.
- Specified by:
toString
in interface IGrammarNode
- Overrides:
toString
in class java.lang.Object
Copyright © 2008-2009 Luc Peuvrier. All Rights Reserved.