-
Notifications
You must be signed in to change notification settings - Fork 0
/
parser.out
1376 lines (945 loc) · 47.2 KB
/
parser.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
Created by PLY version 3.11 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> consulta
Rule 1 consulta -> SELECT distinct campos FROM tablas join where grupos order_by
Rule 2 distinct -> DISTINCT
Rule 3 distinct -> <empty>
Rule 4 campos -> columna
Rule 5 campos -> funcion
Rule 6 campos -> columna COMA campos
Rule 7 campos -> funcion COMA campos
Rule 8 tablas -> tabla
Rule 9 tablas -> tabla COMA tablas
Rule 10 columnas -> columna
Rule 11 columnas -> columna COMA columnas
Rule 12 funcion -> MIN PAREN_IZQ columna PAREN_DER
Rule 13 funcion -> MAX PAREN_IZQ columna PAREN_DER
Rule 14 funcion -> COUNT PAREN_IZQ columna PAREN_DER
Rule 15 funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER
Rule 16 join -> INNER JOIN tabla ON condicion join
Rule 17 join -> LEFT JOIN tabla ON condicion join
Rule 18 join -> <empty>
Rule 19 where -> WHERE condiciones
Rule 20 where -> <empty>
Rule 21 grupos -> group_by
Rule 22 grupos -> group_by having
Rule 23 grupos -> <empty>
Rule 24 group_by -> GROUP BY columnas
Rule 25 having -> HAVING condiciones_having
Rule 26 condiciones_having -> funcion operador valor
Rule 27 condiciones_having -> funcion operador valor COMA condiciones_having
Rule 28 order_by -> ORDER BY condiciones_orderby
Rule 29 order_by -> <empty>
Rule 30 condiciones_orderby -> columna orden
Rule 31 condiciones_orderby -> columna orden COMA condiciones_orderby
Rule 32 condiciones -> condicion
Rule 33 condiciones -> condicion booleano condiciones
Rule 34 condicion -> columna operador valor
Rule 35 condicion -> columna operador columna
Rule 36 condicion -> columna IN PAREN_IZQ consulta PAREN_DER
Rule 37 valor -> NUMERO
Rule 38 valor -> COMILLA PALABRA COMILLA
Rule 39 operador -> IGUAL
Rule 40 operador -> DESIGUAL
Rule 41 operador -> MENOR_IZQ
Rule 42 operador -> MEN_IGUAL_IZQ
Rule 43 operador -> MAYOR_IZQ
Rule 44 operador -> MAY_IGUAL_IZQ
Rule 45 booleano -> AND
Rule 46 booleano -> OR
Rule 47 orden -> ASC
Rule 48 orden -> DESC
Rule 49 orden -> <empty>
Rule 50 tabla -> PALABRA
Rule 51 tabla -> PALABRA AS PALABRA
Rule 52 tabla -> PALABRA PALABRA
Rule 53 columna -> PALABRA PUNTO PALABRA
Rule 54 columna -> PALABRA PUNTO PALABRA AS PALABRA
Terminals, with rules where they appear
AND : 45
AS : 51 54
ASC : 47
BY : 24 28
COMA : 6 7 9 11 27 31
COMILLA : 38 38
COUNT : 14 15
DESC : 48
DESIGUAL : 40
DISTINCT : 2 15
FROM : 1
GROUP : 24
HAVING : 25
IGUAL : 39
IN : 36
INNER : 16
JOIN : 16 17
LEFT : 17
MAX : 13
MAYOR_IZQ : 43
MAY_IGUAL_IZQ : 44
MENOR_IZQ : 41
MEN_IGUAL_IZQ : 42
MIN : 12
NUMERO : 37
ON : 16 17
OR : 46
ORDER : 28
PALABRA : 38 50 51 51 52 52 53 53 54 54 54
PAREN_DER : 12 13 14 15 36
PAREN_IZQ : 12 13 14 15 36
PUNTO : 53 54
SELECT : 1
WHERE : 19
error :
Nonterminals, with rules where they appear
booleano : 33
campos : 1 6 7
columna : 4 6 10 11 12 13 14 15 30 31 34 35 35 36
columnas : 11 24
condicion : 16 17 32 33
condiciones : 19 33
condiciones_having : 25 27
condiciones_orderby : 28 31
consulta : 36 0
distinct : 1
funcion : 5 7 26 27
group_by : 21 22
grupos : 1
having : 22
join : 1 16 17
operador : 26 27 34 35
orden : 30 31
order_by : 1
tabla : 8 9 16 17
tablas : 1 9
valor : 26 27 34
where : 1
Parsing method: LALR
state 0
(0) S' -> . consulta
(1) consulta -> . SELECT distinct campos FROM tablas join where grupos order_by
SELECT shift and go to state 2
consulta shift and go to state 1
state 1
(0) S' -> consulta .
state 2
(1) consulta -> SELECT . distinct campos FROM tablas join where grupos order_by
(2) distinct -> . DISTINCT
(3) distinct -> .
DISTINCT shift and go to state 4
PALABRA reduce using rule 3 (distinct -> .)
MIN reduce using rule 3 (distinct -> .)
MAX reduce using rule 3 (distinct -> .)
COUNT reduce using rule 3 (distinct -> .)
distinct shift and go to state 3
state 3
(1) consulta -> SELECT distinct . campos FROM tablas join where grupos order_by
(4) campos -> . columna
(5) campos -> . funcion
(6) campos -> . columna COMA campos
(7) campos -> . funcion COMA campos
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
(12) funcion -> . MIN PAREN_IZQ columna PAREN_DER
(13) funcion -> . MAX PAREN_IZQ columna PAREN_DER
(14) funcion -> . COUNT PAREN_IZQ columna PAREN_DER
(15) funcion -> . COUNT PAREN_IZQ DISTINCT columna PAREN_DER
PALABRA shift and go to state 8
MIN shift and go to state 9
MAX shift and go to state 10
COUNT shift and go to state 11
campos shift and go to state 5
columna shift and go to state 6
funcion shift and go to state 7
state 4
(2) distinct -> DISTINCT .
PALABRA reduce using rule 2 (distinct -> DISTINCT .)
MIN reduce using rule 2 (distinct -> DISTINCT .)
MAX reduce using rule 2 (distinct -> DISTINCT .)
COUNT reduce using rule 2 (distinct -> DISTINCT .)
state 5
(1) consulta -> SELECT distinct campos . FROM tablas join where grupos order_by
FROM shift and go to state 12
state 6
(4) campos -> columna .
(6) campos -> columna . COMA campos
FROM reduce using rule 4 (campos -> columna .)
COMA shift and go to state 13
state 7
(5) campos -> funcion .
(7) campos -> funcion . COMA campos
FROM reduce using rule 5 (campos -> funcion .)
COMA shift and go to state 14
state 8
(53) columna -> PALABRA . PUNTO PALABRA
(54) columna -> PALABRA . PUNTO PALABRA AS PALABRA
PUNTO shift and go to state 15
state 9
(12) funcion -> MIN . PAREN_IZQ columna PAREN_DER
PAREN_IZQ shift and go to state 16
state 10
(13) funcion -> MAX . PAREN_IZQ columna PAREN_DER
PAREN_IZQ shift and go to state 17
state 11
(14) funcion -> COUNT . PAREN_IZQ columna PAREN_DER
(15) funcion -> COUNT . PAREN_IZQ DISTINCT columna PAREN_DER
PAREN_IZQ shift and go to state 18
state 12
(1) consulta -> SELECT distinct campos FROM . tablas join where grupos order_by
(8) tablas -> . tabla
(9) tablas -> . tabla COMA tablas
(50) tabla -> . PALABRA
(51) tabla -> . PALABRA AS PALABRA
(52) tabla -> . PALABRA PALABRA
PALABRA shift and go to state 21
tablas shift and go to state 19
tabla shift and go to state 20
state 13
(6) campos -> columna COMA . campos
(4) campos -> . columna
(5) campos -> . funcion
(6) campos -> . columna COMA campos
(7) campos -> . funcion COMA campos
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
(12) funcion -> . MIN PAREN_IZQ columna PAREN_DER
(13) funcion -> . MAX PAREN_IZQ columna PAREN_DER
(14) funcion -> . COUNT PAREN_IZQ columna PAREN_DER
(15) funcion -> . COUNT PAREN_IZQ DISTINCT columna PAREN_DER
PALABRA shift and go to state 8
MIN shift and go to state 9
MAX shift and go to state 10
COUNT shift and go to state 11
columna shift and go to state 6
campos shift and go to state 22
funcion shift and go to state 7
state 14
(7) campos -> funcion COMA . campos
(4) campos -> . columna
(5) campos -> . funcion
(6) campos -> . columna COMA campos
(7) campos -> . funcion COMA campos
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
(12) funcion -> . MIN PAREN_IZQ columna PAREN_DER
(13) funcion -> . MAX PAREN_IZQ columna PAREN_DER
(14) funcion -> . COUNT PAREN_IZQ columna PAREN_DER
(15) funcion -> . COUNT PAREN_IZQ DISTINCT columna PAREN_DER
PALABRA shift and go to state 8
MIN shift and go to state 9
MAX shift and go to state 10
COUNT shift and go to state 11
funcion shift and go to state 7
campos shift and go to state 23
columna shift and go to state 6
state 15
(53) columna -> PALABRA PUNTO . PALABRA
(54) columna -> PALABRA PUNTO . PALABRA AS PALABRA
PALABRA shift and go to state 24
state 16
(12) funcion -> MIN PAREN_IZQ . columna PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
columna shift and go to state 25
state 17
(13) funcion -> MAX PAREN_IZQ . columna PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
columna shift and go to state 26
state 18
(14) funcion -> COUNT PAREN_IZQ . columna PAREN_DER
(15) funcion -> COUNT PAREN_IZQ . DISTINCT columna PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
DISTINCT shift and go to state 28
PALABRA shift and go to state 8
columna shift and go to state 27
state 19
(1) consulta -> SELECT distinct campos FROM tablas . join where grupos order_by
(16) join -> . INNER JOIN tabla ON condicion join
(17) join -> . LEFT JOIN tabla ON condicion join
(18) join -> .
INNER shift and go to state 30
LEFT shift and go to state 31
WHERE reduce using rule 18 (join -> .)
GROUP reduce using rule 18 (join -> .)
ORDER reduce using rule 18 (join -> .)
$end reduce using rule 18 (join -> .)
PAREN_DER reduce using rule 18 (join -> .)
join shift and go to state 29
state 20
(8) tablas -> tabla .
(9) tablas -> tabla . COMA tablas
INNER reduce using rule 8 (tablas -> tabla .)
LEFT reduce using rule 8 (tablas -> tabla .)
WHERE reduce using rule 8 (tablas -> tabla .)
GROUP reduce using rule 8 (tablas -> tabla .)
ORDER reduce using rule 8 (tablas -> tabla .)
$end reduce using rule 8 (tablas -> tabla .)
PAREN_DER reduce using rule 8 (tablas -> tabla .)
COMA shift and go to state 32
state 21
(50) tabla -> PALABRA .
(51) tabla -> PALABRA . AS PALABRA
(52) tabla -> PALABRA . PALABRA
COMA reduce using rule 50 (tabla -> PALABRA .)
INNER reduce using rule 50 (tabla -> PALABRA .)
LEFT reduce using rule 50 (tabla -> PALABRA .)
WHERE reduce using rule 50 (tabla -> PALABRA .)
GROUP reduce using rule 50 (tabla -> PALABRA .)
ORDER reduce using rule 50 (tabla -> PALABRA .)
$end reduce using rule 50 (tabla -> PALABRA .)
PAREN_DER reduce using rule 50 (tabla -> PALABRA .)
ON reduce using rule 50 (tabla -> PALABRA .)
AS shift and go to state 34
PALABRA shift and go to state 33
state 22
(6) campos -> columna COMA campos .
FROM reduce using rule 6 (campos -> columna COMA campos .)
state 23
(7) campos -> funcion COMA campos .
FROM reduce using rule 7 (campos -> funcion COMA campos .)
state 24
(53) columna -> PALABRA PUNTO PALABRA .
(54) columna -> PALABRA PUNTO PALABRA . AS PALABRA
COMA reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
FROM reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
PAREN_DER reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
IN reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
IGUAL reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
DESIGUAL reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
MENOR_IZQ reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
MEN_IGUAL_IZQ reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
MAYOR_IZQ reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
MAY_IGUAL_IZQ reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
HAVING reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
ORDER reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
$end reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
AND reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
OR reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
GROUP reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
INNER reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
LEFT reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
WHERE reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
ASC reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
DESC reduce using rule 53 (columna -> PALABRA PUNTO PALABRA .)
AS shift and go to state 35
state 25
(12) funcion -> MIN PAREN_IZQ columna . PAREN_DER
PAREN_DER shift and go to state 36
state 26
(13) funcion -> MAX PAREN_IZQ columna . PAREN_DER
PAREN_DER shift and go to state 37
state 27
(14) funcion -> COUNT PAREN_IZQ columna . PAREN_DER
PAREN_DER shift and go to state 38
state 28
(15) funcion -> COUNT PAREN_IZQ DISTINCT . columna PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
columna shift and go to state 39
state 29
(1) consulta -> SELECT distinct campos FROM tablas join . where grupos order_by
(19) where -> . WHERE condiciones
(20) where -> .
WHERE shift and go to state 41
GROUP reduce using rule 20 (where -> .)
ORDER reduce using rule 20 (where -> .)
$end reduce using rule 20 (where -> .)
PAREN_DER reduce using rule 20 (where -> .)
where shift and go to state 40
state 30
(16) join -> INNER . JOIN tabla ON condicion join
JOIN shift and go to state 42
state 31
(17) join -> LEFT . JOIN tabla ON condicion join
JOIN shift and go to state 43
state 32
(9) tablas -> tabla COMA . tablas
(8) tablas -> . tabla
(9) tablas -> . tabla COMA tablas
(50) tabla -> . PALABRA
(51) tabla -> . PALABRA AS PALABRA
(52) tabla -> . PALABRA PALABRA
PALABRA shift and go to state 21
tabla shift and go to state 20
tablas shift and go to state 44
state 33
(52) tabla -> PALABRA PALABRA .
COMA reduce using rule 52 (tabla -> PALABRA PALABRA .)
INNER reduce using rule 52 (tabla -> PALABRA PALABRA .)
LEFT reduce using rule 52 (tabla -> PALABRA PALABRA .)
WHERE reduce using rule 52 (tabla -> PALABRA PALABRA .)
GROUP reduce using rule 52 (tabla -> PALABRA PALABRA .)
ORDER reduce using rule 52 (tabla -> PALABRA PALABRA .)
$end reduce using rule 52 (tabla -> PALABRA PALABRA .)
PAREN_DER reduce using rule 52 (tabla -> PALABRA PALABRA .)
ON reduce using rule 52 (tabla -> PALABRA PALABRA .)
state 34
(51) tabla -> PALABRA AS . PALABRA
PALABRA shift and go to state 45
state 35
(54) columna -> PALABRA PUNTO PALABRA AS . PALABRA
PALABRA shift and go to state 46
state 36
(12) funcion -> MIN PAREN_IZQ columna PAREN_DER .
COMA reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
FROM reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
IGUAL reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
DESIGUAL reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
MENOR_IZQ reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
MEN_IGUAL_IZQ reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
MAYOR_IZQ reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
MAY_IGUAL_IZQ reduce using rule 12 (funcion -> MIN PAREN_IZQ columna PAREN_DER .)
state 37
(13) funcion -> MAX PAREN_IZQ columna PAREN_DER .
COMA reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
FROM reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
IGUAL reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
DESIGUAL reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
MENOR_IZQ reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
MEN_IGUAL_IZQ reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
MAYOR_IZQ reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
MAY_IGUAL_IZQ reduce using rule 13 (funcion -> MAX PAREN_IZQ columna PAREN_DER .)
state 38
(14) funcion -> COUNT PAREN_IZQ columna PAREN_DER .
COMA reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
FROM reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
IGUAL reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
DESIGUAL reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
MENOR_IZQ reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
MEN_IGUAL_IZQ reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
MAYOR_IZQ reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
MAY_IGUAL_IZQ reduce using rule 14 (funcion -> COUNT PAREN_IZQ columna PAREN_DER .)
state 39
(15) funcion -> COUNT PAREN_IZQ DISTINCT columna . PAREN_DER
PAREN_DER shift and go to state 47
state 40
(1) consulta -> SELECT distinct campos FROM tablas join where . grupos order_by
(21) grupos -> . group_by
(22) grupos -> . group_by having
(23) grupos -> .
(24) group_by -> . GROUP BY columnas
ORDER reduce using rule 23 (grupos -> .)
$end reduce using rule 23 (grupos -> .)
PAREN_DER reduce using rule 23 (grupos -> .)
GROUP shift and go to state 50
grupos shift and go to state 48
group_by shift and go to state 49
state 41
(19) where -> WHERE . condiciones
(32) condiciones -> . condicion
(33) condiciones -> . condicion booleano condiciones
(34) condicion -> . columna operador valor
(35) condicion -> . columna operador columna
(36) condicion -> . columna IN PAREN_IZQ consulta PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
condiciones shift and go to state 51
condicion shift and go to state 52
columna shift and go to state 53
state 42
(16) join -> INNER JOIN . tabla ON condicion join
(50) tabla -> . PALABRA
(51) tabla -> . PALABRA AS PALABRA
(52) tabla -> . PALABRA PALABRA
PALABRA shift and go to state 21
tabla shift and go to state 54
state 43
(17) join -> LEFT JOIN . tabla ON condicion join
(50) tabla -> . PALABRA
(51) tabla -> . PALABRA AS PALABRA
(52) tabla -> . PALABRA PALABRA
PALABRA shift and go to state 21
tabla shift and go to state 55
state 44
(9) tablas -> tabla COMA tablas .
INNER reduce using rule 9 (tablas -> tabla COMA tablas .)
LEFT reduce using rule 9 (tablas -> tabla COMA tablas .)
WHERE reduce using rule 9 (tablas -> tabla COMA tablas .)
GROUP reduce using rule 9 (tablas -> tabla COMA tablas .)
ORDER reduce using rule 9 (tablas -> tabla COMA tablas .)
$end reduce using rule 9 (tablas -> tabla COMA tablas .)
PAREN_DER reduce using rule 9 (tablas -> tabla COMA tablas .)
state 45
(51) tabla -> PALABRA AS PALABRA .
COMA reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
INNER reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
LEFT reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
WHERE reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
GROUP reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
ORDER reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
$end reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
PAREN_DER reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
ON reduce using rule 51 (tabla -> PALABRA AS PALABRA .)
state 46
(54) columna -> PALABRA PUNTO PALABRA AS PALABRA .
COMA reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
FROM reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
PAREN_DER reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
IN reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
IGUAL reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
DESIGUAL reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
MENOR_IZQ reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
MEN_IGUAL_IZQ reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
MAYOR_IZQ reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
MAY_IGUAL_IZQ reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
HAVING reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
ORDER reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
$end reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
AND reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
OR reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
GROUP reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
INNER reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
LEFT reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
WHERE reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
ASC reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
DESC reduce using rule 54 (columna -> PALABRA PUNTO PALABRA AS PALABRA .)
state 47
(15) funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .
COMA reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
FROM reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
IGUAL reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
DESIGUAL reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
MENOR_IZQ reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
MEN_IGUAL_IZQ reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
MAYOR_IZQ reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
MAY_IGUAL_IZQ reduce using rule 15 (funcion -> COUNT PAREN_IZQ DISTINCT columna PAREN_DER .)
state 48
(1) consulta -> SELECT distinct campos FROM tablas join where grupos . order_by
(28) order_by -> . ORDER BY condiciones_orderby
(29) order_by -> .
ORDER shift and go to state 57
$end reduce using rule 29 (order_by -> .)
PAREN_DER reduce using rule 29 (order_by -> .)
order_by shift and go to state 56
state 49
(21) grupos -> group_by .
(22) grupos -> group_by . having
(25) having -> . HAVING condiciones_having
ORDER reduce using rule 21 (grupos -> group_by .)
$end reduce using rule 21 (grupos -> group_by .)
PAREN_DER reduce using rule 21 (grupos -> group_by .)
HAVING shift and go to state 59
having shift and go to state 58
state 50
(24) group_by -> GROUP . BY columnas
BY shift and go to state 60
state 51
(19) where -> WHERE condiciones .
GROUP reduce using rule 19 (where -> WHERE condiciones .)
ORDER reduce using rule 19 (where -> WHERE condiciones .)
$end reduce using rule 19 (where -> WHERE condiciones .)
PAREN_DER reduce using rule 19 (where -> WHERE condiciones .)
state 52
(32) condiciones -> condicion .
(33) condiciones -> condicion . booleano condiciones
(45) booleano -> . AND
(46) booleano -> . OR
GROUP reduce using rule 32 (condiciones -> condicion .)
ORDER reduce using rule 32 (condiciones -> condicion .)
$end reduce using rule 32 (condiciones -> condicion .)
PAREN_DER reduce using rule 32 (condiciones -> condicion .)
AND shift and go to state 62
OR shift and go to state 63
booleano shift and go to state 61
state 53
(34) condicion -> columna . operador valor
(35) condicion -> columna . operador columna
(36) condicion -> columna . IN PAREN_IZQ consulta PAREN_DER
(39) operador -> . IGUAL
(40) operador -> . DESIGUAL
(41) operador -> . MENOR_IZQ
(42) operador -> . MEN_IGUAL_IZQ
(43) operador -> . MAYOR_IZQ
(44) operador -> . MAY_IGUAL_IZQ
IN shift and go to state 65
IGUAL shift and go to state 66
DESIGUAL shift and go to state 67
MENOR_IZQ shift and go to state 68
MEN_IGUAL_IZQ shift and go to state 69
MAYOR_IZQ shift and go to state 70
MAY_IGUAL_IZQ shift and go to state 71
operador shift and go to state 64
state 54
(16) join -> INNER JOIN tabla . ON condicion join
ON shift and go to state 72
state 55
(17) join -> LEFT JOIN tabla . ON condicion join
ON shift and go to state 73
state 56
(1) consulta -> SELECT distinct campos FROM tablas join where grupos order_by .
$end reduce using rule 1 (consulta -> SELECT distinct campos FROM tablas join where grupos order_by .)
PAREN_DER reduce using rule 1 (consulta -> SELECT distinct campos FROM tablas join where grupos order_by .)
state 57
(28) order_by -> ORDER . BY condiciones_orderby
BY shift and go to state 74
state 58
(22) grupos -> group_by having .
ORDER reduce using rule 22 (grupos -> group_by having .)
$end reduce using rule 22 (grupos -> group_by having .)
PAREN_DER reduce using rule 22 (grupos -> group_by having .)
state 59
(25) having -> HAVING . condiciones_having
(26) condiciones_having -> . funcion operador valor
(27) condiciones_having -> . funcion operador valor COMA condiciones_having
(12) funcion -> . MIN PAREN_IZQ columna PAREN_DER
(13) funcion -> . MAX PAREN_IZQ columna PAREN_DER
(14) funcion -> . COUNT PAREN_IZQ columna PAREN_DER
(15) funcion -> . COUNT PAREN_IZQ DISTINCT columna PAREN_DER
MIN shift and go to state 9
MAX shift and go to state 10
COUNT shift and go to state 11
condiciones_having shift and go to state 75
funcion shift and go to state 76
state 60
(24) group_by -> GROUP BY . columnas
(10) columnas -> . columna
(11) columnas -> . columna COMA columnas
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
columnas shift and go to state 77
columna shift and go to state 78
state 61
(33) condiciones -> condicion booleano . condiciones
(32) condiciones -> . condicion
(33) condiciones -> . condicion booleano condiciones
(34) condicion -> . columna operador valor
(35) condicion -> . columna operador columna
(36) condicion -> . columna IN PAREN_IZQ consulta PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
condicion shift and go to state 52
condiciones shift and go to state 79
columna shift and go to state 53
state 62
(45) booleano -> AND .
PALABRA reduce using rule 45 (booleano -> AND .)
state 63
(46) booleano -> OR .
PALABRA reduce using rule 46 (booleano -> OR .)
state 64
(34) condicion -> columna operador . valor
(35) condicion -> columna operador . columna
(37) valor -> . NUMERO
(38) valor -> . COMILLA PALABRA COMILLA
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
NUMERO shift and go to state 82
COMILLA shift and go to state 83
PALABRA shift and go to state 8
columna shift and go to state 80
valor shift and go to state 81
state 65
(36) condicion -> columna IN . PAREN_IZQ consulta PAREN_DER
PAREN_IZQ shift and go to state 84
state 66
(39) operador -> IGUAL .
NUMERO reduce using rule 39 (operador -> IGUAL .)
COMILLA reduce using rule 39 (operador -> IGUAL .)
PALABRA reduce using rule 39 (operador -> IGUAL .)
state 67
(40) operador -> DESIGUAL .
NUMERO reduce using rule 40 (operador -> DESIGUAL .)
COMILLA reduce using rule 40 (operador -> DESIGUAL .)
PALABRA reduce using rule 40 (operador -> DESIGUAL .)
state 68
(41) operador -> MENOR_IZQ .
NUMERO reduce using rule 41 (operador -> MENOR_IZQ .)
COMILLA reduce using rule 41 (operador -> MENOR_IZQ .)
PALABRA reduce using rule 41 (operador -> MENOR_IZQ .)
state 69
(42) operador -> MEN_IGUAL_IZQ .
NUMERO reduce using rule 42 (operador -> MEN_IGUAL_IZQ .)
COMILLA reduce using rule 42 (operador -> MEN_IGUAL_IZQ .)
PALABRA reduce using rule 42 (operador -> MEN_IGUAL_IZQ .)
state 70
(43) operador -> MAYOR_IZQ .
NUMERO reduce using rule 43 (operador -> MAYOR_IZQ .)
COMILLA reduce using rule 43 (operador -> MAYOR_IZQ .)
PALABRA reduce using rule 43 (operador -> MAYOR_IZQ .)
state 71
(44) operador -> MAY_IGUAL_IZQ .
NUMERO reduce using rule 44 (operador -> MAY_IGUAL_IZQ .)
COMILLA reduce using rule 44 (operador -> MAY_IGUAL_IZQ .)
PALABRA reduce using rule 44 (operador -> MAY_IGUAL_IZQ .)
state 72
(16) join -> INNER JOIN tabla ON . condicion join
(34) condicion -> . columna operador valor
(35) condicion -> . columna operador columna
(36) condicion -> . columna IN PAREN_IZQ consulta PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
condicion shift and go to state 85
columna shift and go to state 53
state 73
(17) join -> LEFT JOIN tabla ON . condicion join
(34) condicion -> . columna operador valor
(35) condicion -> . columna operador columna
(36) condicion -> . columna IN PAREN_IZQ consulta PAREN_DER
(53) columna -> . PALABRA PUNTO PALABRA
(54) columna -> . PALABRA PUNTO PALABRA AS PALABRA
PALABRA shift and go to state 8
condicion shift and go to state 86
columna shift and go to state 53
state 74
(28) order_by -> ORDER BY . condiciones_orderby
(30) condiciones_orderby -> . columna orden
(31) condiciones_orderby -> . columna orden COMA condiciones_orderby