-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcifLexer.cpp
7327 lines (6276 loc) · 214 KB
/
cifLexer.cpp
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
/** \file
* This C source file was generated by $ANTLR version 3.4
*
* - From the grammar source file : cif.g
* - On : 2013-04-16 18:47:22
* - for the lexer : cifLexerLexer
*
* Editing it, at least manually, is not wise.
*
* C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws.
*
*
*/
// [The "BSD license"]
// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
// http://www.temporal-wave.com
// http://www.linkedin.com/in/jimidle
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* -----------------------------------------
* Include the ANTLR3 generated header file.
*/
#include "cifLexer.h"
/* ----------------------------------------- */
/** String literals used by cifLexer that we must do things like MATCHS() with.
* C will normally just lay down 8 bit characters, and you can use L"xxx" to
* get wchar_t, but wchar_t is 16 bits on Windows, which is not UTF32 and so
* we perform this little trick of defining the literals as arrays of UINT32
* and passing in the address of these.
*/
static ANTLR3_UCHAR lit_1[] = { 0x0D, 0x0A, ANTLR3_STRING_TERMINATOR};
/* MACROS that hide the C interface implementations from the
* generated code, which makes it a little more understandable to the human eye.
* I am very much against using C pre-processor macros for function calls and bits
* of code as you cannot see what is happening when single stepping in debuggers
* and so on. The exception (in my book at least) is for generated code, where you are
* not maintaining it, but may wish to read and understand it. If you single step it, you know that input()
* hides some indirect calls, but is always referring to the input stream. This is
* probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig
* the runtime interfaces without changing the generated code too often, without
* confusing the reader of the generated output, who may not wish to know the gory
* details of the interface inheritance.
*/
#define CTX ctx
/* Aids in accessing scopes for grammar programmers
*/
#undef SCOPE_TYPE
#undef SCOPE_STACK
#undef SCOPE_TOP
#define SCOPE_TYPE(scope) pcifLexer_##scope##_SCOPE
#define SCOPE_STACK(scope) pcifLexer_##scope##Stack
#define SCOPE_TOP(scope) ctx->pcifLexer_##scope##Top
#define SCOPE_SIZE(scope) ctx->pcifLexer_##scope##Stack_limit
#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i))
/* Macros for accessing things in a lexer
*/
#undef LEXER
#undef RECOGNIZER
#undef RULEMEMO
#undef GETCHARINDEX
#undef GETLINE
#undef GETCHARPOSITIONINLINE
#undef EMIT
#undef EMITNEW
#undef MATCHC
#undef MATCHS
#undef MATCHRANGE
#undef LTOKEN
#undef HASFAILED
#undef FAILEDFLAG
#undef INPUT
#undef STRSTREAM
#undef LA
#undef HASEXCEPTION
#undef EXCEPTION
#undef CONSTRUCTEX
#undef CONSUME
#undef LRECOVER
#undef MARK
#undef REWIND
#undef REWINDLAST
#undef BACKTRACKING
#undef MATCHANY
#undef MEMOIZE
#undef HAVEPARSEDRULE
#undef GETTEXT
#undef INDEX
#undef SEEK
#undef PUSHSTREAM
#undef POPSTREAM
#undef SETTEXT
#undef SETTEXT8
#define LEXER ctx->pLexer
#define RECOGNIZER LEXER->rec
#define LEXSTATE RECOGNIZER->state
#define TOKSOURCE LEXSTATE->tokSource
#define GETCHARINDEX() LEXER->getCharIndex(LEXER)
#define GETLINE() LEXER->getLine(LEXER)
#define GETTEXT() LEXER->getText(LEXER)
#define GETCHARPOSITIONINLINE() LEXER->getCharPositionInLine(LEXER)
#define EMIT() LEXSTATE->type = _type; LEXER->emit(LEXER)
#define EMITNEW(t) LEXER->emitNew(LEXER, t)
#define MATCHC(c) LEXER->matchc(LEXER, c)
#define MATCHS(s) LEXER->matchs(LEXER, s)
#define MATCHRANGE(c1,c2) LEXER->matchRange(LEXER, c1, c2)
#define MATCHANY() LEXER->matchAny(LEXER)
#define LTOKEN LEXSTATE->token
#define HASFAILED() (LEXSTATE->failed == ANTLR3_TRUE)
#define BACKTRACKING LEXSTATE->backtracking
#define FAILEDFLAG LEXSTATE->failed
#define INPUT LEXER->input
#define STRSTREAM INPUT
#define ISTREAM INPUT->istream
#define INDEX() ISTREAM->index(ISTREAM)
#define SEEK(n) ISTREAM->seek(ISTREAM, n)
#define EOF_TOKEN &(LEXSTATE->tokSource->eofToken)
#define HASEXCEPTION() (LEXSTATE->error == ANTLR3_TRUE)
#define EXCEPTION LEXSTATE->exception
#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER)
#define LRECOVER() LEXER->recover(LEXER)
#define MARK() ISTREAM->mark(ISTREAM)
#define REWIND(m) ISTREAM->rewind(ISTREAM, m)
#define REWINDLAST() ISTREAM->rewindLast(ISTREAM)
#define MEMOIZE(ri,si) RECOGNIZER->memoize(RECOGNIZER, ri, si)
#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r)
#define PUSHSTREAM(str) LEXER->pushCharStream(LEXER, str)
#define POPSTREAM() LEXER->popCharStream(LEXER)
#define SETTEXT(str) LEXSTATE->text = str
#define SKIP() LEXSTATE->token = &(TOKSOURCE->skipToken)
#define USER1 LEXSTATE->user1
#define USER2 LEXSTATE->user2
#define USER3 LEXSTATE->user3
#define CUSTOM LEXSTATE->custom
#define RULEMEMO LEXSTATE->ruleMemo
#define DBG RECOGNIZER->debugger
/* If we have been told we can rely on the standard 8 bit or UTF16 input
* stream, then we can define our macros to use the direct pointers
* in the input object, which is much faster than indirect calls. This
* is really only significant to lexers with a lot of fragment rules (which
* do not place LA(1) in a temporary at the moment) and even then
* only if there is a lot of input (order of say 1M or so).
*/
#if defined(ANTLR3_INLINE_INPUT_8BIT) || defined(ANTLR3_INLINE_INPUT_UTF16)
# ifdef ANTLR3_INLINE_INPUT_8BIT
/* 8 bit character set */
# define NEXTCHAR ((pANTLR3_UINT8)(INPUT->nextChar))
# define DATAP ((pANTLR3_UINT8)(INPUT->data))
# else
# define NEXTCHAR ((pANTLR3_UINT16)(INPUT->nextChar))
# define DATAP ((pANTLR3_UINT16)(INPUT->data))
# endif
# define LA(n) ((NEXTCHAR + n) > (DATAP + INPUT->sizeBuf) ? ANTLR3_CHARSTREAM_EOF : (ANTLR3_UCHAR)(*(NEXTCHAR + n - 1)))
# define CONSUME() \
{ \
if (NEXTCHAR < (DATAP + INPUT->sizeBuf)) \
{ \
INPUT->charPositionInLine++; \
if ((ANTLR3_UCHAR)(*NEXTCHAR) == INPUT->newlineChar) \
{ \
INPUT->line++; \
INPUT->charPositionInLine = 0; \
INPUT->currentLine = (void *)(NEXTCHAR + 1); \
} \
INPUT->nextChar = (void *)(NEXTCHAR + 1); \
} \
}
#else
// Pick up the input character by calling the input stream implementation.
//
#define CONSUME() INPUT->istream->consume(INPUT->istream)
#define LA(n) INPUT->istream->_LA(INPUT->istream, n)
#endif
#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt
/* The 4 tokens defined below may well clash with your own #defines or token types. If so
* then for the present you must use different names for your defines as these are hard coded
* in the code generator. It would be better not to use such names internally, and maybe
* we can change this in a forthcoming release. I deliberately do not #undef these
* here as this will at least give you a redefined error somewhere if they clash.
*/
#define UP ANTLR3_TOKEN_UP
#define DOWN ANTLR3_TOKEN_DOWN
#define EOR ANTLR3_TOKEN_EOR
#define INVALID ANTLR3_TOKEN_INVALID
/* =============================================================================
* Functions to create and destroy scopes. First come the rule scopes, followed
* by the global declared scopes.
*/
/* ============================================================================= */
/* =============================================================================
* Start of recognizer
*/
/* Forward declare the locally static matching functions we have generated and any predicate functions.
*/
static ANTLR3_INLINE
void
mT__37 (pcifLexer ctx);
static ANTLR3_INLINE
void
mEOL (pcifLexer ctx);
static ANTLR3_INLINE
void
mDOUBLE_QUOTE (pcifLexer ctx);
static ANTLR3_INLINE
void
mSINGLE_QUOTE (pcifLexer ctx);
static ANTLR3_INLINE
void
mORDINARY_CHAR (pcifLexer ctx);
static ANTLR3_INLINE
void
mNON_BLANK_CHAR_ (pcifLexer ctx);
static ANTLR3_INLINE
void
mTEXT_LEAD_CHAR (pcifLexer ctx);
static ANTLR3_INLINE
void
mANY_PRINT_CHAR (pcifLexer ctx);
static ANTLR3_INLINE
void
mTAG (pcifLexer ctx);
static ANTLR3_INLINE
void
mDATA_ (pcifLexer ctx);
static ANTLR3_INLINE
void
mSAVE_ (pcifLexer ctx);
static ANTLR3_INLINE
void
mLOOP_ (pcifLexer ctx);
static ANTLR3_INLINE
void
mGLOBAL_ (pcifLexer ctx);
static ANTLR3_INLINE
void
mSTOP_ (pcifLexer ctx);
static ANTLR3_INLINE
void
mDATA_BLOCK_HEADING (pcifLexer ctx);
static ANTLR3_INLINE
void
mSAVE_FRAME_HEADING (pcifLexer ctx);
static ANTLR3_INLINE
void
mSAVE (pcifLexer ctx);
static ANTLR3_INLINE
void
mDIGIT (pcifLexer ctx);
static ANTLR3_INLINE
void
mEXPONENT (pcifLexer ctx);
static ANTLR3_INLINE
void
mINTEGER (pcifLexer ctx);
static ANTLR3_INLINE
void
mFLOAT (pcifLexer ctx);
static ANTLR3_INLINE
void
mUNSIGNED_INTEGER (pcifLexer ctx);
static ANTLR3_INLINE
void
mNUMBER (pcifLexer ctx);
static ANTLR3_INLINE
void
mNUMERIC (pcifLexer ctx);
static ANTLR3_INLINE
void
mINAPPLICABLE (pcifLexer ctx);
static ANTLR3_INLINE
void
mUNKNOWN (pcifLexer ctx);
static ANTLR3_INLINE
void
mUNQUOTED_STRING (pcifLexer ctx);
static ANTLR3_INLINE
void
mSINGLE_QUOTED_STRING (pcifLexer ctx);
static ANTLR3_INLINE
void
mDOUBLE_QUOTED_STRING (pcifLexer ctx);
static ANTLR3_INLINE
void
mCHAR_STRING (pcifLexer ctx);
static ANTLR3_INLINE
void
mSEMI_COLON_TEXT_FIELD (pcifLexer ctx);
static ANTLR3_INLINE
void
mCOMMENTS (pcifLexer ctx);
static ANTLR3_INLINE
void
mNON_BLANK_CHAR (pcifLexer ctx);
static ANTLR3_INLINE
void
mWHITESPACE (pcifLexer ctx);
static ANTLR3_INLINE
void
mTokens (pcifLexer ctx);
static ANTLR3_INLINE
ANTLR3_BOOLEAN
synpred1_cif (pcifLexer ctx);
static ANTLR3_INLINE
ANTLR3_BOOLEAN
synpred2_cif (pcifLexer ctx);
static void cifLexerFree(pcifLexer ctx);
/* =========================================================================
* Lexer matching rules end.
* =========================================================================
*/
static void
cifLexerFree (pcifLexer ctx)
{
LEXER->free(LEXER);
ANTLR3_FREE(ctx);
}
static void
cifLexerReset (pcifLexer ctx)
{
RECOGNIZER->reset(RECOGNIZER);
}
/** \brief Name of the grammar file that generated this code
*/
static const char fileName[] = "cif.g";
/** \brief Return the name of the grammar file that generated this code.
*/
static const char * getGrammarFileName()
{
return fileName;
}
/** \brief Create a new lexer called cifLexer
*
* \param[in] instream Pointer to an initialized input stream
* \return
* - Success pcifLexer initialized for the lex start
* - Fail NULL
*/
ANTLR3_API pcifLexer cifLexerNew
(
pANTLR3_INPUT_STREAM
instream)
{
// See if we can create a new lexer with the standard constructor
//
return cifLexerNewSSD(instream, NULL);
}
/** \brief Create a new lexer called cifLexer
*
* \param[in] instream Pointer to an initialized input stream
* \param[state] state Previously created shared recognizer stat
* \return
* - Success pcifLexer initialized for the lex start
* - Fail NULL
*/
ANTLR3_API pcifLexer cifLexerNewSSD
(pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state)
{
pcifLexer ctx; // Context structure we will build and return
ctx = (pcifLexer) ANTLR3_CALLOC(1, sizeof(cifLexer));
if (ctx == NULL)
{
// Failed to allocate memory for lexer context
return NULL;
}
/* -------------------------------------------------------------------
* Memory for basic structure is allocated, now to fill in
* in base ANTLR3 structures. We initialize the function pointers
* for the standard ANTLR3 lexer function set, but upon return
* from here, the programmer may set the pointers to provide custom
* implementations of each function.
*
* We don't use the macros defined in cifLexer.h here so you can get a sense
* of what goes where.
*/
/* Create a base lexer, using the supplied input stream
*/
ctx->pLexer = antlr3LexerNewStream(ANTLR3_SIZE_HINT, instream, state);
/* Check that we allocated the memory correctly
*/
if (ctx->pLexer == NULL)
{
ANTLR3_FREE(ctx);
return NULL;
}
/* Install the implementation of our cifLexer interface
*/
ctx->mT__37 = mT__37;
ctx->mEOL = mEOL;
ctx->mDOUBLE_QUOTE = mDOUBLE_QUOTE;
ctx->mSINGLE_QUOTE = mSINGLE_QUOTE;
ctx->mORDINARY_CHAR = mORDINARY_CHAR;
ctx->mNON_BLANK_CHAR_ = mNON_BLANK_CHAR_;
ctx->mTEXT_LEAD_CHAR = mTEXT_LEAD_CHAR;
ctx->mANY_PRINT_CHAR = mANY_PRINT_CHAR;
ctx->mTAG = mTAG;
ctx->mDATA_ = mDATA_;
ctx->mSAVE_ = mSAVE_;
ctx->mLOOP_ = mLOOP_;
ctx->mGLOBAL_ = mGLOBAL_;
ctx->mSTOP_ = mSTOP_;
ctx->mDATA_BLOCK_HEADING = mDATA_BLOCK_HEADING;
ctx->mSAVE_FRAME_HEADING = mSAVE_FRAME_HEADING;
ctx->mSAVE = mSAVE;
ctx->mDIGIT = mDIGIT;
ctx->mEXPONENT = mEXPONENT;
ctx->mINTEGER = mINTEGER;
ctx->mFLOAT = mFLOAT;
ctx->mUNSIGNED_INTEGER = mUNSIGNED_INTEGER;
ctx->mNUMBER = mNUMBER;
ctx->mNUMERIC = mNUMERIC;
ctx->mINAPPLICABLE = mINAPPLICABLE;
ctx->mUNKNOWN = mUNKNOWN;
ctx->mUNQUOTED_STRING = mUNQUOTED_STRING;
ctx->mSINGLE_QUOTED_STRING = mSINGLE_QUOTED_STRING;
ctx->mDOUBLE_QUOTED_STRING = mDOUBLE_QUOTED_STRING;
ctx->mCHAR_STRING = mCHAR_STRING;
ctx->mSEMI_COLON_TEXT_FIELD = mSEMI_COLON_TEXT_FIELD;
ctx->mCOMMENTS = mCOMMENTS;
ctx->mNON_BLANK_CHAR = mNON_BLANK_CHAR;
ctx->mWHITESPACE = mWHITESPACE;
ctx->mTokens = mTokens;
/** When the nextToken() call is made to this lexer's pANTLR3_TOKEN_SOURCE
* it will call mTokens() in this generated code, and will pass it the ctx
* pointer of this lexer, not the context of the base lexer, so store that now.
*/
ctx->pLexer->ctx = ctx;
/**Install the token matching function
*/
ctx->pLexer->mTokens = (void (*) (void *))(mTokens);
ctx->getGrammarFileName = getGrammarFileName;
ctx->free = cifLexerFree;
ctx->reset = cifLexerReset;
LEXER->super = (void *)ctx;
/* Return the newly built lexer to the caller
*/
return ctx;
}
/* =========================================================================
* DFA tables for the lexer
*/
/** Static dfa state tables for Cyclic dfa:
* 276:10: fragment FLOAT : ( INTEGER EXPONENT | ( ( '+' | '-' )? ( ( DIGIT )* '.' ( DIGIT )+ ) | ( DIGIT )+ '.' ) ( EXPONENT )? );
*/
static const ANTLR3_INT32 dfa15_eot[6] =
{
-1, -1, -1, -1, -1, -1
};
static const ANTLR3_INT32 dfa15_eof[6] =
{
-1, -1, -1, -1, -1, -1
};
static const ANTLR3_INT32 dfa15_min[6] =
{
43, 46, 46, -1, 46, -1
};
static const ANTLR3_INT32 dfa15_max[6] =
{
57, 57, 101, -1, 101, -1
};
static const ANTLR3_INT32 dfa15_accept[6] =
{
-1, -1, -1, 2, -1, 1
};
static const ANTLR3_INT32 dfa15_special[6] =
{
-1, -1, -1, -1, -1, -1
};
/** Used when there is no transition table entry for a particular state */
#define dfa15_T_empty NULL
static const ANTLR3_INT32 dfa15_T0[] =
{
3, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5
};
static const ANTLR3_INT32 dfa15_T1[] =
{
3, -1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
};
static const ANTLR3_INT32 dfa15_T2[] =
{
3, -1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5
};
static const ANTLR3_INT32 dfa15_T3[] =
{
1, -1, 1, 3, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
};
/* Transition tables are a table of sub tables, with some tables
* reused for efficiency.
*/
static const ANTLR3_INT32 * const dfa15_transitions[] =
{
dfa15_T3, dfa15_T1, dfa15_T0, NULL, dfa15_T2, NULL
};
/* Declare tracking structure for Cyclic DFA 15
*/
static
ANTLR3_CYCLIC_DFA cdfa15
= {
15, /* Decision number of this dfa */
/* Which decision this represents: */
(const pANTLR3_UCHAR)"276:10: fragment FLOAT : ( INTEGER EXPONENT | ( ( '+' | '-' )? ( ( DIGIT )* '.' ( DIGIT )+ ) | ( DIGIT )+ '.' ) ( EXPONENT )? );",
(CDFA_SPECIAL_FUNC) antlr3dfaspecialStateTransition, /* Default special state transition function */
antlr3dfaspecialTransition, /* DFA specialTransition is currently just a default function in the runtime */
antlr3dfapredict, /* DFA simulator function is in the runtime */
dfa15_eot, /* EOT table */
dfa15_eof, /* EOF table */
dfa15_min, /* Minimum tokens for each state */
dfa15_max, /* Maximum tokens for each state */
dfa15_accept, /* Accept table */
dfa15_special, /* Special transition states */
dfa15_transitions /* Table of transition tables */
};
/* End of Cyclic DFA 15
* ---------------------
*//** Static dfa state tables for Cyclic dfa:
* 277:25: ( ( '+' | '-' )? ( ( DIGIT )* '.' ( DIGIT )+ ) | ( DIGIT )+ '.' )
*/
static const ANTLR3_INT32 dfa13_eot[5] =
{
-1, -1, -1, 4, -1
};
static const ANTLR3_INT32 dfa13_eof[5] =
{
-1, -1, -1, -1, -1
};
static const ANTLR3_INT32 dfa13_min[5] =
{
43, -1, 46, 48, -1
};
static const ANTLR3_INT32 dfa13_max[5] =
{
57, -1, 57, 57, -1
};
static const ANTLR3_INT32 dfa13_accept[5] =
{
-1, 1, -1, -1, 2
};
static const ANTLR3_INT32 dfa13_special[5] =
{
-1, -1, -1, -1, -1
};
/** Used when there is no transition table entry for a particular state */
#define dfa13_T_empty NULL
static const ANTLR3_INT32 dfa13_T0[] =
{
3, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
};
static const ANTLR3_INT32 dfa13_T1[] =
{
1, -1, 1, 1, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
};
static const ANTLR3_INT32 dfa13_T2[] =
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1
};
/* Transition tables are a table of sub tables, with some tables
* reused for efficiency.
*/
static const ANTLR3_INT32 * const dfa13_transitions[] =
{
dfa13_T1, NULL, dfa13_T0, dfa13_T2, NULL
};
/* Declare tracking structure for Cyclic DFA 13
*/
static
ANTLR3_CYCLIC_DFA cdfa13
= {
13, /* Decision number of this dfa */
/* Which decision this represents: */
(const pANTLR3_UCHAR)"277:25: ( ( '+' | '-' )? ( ( DIGIT )* '.' ( DIGIT )+ ) | ( DIGIT )+ '.' )",
(CDFA_SPECIAL_FUNC) antlr3dfaspecialStateTransition, /* Default special state transition function */
antlr3dfaspecialTransition, /* DFA specialTransition is currently just a default function in the runtime */
antlr3dfapredict, /* DFA simulator function is in the runtime */
dfa13_eot, /* EOT table */
dfa13_eof, /* EOF table */
dfa13_min, /* Minimum tokens for each state */
dfa13_max, /* Maximum tokens for each state */
dfa13_accept, /* Accept table */
dfa13_special, /* Special transition states */
dfa13_transitions /* Table of transition tables */
};
/* End of Cyclic DFA 13
* ---------------------
*//** Static dfa state tables for Cyclic dfa:
* 282:10: fragment NUMBER : ( INTEGER | FLOAT );
*/
static const ANTLR3_INT32 dfa17_eot[6] =
{
-1, -1, 5, -1, 5, -1
};
static const ANTLR3_INT32 dfa17_eof[6] =
{
-1, -1, -1, -1, -1, -1
};
static const ANTLR3_INT32 dfa17_min[6] =
{
43, 46, 46, -1, 46, -1
};
static const ANTLR3_INT32 dfa17_max[6] =
{
57, 57, 101, -1, 101, -1
};
static const ANTLR3_INT32 dfa17_accept[6] =
{
-1, -1, -1, 2, -1, 1
};
static const ANTLR3_INT32 dfa17_special[6] =
{
-1, -1, -1, -1, -1, -1
};
/** Used when there is no transition table entry for a particular state */
#define dfa17_T_empty NULL
static const ANTLR3_INT32 dfa17_T0[] =
{
3, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3
};
static const ANTLR3_INT32 dfa17_T1[] =
{
1, -1, 1, 3, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
};
static const ANTLR3_INT32 dfa17_T2[] =
{
3, -1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
};
static const ANTLR3_INT32 dfa17_T3[] =
{
3, -1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3
};
/* Transition tables are a table of sub tables, with some tables
* reused for efficiency.
*/
static const ANTLR3_INT32 * const dfa17_transitions[] =
{
dfa17_T1, dfa17_T2, dfa17_T0, NULL, dfa17_T3, NULL
};
/* Declare tracking structure for Cyclic DFA 17
*/
static
ANTLR3_CYCLIC_DFA cdfa17
= {
17, /* Decision number of this dfa */
/* Which decision this represents: */
(const pANTLR3_UCHAR)"282:10: fragment NUMBER : ( INTEGER | FLOAT );",
(CDFA_SPECIAL_FUNC) antlr3dfaspecialStateTransition, /* Default special state transition function */
antlr3dfaspecialTransition, /* DFA specialTransition is currently just a default function in the runtime */
antlr3dfapredict, /* DFA simulator function is in the runtime */
dfa17_eot, /* EOT table */
dfa17_eof, /* EOF table */
dfa17_min, /* Minimum tokens for each state */
dfa17_max, /* Maximum tokens for each state */
dfa17_accept, /* Accept table */
dfa17_special, /* Special transition states */
dfa17_transitions /* Table of transition tables */
};
/* End of Cyclic DFA 17
* ---------------------
*//** Static dfa state tables for Cyclic dfa:
* 285:1: NUMERIC : ( NUMBER | ( NUMBER '(' ( UNSIGNED_INTEGER )+ ')' ) );
*/
static const ANTLR3_INT32 dfa19_eot[15] =
{
-1, -1, 5, -1, 5, -1, -1, 5, -1, 5, -1, 5, -1, -1, 5
};
static const ANTLR3_INT32 dfa19_eof[15] =
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
static const ANTLR3_INT32 dfa19_min[15] =
{
43, 46, 40, 48, 40, -1, 43, 40, -1, 40, 48, 40, 43, 48, 40
};
static const ANTLR3_INT32 dfa19_max[15] =
{
57, 57, 101, 57, 101, -1, 57, 101, -1, 101, 57, 57, 57, 57, 57
};
static const ANTLR3_INT32 dfa19_accept[15] =
{
-1, -1, -1, -1, -1, 1, -1, -1, 2, -1, -1, -1, -1, -1, -1
};
static const ANTLR3_INT32 dfa19_special[15] =
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
/** Used when there is no transition table entry for a particular state */
#define dfa19_T_empty NULL
static const ANTLR3_INT32 dfa19_T0[] =
{
1, -1, 1, 3, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
};
static const ANTLR3_INT32 dfa19_T1[] =
{
9, 9, 9, 9, 9, 9, 9, 9, 9, 9
};
static const ANTLR3_INT32 dfa19_T2[] =
{
8, -1, -1, -1, -1, -1, -1, -1, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
};
static const ANTLR3_INT32 dfa19_T3[] =
{
3, -1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
};
static const ANTLR3_INT32 dfa19_T4[] =
{
8, -1, -1, -1, -1, -1, -1, -1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 12
};
static const ANTLR3_INT32 dfa19_T5[] =
{
14, 14, 14, 14, 14, 14, 14, 14, 14, 14
};
static const ANTLR3_INT32 dfa19_T6[] =
{
8, -1, -1, -1, -1, -1, 3, -1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 6
};
static const ANTLR3_INT32 dfa19_T7[] =
{
11, 11, 11, 11, 11, 11, 11, 11, 11, 11
};
static const ANTLR3_INT32 dfa19_T8[] =
{
8, -1, -1, -1, -1, -1, -1, -1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
};
static const ANTLR3_INT32 dfa19_T9[] =
{
8, -1, -1, -1, -1, -1, 7, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 6
};
static const ANTLR3_INT32 dfa19_T10[] =
{
10, -1, 10, -1, -1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
};
static const ANTLR3_INT32 dfa19_T11[] =
{
13, -1, 13, -1, -1, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
};
/* Transition tables are a table of sub tables, with some tables
* reused for efficiency.
*/
static const ANTLR3_INT32 * const dfa19_transitions[] =
{
dfa19_T0, dfa19_T3, dfa19_T9, dfa19_T1, dfa19_T6, NULL, dfa19_T10, dfa19_T4,
NULL, dfa19_T4, dfa19_T7, dfa19_T8, dfa19_T11, dfa19_T5, dfa19_T2
};
/* Declare tracking structure for Cyclic DFA 19
*/
static
ANTLR3_CYCLIC_DFA cdfa19
= {
19, /* Decision number of this dfa */
/* Which decision this represents: */
(const pANTLR3_UCHAR)"285:1: NUMERIC : ( NUMBER | ( NUMBER '(' ( UNSIGNED_INTEGER )+ ')' ) );",
(CDFA_SPECIAL_FUNC) antlr3dfaspecialStateTransition, /* Default special state transition function */
antlr3dfaspecialTransition, /* DFA specialTransition is currently just a default function in the runtime */
antlr3dfapredict, /* DFA simulator function is in the runtime */
dfa19_eot, /* EOT table */
dfa19_eof, /* EOF table */
dfa19_min, /* Minimum tokens for each state */
dfa19_max, /* Maximum tokens for each state */
dfa19_accept, /* Accept table */
dfa19_special, /* Special transition states */
dfa19_transitions /* Table of transition tables */
};
/* End of Cyclic DFA 19
* ---------------------
*//** Static dfa state tables for Cyclic dfa:
* 1:1: Tokens : ( T__37 | TAG | LOOP_ | GLOBAL_ | STOP_ | DATA_BLOCK_HEADING | SAVE_FRAME_HEADING | SAVE | NUMERIC | INAPPLICABLE | UNKNOWN | CHAR_STRING | SEMI_COLON_TEXT_FIELD | COMMENTS | NON_BLANK_CHAR | WHITESPACE );
*/
static const ANTLR3_INT32 dfa33_eot[73] =
{
-1, -1, 16, 20, 20, 20, 20, 20, 27, 33, 34, 36, -1, 16, 16, -1, -1, -1,
-1, 20, -1, 20, 20, 20, 20, 27, 20, -1, 27, 20, 27, 20, 27, -1, -1, 48,
-1, -1, -1, 50, 50, 50, 50, 50, 50, 27, 50, 50, -1, 50, -1, 50, 50, 50,
50, 50, 27, 27, 63, 50, 65, 66, 50, -1, 50, -1, -1, 70, 71, 72, -1, -1,
-1
};
static const ANTLR3_INT32 dfa33_eof[73] =
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1
};
static const ANTLR3_INT32 dfa33_min[73] =
{
9, -1, 33, 79, 76, 65, 65, 46, 33, 33, 33, 9, -1, 9, 9, -1, -1, -1, -1,
79, -1, 79, 79, 86, 84, 33, 48, -1, 33, 43, 33, 48, 33, -1, -1, 9, 0, -1,
-1, 80, 66, 80, 69, 65, 48, 33, 43, 41, -1, 95, -1, 65, 95, 95, 95, 48,
33, 33, 33, 76, 33, 33, 33, -1, 95, -1, -1, 33, 33, 33, -1, -1, -1
};
static const ANTLR3_INT32 dfa33_max[73] =
{
126, -1, 126, 111, 108, 116, 97, 57, 126, 126, 126, 126, -1, 126, 126,
-1, -1, -1, -1, 111, -1, 111, 111, 118, 116, 126, 57, -1, 126, 57, 126,
57, 126, -1, -1, 126, 0, -1, -1, 112, 98, 112, 101, 97, 57, 126, 57, 57,
-1, 95, -1, 97, 95, 95, 95, 57, 126, 126, 126, 108, 126, 126, 126, -1,
95, -1, -1, 126, 126, 126, -1, -1, -1
};
static const ANTLR3_INT32 dfa33_accept[73] =
{
-1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, 14, 15, 16,
2, -1, 12, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, 10, 11, -1, -1,
13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, 12, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 3, -1, 5, 8, -1, -1, -1, 7, 6, 4
};
static const ANTLR3_INT32 dfa33_special[73] =
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2,
1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1
};
/** Used when there is no transition table entry for a particular state */
#define dfa33_T_empty NULL
static const ANTLR3_INT32 dfa33_T0[] =
{
47, 47, 47, 47, 47, 47, 47, 47, 47, 47
};
static const ANTLR3_INT32 dfa33_T1[] =
{
50, 50, 50, 50, 50, 50, 50, 31, 50, 50, 50, 50, 50, 50, 50, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50
};
static const ANTLR3_INT32 dfa33_T2[] =
{
37, 37, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 37, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35
};
static const ANTLR3_INT32 dfa33_T3[] =
{
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50
};
static const ANTLR3_INT32 dfa33_T4[] =
{
39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39
};
static const ANTLR3_INT32 dfa33_T5[] =
{
56, 56, 56, 56, 56, 56, 56, 56, 56, 56
};
static const ANTLR3_INT32 dfa33_T6[] =
{
45, 45, 45, 45, 45, 45, 45, 45, 45, 45
};
static const ANTLR3_INT32 dfa33_T7[] =
{
58
};
static const ANTLR3_INT32 dfa33_T8[] =
{
49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49
};
static const ANTLR3_INT32 dfa33_T9[] =
{
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,