public class NonterminalSymbol extends Symbol
Modifier and Type | Field and Description |
---|---|
java.lang.String |
symbolName |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Test nonterminals for equality.
|
java.lang.String |
getName()
The name of this symbol.
|
int |
hashCode()
Assure that equal nonterminals return the same hash code.
|
boolean |
matches(Symbol input)
Are these the same symbol?
|
boolean |
matches(Token input)
Does this symbol match the input token?
|
java.lang.String |
toString()
Pretty print a nonterminal.
|
addAttribute, addAttributes, getAttribute, getAttributes, getAttributesMap, getAttributeValue, hasAttribute
public java.lang.String getName()
public final boolean matches(Symbol input)
public final boolean matches(Token input)
No, it does not. No nonterminal ever matches an input token.
public boolean equals(java.lang.Object obj)
Two nonterminals are equal if they have the same name.
equals
in class java.lang.Object
obj
- An object.obj
is equal to this nonterminal.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object