|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectit.unimo.dbgroup.momis.odli3.Parser
| Field Summary | |
private Error |
_error
Error support object. |
private TypeContainer |
_typeContainer
stream to read from the ODL description. |
static short |
ALL
|
static short |
AMPER
|
static short |
AND
|
static short |
ANY
|
static short |
ARRAY
|
static short |
ATTRIBUTE
|
static short |
BAG
|
static short |
BOOLEAN
|
static short |
BOTTOM
|
static short |
BT
|
static short |
CANDIDATE_KEY
|
static short |
CASE
|
static short |
CHAR
|
static short |
CharacterLiteral
|
static short |
COLON
|
static short |
COMMA
|
static short |
CONST
|
static short |
CONTEXT
|
static short |
DATE
|
static short |
DEFAULT
|
static short |
DOT
|
static short |
DOUBLE
|
static short |
DOUBLE_COLON
|
static short |
DOUBLE_LEFT
|
static short |
DOUBLE_RIGHT
|
static short |
ENUM
|
static short |
EQUAL
|
private java.lang.String |
err
Stringa con il testo dell'errore (vuota quando non c'e' errore) |
static short |
EXCEPTION
|
static short |
EXISTS
|
static short |
EXTENT
|
static short |
EXTRULE
|
static short |
FALSE
|
static short |
FILE
|
static short |
FLOAT
|
static short |
FloatingPtLiteral
|
static short |
FOR
|
static short |
FORALL
|
static short |
FOREIGN_KEY
|
static short |
GREATEQUAL
|
static short |
HAT
|
static short |
Identifier
|
static short |
IN
|
static short |
INFINITE
|
static short |
INOUT
|
static short |
INT
|
static short |
INTEGER
|
static short |
IntegerLiteral
|
static short |
INTERFACE
|
static short |
INVERSE
|
static short |
KEY
|
static short |
KEYS
|
static short |
LEFT
|
static short |
LEPAR
|
static short |
LESSEQUAL
|
private long |
lineNo
Line parsed. |
static short |
LIST
|
static short |
LONG
|
static short |
LPAR
|
static short |
LRPAR
|
static short |
MAPPING
|
static short |
MINUS
|
static short |
MODULE
|
static short |
NFRELATIONAL
|
static short |
NT
|
static short |
OBJECT
|
static short |
OCTET
|
private Schema |
odli3Schema
The parser fills ODL data structure starting from this Schema instace. |
static short |
OF
|
static short |
ON
|
static short |
ONEWAY
|
static short |
ORDER_BY
|
static short |
OUT
|
static short |
PERCENT
|
static short |
PERSISTENT
|
static short |
PLUS
|
static short |
QUESTION
|
static short |
RAISES
|
static short |
RANGE
|
static short |
READONLY
|
static short |
REFERENCES
|
static short |
RELATIONAL
|
static short |
RELATIONSHIP
|
static short |
REPAR
|
static short |
RIGHT
|
static short |
RPAR
|
static short |
RRPAR
|
static short |
RT
|
static short |
RULE
|
static short |
SEMI
|
static short |
SEMISTRUCTURED
|
static short |
SEQUENCE
|
static short |
SET
|
static short |
SHORT
|
static short |
SLASH
|
static short |
SOURCE
|
private java.io.StreamTokenizer |
st
stream to read from the ODL description. |
(package private) int |
stateptr
|
(package private) int[] |
statestk
|
static short |
String
|
static short |
STRING
|
static short |
StringLiteral
|
static short |
STRUCT
|
static short |
SWITCH
|
static short |
SYN
|
static short |
THEN
|
static short |
TILDE
|
static short |
TIMES
|
static short |
TIMESTAMP
|
static short |
TRANSIENT
|
static short |
TRUE
|
static short |
TYPEDEF
|
static short |
UNION
|
static short |
UNSIGNED
|
(package private) int |
valptr
|
(package private) Parserval[] |
valstk
|
static short |
VERT
|
static short |
VIEW
|
static short |
VOID
|
(package private) int |
yychar
|
(package private) static short[] |
yycheck
|
(package private) boolean |
yydebug
|
(package private) static short[] |
yydefred
|
(package private) static short[] |
yydgoto
|
static short |
YYERRCODE
|
(package private) int |
yyerrflag
|
(package private) static short |
YYFINAL
|
(package private) static short[] |
yygindex
|
(package private) static short[] |
yylen
|
(package private) static short[] |
yylhs
|
(package private) Parserval |
yylval
|
(package private) static short |
YYMAXTOKEN
|
(package private) static java.lang.String[] |
yyname
|
(package private) int |
yynerrs
|
(package private) static short[] |
yyrindex
|
(package private) static java.lang.String[] |
yyrule
|
(package private) static short[] |
yysindex
|
(package private) static int |
YYSTACKSIZE
|
(package private) static short[] |
yytable
|
(package private) static int |
YYTABLESIZE
|
(package private) java.lang.String |
yytext
|
(package private) Parserval |
yyval
|
| Constructor Summary | |
Parser()
Constructor: Creates a parser. |
|
Parser(Schema s)
Constructor: Creates a parser ready do parse into the given schema. |
|
| Method Summary | |
(package private) void |
debug(java.lang.String msg)
|
(package private) void |
dump_stacks(int count)
|
private void |
flushTmpTypeContainerTo(TypeContainer t)
The temporary type container is usefull to collect all type definitios during parsing is flushed into a "stable" TypeContainer |
private Interface |
getInterface(java.util.Vector list)
Search for an interface in a source. |
Schema |
getSchema()
Restituisce la struttura entry point dal parser. |
private TypeContainer |
getTmpTypeContainer()
A temporary type container is usefull to collect all type definitios during parsing. |
(package private) boolean |
init_stacks()
|
static void |
main(java.lang.String[] args)
This method reads an ODLI3 description from the file with the name passed in the first argument. |
private void |
myDebug(java.lang.String s)
Routine per la stampa delle informazioni di debug |
boolean |
parse(java.io.StreamTokenizer st)
Parse a ODL schema contained in a stream. |
boolean |
parse(java.lang.String sodl)
Parse an ODLI3 description from a string. |
boolean |
parseFile(java.lang.String fileName)
Parse a ODL schema contained in a file. |
Schema |
parseNewSchema(java.lang.String sodl)
Parse an ODLI3 description from a string. |
void |
setErrorOutStream(java.io.PrintStream errorOutStream)
Changes the output stream where write error messages. |
(package private) void |
state_drop(int cnt)
|
(package private) int |
state_peek(int relative)
|
(package private) int |
state_pop()
|
(package private) void |
state_push(int state)
|
private static void |
uso(java.io.PrintStream out)
Prints Instructions about how to use this class from command line. |
(package private) void |
val_drop(int cnt)
|
(package private) void |
val_dump()
|
(package private) void |
val_init()
|
(package private) Parserval |
val_peek(int relative)
|
(package private) Parserval |
val_pop()
|
(package private) void |
val_push(Parserval val)
|
private void |
yyerror(java.lang.String s)
Routine di gestione errori statndard del parser |
private int |
yylex()
Routine di estrazione di un token da StreamTokenizer, l'input avviene da standard input |
(package private) void |
yylexdebug(int state,
int ch)
|
(package private) int |
yyparse()
|
private void |
yywarning(java.lang.String s)
Routine di gestione degli avvertimenti statndard |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
boolean yydebug
int yynerrs
int yyerrflag
int yychar
static final int YYSTACKSIZE
int[] statestk
int stateptr
java.lang.String yytext
Parserval yyval
Parserval yylval
Parserval[] valstk
int valptr
public static final short Identifier
public static final short String
public static final short IntegerLiteral
public static final short StringLiteral
public static final short CharacterLiteral
public static final short FloatingPtLiteral
public static final short AMPER
public static final short COLON
public static final short COMMA
public static final short DOT
public static final short DOUBLE_COLON
public static final short DOUBLE_LEFT
public static final short DOUBLE_RIGHT
public static final short EQUAL
public static final short GREATEQUAL
public static final short HAT
public static final short LEFT
public static final short LEPAR
public static final short LESSEQUAL
public static final short LPAR
public static final short LRPAR
public static final short MINUS
public static final short PERCENT
public static final short PLUS
public static final short QUESTION
public static final short REPAR
public static final short RIGHT
public static final short RPAR
public static final short RRPAR
public static final short SEMI
public static final short SLASH
public static final short TILDE
public static final short TIMES
public static final short VERT
public static final short ALL
public static final short AND
public static final short ANY
public static final short ARRAY
public static final short ATTRIBUTE
public static final short BAG
public static final short BOOLEAN
public static final short BOTTOM
public static final short BT
public static final short CANDIDATE_KEY
public static final short CASE
public static final short CHAR
public static final short CONST
public static final short CONTEXT
public static final short DEFAULT
public static final short DOUBLE
public static final short ENUM
public static final short EXCEPTION
public static final short EXISTS
public static final short EXTENT
public static final short EXTRULE
public static final short FALSE
public static final short FILE
public static final short FLOAT
public static final short FOR
public static final short FORALL
public static final short FOREIGN_KEY
public static final short IN
public static final short INFINITE
public static final short INOUT
public static final short INT
public static final short INTEGER
public static final short INTERFACE
public static final short INVERSE
public static final short KEY
public static final short KEYS
public static final short LIST
public static final short LONG
public static final short MAPPING
public static final short MODULE
public static final short NFRELATIONAL
public static final short NT
public static final short OBJECT
public static final short OCTET
public static final short OF
public static final short ON
public static final short ONEWAY
public static final short ORDER_BY
public static final short OUT
public static final short PERSISTENT
public static final short RAISES
public static final short RANGE
public static final short READONLY
public static final short REFERENCES
public static final short RELATIONAL
public static final short RELATIONSHIP
public static final short RT
public static final short RULE
public static final short SEMISTRUCTURED
public static final short SEQUENCE
public static final short SET
public static final short SHORT
public static final short SOURCE
public static final short STRING
public static final short STRUCT
public static final short SWITCH
public static final short SYN
public static final short THEN
public static final short TRANSIENT
public static final short TRUE
public static final short TYPEDEF
public static final short UNION
public static final short UNSIGNED
public static final short VIEW
public static final short VOID
public static final short DATE
public static final short TIMESTAMP
public static final short YYERRCODE
static final short[] yylhs
static final short[] yylen
static final short[] yydefred
static final short[] yydgoto
static final short[] yysindex
static final short[] yyrindex
static final short[] yygindex
static final int YYTABLESIZE
static final short[] yytable
static final short[] yycheck
static final short YYFINAL
static final short YYMAXTOKEN
static final java.lang.String[] yyname
static final java.lang.String[] yyrule
private TypeContainer _typeContainer
private java.io.StreamTokenizer st
private long lineNo
private Error _error
private java.lang.String err
private Schema odli3Schema
| Constructor Detail |
public Parser(Schema s)
public Parser()
| Method Detail |
void debug(java.lang.String msg)
void val_dump()
void state_push(int state)
int state_pop()
void state_drop(int cnt)
int state_peek(int relative)
boolean init_stacks()
void dump_stacks(int count)
void val_init()
void val_push(Parserval val)
Parserval val_pop()
void val_drop(int cnt)
Parserval val_peek(int relative)
public boolean parse(java.io.StreamTokenizer st)
throws OdlException
OdlExceptionpublic boolean parseFile(java.lang.String fileName)
fileName - the fileName of the ODL schema description.
public boolean parse(java.lang.String sodl)
sodl - the string containing the ODL schema description.
public Schema parseNewSchema(java.lang.String sodl)
sodl - the string containing the ODL schema description.
private static void uso(java.io.PrintStream out)
public static void main(java.lang.String[] args)
throws java.io.NotSerializableException
java.io.NotSerializableExceptionpublic Schema getSchema()
private int yylex()
Lavora - su Output, Input e streamTokenizer
see noneprivate void yyerror(java.lang.String s)
s - messaggio da visualizzareprivate void yywarning(java.lang.String s)
s - messaggio da visualizzareprivate void myDebug(java.lang.String s)
s - messaggio da visualizzareprivate Interface getInterface(java.util.Vector list)
list - Vettore di due stringhe contenente il
nome della sorgente e della classe
private TypeContainer getTmpTypeContainer()
private void flushTmpTypeContainerTo(TypeContainer t)
public void setErrorOutStream(java.io.PrintStream errorOutStream)
void yylexdebug(int state,
int ch)
int yyparse()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||