forked from senarukana/sqlparser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sql1.out
5411 lines (3295 loc) · 126 KB
/
sql1.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
语法
0 $accept: sql_list $end
1 sql_list: sql ';'
2 | sql_list sql ';'
3 sql: schema
4 schema: CREATE SCHEMA AUTHORIZATION user opt_schema_element_list
5 opt_schema_element_list: /* 空 */
6 | schema_element_list
7 schema_element_list: schema_element
8 | schema_element_list schema_element
9 schema_element: base_table_def
10 | view_def
11 | privilege_def
12 base_table_def: CREATE TABLE table '(' base_table_element_commalist ')'
13 base_table_element_commalist: base_table_element
14 | base_table_element_commalist ',' base_table_element
15 base_table_element: column_def
16 | table_constraint_def
17 column_def: column data_type column_def_opt_list
18 column_def_opt_list: /* 空 */
19 | column_def_opt_list column_def_opt
20 column_def_opt: NOT NULLX
21 | NOT NULLX UNIQUE
22 | NOT NULLX PRIMARY KEY
23 | DEFAULT literal
24 | DEFAULT NULLX
25 | DEFAULT USER
26 | CHECK '(' search_condition ')'
27 | REFERENCES table
28 | REFERENCES table '(' column_commalist ')'
29 table_constraint_def: UNIQUE '(' column_commalist ')'
30 | PRIMARY KEY '(' column_commalist ')'
31 | FOREIGN KEY '(' column_commalist ')' REFERENCES table
32 | FOREIGN KEY '(' column_commalist ')' REFERENCES table '(' column_commalist ')'
33 | CHECK '(' search_condition ')'
34 column_commalist: column
35 | column_commalist ',' column
36 view_def: CREATE VIEW table opt_column_commalist AS query_spec opt_with_check_option
37 opt_with_check_option: /* 空 */
38 | WITH CHECK OPTION
39 opt_column_commalist: /* 空 */
40 | '(' column_commalist ')'
41 privilege_def: GRANT privileges ON table TO grantee_commalist opt_with_grant_option
42 opt_with_grant_option: /* 空 */
43 | WITH GRANT OPTION
44 privileges: ALL PRIVILEGES
45 | ALL
46 | operation_commalist
47 operation_commalist: operation
48 | operation_commalist ',' operation
49 operation: SELECT
50 | INSERT
51 | DELETE
52 | UPDATE opt_column_commalist
53 | REFERENCES opt_column_commalist
54 grantee_commalist: grantee
55 | grantee_commalist ',' grantee
56 grantee: PUBLIC
57 | user
58 sql: module_def
59 module_def: MODULE opt_module LANGUAGE lang AUTHORIZATION user opt_cursor_def_list procedure_def_list
60 opt_module: /* 空 */
61 | module
62 lang: COBOL
63 | FORTRAN
64 | PASCAL
65 | PLI
66 | C
67 | ADA
68 opt_cursor_def_list: /* 空 */
69 | cursor_def_list
70 cursor_def_list: cursor_def
71 | cursor_def_list cursor_def
72 cursor_def: DECLARE cursor CURSOR FOR query_exp opt_order_by_clause
73 opt_order_by_clause: /* 空 */
74 | ORDER BY ordering_spec_commalist
75 ordering_spec_commalist: ordering_spec
76 | ordering_spec_commalist ',' ordering_spec
77 ordering_spec: INTNUM opt_asc_desc
78 | column_ref opt_asc_desc
79 opt_asc_desc: /* 空 */
80 | ASC
81 | DESC
82 procedure_def_list: procedure_def
83 | procedure_def_list procedure_def
84 procedure_def: PROCEDURE procedure parameter_def_list ';' manipulative_statement_list
85 manipulative_statement_list: manipulative_statement
86 | manipulative_statement_list manipulative_statement
87 parameter_def_list: parameter_def
88 | parameter_def_list parameter_def
89 parameter_def: parameter data_type
90 | SQLCODE
91 sql: manipulative_statement
92 manipulative_statement: close_statement
93 | commit_statement
94 | delete_statement_positioned
95 | delete_statement_searched
96 | fetch_statement
97 | insert_statement
98 | open_statement
99 | rollback_statement
100 | select_statement
101 | update_statement_positioned
102 | update_statement_searched
103 close_statement: CLOSE cursor
104 commit_statement: COMMIT WORK
105 delete_statement_positioned: DELETE FROM table WHERE CURRENT OF cursor
106 delete_statement_searched: DELETE FROM table opt_where_clause
107 fetch_statement: FETCH cursor INTO target_commalist
108 insert_statement: INSERT INTO table opt_column_commalist values_or_query_spec
109 values_or_query_spec: VALUES '(' insert_atom_commalist ')'
110 | query_spec
111 insert_atom_commalist: insert_atom
112 | insert_atom_commalist ',' insert_atom
113 insert_atom: atom
114 | NULLX
115 open_statement: OPEN cursor
116 rollback_statement: ROLLBACK WORK
117 select_statement: SELECT opt_all_distinct selection INTO target_commalist table_exp
118 | SELECT opt_all_distinct selection table_exp
119 opt_all_distinct: /* 空 */
120 | ALL
121 | DISTINCT
122 update_statement_positioned: UPDATE table SET assignment_commalist WHERE CURRENT OF cursor
123 assignment_commalist: /* 空 */
124 | assignment
125 | assignment_commalist ',' assignment
126 assignment: column '=' scalar_exp
127 | column '=' NULLX
128 update_statement_searched: UPDATE table SET assignment_commalist opt_where_clause
129 target_commalist: target
130 | target_commalist ',' target
131 target: parameter_ref
132 opt_where_clause: /* 空 */
133 | where_clause
134 query_exp: query_term
135 | query_exp UNION query_term
136 | query_exp UNION ALL query_term
137 query_term: query_spec
138 | '(' query_exp ')'
139 query_spec: SELECT opt_all_distinct selection table_exp
140 selection: scalar_exp_commalist
141 | '*'
142 table_exp: from_clause opt_where_clause opt_group_by_clause opt_having_clause
143 from_clause: FROM table_ref_commalist
144 table_ref_commalist: table_ref
145 | table_ref_commalist ',' table_ref
146 table_ref: table
147 | table range_variable
148 where_clause: WHERE search_condition
149 opt_group_by_clause: /* 空 */
150 | GROUP BY column_ref_commalist
151 column_ref_commalist: column_ref
152 | column_ref_commalist ',' column_ref
153 opt_having_clause: /* 空 */
154 | HAVING search_condition
155 search_condition: /* 空 */
156 | search_condition OR search_condition
157 | search_condition AND search_condition
158 | NOT search_condition
159 | '(' search_condition ')'
160 | predicate
161 predicate: comparison_predicate
162 | between_predicate
163 | like_predicate
164 | test_for_null
165 | in_predicate
166 | all_or_any_predicate
167 | existence_test
168 comparison_predicate: scalar_exp COMPARISON scalar_exp
169 | scalar_exp COMPARISON subquery
170 between_predicate: scalar_exp NOT BETWEEN scalar_exp AND scalar_exp
171 | scalar_exp BETWEEN scalar_exp AND scalar_exp
172 like_predicate: scalar_exp NOT LIKE atom opt_escape
173 | scalar_exp LIKE atom opt_escape
174 opt_escape: /* 空 */
175 | ESCAPE atom
176 test_for_null: column_ref IS NOT NULLX
177 | column_ref IS NULLX
178 in_predicate: scalar_exp NOT IN '(' subquery ')'
179 | scalar_exp IN '(' subquery ')'
180 | scalar_exp NOT IN '(' atom_commalist ')'
181 | scalar_exp IN '(' atom_commalist ')'
182 atom_commalist: atom
183 | atom_commalist ',' atom
184 all_or_any_predicate: scalar_exp COMPARISON any_all_some subquery
185 any_all_some: ANY
186 | ALL
187 | SOME
188 existence_test: EXISTS subquery
189 subquery: '(' SELECT opt_all_distinct selection table_exp ')'
190 scalar_exp: scalar_exp '+' scalar_exp
191 | scalar_exp '-' scalar_exp
192 | scalar_exp '*' scalar_exp
193 | scalar_exp '/' scalar_exp
194 | '+' scalar_exp
195 | '-' scalar_exp
196 | atom
197 | column_ref
198 | function_ref
199 | '(' scalar_exp ')'
200 scalar_exp_commalist: scalar_exp
201 | scalar_exp_commalist ',' scalar_exp
202 atom: parameter_ref
203 | literal
204 | USER
205 parameter_ref: parameter
206 | parameter parameter
207 | parameter INDICATOR parameter
208 function_ref: AMMSC '(' '*' ')'
209 | AMMSC '(' DISTINCT column_ref ')'
210 | AMMSC '(' ALL scalar_exp ')'
211 | AMMSC '(' scalar_exp ')'
212 literal: STRING
213 | INTNUM
214 | APPROXNUM
215 table: NAME
216 | NAME '.' NAME
217 column_ref: NAME
218 | NAME '.' NAME
219 | NAME '.' NAME '.' NAME
220 data_type: CHARACTER
221 | CHARACTER '(' INTNUM ')'
222 | NUMERIC
223 | NUMERIC '(' INTNUM ')'
224 | NUMERIC '(' INTNUM ',' INTNUM ')'
225 | DECIMAL
226 | DECIMAL '(' INTNUM ')'
227 | DECIMAL '(' INTNUM ',' INTNUM ')'
228 | INTEGER
229 | SMALLINT
230 | FLOAT
231 | FLOAT '(' INTNUM ')'
232 | REAL
233 | DOUBLE PRECISION
234 column: NAME
235 cursor: NAME
236 module: NAME
237 parameter: ':' NAME
238 procedure: NAME
239 range_variable: NAME
240 user: NAME
241 sql: WHENEVER NOT FOUND when_action
242 | WHENEVER SQLERROR when_action
243 when_action: GOTO NAME
244 | CONTINUE
Terminals, with rules where they appear
$end (0) 0
'(' (40) 12 26 28 29 30 31 32 33 40 109 138 159 178 179 180 181 189
199 208 209 210 211 221 223 224 226 227 231
')' (41) 12 26 28 29 30 31 32 33 40 109 138 159 178 179 180 181 189
199 208 209 210 211 221 223 224 226 227 231
'*' (42) 141 192 208
'+' (43) 190 194
',' (44) 14 35 48 55 76 112 125 130 145 152 183 201 224 227
'-' (45) 191 195
'.' (46) 216 218 219
'/' (47) 193
':' (58) 237
';' (59) 1 2 84
'=' (61) 126 127
error (256)
NAME (258) 215 216 217 218 219 234 235 236 237 238 239 240 243
STRING (259) 212
INTNUM (260) 77 213 221 223 224 226 227 231
APPROXNUM (261) 214
OR (262) 156
AND (263) 157 170 171
NOT (264) 20 21 22 158 170 172 176 178 180 241
COMPARISON (265) 168 169 184
UMINUS (266)
ALL (267) 44 45 120 136 186 210
AMMSC (268) 208 209 210 211
ANY (269) 185
AS (270) 36
ASC (271) 80
AUTHORIZATION (272) 4 59
BETWEEN (273) 170 171
BY (274) 74 150
CHARACTER (275) 220 221
CHECK (276) 26 33 38
CLOSE (277) 103
COMMIT (278) 104
CONTINUE (279) 244
CREATE (280) 4 12 36
CURRENT (281) 105 122
CURSOR (282) 72
DECIMAL (283) 225 226 227
DECLARE (284) 72
DEFAULT (285) 23 24 25
DELETE (286) 51 105 106
DESC (287) 81
DISTINCT (288) 121 209
DOUBLE (289) 233
ESCAPE (290) 175
EXISTS (291) 188
FETCH (292) 107
FLOAT (293) 230 231
FOR (294) 72
FOREIGN (295) 31 32
FOUND (296) 241
FROM (297) 105 106 143
GOTO (298) 243
GRANT (299) 41 43
GROUP (300) 150
HAVING (301) 154
IN (302) 178 179 180 181
INDICATOR (303) 207
INSERT (304) 50 108
INTEGER (305) 228
INTO (306) 107 108 117
IS (307) 176 177
KEY (308) 22 30 31 32
LANGUAGE (309) 59
LIKE (310) 172 173
MODULE (311) 59
NULLX (312) 20 21 22 24 114 127 176 177
NUMERIC (313) 222 223 224
OF (314) 105 122
ON (315) 41
OPEN (316) 115
OPTION (317) 38 43
ORDER (318) 74
PRECISION (319) 233
PRIMARY (320) 22 30
PRIVILEGES (321) 44
PROCEDURE (322) 84
PUBLIC (323) 56
REAL (324) 232
REFERENCES (325) 27 28 31 32 53
ROLLBACK (326) 116
SCHEMA (327) 4
SELECT (328) 49 117 118 139 189
SET (329) 122 128
SMALLINT (330) 229
SOME (331) 187
SQLCODE (332) 90
SQLERROR (333) 242
TABLE (334) 12
TO (335) 41
UNION (336) 135 136
UNIQUE (337) 21 29
UPDATE (338) 52 122 128
USER (339) 25 204
VALUES (340) 109
VIEW (341) 36
WHENEVER (342) 241 242
WHERE (343) 105 122 148
WITH (344) 38 43
WORK (345) 104 116
COBOL (346) 62
FORTRAN (347) 63
PASCAL (348) 64
PLI (349) 65
C (350) 66
ADA (351) 67
Nonterminals, with rules where they appear
$accept (108)
左: 0
sql_list (109)
左: 1 2, 右: 0 2
sql (110)
左: 3 58 91 241 242, 右: 1 2
schema (111)
左: 4, 右: 3
opt_schema_element_list (112)
左: 5 6, 右: 4
schema_element_list (113)
左: 7 8, 右: 6 8
schema_element (114)
左: 9 10 11, 右: 7 8
base_table_def (115)
左: 12, 右: 9
base_table_element_commalist (116)
左: 13 14, 右: 12 14
base_table_element (117)
左: 15 16, 右: 13 14
column_def (118)
左: 17, 右: 15
column_def_opt_list (119)
左: 18 19, 右: 17 19
column_def_opt (120)
左: 20 21 22 23 24 25 26 27 28, 右: 19
table_constraint_def (121)
左: 29 30 31 32 33, 右: 16
column_commalist (122)
左: 34 35, 右: 28 29 30 31 32 35 40
view_def (123)
左: 36, 右: 10
opt_with_check_option (124)
左: 37 38, 右: 36
opt_column_commalist (125)
左: 39 40, 右: 36 52 53 108
privilege_def (126)
左: 41, 右: 11
opt_with_grant_option (127)
左: 42 43, 右: 41
privileges (128)
左: 44 45 46, 右: 41
operation_commalist (129)
左: 47 48, 右: 46 48
operation (130)
左: 49 50 51 52 53, 右: 47 48
grantee_commalist (131)
左: 54 55, 右: 41 55
grantee (132)
左: 56 57, 右: 54 55
module_def (133)
左: 59, 右: 58
opt_module (134)
左: 60 61, 右: 59
lang (135)
左: 62 63 64 65 66 67, 右: 59
opt_cursor_def_list (136)
左: 68 69, 右: 59
cursor_def_list (137)
左: 70 71, 右: 69 71
cursor_def (138)
左: 72, 右: 70 71
opt_order_by_clause (139)
左: 73 74, 右: 72
ordering_spec_commalist (140)
左: 75 76, 右: 74 76
ordering_spec (141)
左: 77 78, 右: 75 76
opt_asc_desc (142)
左: 79 80 81, 右: 77 78
procedure_def_list (143)
左: 82 83, 右: 59 83
procedure_def (144)
左: 84, 右: 82 83
manipulative_statement_list (145)
左: 85 86, 右: 84 86
parameter_def_list (146)
左: 87 88, 右: 84 88
parameter_def (147)
左: 89 90, 右: 87 88
manipulative_statement (148)
左: 92 93 94 95 96 97 98 99 100 101 102, 右: 85 86 91
close_statement (149)
左: 103, 右: 92
commit_statement (150)
左: 104, 右: 93
delete_statement_positioned (151)
左: 105, 右: 94
delete_statement_searched (152)
左: 106, 右: 95
fetch_statement (153)
左: 107, 右: 96
insert_statement (154)
左: 108, 右: 97
values_or_query_spec (155)
左: 109 110, 右: 108
insert_atom_commalist (156)
左: 111 112, 右: 109 112
insert_atom (157)
左: 113 114, 右: 111 112
open_statement (158)
左: 115, 右: 98
rollback_statement (159)
左: 116, 右: 99
select_statement (160)
左: 117 118, 右: 100
opt_all_distinct (161)
左: 119 120 121, 右: 117 118 139 189
update_statement_positioned (162)
左: 122, 右: 101
assignment_commalist (163)
左: 123 124 125, 右: 122 125 128
assignment (164)
左: 126 127, 右: 124 125
update_statement_searched (165)
左: 128, 右: 102
target_commalist (166)
左: 129 130, 右: 107 117 130
target (167)
左: 131, 右: 129 130
opt_where_clause (168)
左: 132 133, 右: 106 128 142
query_exp (169)
左: 134 135 136, 右: 72 135 136 138
query_term (170)
左: 137 138, 右: 134 135 136
query_spec (171)
左: 139, 右: 36 110 137
selection (172)
左: 140 141, 右: 117 118 139 189
table_exp (173)
左: 142, 右: 117 118 139 189
from_clause (174)
左: 143, 右: 142
table_ref_commalist (175)
左: 144 145, 右: 143 145
table_ref (176)
左: 146 147, 右: 144 145
where_clause (177)
左: 148, 右: 133
opt_group_by_clause (178)
左: 149 150, 右: 142
column_ref_commalist (179)
左: 151 152, 右: 150 152
opt_having_clause (180)
左: 153 154, 右: 142
search_condition (181)
左: 155 156 157 158 159 160, 右: 26 33 148 154 156 157 158
159
predicate (182)
左: 161 162 163 164 165 166 167, 右: 160
comparison_predicate (183)
左: 168 169, 右: 161
between_predicate (184)
左: 170 171, 右: 162
like_predicate (185)
左: 172 173, 右: 163
opt_escape (186)
左: 174 175, 右: 172 173
test_for_null (187)
左: 176 177, 右: 164
in_predicate (188)
左: 178 179 180 181, 右: 165
atom_commalist (189)
左: 182 183, 右: 180 181 183
all_or_any_predicate (190)
左: 184, 右: 166
any_all_some (191)
左: 185 186 187, 右: 184
existence_test (192)
左: 188, 右: 167
subquery (193)
左: 189, 右: 169 178 179 184 188
scalar_exp (194)
左: 190 191 192 193 194 195 196 197 198 199, 右: 126 168
169 170 171 172 173 178 179 180 181 184 190 191 192 193 194 195
199 200 201 210 211
scalar_exp_commalist (195)
左: 200 201, 右: 140 201
atom (196)
左: 202 203 204, 右: 113 172 173 175 182 183 196
parameter_ref (197)
左: 205 206 207, 右: 131 202
function_ref (198)
左: 208 209 210 211, 右: 198
literal (199)
左: 212 213 214, 右: 23 203
table (200)
左: 215 216, 右: 12 27 28 31 32 36 41 105 106 108 122 128
146 147
column_ref (201)
左: 217 218 219, 右: 78 151 152 176 177 197 209
data_type (202)
左: 220 221 222 223 224 225 226 227 228 229 230 231 232 233,
右: 17 89
column (203)
左: 234, 右: 17 34 35 126 127
cursor (204)
左: 235, 右: 72 103 105 107 115 122
module (205)
左: 236, 右: 61
parameter (206)
左: 237, 右: 89 205 206 207
procedure (207)
左: 238, 右: 84
range_variable (208)
左: 239, 右: 147
user (209)
左: 240, 右: 4 57 59
when_action (210)
左: 243 244, 右: 241 242
状态 0
0 $accept: . sql_list $end
CLOSE shift, and go to state 1
COMMIT shift, and go to state 2
CREATE shift, and go to state 3
DELETE shift, and go to state 4
FETCH shift, and go to state 5
INSERT shift, and go to state 6
MODULE shift, and go to state 7
OPEN shift, and go to state 8
ROLLBACK shift, and go to state 9
SELECT shift, and go to state 10
UPDATE shift, and go to state 11
WHENEVER shift, and go to state 12
sql_list 转到状态13
sql 转到状态14
schema 转到状态15
module_def 转到状态16
manipulative_statement 转到状态17
close_statement 转到状态18
commit_statement 转到状态19
delete_statement_positioned 转到状态20
delete_statement_searched 转到状态21
fetch_statement 转到状态22
insert_statement 转到状态23
open_statement 转到状态24
rollback_statement 转到状态25
select_statement 转到状态26
update_statement_positioned 转到状态27
update_statement_searched 转到状态28
状态 1
103 close_statement: CLOSE . cursor
NAME shift, and go to state 29
cursor 转到状态30
状态 2
104 commit_statement: COMMIT . WORK
WORK shift, and go to state 31
状态 3
4 schema: CREATE . SCHEMA AUTHORIZATION user opt_schema_element_list
SCHEMA shift, and go to state 32
状态 4
105 delete_statement_positioned: DELETE . FROM table WHERE CURRENT OF cursor
106 delete_statement_searched: DELETE . FROM table opt_where_clause
FROM shift, and go to state 33
状态 5
107 fetch_statement: FETCH . cursor INTO target_commalist
NAME shift, and go to state 29
cursor 转到状态34
状态 6
108 insert_statement: INSERT . INTO table opt_column_commalist values_or_query_spec
INTO shift, and go to state 35
状态 7
59 module_def: MODULE . opt_module LANGUAGE lang AUTHORIZATION user opt_cursor_def_list procedure_def_list
NAME shift, and go to state 36
$default reduce using rule 60 (opt_module)
opt_module 转到状态37
module 转到状态38
状态 8
115 open_statement: OPEN . cursor
NAME shift, and go to state 29
cursor 转到状态39
状态 9
116 rollback_statement: ROLLBACK . WORK
WORK shift, and go to state 40
状态 10
117 select_statement: SELECT . opt_all_distinct selection INTO target_commalist table_exp
118 | SELECT . opt_all_distinct selection table_exp
ALL shift, and go to state 41
DISTINCT shift, and go to state 42
$default reduce using rule 119 (opt_all_distinct)
opt_all_distinct 转到状态43
状态 11
122 update_statement_positioned: UPDATE . table SET assignment_commalist WHERE CURRENT OF cursor
128 update_statement_searched: UPDATE . table SET assignment_commalist opt_where_clause
NAME shift, and go to state 44
table 转到状态45
状态 12
241 sql: WHENEVER . NOT FOUND when_action
242 | WHENEVER . SQLERROR when_action
NOT shift, and go to state 46
SQLERROR shift, and go to state 47
状态 13
0 $accept: sql_list . $end
2 sql_list: sql_list . sql ';'
$end shift, and go to state 48
CLOSE shift, and go to state 1
COMMIT shift, and go to state 2
CREATE shift, and go to state 3
DELETE shift, and go to state 4
FETCH shift, and go to state 5
INSERT shift, and go to state 6
MODULE shift, and go to state 7
OPEN shift, and go to state 8
ROLLBACK shift, and go to state 9
SELECT shift, and go to state 10
UPDATE shift, and go to state 11
WHENEVER shift, and go to state 12
sql 转到状态49
schema 转到状态15
module_def 转到状态16
manipulative_statement 转到状态17
close_statement 转到状态18
commit_statement 转到状态19
delete_statement_positioned 转到状态20
delete_statement_searched 转到状态21
fetch_statement 转到状态22
insert_statement 转到状态23
open_statement 转到状态24
rollback_statement 转到状态25
select_statement 转到状态26
update_statement_positioned 转到状态27
update_statement_searched 转到状态28
状态 14
1 sql_list: sql . ';'
';' shift, and go to state 50
状态 15
3 sql: schema .
$default reduce using rule 3 (sql)
状态 16
58 sql: module_def .
$default reduce using rule 58 (sql)
状态 17
91 sql: manipulative_statement .
$default reduce using rule 91 (sql)
状态 18
92 manipulative_statement: close_statement .
$default reduce using rule 92 (manipulative_statement)
状态 19
93 manipulative_statement: commit_statement .
$default reduce using rule 93 (manipulative_statement)
状态 20
94 manipulative_statement: delete_statement_positioned .
$default reduce using rule 94 (manipulative_statement)
状态 21
95 manipulative_statement: delete_statement_searched .
$default reduce using rule 95 (manipulative_statement)
状态 22
96 manipulative_statement: fetch_statement .
$default reduce using rule 96 (manipulative_statement)
状态 23
97 manipulative_statement: insert_statement .
$default reduce using rule 97 (manipulative_statement)
状态 24
98 manipulative_statement: open_statement .
$default reduce using rule 98 (manipulative_statement)
状态 25
99 manipulative_statement: rollback_statement .
$default reduce using rule 99 (manipulative_statement)
状态 26
100 manipulative_statement: select_statement .
$default reduce using rule 100 (manipulative_statement)
状态 27
101 manipulative_statement: update_statement_positioned .
$default reduce using rule 101 (manipulative_statement)
状态 28
102 manipulative_statement: update_statement_searched .
$default reduce using rule 102 (manipulative_statement)
状态 29
235 cursor: NAME .
$default reduce using rule 235 (cursor)
状态 30
103 close_statement: CLOSE cursor .
$default reduce using rule 103 (close_statement)
状态 31
104 commit_statement: COMMIT WORK .
$default reduce using rule 104 (commit_statement)
状态 32
4 schema: CREATE SCHEMA . AUTHORIZATION user opt_schema_element_list
AUTHORIZATION shift, and go to state 51
状态 33
105 delete_statement_positioned: DELETE FROM . table WHERE CURRENT OF cursor
106 delete_statement_searched: DELETE FROM . table opt_where_clause
NAME shift, and go to state 44