Uh oh!
There was an error while loading. Please reload this page.
forked from ThrostGunnulf/iJavaC
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathijparser.tab.c
More file actions
Latest commit
2015 lines (1707 loc) · 54.3 KB
/
Copy pathijparser.tab.c
File metadata and controls
2015 lines (1707 loc) · 54.3 KB
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
/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output. */
#defineYYBISON 1
/* Bison version. */
#defineYYBISON_VERSION "2.3"
/* Skeleton name. */
#defineYYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#defineYYPURE 0
/* Using locations. */
#defineYYLSP_NEEDED 0
/* Tokens. */
#ifndefYYTOKENTYPE
# defineYYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enumyytokentype {
INT=258,
BOOL=259,
NEW=260,
IF=261,
ELSE=262,
WHILE=263,
PRINT=264,
PARSEINT=265,
CLASS=266,
PUBLIC=267,
STATIC=268,
VOID=269,
STRING=270,
DOTLENGTH=271,
RETURN=272,
AND=273,
OR=274,
RELCOMPAR=275,
BOOLLIT=276,
ID=277,
INTLIT=278,
RESERVED=279,
EQUALITY=280,
ADDITIVE=281,
MULTIPLIC=282,
UNARY=283,
EXPR1REDUCE=284,
IFX=285
};
#endif
/* Tokens. */
#defineINT 258
#defineBOOL 259
#defineNEW 260
#defineIF 261
#defineELSE 262
#defineWHILE 263
#definePRINT 264
#definePARSEINT 265
#defineCLASS 266
#definePUBLIC 267
#defineSTATIC 268
#defineVOID 269
#defineSTRING 270
#defineDOTLENGTH 271
#defineRETURN 272
#defineAND 273
#defineOR 274
#defineRELCOMPAR 275
#defineBOOLLIT 276
#defineID 277
#defineINTLIT 278
#defineRESERVED 279
#defineEQUALITY 280
#defineADDITIVE 281
#defineMULTIPLIC 282
#defineUNARY 283
#defineEXPR1REDUCE 284
#defineIFX 285
/* Copy the first part of user declarations. */
#line 1 "ijparser.y"
#include<stdio.h>
#include"astNodes.h"
voidyyerror(char*s);
externintprevLineNo;
externintprevColNo;
externchar*yytext;
/* Enabling traces. */
#ifndefYYDEBUG
# defineYYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdefYYERROR_VERBOSE
# undef YYERROR_VERBOSE
# defineYYERROR_VERBOSE 1
#else
# defineYYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndefYYTOKEN_TABLE
# defineYYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE&& ! defined YYSTYPE_IS_DECLARED
typedefunionYYSTYPE
#line 13 "ijparser.y"
{
char*token;
Typetype;
struct_class*class;
DeclList*decllist;
VarDecl*vardecl;
MethodDecl*methoddecl;
ParamList*paramlist;
VarDeclList*vardecllist;
IDList*idlist;
StmtList*stmtlist;
Expr*expr;
ArgsList*argslist;
}
/* Line 193 of yacc.c. */
#line 183 "ijparser.tab.c"
YYSTYPE;
# defineyystype YYSTYPE /* obsolescent; will be withdrawn */
# defineYYSTYPE_IS_DECLARED 1
# defineYYSTYPE_IS_TRIVIAL 1
#endif
/* Copy the second part of user declarations. */
/* Line 216 of yacc.c. */
#line 196 "ijparser.tab.c"
#ifdefshort
# undef short
#endif
#ifdefYYTYPE_UINT8
typedefYYTYPE_UINT8yytype_uint8;
#else
typedefunsigned charyytype_uint8;
#endif
#ifdefYYTYPE_INT8
typedefYYTYPE_INT8yytype_int8;
#elif (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
typedefsigned charyytype_int8;
#else
typedefshort intyytype_int8;
#endif
#ifdefYYTYPE_UINT16
typedefYYTYPE_UINT16yytype_uint16;
#else
typedefunsigned short intyytype_uint16;
#endif
#ifdefYYTYPE_INT16
typedefYYTYPE_INT16yytype_int16;
#else
typedefshort intyytype_int16;
#endif
#ifndefYYSIZE_T
# ifdef__SIZE_TYPE__
# defineYYSIZE_T __SIZE_TYPE__
# elif defined size_t
# defineYYSIZE_T size_t
# elif ! defined YYSIZE_T&& (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
# include<stddef.h>/* INFRINGES ON USER NAME SPACE */
# defineYYSIZE_T size_t
# else
# defineYYSIZE_T unsigned int
# endif
#endif
#defineYYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndefYY_
# if defined YYENABLE_NLS&&YYENABLE_NLS
# ifENABLE_NLS
# include<libintl.h>/* INFRINGES ON USER NAME SPACE */
# defineYY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndefYY_
# defineYY_(msgid) msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint|| defined __GNUC__
# defineYYUSE(e) ((void) (e))
#else
# defineYYUSE(e) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndeflint
# defineYYID(n) (n)
#else
#if (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
staticint
YYID (inti)
#else
staticint
YYID (i)
inti;
#endif
{
returni;
}
#endif
#if ! defined yyoverflow||YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdefYYSTACK_USE_ALLOCA
# ifYYSTACK_USE_ALLOCA
# ifdef__GNUC__
# defineYYSTACK_ALLOC __builtin_alloca
# elif defined __BUILTIN_VA_ARG_INCR
# include<alloca.h>/* INFRINGES ON USER NAME SPACE */
# elif defined _AIX
# defineYYSTACK_ALLOC __alloca
# elif defined _MSC_VER
# include<malloc.h>/* INFRINGES ON USER NAME SPACE */
# definealloca _alloca
# else
# defineYYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H&& ! defined _STDLIB_H&& (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
# include<stdlib.h>/* INFRINGES ON USER NAME SPACE */
# ifndef_STDLIB_H
# define_STDLIB_H 1
# endif
# endif
# endif
# endif
# endif
# ifdefYYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# defineYYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
# ifndefYYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# defineYYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
# else
# defineYYSTACK_ALLOC YYMALLOC
# defineYYSTACK_FREE YYFREE
# ifndefYYSTACK_ALLOC_MAXIMUM
# defineYYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
# if (defined __cplusplus&& ! defined _STDLIB_H \
&& ! ((defined YYMALLOC|| defined malloc) \
&& (defined YYFREE|| defined free)))
# include<stdlib.h>/* INFRINGES ON USER NAME SPACE */
# ifndef_STDLIB_H
# define_STDLIB_H 1
# endif
# endif
# ifndefYYMALLOC
# defineYYMALLOC malloc
# if ! defined malloc&& ! defined _STDLIB_H&& (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
void*malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndefYYFREE
# defineYYFREE free
# if ! defined free&& ! defined _STDLIB_H&& (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
voidfree (void*); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
#endif/* ! defined yyoverflow || YYERROR_VERBOSE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
|| (defined YYSTYPE_IS_TRIVIAL&&YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
unionyyalloc
{
yytype_int16yyss;
YYSTYPEyyvs;
};
/* The size of the maximum gap between one aligned stack and the next. */
# defineYYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# defineYYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndefYYCOPY
# if defined __GNUC__&&1<__GNUC__
# defineYYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# defineYYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# defineYYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#endif
/* YYFINAL -- State number of the termination state. */
#defineYYFINAL 4
/* YYLAST -- Last index in YYTABLE. */
#defineYYLAST 300
/* YYNTOKENS -- Number of terminals. */
#defineYYNTOKENS 41
/* YYNNTS -- Number of nonterminals. */
#defineYYNNTS 18
/* YYNRULES -- Number of rules. */
#defineYYNRULES 58
/* YYNRULES -- Number of states. */
#defineYYNSTATES 137
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#defineYYUNDEFTOK 2
#defineYYMAXUTOK 285
#defineYYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
staticconstyytype_uint8yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 40, 2, 2, 2, 2, 2, 2,
34, 35, 2, 2, 37, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 38,
2, 39, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 30, 2, 36, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 32, 2, 33, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 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, 31
};
#ifYYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
staticconstyytype_uint8yyprhs[] =
{
0, 0, 3, 9, 14, 17, 20, 22, 24, 27,
39, 41, 43, 47, 52, 53, 58, 59, 62, 63,
68, 72, 73, 77, 81, 83, 85, 89, 97, 103,
109, 115, 123, 128, 132, 135, 137, 142, 144, 148,
152, 156, 160, 164, 168, 170, 172, 174, 178, 181,
184, 187, 195, 200, 204, 210, 216, 219, 221
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
staticconstyytype_int8yyrhs[] =
{
42, 0, -1, 11, 22, 32, 43, 33, -1, 11,
22, 32, 33, -1, 43, 44, -1, 43, 45, -1,
44, -1, 45, -1, 13, 50, -1, 12, 13, 46,
22, 34, 47, 35, 32, 50, 49, 33, -1, 52,
-1, 14, -1, 52, 22, 48, -1, 15, 30, 36,
22, -1, -1, 48, 37, 52, 22, -1, -1, 49,
53, -1, -1, 52, 22, 51, 38, -1, 51, 37,
22, -1, -1, 3, 30, 36, -1, 4, 30, 36,
-1, 3, -1, 4, -1, 32, 49, 33, -1, 6,
34, 54, 35, 53, 7, 53, -1, 6, 34, 54,
35, 53, -1, 8, 34, 54, 35, 53, -1, 9,
34, 54, 35, 38, -1, 22, 30, 54, 36, 39,
54, 38, -1, 22, 39, 54, 38, -1, 17, 54,
38, -1, 17, 38, -1, 55, -1, 55, 30, 54,
36, -1, 56, -1, 54, 18, 54, -1, 54, 19,
54, -1, 54, 20, 54, -1, 54, 25, 54, -1,
54, 26, 54, -1, 54, 27, 54, -1, 22, -1,
23, -1, 21, -1, 34, 54, 35, -1, 54, 16,
-1, 40, 54, -1, 26, 54, -1, 10, 34, 22,
30, 54, 36, 35, -1, 22, 34, 57, 35, -1,
22, 34, 35, -1, 5, 3, 30, 54, 36, -1,
5, 4, 30, 54, 36, -1, 54, 58, -1, 54,
-1, 37, 57, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
staticconstyytype_uint8yyrline[] =
{
0, 60, 60, 61, 63, 64, 65, 66, 68, 70,
72, 73, 75, 76, 77, 79, 80, 82, 83, 85,
87, 88, 90, 91, 92, 93, 95, 96, 97, 98,
99, 100, 101, 102, 103, 105, 106, 107, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 126, 127, 129, 130, 132
};
#endif
#ifYYDEBUG||YYERROR_VERBOSE||YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
staticconstchar*constyytname[] =
{
"$end", "error", "$undefined", "INT", "BOOL", "NEW", "IF", "ELSE",
"WHILE", "PRINT", "PARSEINT", "CLASS", "PUBLIC", "STATIC", "VOID",
"STRING", "DOTLENGTH", "RETURN", "AND", "OR", "RELCOMPAR", "BOOLLIT",
"ID", "INTLIT", "RESERVED", "EQUALITY", "ADDITIVE", "MULTIPLIC", "UNARY",
"EXPR1REDUCE", "'['", "IFX", "'{'", "'}'", "'('", "')'", "']'", "','",
"';'", "'='", "'!'", "$accept", "start", "decls", "fielddecl",
"methoddecl", "methodtype", "formalparams", "formalparamslist",
"stmtlist", "vardecl", "vardecllist", "type", "statement", "expr",
"expr1", "expr2", "args", "argslist", 0
};
#endif
# ifdefYYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
staticconstyytype_uint16yytoknum[] =
{
0, 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,
91, 285, 123, 125, 40, 41, 93, 44, 59, 61,
33
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
staticconstyytype_uint8yyr1[] =
{
0, 41, 42, 42, 43, 43, 43, 43, 44, 45,
46, 46, 47, 47, 47, 48, 48, 49, 49, 50,
51, 51, 52, 52, 52, 52, 53, 53, 53, 53,
53, 53, 53, 53, 53, 54, 54, 54, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 56, 56, 57, 57, 58
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
staticconstyytype_uint8yyr2[] =
{
0, 2, 5, 4, 2, 2, 1, 1, 2, 11,
1, 1, 3, 4, 0, 4, 0, 2, 0, 4,
3, 0, 3, 3, 1, 1, 3, 7, 5, 5,
5, 7, 4, 3, 2, 1, 4, 1, 3, 3,
3, 3, 3, 3, 1, 1, 1, 3, 2, 2,
2, 7, 4, 3, 5, 5, 2, 1, 2
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
staticconstyytype_uint8yydefact[] =
{
0, 0, 0, 0, 1, 0, 0, 0, 3, 0,
6, 7, 0, 24, 25, 8, 0, 2, 4, 5,
11, 0, 10, 0, 0, 21, 0, 22, 23, 0,
14, 0, 19, 0, 0, 0, 20, 0, 0, 16,
0, 0, 12, 13, 18, 0, 0, 0, 0, 0,
0, 0, 0, 18, 9, 17, 15, 0, 0, 0,
0, 0, 46, 44, 45, 0, 0, 34, 0, 0,
35, 37, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 50, 0, 49, 48, 0, 0, 0, 0,
0, 0, 33, 0, 0, 0, 26, 0, 0, 0,
0, 0, 0, 53, 57, 0, 47, 38, 39, 40,
41, 42, 43, 0, 0, 32, 28, 29, 30, 0,
0, 0, 0, 56, 52, 36, 0, 0, 54, 55,
0, 58, 0, 27, 0, 31, 51
};
/* YYDEFGOTO[NTERM-NUM]. */
staticconstyytype_int8yydefgoto[] =
{
-1, 2, 9, 10, 11, 21, 34, 42, 46, 15,
29, 16, 55, 104, 70, 71, 105, 123
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#defineYYPACT_NINF -95
staticconstyytype_int16yypact[] =
{
-6, -2, 16, -8, -95, -3, 18, 50, -95, 13,
-95, -95, 55, 11, 21, -95, 33, -95, -95, -95,
-95, 39, -95, 35, 43, -95, 57, -95, -95, 36,
8, 73, -95, 68, 74, 81, -95, 71, 78, -95,
89, 50, 75, -95, -95, 50, 72, 92, 96, 97,
103, 22, 27, -95, -95, -95, -95, 62, 62, 62,
83, 104, -95, 105, -95, 62, 62, -95, 62, 102,
114, -95, 62, 62, 84, 217, 229, 241, 115, 117,
111, 42, 135, 253, 135, -95, 62, 62, 62, 62,
62, 62, -95, 62, 157, 116, -95, 91, 91, 120,
62, 62, 122, -95, 144, 118, -95, 99, 265, 2,
273, -14, 135, 169, 126, -95, 152, -95, -95, 181,
193, 62, 62, -95, -95, -95, 62, 91, -95, -95,
205, -95, 130, -95, 131, -95, -95
};
/* YYPGOTO[NTERM-NUM]. */
staticconstyytype_int16yypgoto[] =
{
-95, -95, -95, 158, 163, -95, -95, -95, 108, 133,
-95, -11, -94, -51, -95, -95, 56, -95
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#defineYYTABLE_NINF -1
staticconstyytype_uint8yytable[] =
{
69, 22, 85, 116, 117, 1, 75, 76, 77, 6,
7, 13, 14, 91, 82, 83, 4, 84, 85, 35,
3, 94, 95, 33, 5, 6, 7, 60, 90, 91,
8, 12, 61, 133, 47, 107, 108, 109, 110, 111,
112, 23, 113, 62, 63, 64, 17, 60, 65, 119,
120, 24, 61, 13, 14, 25, 66, 72, 13, 14,
67, 26, 68, 62, 63, 64, 73, 60, 65, 20,
130, 27, 61, 31, 32, 132, 66, 103, 48, 28,
49, 50, 68, 62, 63, 64, 78, 79, 65, 51,
48, 30, 49, 50, 52, 36, 66, 48, 37, 49,
50, 51, 68, 39, 53, 54, 52, 40, 51, 38,
41, 43, 45, 52, 56, 85, 53, 96, 85, 88,
86, 87, 88, 53, 89, 90, 91, 89, 90, 91,
57, 58, 85, 102, 86, 87, 88, 59, 80, 81,
92, 89, 90, 91, 93, 100, 85, 101, 86, 87,
88, 85, 121, 124, 115, 89, 90, 91, 118, 127,
85, 74, 86, 87, 88, 126, 136, 18, 135, 89,
90, 91, 19, 85, 44, 86, 87, 88, 131, 0,
0, 122, 89, 90, 91, 85, 0, 86, 87, 88,
0, 0, 0, 114, 89, 90, 91, 85, 0, 86,
87, 88, 0, 0, 0, 125, 89, 90, 91, 85,
0, 86, 87, 88, 0, 0, 0, 128, 89, 90,
91, 85, 0, 86, 87, 88, 0, 0, 0, 129,
89, 90, 91, 85, 0, 86, 87, 88, 0, 0,
0, 134, 89, 90, 91, 85, 0, 86, 87, 88,
0, 0, 97, 0, 89, 90, 91, 85, 0, 86,
87, 88, 0, 0, 98, 0, 89, 90, 91, 85,
0, 86, 87, 88, 0, 0, 99, 0, 89, 90,
91, 85, 0, 86, 0, 88, 0, 0, 106, 85,
89, 90, 91, 88, 0, 0, 0, 0, 0, 90,
91
};
staticconstyytype_int8yycheck[] =
{
51, 12, 16, 97, 98, 11, 57, 58, 59, 12,
13, 3, 4, 27, 65, 66, 0, 68, 16, 30,
22, 72, 73, 15, 32, 12, 13, 5, 26, 27,
33, 13, 10, 127, 45, 86, 87, 88, 89, 90,
91, 30, 93, 21, 22, 23, 33, 5, 26, 100,
101, 30, 10, 3, 4, 22, 34, 30, 3, 4,
38, 22, 40, 21, 22, 23, 39, 5, 26, 14,
121, 36, 10, 37, 38, 126, 34, 35, 6, 36,
8, 9, 40, 21, 22, 23, 3, 4, 26, 17,
6, 34, 8, 9, 22, 22, 34, 6, 30, 8,
9, 17, 40, 22, 32, 33, 22, 36, 17, 35,
32, 22, 37, 22, 22, 16, 32, 33, 16, 20,
18, 19, 20, 32, 25, 26, 27, 25, 26, 27,
34, 34, 16, 22, 18, 19, 20, 34, 34, 34,
38, 25, 26, 27, 30, 30, 16, 30, 18, 19,
20, 16, 30, 35, 38, 25, 26, 27, 38, 7,
16, 53, 18, 19, 20, 39, 35, 9, 38, 25,
26, 27, 9, 16, 41, 18, 19, 20, 122, -1,
-1, 37, 25, 26, 27, 16, -1, 18, 19, 20,
-1, -1, -1, 36, 25, 26, 27, 16, -1, 18,
19, 20, -1, -1, -1, 36, 25, 26, 27, 16,
-1, 18, 19, 20, -1, -1, -1, 36, 25, 26,
27, 16, -1, 18, 19, 20, -1, -1, -1, 36,
25, 26, 27, 16, -1, 18, 19, 20, -1, -1,
-1, 36, 25, 26, 27, 16, -1, 18, 19, 20,
-1, -1, 35, -1, 25, 26, 27, 16, -1, 18,
19, 20, -1, -1, 35, -1, 25, 26, 27, 16,
-1, 18, 19, 20, -1, -1, 35, -1, 25, 26,
27, 16, -1, 18, -1, 20, -1, -1, 35, 16,
25, 26, 27, 20, -1, -1, -1, -1, -1, 26,
27
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
staticconstyytype_uint8yystos[] =
{
0, 11, 42, 22, 0, 32, 12, 13, 33, 43,
44, 45, 13, 3, 4, 50, 52, 33, 44, 45,
14, 46, 52, 30, 30, 22, 22, 36, 36, 51,
34, 37, 38, 15, 47, 52, 22, 30, 35, 22,
36, 32, 48, 22, 50, 37, 49, 52, 6, 8,
9, 17, 22, 32, 33, 53, 22, 34, 34, 34,
5, 10, 21, 22, 23, 26, 34, 38, 40, 54,
55, 56, 30, 39, 49, 54, 54, 54, 3, 4,
34, 34, 54, 54, 54, 16, 18, 19, 20, 25,
26, 27, 38, 30, 54, 54, 33, 35, 35, 35,
30, 30, 22, 35, 54, 57, 35, 54, 54, 54,
54, 54, 54, 54, 36, 38, 53, 53, 38, 54,
54, 30, 37, 58, 35, 36, 39, 7, 36, 36,
54, 57, 54, 53, 36, 38, 35
};
#defineyyerrok (yyerrstatus = 0)
#defineyyclearin (yychar = YYEMPTY)
#defineYYEMPTY (-2)
#defineYYEOF 0
#defineYYACCEPT goto yyacceptlab
#defineYYABORT goto yyabortlab
#defineYYERROR goto yyerrorlab
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#defineYYFAIL goto yyerrlab
#defineYYRECOVERING() (!!yyerrstatus)
#defineYYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
#defineYYTERROR 1
#defineYYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#defineYYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndefYYLLOC_DEFAULT
# defineYYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#endif
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
#ifndefYY_LOCATION_PRINT
# if defined YYLTYPE_IS_TRIVIAL&&YYLTYPE_IS_TRIVIAL
# defineYY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# defineYY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdefYYLEX_PARAM
# defineYYLEX yylex (YYLEX_PARAM)
#else
# defineYYLEX yylex ()
#endif
/* Enable debugging if requested. */
#ifYYDEBUG
# ifndefYYFPRINTF
# include<stdio.h>/* INFRINGES ON USER NAME SPACE */
# defineYYFPRINTF fprintf
# endif
# defineYYDPRINTF(Args) \
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (YYID (0))
# defineYY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
/*ARGSUSED*/
#if (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
staticvoid
yy_symbol_value_print (FILE*yyoutput, intyytype, YYSTYPEconst*constyyvaluep)
#else
staticvoid
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
FILE*yyoutput;
intyytype;
YYSTYPEconst*constyyvaluep;
#endif
{
if (!yyvaluep)
return;
# ifdefYYPRINT
if (yytype<YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
YYUSE (yyoutput);
# endif
switch (yytype)
{
default:
break;
}
}
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
#if (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
staticvoid
yy_symbol_print (FILE*yyoutput, intyytype, YYSTYPEconst*constyyvaluep)
#else
staticvoid
yy_symbol_print (yyoutput, yytype, yyvaluep)
FILE*yyoutput;
intyytype;
YYSTYPEconst*constyyvaluep;
#endif
{
if (yytype<YYNTOKENS)
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep);
YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
#if (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
staticvoid
yy_stack_print (yytype_int16*bottom, yytype_int16*top)
#else
staticvoid
yy_stack_print (bottom, top)
yytype_int16*bottom;
yytype_int16*top;
#endif
{
YYFPRINTF (stderr, "Stack now");
for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
# defineYY_STACK_PRINT(Bottom, Top) \
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
#if (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
staticvoid
yy_reduce_print (YYSTYPE*yyvsp, intyyrule)
#else
staticvoid
yy_reduce_print (yyvsp, yyrule)
YYSTYPE*yyvsp;
intyyrule;
#endif
{
intyynrhs=yyr2[yyrule];
intyyi;
unsigned long intyylno=yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
yyrule-1, yylno);
/* The symbols being reduced. */
for (yyi=0; yyi<yynrhs; yyi++)
{
fprintf (stderr, " $%d = ", yyi+1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] +yyi],
&(yyvsp[(yyi+1) - (yynrhs)])
);
fprintf (stderr, "\n");
}
}
# defineYY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
yy_reduce_print (yyvsp, Rule); \
} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
intyydebug;
#else/* !YYDEBUG */
# defineYYDPRINTF(Args)
# defineYY_SYMBOL_PRINT(Title, Type, Value, Location)
# defineYY_STACK_PRINT(Bottom, Top)
# defineYY_REDUCE_PRINT(Rule)
#endif/* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndefYYINITDEPTH
# defineYYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndefYYMAXDEPTH
# defineYYMAXDEPTH 10000
#endif
#ifYYERROR_VERBOSE
# ifndefyystrlen
# if defined __GLIBC__&& defined _STRING_H
# defineyystrlen strlen
# else
/* Return the length of YYSTR. */
#if (defined __STDC__|| defined __C99__FUNC__ \
|| defined __cplusplus|| defined _MSC_VER)
staticYYSIZE_T
yystrlen (constchar*yystr)
#else
staticYYSIZE_T
yystrlen (yystr)