address, float, integer, string, bool, or, not, oid, timediff
This commit is contained in:
parent
8ee01f03e1
commit
ee37f260a3
7 changed files with 3510 additions and 1206 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,129 +1,730 @@
|
|||
State 0:
|
||||
main ::= * expr
|
||||
string ::= * STRING_LITERAL
|
||||
id ::= * string
|
||||
main ::= * literal
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
id ::= * string_literal
|
||||
id ::= * ID
|
||||
eq ::= * id EQ literal
|
||||
and ::= * expr AND expr
|
||||
expr ::= * eq
|
||||
or ::= * expr OR expr
|
||||
not ::= * NOT expr
|
||||
eq ::= * id EQ literal
|
||||
neq ::= * id NEQ literal
|
||||
gt ::= * id GT literal
|
||||
gte ::= * id GTE literal
|
||||
lt ::= * id LT literal
|
||||
lte ::= * id LTE literal
|
||||
like ::= * id LIKE literal
|
||||
nlike ::= * id NLIKE literal
|
||||
expr ::= * and
|
||||
expr ::= * or
|
||||
expr ::= * not
|
||||
expr ::= * eq
|
||||
expr ::= * neq
|
||||
expr ::= * gt
|
||||
expr ::= * gte
|
||||
expr ::= * lt
|
||||
expr ::= * lte
|
||||
expr ::= * like
|
||||
expr ::= * nlike
|
||||
expr ::= * LCB expr RCB
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
STRING_LITERAL shift-reduce 3 string ::= STRING_LITERAL
|
||||
ID shift-reduce 5 id ::= ID
|
||||
NOT shift 2
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ID shift-reduce 11 id ::= ID
|
||||
LCB shift 1
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
main accept
|
||||
expr shift 6
|
||||
string shift-reduce 4 id ::= string
|
||||
id shift 11
|
||||
eq shift-reduce 8 expr ::= eq
|
||||
and shift-reduce 9 expr ::= and
|
||||
expr shift 24
|
||||
literal shift 26
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift 25
|
||||
id shift 22
|
||||
and shift-reduce 23 expr ::= and
|
||||
or shift-reduce 24 expr ::= or
|
||||
not shift-reduce 25 expr ::= not
|
||||
eq shift-reduce 26 expr ::= eq
|
||||
neq shift-reduce 27 expr ::= neq
|
||||
gt shift-reduce 28 expr ::= gt
|
||||
gte shift-reduce 29 expr ::= gte
|
||||
lt shift-reduce 30 expr ::= lt
|
||||
lte shift-reduce 31 expr ::= lte
|
||||
like shift-reduce 32 expr ::= like
|
||||
nlike shift-reduce 33 expr ::= nlike
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 1:
|
||||
string ::= * STRING_LITERAL
|
||||
id ::= * string
|
||||
string_literal ::= * STRING_LITERAL
|
||||
id ::= * string_literal
|
||||
id ::= * ID
|
||||
eq ::= * id EQ literal
|
||||
and ::= * expr AND expr
|
||||
expr ::= * eq
|
||||
or ::= * expr OR expr
|
||||
not ::= * NOT expr
|
||||
eq ::= * id EQ literal
|
||||
neq ::= * id NEQ literal
|
||||
gt ::= * id GT literal
|
||||
gte ::= * id GTE literal
|
||||
lt ::= * id LT literal
|
||||
lte ::= * id LTE literal
|
||||
like ::= * id LIKE literal
|
||||
nlike ::= * id NLIKE literal
|
||||
expr ::= * and
|
||||
expr ::= * or
|
||||
expr ::= * not
|
||||
expr ::= * eq
|
||||
expr ::= * neq
|
||||
expr ::= * gt
|
||||
expr ::= * gte
|
||||
expr ::= * lt
|
||||
expr ::= * lte
|
||||
expr ::= * like
|
||||
expr ::= * nlike
|
||||
expr ::= * LCB expr RCB
|
||||
expr ::= LCB * expr RCB
|
||||
|
||||
STRING_LITERAL shift-reduce 3 string ::= STRING_LITERAL
|
||||
ID shift-reduce 5 id ::= ID
|
||||
NOT shift 2
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ID shift-reduce 11 id ::= ID
|
||||
LCB shift 1
|
||||
expr shift 5
|
||||
string shift-reduce 4 id ::= string
|
||||
id shift 11
|
||||
eq shift-reduce 8 expr ::= eq
|
||||
and shift-reduce 9 expr ::= and
|
||||
expr shift 23
|
||||
string_literal shift-reduce 10 id ::= string_literal
|
||||
id shift 22
|
||||
and shift-reduce 23 expr ::= and
|
||||
or shift-reduce 24 expr ::= or
|
||||
not shift-reduce 25 expr ::= not
|
||||
eq shift-reduce 26 expr ::= eq
|
||||
neq shift-reduce 27 expr ::= neq
|
||||
gt shift-reduce 28 expr ::= gt
|
||||
gte shift-reduce 29 expr ::= gte
|
||||
lt shift-reduce 30 expr ::= lt
|
||||
lte shift-reduce 31 expr ::= lte
|
||||
like shift-reduce 32 expr ::= like
|
||||
nlike shift-reduce 33 expr ::= nlike
|
||||
|
||||
State 2:
|
||||
string ::= * STRING_LITERAL
|
||||
id ::= * string
|
||||
string_literal ::= * STRING_LITERAL
|
||||
id ::= * string_literal
|
||||
id ::= * ID
|
||||
eq ::= * id EQ literal
|
||||
and ::= * expr AND expr
|
||||
and ::= expr AND * expr
|
||||
expr ::= * eq
|
||||
or ::= * expr OR expr
|
||||
not ::= * NOT expr
|
||||
not ::= NOT * expr
|
||||
eq ::= * id EQ literal
|
||||
neq ::= * id NEQ literal
|
||||
gt ::= * id GT literal
|
||||
gte ::= * id GTE literal
|
||||
lt ::= * id LT literal
|
||||
lte ::= * id LTE literal
|
||||
like ::= * id LIKE literal
|
||||
nlike ::= * id NLIKE literal
|
||||
expr ::= * and
|
||||
expr ::= * or
|
||||
expr ::= * not
|
||||
expr ::= * eq
|
||||
expr ::= * neq
|
||||
expr ::= * gt
|
||||
expr ::= * gte
|
||||
expr ::= * lt
|
||||
expr ::= * lte
|
||||
expr ::= * like
|
||||
expr ::= * nlike
|
||||
expr ::= * LCB expr RCB
|
||||
|
||||
STRING_LITERAL shift-reduce 3 string ::= STRING_LITERAL
|
||||
ID shift-reduce 5 id ::= ID
|
||||
NOT shift 2
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ID shift-reduce 11 id ::= ID
|
||||
LCB shift 1
|
||||
expr shift-reduce 7 and ::= expr AND expr
|
||||
string shift-reduce 4 id ::= string
|
||||
id shift 11
|
||||
eq shift-reduce 8 expr ::= eq
|
||||
and shift-reduce 9 expr ::= and
|
||||
expr shift-reduce 14 not ::= NOT expr
|
||||
string_literal shift-reduce 10 id ::= string_literal
|
||||
id shift 22
|
||||
and shift-reduce 23 expr ::= and
|
||||
or shift-reduce 24 expr ::= or
|
||||
not shift-reduce 25 expr ::= not
|
||||
eq shift-reduce 26 expr ::= eq
|
||||
neq shift-reduce 27 expr ::= neq
|
||||
gt shift-reduce 28 expr ::= gt
|
||||
gte shift-reduce 29 expr ::= gte
|
||||
lt shift-reduce 30 expr ::= lt
|
||||
lte shift-reduce 31 expr ::= lte
|
||||
like shift-reduce 32 expr ::= like
|
||||
nlike shift-reduce 33 expr ::= nlike
|
||||
|
||||
State 3:
|
||||
integer ::= * INTEGER_LITERAL
|
||||
literal ::= * integer
|
||||
string_literal ::= * STRING_LITERAL
|
||||
id ::= * string_literal
|
||||
id ::= * ID
|
||||
and ::= * expr AND expr
|
||||
or ::= * expr OR expr
|
||||
or ::= expr OR * expr
|
||||
not ::= * NOT expr
|
||||
eq ::= * id EQ literal
|
||||
neq ::= * id NEQ literal
|
||||
gt ::= * id GT literal
|
||||
gte ::= * id GTE literal
|
||||
lt ::= * id LT literal
|
||||
lte ::= * id LTE literal
|
||||
like ::= * id LIKE literal
|
||||
nlike ::= * id NLIKE literal
|
||||
expr ::= * and
|
||||
expr ::= * or
|
||||
expr ::= * not
|
||||
expr ::= * eq
|
||||
expr ::= * neq
|
||||
expr ::= * gt
|
||||
expr ::= * gte
|
||||
expr ::= * lt
|
||||
expr ::= * lte
|
||||
expr ::= * like
|
||||
expr ::= * nlike
|
||||
expr ::= * LCB expr RCB
|
||||
|
||||
NOT shift 2
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ID shift-reduce 11 id ::= ID
|
||||
LCB shift 1
|
||||
expr shift 37
|
||||
string_literal shift-reduce 10 id ::= string_literal
|
||||
id shift 22
|
||||
and shift-reduce 23 expr ::= and
|
||||
or shift-reduce 24 expr ::= or
|
||||
not shift-reduce 25 expr ::= not
|
||||
eq shift-reduce 26 expr ::= eq
|
||||
neq shift-reduce 27 expr ::= neq
|
||||
gt shift-reduce 28 expr ::= gt
|
||||
gte shift-reduce 29 expr ::= gte
|
||||
lt shift-reduce 30 expr ::= lt
|
||||
lte shift-reduce 31 expr ::= lte
|
||||
like shift-reduce 32 expr ::= like
|
||||
nlike shift-reduce 33 expr ::= nlike
|
||||
|
||||
State 4:
|
||||
string_literal ::= * STRING_LITERAL
|
||||
id ::= * string_literal
|
||||
id ::= * ID
|
||||
and ::= * expr AND expr
|
||||
and ::= expr AND * expr
|
||||
or ::= * expr OR expr
|
||||
not ::= * NOT expr
|
||||
eq ::= * id EQ literal
|
||||
neq ::= * id NEQ literal
|
||||
gt ::= * id GT literal
|
||||
gte ::= * id GTE literal
|
||||
lt ::= * id LT literal
|
||||
lte ::= * id LTE literal
|
||||
like ::= * id LIKE literal
|
||||
nlike ::= * id NLIKE literal
|
||||
expr ::= * and
|
||||
expr ::= * or
|
||||
expr ::= * not
|
||||
expr ::= * eq
|
||||
expr ::= * neq
|
||||
expr ::= * gt
|
||||
expr ::= * gte
|
||||
expr ::= * lt
|
||||
expr ::= * lte
|
||||
expr ::= * like
|
||||
expr ::= * nlike
|
||||
expr ::= * LCB expr RCB
|
||||
|
||||
NOT shift 2
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ID shift-reduce 11 id ::= ID
|
||||
LCB shift 1
|
||||
expr shift-reduce 12 and ::= expr AND expr
|
||||
string_literal shift-reduce 10 id ::= string_literal
|
||||
id shift 22
|
||||
and shift-reduce 23 expr ::= and
|
||||
or shift-reduce 24 expr ::= or
|
||||
not shift-reduce 25 expr ::= not
|
||||
eq shift-reduce 26 expr ::= eq
|
||||
neq shift-reduce 27 expr ::= neq
|
||||
gt shift-reduce 28 expr ::= gt
|
||||
gte shift-reduce 29 expr ::= gte
|
||||
lt shift-reduce 30 expr ::= lt
|
||||
lte shift-reduce 31 expr ::= lte
|
||||
like shift-reduce 32 expr ::= like
|
||||
nlike shift-reduce 33 expr ::= nlike
|
||||
|
||||
State 5:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
nlike ::= id NLIKE * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 22 nlike ::= id NLIKE literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 6:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
like ::= id LIKE * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 21 like ::= id LIKE literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 7:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
lte ::= id LTE * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 20 lte ::= id LTE literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 8:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
lt ::= id LT * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 19 lt ::= id LT literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 9:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
gte ::= id GTE * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 18 gte ::= id GTE literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 10:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
gt ::= id GT * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 17 gt ::= id GT literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 11:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
neq ::= id NEQ * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 16 neq ::= id NEQ literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 12:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
literal ::= * integer_literal
|
||||
float_literal ::= * FLOAT_LITERAL
|
||||
literal ::= * float_literal
|
||||
bool_literal ::= * BOOL_LITERAL
|
||||
literal ::= * bool_literal
|
||||
string_literal ::= * STRING_LITERAL
|
||||
literal ::= * string_literal
|
||||
eq ::= id EQ * literal
|
||||
address_literal ::= * ADDRESS LSB address_literal_content_or_empty RSB
|
||||
literal ::= * address_literal
|
||||
oid_literal ::= * OID LSB oid_literal_content_or_empty RSB
|
||||
literal ::= * oid_literal
|
||||
time_diff_literal ::= * TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
literal ::= * time_diff_literal
|
||||
|
||||
INTEGER_LITERAL shift-reduce 1 integer ::= INTEGER_LITERAL
|
||||
ADDRESS shift 10
|
||||
integer shift-reduce 2 literal ::= integer
|
||||
literal shift-reduce 6 eq ::= id EQ literal
|
||||
address_literal shift-reduce 16 literal ::= address_literal
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
FLOAT_LITERAL shift-reduce 4 float_literal ::= FLOAT_LITERAL
|
||||
BOOL_LITERAL shift-reduce 6 bool_literal ::= BOOL_LITERAL
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ADDRESS shift 36
|
||||
OID shift 33
|
||||
TIMEDIFF shift 30
|
||||
literal shift-reduce 15 eq ::= id EQ literal
|
||||
integer_literal shift-reduce 3 literal ::= integer_literal
|
||||
float_literal shift-reduce 5 literal ::= float_literal
|
||||
bool_literal shift-reduce 7 literal ::= bool_literal
|
||||
string_literal shift-reduce 9 literal ::= string_literal
|
||||
address_literal shift-reduce 40 literal ::= address_literal
|
||||
oid_literal shift-reduce 46 literal ::= oid_literal
|
||||
time_diff_literal shift-reduce 48 literal ::= time_diff_literal
|
||||
|
||||
State 4:
|
||||
address_literal_content ::= * STRING_LITERAL
|
||||
address_literal_content ::= * address_literal_content COMMA STRING_LITERAL
|
||||
State 13:
|
||||
string_literal ::= * STRING_LITERAL
|
||||
id ::= * string_literal
|
||||
id ::= * ID
|
||||
oid_literal_content ::= * id
|
||||
oid_literal_content ::= * oid_literal_content DOT id
|
||||
oid_literal_content_or_empty ::= * oid_literal_content
|
||||
(44) oid_literal_content_or_empty ::= *
|
||||
oid_literal ::= OID LSB * oid_literal_content_or_empty RSB
|
||||
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ID shift-reduce 11 id ::= ID
|
||||
string_literal shift-reduce 10 id ::= string_literal
|
||||
id shift-reduce 41 oid_literal_content ::= id
|
||||
oid_literal_content shift 32
|
||||
oid_literal_content_or_empty shift 31
|
||||
{default} reduce 44 oid_literal_content_or_empty ::=
|
||||
|
||||
State 14:
|
||||
string_literal ::= * STRING_LITERAL
|
||||
address_literal_content ::= * string_literal
|
||||
address_literal_content ::= * address_literal_content COMMA string_literal
|
||||
address_literal_content_or_empty ::= * address_literal_content
|
||||
(14) address_literal_content_or_empty ::= *
|
||||
(38) address_literal_content_or_empty ::= *
|
||||
address_literal ::= ADDRESS LSB * address_literal_content_or_empty RSB
|
||||
|
||||
STRING_LITERAL shift-reduce 11 address_literal_content ::= STRING_LITERAL
|
||||
address_literal_content shift 9
|
||||
address_literal_content_or_empty shift 7
|
||||
{default} reduce 14 address_literal_content_or_empty ::=
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
string_literal shift-reduce 35 address_literal_content ::= string_literal
|
||||
address_literal_content shift 35
|
||||
address_literal_content_or_empty shift 34
|
||||
{default} reduce 38 address_literal_content_or_empty ::=
|
||||
|
||||
State 5:
|
||||
State 15:
|
||||
string_literal ::= * STRING_LITERAL
|
||||
id ::= * string_literal
|
||||
id ::= * ID
|
||||
oid_literal_content ::= oid_literal_content DOT * id
|
||||
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
ID shift-reduce 11 id ::= ID
|
||||
string_literal shift-reduce 10 id ::= string_literal
|
||||
id shift-reduce 42 oid_literal_content ::= oid_literal_content DOT id
|
||||
|
||||
State 16:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
time_diff_literal ::= TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal * integer_literal RSB
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
integer_literal shift 27
|
||||
|
||||
State 17:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
time_diff_literal ::= TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON * integer_literal integer_literal RSB
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
integer_literal shift 16
|
||||
|
||||
State 18:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
time_diff_literal ::= TIMEDIFF LSB integer_literal integer_literal COLON * integer_literal COLON integer_literal integer_literal RSB
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
integer_literal shift 28
|
||||
|
||||
State 19:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
time_diff_literal ::= TIMEDIFF LSB integer_literal * integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
integer_literal shift 29
|
||||
|
||||
State 20:
|
||||
integer_literal ::= * INTEGER_LITERAL
|
||||
time_diff_literal ::= TIMEDIFF LSB * integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
|
||||
INTEGER_LITERAL shift-reduce 2 integer_literal ::= INTEGER_LITERAL
|
||||
integer_literal shift 19
|
||||
|
||||
State 21:
|
||||
string_literal ::= * STRING_LITERAL
|
||||
address_literal_content ::= address_literal_content COMMA * string_literal
|
||||
|
||||
STRING_LITERAL shift-reduce 8 string_literal ::= STRING_LITERAL
|
||||
string_literal shift-reduce 36 address_literal_content ::= address_literal_content COMMA string_literal
|
||||
|
||||
State 22:
|
||||
eq ::= id * EQ literal
|
||||
neq ::= id * NEQ literal
|
||||
gt ::= id * GT literal
|
||||
gte ::= id * GTE literal
|
||||
lt ::= id * LT literal
|
||||
lte ::= id * LTE literal
|
||||
like ::= id * LIKE literal
|
||||
nlike ::= id * NLIKE literal
|
||||
|
||||
EQ shift 12
|
||||
NEQ shift 11
|
||||
GT shift 10
|
||||
GTE shift 9
|
||||
LT shift 8
|
||||
LTE shift 7
|
||||
LIKE shift 6
|
||||
NLIKE shift 5
|
||||
|
||||
State 23:
|
||||
and ::= expr * AND expr
|
||||
or ::= expr * OR expr
|
||||
expr ::= LCB expr * RCB
|
||||
|
||||
AND shift 2
|
||||
RCB shift-reduce 10 expr ::= LCB expr RCB
|
||||
OR shift 3
|
||||
AND shift 4
|
||||
RCB shift-reduce 34 expr ::= LCB expr RCB
|
||||
|
||||
State 6:
|
||||
State 24:
|
||||
(0) main ::= expr *
|
||||
and ::= expr * AND expr
|
||||
or ::= expr * OR expr
|
||||
|
||||
$ reduce 0 main ::= expr
|
||||
AND shift 2
|
||||
OR shift 3
|
||||
AND shift 4
|
||||
|
||||
State 7:
|
||||
State 25:
|
||||
(9) literal ::= string_literal *
|
||||
(10) id ::= string_literal *
|
||||
|
||||
$ reduce 9 literal ::= string_literal
|
||||
{default} reduce 10 id ::= string_literal
|
||||
|
||||
State 26:
|
||||
(1) main ::= literal *
|
||||
|
||||
$ reduce 1 main ::= literal
|
||||
|
||||
State 27:
|
||||
time_diff_literal ::= TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal * RSB
|
||||
|
||||
RSB shift-reduce 47 time_diff_literal ::= TIMEDIFF LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
|
||||
State 28:
|
||||
time_diff_literal ::= TIMEDIFF LSB integer_literal integer_literal COLON integer_literal * COLON integer_literal integer_literal RSB
|
||||
|
||||
COLON shift 17
|
||||
|
||||
State 29:
|
||||
time_diff_literal ::= TIMEDIFF LSB integer_literal integer_literal * COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
|
||||
COLON shift 18
|
||||
|
||||
State 30:
|
||||
time_diff_literal ::= TIMEDIFF * LSB integer_literal integer_literal COLON integer_literal COLON integer_literal integer_literal RSB
|
||||
|
||||
LSB shift 20
|
||||
|
||||
State 31:
|
||||
oid_literal ::= OID LSB oid_literal_content_or_empty * RSB
|
||||
|
||||
RSB shift-reduce 45 oid_literal ::= OID LSB oid_literal_content_or_empty RSB
|
||||
|
||||
State 32:
|
||||
oid_literal_content ::= oid_literal_content * DOT id
|
||||
(43) oid_literal_content_or_empty ::= oid_literal_content *
|
||||
|
||||
DOT shift 15
|
||||
{default} reduce 43 oid_literal_content_or_empty ::= oid_literal_content
|
||||
|
||||
State 33:
|
||||
oid_literal ::= OID * LSB oid_literal_content_or_empty RSB
|
||||
|
||||
LSB shift 13
|
||||
|
||||
State 34:
|
||||
address_literal ::= ADDRESS LSB address_literal_content_or_empty * RSB
|
||||
|
||||
RSB shift-reduce 15 address_literal ::= ADDRESS LSB address_literal_content_or_empty RSB
|
||||
RSB shift-reduce 39 address_literal ::= ADDRESS LSB address_literal_content_or_empty RSB
|
||||
|
||||
State 8:
|
||||
address_literal_content ::= address_literal_content COMMA * STRING_LITERAL
|
||||
State 35:
|
||||
address_literal_content ::= address_literal_content * COMMA string_literal
|
||||
(37) address_literal_content_or_empty ::= address_literal_content *
|
||||
|
||||
STRING_LITERAL shift-reduce 12 address_literal_content ::= address_literal_content COMMA STRING_LITERAL
|
||||
COMMA shift 21
|
||||
{default} reduce 37 address_literal_content_or_empty ::= address_literal_content
|
||||
|
||||
State 9:
|
||||
address_literal_content ::= address_literal_content * COMMA STRING_LITERAL
|
||||
(13) address_literal_content_or_empty ::= address_literal_content *
|
||||
|
||||
COMMA shift 8
|
||||
{default} reduce 13 address_literal_content_or_empty ::= address_literal_content
|
||||
|
||||
State 10:
|
||||
State 36:
|
||||
address_literal ::= ADDRESS * LSB address_literal_content_or_empty RSB
|
||||
|
||||
LSB shift 4
|
||||
LSB shift 14
|
||||
|
||||
State 11:
|
||||
eq ::= id * EQ literal
|
||||
State 37:
|
||||
and ::= expr * AND expr
|
||||
or ::= expr * OR expr
|
||||
(13) or ::= expr OR expr *
|
||||
|
||||
EQ shift 3
|
||||
AND shift 4
|
||||
{default} reduce 13 or ::= expr OR expr
|
||||
|
||||
----------------------------------------------------
|
||||
Symbols:
|
||||
|
@ -132,24 +733,52 @@ Symbols:
|
|||
2: AND
|
||||
3: NOT
|
||||
4: INTEGER_LITERAL
|
||||
5: STRING_LITERAL
|
||||
6: ID
|
||||
7: EQ
|
||||
8: LCB
|
||||
9: RCB
|
||||
10: COMMA
|
||||
11: ADDRESS
|
||||
12: LSB
|
||||
13: RSB
|
||||
14: error:
|
||||
15: main: STRING_LITERAL ID LCB
|
||||
16: expr: STRING_LITERAL ID LCB
|
||||
17: integer: INTEGER_LITERAL
|
||||
18: literal: INTEGER_LITERAL ADDRESS
|
||||
19: string: STRING_LITERAL
|
||||
20: id: STRING_LITERAL ID
|
||||
21: eq: STRING_LITERAL ID
|
||||
22: and: STRING_LITERAL ID LCB
|
||||
23: address_literal_content: STRING_LITERAL
|
||||
24: address_literal_content_or_empty: <lambda> STRING_LITERAL
|
||||
25: address_literal: ADDRESS
|
||||
5: FLOAT_LITERAL
|
||||
6: BOOL_LITERAL
|
||||
7: STRING_LITERAL
|
||||
8: ID
|
||||
9: EQ
|
||||
10: NEQ
|
||||
11: GT
|
||||
12: GTE
|
||||
13: LT
|
||||
14: LTE
|
||||
15: LIKE
|
||||
16: NLIKE
|
||||
17: LCB
|
||||
18: RCB
|
||||
19: COMMA
|
||||
20: ADDRESS
|
||||
21: LSB
|
||||
22: RSB
|
||||
23: DOT
|
||||
24: OID
|
||||
25: TIMEDIFF
|
||||
26: COLON
|
||||
27: error:
|
||||
28: main: NOT INTEGER_LITERAL FLOAT_LITERAL BOOL_LITERAL STRING_LITERAL ID LCB ADDRESS OID TIMEDIFF
|
||||
29: expr: NOT STRING_LITERAL ID LCB
|
||||
30: literal: INTEGER_LITERAL FLOAT_LITERAL BOOL_LITERAL STRING_LITERAL ADDRESS OID TIMEDIFF
|
||||
31: integer_literal: INTEGER_LITERAL
|
||||
32: float_literal: FLOAT_LITERAL
|
||||
33: bool_literal: BOOL_LITERAL
|
||||
34: string_literal: STRING_LITERAL
|
||||
35: id: STRING_LITERAL ID
|
||||
36: and: NOT STRING_LITERAL ID LCB
|
||||
37: or: NOT STRING_LITERAL ID LCB
|
||||
38: not: NOT
|
||||
39: eq: STRING_LITERAL ID
|
||||
40: neq: STRING_LITERAL ID
|
||||
41: gt: STRING_LITERAL ID
|
||||
42: gte: STRING_LITERAL ID
|
||||
43: lt: STRING_LITERAL ID
|
||||
44: lte: STRING_LITERAL ID
|
||||
45: like: STRING_LITERAL ID
|
||||
46: nlike: STRING_LITERAL ID
|
||||
47: address_literal_content: STRING_LITERAL
|
||||
48: address_literal_content_or_empty: <lambda> STRING_LITERAL
|
||||
49: address_literal: ADDRESS
|
||||
50: oid_literal_content: STRING_LITERAL ID
|
||||
51: oid_literal_content_or_empty: <lambda> STRING_LITERAL ID
|
||||
52: oid_literal: OID
|
||||
53: time_diff_literal: TIMEDIFF
|
||||
|
|
|
@ -22,94 +22,16 @@ main ::= expr(A) . {
|
|||
_result.root_node = A
|
||||
}
|
||||
|
||||
integer(A) ::= INTEGER_LITERAL(B) . {
|
||||
A = new Node({
|
||||
type: "INTEGER_LITERAL",
|
||||
lexeme: B.lexeme,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
main ::= literal(A) . {
|
||||
_result.root_node = A
|
||||
}
|
||||
|
||||
literal(A) ::= integer(B) . {
|
||||
A = new Node({
|
||||
type: "literal",
|
||||
children: [B]
|
||||
})
|
||||
}
|
||||
|
||||
string(A) ::= STRING_LITERAL(B) . {
|
||||
A = new Node({
|
||||
type: "STRING_LITERAL",
|
||||
lexeme: B.lexeme,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
}
|
||||
|
||||
id(A) ::= string(B) . {
|
||||
A = new Node({
|
||||
type: "id",
|
||||
children: [B]
|
||||
});
|
||||
}
|
||||
|
||||
id(A) ::= ID(B) . {
|
||||
A = new Node({
|
||||
type: "ID",
|
||||
lexeme: B.lexeme,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
}
|
||||
|
||||
eq(A) ::= id(B) EQ(C) literal(D) . {
|
||||
A = new Node({
|
||||
type: "eq",
|
||||
integer_literal(A) ::= INTEGER_LITERAL(B) . {
|
||||
A = new tokens.integer_literal({
|
||||
children: [
|
||||
B,
|
||||
new Node({
|
||||
type: "EQ",
|
||||
lexeme: C.lexeme,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
D
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
and(A) ::= expr(B) AND expr(D) . {
|
||||
A = new Node({
|
||||
type: "and",
|
||||
children: [
|
||||
B,
|
||||
D
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
expr(A) ::= eq(B) . {
|
||||
A = new Node({
|
||||
type: "expr",
|
||||
children: [B]
|
||||
})
|
||||
}
|
||||
|
||||
expr(A) ::= and(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= LCB expr(C) RCB . {
|
||||
A = C;
|
||||
}
|
||||
|
||||
address_literal_content(A) ::= STRING_LITERAL(B) . {
|
||||
A = new Node({
|
||||
children: [
|
||||
new Node({
|
||||
type: "STRING_LITERAL",
|
||||
lexeme: B.lexeme,
|
||||
new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
|
@ -117,13 +39,292 @@ address_literal_content(A) ::= STRING_LITERAL(B) . {
|
|||
});
|
||||
}
|
||||
|
||||
address_literal_content(A) ::= address_literal_content(B) COMMA STRING_LITERAL(C) . {
|
||||
B.add(new Node({
|
||||
type: "STRING_LITERAL",
|
||||
lexeme: C.lexeme,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}));
|
||||
literal(A) ::= integer_literal(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
float_literal(A) ::= FLOAT_LITERAL(B) . {
|
||||
A = new tokens.float_literal({
|
||||
children: [
|
||||
new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
literal(A) ::= float_literal(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
bool_literal(A) ::= BOOL_LITERAL(B) . {
|
||||
A = new tokens.bool_literal({
|
||||
children: [
|
||||
new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
literal(A) ::= bool_literal(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
string_literal(A) ::= STRING_LITERAL(B) . {
|
||||
A = new tokens.string_literal({
|
||||
children: [
|
||||
new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
literal(A) ::= string_literal(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
id(A) ::= string_literal(B) . {
|
||||
A = new tokens.id({
|
||||
children: [B]
|
||||
});
|
||||
}
|
||||
|
||||
id(A) ::= ID(B) . {
|
||||
A = new tokens.id({
|
||||
children: [
|
||||
new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
and(A) ::= expr(B) AND(C) expr(D) . {
|
||||
A = new tokens.and({
|
||||
lexpr: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
rexpr: D
|
||||
})
|
||||
}
|
||||
|
||||
or(A) ::= expr(B) OR(C) expr(D) . {
|
||||
A = new tokens.or({
|
||||
lexpr: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
rexpr: D
|
||||
})
|
||||
}
|
||||
|
||||
not(A) ::= NOT(C) expr(D) . {
|
||||
A = new tokens.not({
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
rexpr: D
|
||||
})
|
||||
}
|
||||
|
||||
eq(A) ::= id(B) EQ(C) literal(D) . {
|
||||
A = new tokens.eq({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
neq(A) ::= id(B) NEQ(C) literal(D) . {
|
||||
A = new tokens.neq({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
gt(A) ::= id(B) GT(C) literal(D) . {
|
||||
A = new tokens.gt({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
gte(A) ::= id(B) GTE(C) literal(D) . {
|
||||
A = new tokens.gte({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
lt(A) ::= id(B) LT(C) literal(D) . {
|
||||
A = new tokens.lt({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
lte(A) ::= id(B) LTE(C) literal(D) . {
|
||||
A = new tokens.lte({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
like(A) ::= id(B) LIKE(C) literal(D) . {
|
||||
A = new tokens.like({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
nlike(A) ::= id(B) NLIKE(C) literal(D) . {
|
||||
A = new tokens.nlike({
|
||||
id: B,
|
||||
op: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
literal: D
|
||||
});
|
||||
}
|
||||
|
||||
expr(A) ::= and(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= or(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= not(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= eq(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= neq(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= gt(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= gte(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= lt(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= lte(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= like(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= nlike(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
expr(A) ::= LCB(B) expr(C) RCB(D) . {
|
||||
A = new tokens.sub_expr({
|
||||
LCB: new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
}),
|
||||
expr: C,
|
||||
RCB: new tokens.LEXEME({
|
||||
type: D.lexeme,
|
||||
value: D.value,
|
||||
start: D.start,
|
||||
end: D.end
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
address_literal_content(A) ::= string_literal(B) . {
|
||||
A = new tokens.address_literal_content({
|
||||
children: [B]
|
||||
});
|
||||
}
|
||||
|
||||
address_literal_content(A) ::= address_literal_content(B) COMMA string_literal(C) . {
|
||||
B.add(C);
|
||||
A = B;
|
||||
}
|
||||
|
||||
|
@ -132,21 +333,117 @@ address_literal_content_or_empty(A) ::= address_literal_content(B) . {
|
|||
}
|
||||
|
||||
address_literal_content_or_empty(A) ::= . {
|
||||
A = new Node({
|
||||
type: "address_literal_content"
|
||||
A = new tokens.address_literal_content({
|
||||
children: []
|
||||
});
|
||||
}
|
||||
|
||||
address_literal(A) ::= ADDRESS LSB address_literal_content_or_empty(C) RSB . {
|
||||
A = new Node({
|
||||
type: "address_literal",
|
||||
children: C.children
|
||||
address_literal(A) ::= ADDRESS(B) LSB(C) address_literal_content_or_empty(D) RSB(E) . {
|
||||
A = new tokens.address_literal({
|
||||
children: D.children,
|
||||
keyword: new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
}),
|
||||
LSB: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
RSB: new tokens.LEXEME({
|
||||
type: E.lexeme,
|
||||
value: E.value,
|
||||
start: E.start,
|
||||
end: E.end
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
literal(A) ::= address_literal(B) . {
|
||||
A = new Node({
|
||||
type: "literal",
|
||||
A = B;
|
||||
}
|
||||
|
||||
oid_literal_content(A) ::= id(B) . {
|
||||
A = new tokens.oid_literal_content({
|
||||
children: [B]
|
||||
});
|
||||
}
|
||||
|
||||
oid_literal_content(A) ::= oid_literal_content(B) DOT id(C) . {
|
||||
B.add(C);
|
||||
A = B;
|
||||
}
|
||||
|
||||
oid_literal_content_or_empty(A) ::= oid_literal_content(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
oid_literal_content_or_empty(A) ::= . {
|
||||
A = new tokens.oid_literal_content({
|
||||
children: []
|
||||
});
|
||||
}
|
||||
|
||||
oid_literal(A) ::= OID(B) LSB(C) oid_literal_content_or_empty(D) RSB(E) . {
|
||||
A = new tokens.oid_literal({
|
||||
children: D.children,
|
||||
keyword: new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
}),
|
||||
LSB: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
RSB: new tokens.LEXEME({
|
||||
type: E.lexeme,
|
||||
value: E.value,
|
||||
start: E.start,
|
||||
end: E.end
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
literal(A) ::= oid_literal(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
time_diff_literal(A) ::= TIMEDIFF(KWD) LSB(B) integer_literal(DAYS) integer_literal(HH) COLON integer_literal(MM) COLON integer_literal(SS) integer_literal(MS) RSB(C) . {
|
||||
A = new tokens.time_diff_literal({
|
||||
keyword: new tokens.LEXEME({
|
||||
type: KWD.lexeme,
|
||||
value: KWD.value,
|
||||
start: KWD.start,
|
||||
end: KWD.end
|
||||
}),
|
||||
LSB: new tokens.LEXEME({
|
||||
type: B.lexeme,
|
||||
value: B.value,
|
||||
start: B.start,
|
||||
end: B.end
|
||||
}),
|
||||
RSB: new tokens.LEXEME({
|
||||
type: C.lexeme,
|
||||
value: C.value,
|
||||
start: C.start,
|
||||
end: C.end
|
||||
}),
|
||||
days: DAYS,
|
||||
hours: HH,
|
||||
minutes: MM,
|
||||
seconds: SS,
|
||||
microseconds: MS,
|
||||
});
|
||||
}
|
||||
|
||||
literal(A) ::= time_diff_literal(B) . {
|
||||
A = B;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue