|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.common.spec.grammar.Symbol
public class Symbol
Project: Caymman(DSC/UFCG) Description: This class represents a symbol formed
by (code + value + type), where type can be Symbol.TERMINAL,
Symbol.TERMINAL or Symbol.SEMANTIC_ACTION.
Field Summary | |
---|---|
static Symbol |
EMPTY
|
static Symbol |
EOF
|
static int |
NON_TERMINAL
|
static int |
SEMANTIC_ACTION
|
static int |
TERMINAL
|
Constructor Summary | |
---|---|
Symbol()
An empty constructor |
|
Symbol(int code,
java.lang.String value,
int type)
Constructor |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Returns true if the object obj is a Symbol and the code = obj.getCode(). |
int |
getCode()
Gets the code of the symbol |
java.lang.String |
getValue()
Gets the symbol |
boolean |
isNonTerminal()
Returns true if the symbol is a non terminal |
boolean |
isSemanticAction()
Returns true if the symbol is a semantic action |
boolean |
isTerminal()
Returns true if the symbol is a terminal |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TERMINAL
public static final int NON_TERMINAL
public static final int SEMANTIC_ACTION
public static final Symbol EMPTY
public static final Symbol EOF
Constructor Detail |
---|
public Symbol(int code, java.lang.String value, int type)
code
- The code of the symbolvalue
- The symbol identifiertype
- The code of the type of the symbolpublic Symbol()
Method Detail |
---|
public int getCode()
public java.lang.String getValue()
public boolean isTerminal()
public boolean isNonTerminal()
public boolean isSemanticAction()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to be compared.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |