Source

PonyFormatter / MysqlParser / PonySQLLexer.cs

Full commit
meze 5fe8cf9 
Ivan Kurnosov 9362831 




meze cd31492 












Ivan Kurnosov 9362831 
meze 5fe8cf9 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 



Ivan Kurnosov d020c46 
meze 5fe8cf9 
meze 6e4bcaf 
meze 5fe8cf9 


meze cd31492 


















meze 5fe8cf9 
meze cd31492 

meze 5fe8cf9 

meze f3d757c 


meze 5fe8cf9 
meze f3d757c 
meze 5fe8cf9 

meze f3d757c 
meze 6e4bcaf 
meze f3d757c 









meze 5fe8cf9 
meze f3d757c 
meze 5fe8cf9 

meze f3d757c 


meze 5fe8cf9 
meze f3d757c 
meze 5fe8cf9 

meze f3d757c 
meze 6e4bcaf 
meze f3d757c 









meze 5fe8cf9 
meze f3d757c 
Ivan Kurnosov 9cd2f7f 

meze f3d757c 


Ivan Kurnosov 9cd2f7f 
meze f3d757c 
meze 5fe8cf9 

meze 6e4bcaf 











Ivan Kurnosov 9cd2f7f 
meze 6e4bcaf 
Ivan Kurnosov 9cd2f7f 

meze 6e4bcaf 


Ivan Kurnosov 9cd2f7f 
meze 6e4bcaf 
meze 5fe8cf9 

meze f3d757c 











Ivan Kurnosov 9cd2f7f 








meze 5fe8cf9 

Ivan Kurnosov 9cd2f7f 












meze f3d757c 







meze 5fe8cf9 

meze cd31492 











meze f3d757c 
meze cd31492 







meze 5fe8cf9 

meze cd31492 
meze 5fe8cf9 
meze cd31492 




















meze 5fe8cf9 
meze cd31492 






meze 5fe8cf9 
meze cd31492 



























meze 5fe8cf9 

meze cd31492 
meze 5fe8cf9 
meze cd31492 




















meze 5fe8cf9 
meze cd31492 






meze 5fe8cf9 
meze cd31492 



























meze 5fe8cf9 

meze cd31492 
meze 5fe8cf9 
meze cd31492 




















meze 5fe8cf9 
meze cd31492 






meze 5fe8cf9 
meze cd31492 



























meze 5fe8cf9 

meze cd31492 
meze 5fe8cf9 
meze cd31492 
































meze 5fe8cf9 
meze cd31492 






meze 5fe8cf9 
meze cd31492 






meze 5fe8cf9 
meze cd31492 






meze 5fe8cf9 
meze cd31492 



























meze 5fe8cf9 

meze cd31492 











meze 5fe8cf9 
meze cd31492 













meze 5fe8cf9 
meze cd31492 










































meze 5fe8cf9 

meze cd31492 
meze 5fe8cf9 
meze cd31492 














meze 5fe8cf9 
meze cd31492 




































meze 5fe8cf9 

meze cd31492 




















meze 5fe8cf9 

meze cd31492 
meze 5fe8cf9 
meze cd31492 














meze 5fe8cf9 
meze cd31492 










































meze 5fe8cf9 
Ivan Kurnosov 9cd2f7f 
meze cd31492 



meze 5fe8cf9 
Ivan Kurnosov 9cd2f7f 




meze 5fe8cf9 






Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
Ivan Kurnosov 9cd2f7f 





meze 5fe8cf9 
Ivan Kurnosov 9cd2f7f 




meze f3d757c 
meze 5fe8cf9 
Ivan Kurnosov 9cd2f7f 





meze 5fe8cf9 
meze f3d757c 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 




Ivan Kurnosov 9cd2f7f 
meze 5fe8cf9 
meze cd31492 

















Ivan Kurnosov 9cd2f7f 

meze cd31492 
Ivan Kurnosov 9cd2f7f 
meze cd31492 
Ivan Kurnosov 9cd2f7f 
meze cd31492 





Ivan Kurnosov 9cd2f7f 
meze cd31492 





Ivan Kurnosov 9cd2f7f 


meze cd31492 
Ivan Kurnosov 9cd2f7f 
meze cd31492 
Ivan Kurnosov 9cd2f7f 





meze cd31492 
meze f3d757c 



Ivan Kurnosov 9cd2f7f 
meze cd31492 








Ivan Kurnosov 9cd2f7f 
meze f3d757c 



meze cd31492 










meze f3d757c 
meze cd31492 


Ivan Kurnosov 9cd2f7f 




meze cd31492 

meze f3d757c 
Ivan Kurnosov 9cd2f7f 




meze f3d757c 
Ivan Kurnosov 9cd2f7f 
meze cd31492 
Ivan Kurnosov 9cd2f7f 



meze f3d757c 
Ivan Kurnosov 9cd2f7f 
meze cd31492 
Ivan Kurnosov 9cd2f7f 





meze cd31492 





























meze 5fe8cf9 
meze cd31492 






  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
// $ANTLR 3.2 Sep 23, 2009 12:02:23 C:\\projects\\pony\\_grammatics\\PonySQL.g 2010-11-29 09:01:52

// The variable 'variable' is assigned but its value is never used.
#pragma warning disable 168, 219
// Unreachable code detected.
#pragma warning disable 162


using System;
using Antlr.Runtime;
using IList 		= System.Collections.IList;
using ArrayList 	= System.Collections.ArrayList;
using Stack 		= Antlr.Runtime.Collections.StackList;


namespace 
    MysqlParser

{
public partial class PonySQLLexer : Lexer {
    public const int T_ID = 6;
    public const int T__20 = 20;
    public const int INT = 14;
    public const int MINUS = 16;
    public const int ID = 13;
    public const int EOF = -1;
    public const int ASTERISK = 9;
    public const int T__19 = 19;
    public const int WS = 18;
    public const int ASC_DESC = 12;
    public const int COMMA = 8;
    public const int PLUS = 15;
    public const int T_SELECT = 4;
    public const int FROM = 10;
    public const int T_SUBQUERY = 5;
    public const int SELECT = 7;
    public const int ORDER_BY = 11;
    public const int DIVIDE = 17;

    // delegates
    // delegators

    public PonySQLLexer() 
    {
		InitializeCyclicDFAs();
    }
    public PonySQLLexer(ICharStream input)
		: this(input, null) {
    }
    public PonySQLLexer(ICharStream input, RecognizerSharedState state)
		: base(input, state) {
		InitializeCyclicDFAs(); 

    }
    
    override public string GrammarFileName
    {
    	get { return "C:\\projects\\pony\\_grammatics\\PonySQL.g";} 
    }

    // $ANTLR start "T__19"
    public void mT__19() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = T__19;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:11:7: ( '(' )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:11:9: '('
            {
            	Match('('); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "T__19"

    // $ANTLR start "T__20"
    public void mT__20() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = T__20;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:12:7: ( ')' )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:12:9: ')'
            {
            	Match(')'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "T__20"

    // $ANTLR start "PLUS"
    public void mPLUS() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = PLUS;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:83:6: ( '+' )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:83:8: '+'
            {
            	Match('+'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "PLUS"

    // $ANTLR start "MINUS"
    public void mMINUS() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = MINUS;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:84:7: ( '-' )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:84:9: '-'
            {
            	Match('-'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "MINUS"

    // $ANTLR start "DIVIDE"
    public void mDIVIDE() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = DIVIDE;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:85:8: ( '/' )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:85:10: '/'
            {
            	Match('/'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "DIVIDE"

    // $ANTLR start "ASTERISK"
    public void mASTERISK() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = ASTERISK;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:87:9: ( '*' )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:87:11: '*'
            {
            	Match('*'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "ASTERISK"

    // $ANTLR start "SELECT"
    public void mSELECT() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = SELECT;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:88:9: ( ( 'SELECT' | 'select' ) )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:88:11: ( 'SELECT' | 'select' )
            {
            	// C:\\projects\\pony\\_grammatics\\PonySQL.g:88:11: ( 'SELECT' | 'select' )
            	int alt1 = 2;
            	int LA1_0 = input.LA(1);

            	if ( (LA1_0 == 'S') )
            	{
            	    alt1 = 1;
            	}
            	else if ( (LA1_0 == 's') )
            	{
            	    alt1 = 2;
            	}
            	else 
            	{
            	    NoViableAltException nvae_d1s0 =
            	        new NoViableAltException("", 1, 0, input);

            	    throw nvae_d1s0;
            	}
            	switch (alt1) 
            	{
            	    case 1 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:88:12: 'SELECT'
            	        {
            	        	Match("SELECT"); 


            	        }
            	        break;
            	    case 2 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:88:21: 'select'
            	        {
            	        	Match("select"); 


            	        }
            	        break;

            	}


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "SELECT"

    // $ANTLR start "FROM"
    public void mFROM() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = FROM;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:89:6: ( ( 'FROM' | 'from' ) )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:89:8: ( 'FROM' | 'from' )
            {
            	// C:\\projects\\pony\\_grammatics\\PonySQL.g:89:8: ( 'FROM' | 'from' )
            	int alt2 = 2;
            	int LA2_0 = input.LA(1);

            	if ( (LA2_0 == 'F') )
            	{
            	    alt2 = 1;
            	}
            	else if ( (LA2_0 == 'f') )
            	{
            	    alt2 = 2;
            	}
            	else 
            	{
            	    NoViableAltException nvae_d2s0 =
            	        new NoViableAltException("", 2, 0, input);

            	    throw nvae_d2s0;
            	}
            	switch (alt2) 
            	{
            	    case 1 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:89:9: 'FROM'
            	        {
            	        	Match("FROM"); 


            	        }
            	        break;
            	    case 2 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:89:16: 'from'
            	        {
            	        	Match("from"); 


            	        }
            	        break;

            	}


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "FROM"

    // $ANTLR start "ORDER_BY"
    public void mORDER_BY() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = ORDER_BY;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:90:9: ( ( 'ORDER BY' | 'order by' ) )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:90:11: ( 'ORDER BY' | 'order by' )
            {
            	// C:\\projects\\pony\\_grammatics\\PonySQL.g:90:11: ( 'ORDER BY' | 'order by' )
            	int alt3 = 2;
            	int LA3_0 = input.LA(1);

            	if ( (LA3_0 == 'O') )
            	{
            	    alt3 = 1;
            	}
            	else if ( (LA3_0 == 'o') )
            	{
            	    alt3 = 2;
            	}
            	else 
            	{
            	    NoViableAltException nvae_d3s0 =
            	        new NoViableAltException("", 3, 0, input);

            	    throw nvae_d3s0;
            	}
            	switch (alt3) 
            	{
            	    case 1 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:90:12: 'ORDER BY'
            	        {
            	        	Match("ORDER BY"); 


            	        }
            	        break;
            	    case 2 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:90:23: 'order by'
            	        {
            	        	Match("order by"); 


            	        }
            	        break;

            	}


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "ORDER_BY"

    // $ANTLR start "ASC_DESC"
    public void mASC_DESC() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = ASC_DESC;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:91:9: ( ( 'ASC' | 'asc' | 'DESC' | 'desc' ) )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:91:11: ( 'ASC' | 'asc' | 'DESC' | 'desc' )
            {
            	// C:\\projects\\pony\\_grammatics\\PonySQL.g:91:11: ( 'ASC' | 'asc' | 'DESC' | 'desc' )
            	int alt4 = 4;
            	switch ( input.LA(1) ) 
            	{
            	case 'A':
            		{
            	    alt4 = 1;
            	    }
            	    break;
            	case 'a':
            		{
            	    alt4 = 2;
            	    }
            	    break;
            	case 'D':
            		{
            	    alt4 = 3;
            	    }
            	    break;
            	case 'd':
            		{
            	    alt4 = 4;
            	    }
            	    break;
            		default:
            		    NoViableAltException nvae_d4s0 =
            		        new NoViableAltException("", 4, 0, input);

            		    throw nvae_d4s0;
            	}

            	switch (alt4) 
            	{
            	    case 1 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:91:12: 'ASC'
            	        {
            	        	Match("ASC"); 


            	        }
            	        break;
            	    case 2 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:91:18: 'asc'
            	        {
            	        	Match("asc"); 


            	        }
            	        break;
            	    case 3 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:91:24: 'DESC'
            	        {
            	        	Match("DESC"); 


            	        }
            	        break;
            	    case 4 :
            	        // C:\\projects\\pony\\_grammatics\\PonySQL.g:91:31: 'desc'
            	        {
            	        	Match("desc"); 


            	        }
            	        break;

            	}


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "ASC_DESC"

    // $ANTLR start "ID"
    public void mID() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = ID;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:93:4: ( ( 'A' .. 'Z' | 'a' .. 'z' ) ( 'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '_' | '$' | '#' )* )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:93:6: ( 'A' .. 'Z' | 'a' .. 'z' ) ( 'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '_' | '$' | '#' )*
            {
            	if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || (input.LA(1) >= 'a' && input.LA(1) <= 'z') ) 
            	{
            	    input.Consume();

            	}
            	else 
            	{
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    Recover(mse);
            	    throw mse;}

            	// C:\\projects\\pony\\_grammatics\\PonySQL.g:93:31: ( 'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '_' | '$' | '#' )*
            	do 
            	{
            	    int alt5 = 2;
            	    int LA5_0 = input.LA(1);

            	    if ( ((LA5_0 >= '#' && LA5_0 <= '$') || (LA5_0 >= '0' && LA5_0 <= '9') || (LA5_0 >= 'A' && LA5_0 <= 'Z') || LA5_0 == '_' || (LA5_0 >= 'a' && LA5_0 <= 'z')) )
            	    {
            	        alt5 = 1;
            	    }


            	    switch (alt5) 
            		{
            			case 1 :
            			    // C:\\projects\\pony\\_grammatics\\PonySQL.g:
            			    {
            			    	if ( (input.LA(1) >= '#' && input.LA(1) <= '$') || (input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') ) 
            			    	{
            			    	    input.Consume();

            			    	}
            			    	else 
            			    	{
            			    	    MismatchedSetException mse = new MismatchedSetException(null,input);
            			    	    Recover(mse);
            			    	    throw mse;}


            			    }
            			    break;

            			default:
            			    goto loop5;
            	    }
            	} while (true);

            	loop5:
            		;	// Stops C# compiler whining that label 'loop5' has no statements


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "ID"

    // $ANTLR start "INT"
    public void mINT() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = INT;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:94:5: ( ( '0' .. '9' )+ )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:94:7: ( '0' .. '9' )+
            {
            	// C:\\projects\\pony\\_grammatics\\PonySQL.g:94:7: ( '0' .. '9' )+
            	int cnt6 = 0;
            	do 
            	{
            	    int alt6 = 2;
            	    int LA6_0 = input.LA(1);

            	    if ( ((LA6_0 >= '0' && LA6_0 <= '9')) )
            	    {
            	        alt6 = 1;
            	    }


            	    switch (alt6) 
            		{
            			case 1 :
            			    // C:\\projects\\pony\\_grammatics\\PonySQL.g:94:8: '0' .. '9'
            			    {
            			    	MatchRange('0','9'); 

            			    }
            			    break;

            			default:
            			    if ( cnt6 >= 1 ) goto loop6;
            		            EarlyExitException eee6 =
            		                new EarlyExitException(6, input);
            		            throw eee6;
            	    }
            	    cnt6++;
            	} while (true);

            	loop6:
            		;	// Stops C# compiler whining that label 'loop6' has no statements


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "INT"

    // $ANTLR start "COMMA"
    public void mCOMMA() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = COMMA;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:95:7: ( ',' )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:95:9: ','
            {
            	Match(','); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "COMMA"

    // $ANTLR start "WS"
    public void mWS() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = WS;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:98:9: ( ( ' ' | '\\r' | '\\t' | '\\n' )+ )
            // C:\\projects\\pony\\_grammatics\\PonySQL.g:98:17: ( ' ' | '\\r' | '\\t' | '\\n' )+
            {
            	// C:\\projects\\pony\\_grammatics\\PonySQL.g:98:17: ( ' ' | '\\r' | '\\t' | '\\n' )+
            	int cnt7 = 0;
            	do 
            	{
            	    int alt7 = 2;
            	    int LA7_0 = input.LA(1);

            	    if ( ((LA7_0 >= '\t' && LA7_0 <= '\n') || LA7_0 == '\r' || LA7_0 == ' ') )
            	    {
            	        alt7 = 1;
            	    }


            	    switch (alt7) 
            		{
            			case 1 :
            			    // C:\\projects\\pony\\_grammatics\\PonySQL.g:
            			    {
            			    	if ( (input.LA(1) >= '\t' && input.LA(1) <= '\n') || input.LA(1) == '\r' || input.LA(1) == ' ' ) 
            			    	{
            			    	    input.Consume();

            			    	}
            			    	else 
            			    	{
            			    	    MismatchedSetException mse = new MismatchedSetException(null,input);
            			    	    Recover(mse);
            			    	    throw mse;}


            			    }
            			    break;

            			default:
            			    if ( cnt7 >= 1 ) goto loop7;
            		            EarlyExitException eee7 =
            		                new EarlyExitException(7, input);
            		            throw eee7;
            	    }
            	    cnt7++;
            	} while (true);

            	loop7:
            		;	// Stops C# compiler whining that label 'loop7' has no statements

            	_channel=HIDDEN;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
    // $ANTLR end "WS"

    override public void mTokens() // throws RecognitionException 
    {
        // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:8: ( T__19 | T__20 | PLUS | MINUS | DIVIDE | ASTERISK | SELECT | FROM | ORDER_BY | ASC_DESC | ID | INT | COMMA | WS )
        int alt8 = 14;
        alt8 = dfa8.Predict(input);
        switch (alt8) 
        {
            case 1 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:10: T__19
                {
                	mT__19(); 

                }
                break;
            case 2 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:16: T__20
                {
                	mT__20(); 

                }
                break;
            case 3 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:22: PLUS
                {
                	mPLUS(); 

                }
                break;
            case 4 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:27: MINUS
                {
                	mMINUS(); 

                }
                break;
            case 5 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:33: DIVIDE
                {
                	mDIVIDE(); 

                }
                break;
            case 6 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:40: ASTERISK
                {
                	mASTERISK(); 

                }
                break;
            case 7 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:49: SELECT
                {
                	mSELECT(); 

                }
                break;
            case 8 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:56: FROM
                {
                	mFROM(); 

                }
                break;
            case 9 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:61: ORDER_BY
                {
                	mORDER_BY(); 

                }
                break;
            case 10 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:70: ASC_DESC
                {
                	mASC_DESC(); 

                }
                break;
            case 11 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:79: ID
                {
                	mID(); 

                }
                break;
            case 12 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:82: INT
                {
                	mINT(); 

                }
                break;
            case 13 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:86: COMMA
                {
                	mCOMMA(); 

                }
                break;
            case 14 :
                // C:\\projects\\pony\\_grammatics\\PonySQL.g:1:92: WS
                {
                	mWS(); 

                }
                break;

        }

    }


    protected DFA8 dfa8;
	private void InitializeCyclicDFAs()
	{
	    this.dfa8 = new DFA8(this);
	}

    const string DFA8_eotS =
        "\x07\uffff\x0a\x11\x04\uffff\x10\x11\x02\x2f\x04\x11\x02\x34\x02"+
        "\x11\x01\uffff\x02\x2f\x02\x11\x01\uffff\x02\x11\x02\x3a\x02\uffff";
    const string DFA8_eofS =
        "\x3b\uffff";
    const string DFA8_minS =
        "\x01\x09\x06\uffff\x01\x45\x01\x65\x01\x52\x01\x72\x01\x52\x01"+
        "\x72\x01\x53\x01\x73\x01\x45\x01\x65\x04\uffff\x01\x4c\x01\x6c\x01"+
        "\x4f\x01\x6f\x01\x44\x01\x64\x01\x43\x01\x63\x01\x53\x01\x73\x01"+
        "\x45\x01\x65\x01\x4d\x01\x6d\x01\x45\x01\x65\x02\x23\x01\x43\x01"+
        "\x63\x01\x43\x01\x63\x02\x23\x01\x52\x01\x72\x01\uffff\x02\x23\x01"+
        "\x54\x01\x74\x01\uffff\x02\x20\x02\x23\x02\uffff";
    const string DFA8_maxS =
        "\x01\x7a\x06\uffff\x01\x45\x01\x65\x01\x52\x01\x72\x01\x52\x01"+
        "\x72\x01\x53\x01\x73\x01\x45\x01\x65\x04\uffff\x01\x4c\x01\x6c\x01"+
        "\x4f\x01\x6f\x01\x44\x01\x64\x01\x43\x01\x63\x01\x53\x01\x73\x01"+
        "\x45\x01\x65\x01\x4d\x01\x6d\x01\x45\x01\x65\x02\x7a\x01\x43\x01"+
        "\x63\x01\x43\x01\x63\x02\x7a\x01\x52\x01\x72\x01\uffff\x02\x7a\x01"+
        "\x54\x01\x74\x01\uffff\x02\x20\x02\x7a\x02\uffff";
    const string DFA8_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x0a"+
        "\uffff\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x1a\uffff\x01\x0a\x04\uffff"+
        "\x01\x08\x04\uffff\x01\x09\x01\x07";
    const string DFA8_specialS =
        "\x3b\uffff}>";
    static readonly string[] DFA8_transitionS = {
            "\x02\x14\x02\uffff\x01\x14\x12\uffff\x01\x14\x07\uffff\x01"+
            "\x01\x01\x02\x01\x06\x01\x03\x01\x13\x01\x04\x01\uffff\x01\x05"+
            "\x0a\x12\x07\uffff\x01\x0d\x02\x11\x01\x0f\x01\x11\x01\x09\x08"+
            "\x11\x01\x0b\x03\x11\x01\x07\x07\x11\x06\uffff\x01\x0e\x02\x11"+
            "\x01\x10\x01\x11\x01\x0a\x08\x11\x01\x0c\x03\x11\x01\x08\x07"+
            "\x11",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\x15",
            "\x01\x16",
            "\x01\x17",
            "\x01\x18",
            "\x01\x19",
            "\x01\x1a",
            "\x01\x1b",
            "\x01\x1c",
            "\x01\x1d",
            "\x01\x1e",
            "",
            "",
            "",
            "",
            "\x01\x1f",
            "\x01\x20",
            "\x01\x21",
            "\x01\x22",
            "\x01\x23",
            "\x01\x24",
            "\x01\x25",
            "\x01\x26",
            "\x01\x27",
            "\x01\x28",
            "\x01\x29",
            "\x01\x2a",
            "\x01\x2b",
            "\x01\x2c",
            "\x01\x2d",
            "\x01\x2e",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "\x01\x30",
            "\x01\x31",
            "\x01\x32",
            "\x01\x33",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "\x01\x35",
            "\x01\x36",
            "",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "\x01\x37",
            "\x01\x38",
            "",
            "\x01\x39",
            "\x01\x39",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "\x02\x11\x0b\uffff\x0a\x11\x07\uffff\x1a\x11\x04\uffff\x01"+
            "\x11\x01\uffff\x1a\x11",
            "",
            ""
    };

    static readonly short[] DFA8_eot = DFA.UnpackEncodedString(DFA8_eotS);
    static readonly short[] DFA8_eof = DFA.UnpackEncodedString(DFA8_eofS);
    static readonly char[] DFA8_min = DFA.UnpackEncodedStringToUnsignedChars(DFA8_minS);
    static readonly char[] DFA8_max = DFA.UnpackEncodedStringToUnsignedChars(DFA8_maxS);
    static readonly short[] DFA8_accept = DFA.UnpackEncodedString(DFA8_acceptS);
    static readonly short[] DFA8_special = DFA.UnpackEncodedString(DFA8_specialS);
    static readonly short[][] DFA8_transition = DFA.UnpackEncodedStringArray(DFA8_transitionS);

    protected class DFA8 : DFA
    {
        public DFA8(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 8;
            this.eot = DFA8_eot;
            this.eof = DFA8_eof;
            this.min = DFA8_min;
            this.max = DFA8_max;
            this.accept = DFA8_accept;
            this.special = DFA8_special;
            this.transition = DFA8_transition;

        }

        override public string Description
        {
            get { return "1:1: Tokens : ( T__19 | T__20 | PLUS | MINUS | DIVIDE | ASTERISK | SELECT | FROM | ORDER_BY | ASC_DESC | ID | INT | COMMA | WS );"; }
        }

    }

 
    
}
}