|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectGramaticas.Simbolo
public abstract class Simbolo
(Super)clase abstracta para la implementacion interna de simbolos en gramaticas, automatas, etc. Para simplificar, los simbolos estan constituidos por caracteres aislados.
| Field Summary | |
|---|---|
protected char |
id
Identificador del simbolo |
static int |
NOTERMINAL
|
static int |
OTHER
|
static int |
TERMINAL
|
| Constructor Summary | |
|---|---|
Simbolo()
|
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
Funcion de comparacion para ordenacion de dos simbolos. |
boolean |
equals(java.lang.Object s)
|
char |
get_id()
Devuelve el identificador del Simbolo |
int |
hashCode()
|
boolean |
isNoTerminal()
Comprueba si el simbolo actual es un no terminal (tipo No_erminal) |
static int |
isStrSimbolo(java.lang.String s)
Comprueba si un string es un simbolo y de que tipo |
boolean |
isTerminal()
Comprueba si el simbolo actual es un terminal (tipo Terminal) |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TERMINAL
public static final int NOTERMINAL
public static final int OTHER
protected char id
| Constructor Detail |
|---|
public Simbolo()
| Method Detail |
|---|
public char get_id()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object s)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - Simbolo a comparar
public static int isStrSimbolo(java.lang.String s)
s - String a comprobar
OTHER - NO es un simboloTERMINAL - es un simbolo terminalNOTERMINAL - es un simbolo no terminalpublic boolean isTerminal()
Terminal)
true/false segun sea o no un terminalpublic boolean isNoTerminal()
No_erminal)
true/false segun sea o no un no terminal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||