static char yysccsid
[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define yyclearin (yychar=(-1))
#define yyerrok (yyerrflag=0)
#define YYRECOVERING (yyerrflag!=0)
#define yyerrflag ch_errflag
#define yydefred ch_defred
#define yysindex ch_sindex
#define yyrindex ch_rindex
#define yygindex ch_gindex
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple
yacc generated parsers in gdb. Note that these are only the variables
produced by yacc. If other parser generators (bison, byacc, etc) produce
additional global names that conflict at link time, then those parser
generators need to be fixed instead of adding those names to this list. */
#define yymaxdepth chill_maxdepth
#define yyparse chill_parse
#define yyerror chill_error
#define yylval chill_lval
#define yychar chill_char
#define yydebug chill_debug
#define yypact chill_pact
#define yyexca chill_exca
#define yyerrflag chill_errflag
#define yynerrs chill_nerrs
#define yystate chill_state
#define yylloc chill_lloc
#define yyreds chill_reds /* With YYDEBUG defined */
#define yytoks chill_toks /* With YYDEBUG defined */
#define YYDEBUG 0 /* Default to no yydebug support */
yyerror
PARAMS ((char *));
struct internalvar
*ivar
;
#define INTEGER_LITERAL 286
#define BOOLEAN_LITERAL 287
#define CHARACTER_LITERAL 288
#define FLOAT_LITERAL 289
#define GENERAL_PROCEDURE_NAME 290
#define LOCATION_NAME 291
#define EMPTINESS_LITERAL 293
#define CHARACTER_STRING_LITERAL 294
#define BIT_STRING_LITERAL 295
#define ILLEGAL_TOKEN 322
#define GDB_ASSIGNMENT 337
0, 0, 20, 20, 21, 1, 1, 2, 2, 2,
2, 2, 45, 45, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
5, 5, 5, 5, 5, 6, 6, 6, 6, 6,
6, 6, 6, 7, 8, 9, 9, 62, 10, 11,
11, 12, 13, 14, 15, 17, 18, 19, 22, 22,
22, 23, 23, 24, 25, 25, 26, 27, 28, 28,
28, 28, 29, 29, 29, 30, 30, 30, 30, 30,
30, 30, 30, 31, 31, 31, 31, 32, 32, 32,
32, 32, 33, 33, 33, 33, 34, 34, 34, 60,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 49, 49, 49, 49, 61, 50, 50, 51,
44, 52, 53, 54, 35, 36, 37, 38, 39, 40,
41, 42, 43, 46, 47, 48, 55, 56, 57, 58,
1, 1, 1, 1, 1, 1, 2, 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, 4, 6, 6, 0, 5, 6,
6, 2, 2, 1, 1, 1, 1, 3, 1, 1,
1, 5, 9, 2, 2, 4, 1, 4, 1, 3,
3, 3, 1, 3, 3, 1, 3, 3, 3, 3,
3, 3, 3, 1, 3, 3, 3, 1, 3, 3,
3, 3, 1, 2, 2, 2, 2, 2, 1, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 1, 4, 4, 4, 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, 12, 44, 54, 56, 57, 125, 126, 127, 128,
129, 36, 37, 38, 39, 35, 8, 40, 41, 42,
43, 117, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
10, 9, 11, 0, 0, 6, 0, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 55,
27, 28, 0, 1, 4, 3, 61, 0, 0, 0,
0, 0, 88, 93, 31, 32, 33, 34, 0, 0,
60, 0, 138, 0, 30, 29, 94, 0, 95, 0,
0, 141, 98, 0, 137, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 52, 7,
96, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 53, 0, 58, 0, 0, 0, 0, 0,
0, 0, 0, 0, 122, 123, 124, 0, 0, 0,
0, 0, 0, 118, 0, 0, 0, 120, 0, 100,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 89, 90, 91, 92, 130,
131, 0, 0, 134, 136, 0, 0, 0, 140, 0,
0, 139, 64, 0, 0, 0, 101, 102, 103, 104,
105, 106, 107, 108, 109, 0, 0, 0, 110, 111,
112, 45, 0, 0, 0, 0, 13, 0, 0, 0,
65, 0, 62, 0, 0, 0, 133, 0, 132, 0,
135, 0, 0, 49, 0, 0, 67, 0, 0, 114,
115, 116, 47, 46, 50, 51, 14, 0, 68, 66,
85, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 137, 196, 238, 190, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 182,
183, 230, 228, 80, 218, 186, 232, 187, 149, 155,
159, 150, 151, 152, 96, 84, 193, 191, 93, 81,
short ch_sindex
[] = { 457,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -262, 879, 879, 893, -215, 622, -258, 50,
51, 52, 53, 56, 57, 58, 67, 72, 73, 75,
0, 0, 0, 0, -221, 0, -293, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, -261, 0, 0, 0, 0, -248, -275, -44,
-30, -33, 0, 0, 0, 0, 0, 0, 88, 91,
0, 92, 0, -165, 0, 0, 0, 92, 0, 0,
-293, 0, 0, 94, 0, -181, 622, 622, 622, 622,
622, 622, 622, 636, 622, 622, 622, 457, 0, 0,
0, 797, 797, 797, 797, 797, 797, 797, 797, 797,
797, 797, 797, 797, 797, 797, 797, 797, 797, 797,
-233, -270, 0, -137, 0, -132, -272, 112, 118, 119,
120, 121, 122, 128, 0, 0, 0, 129, 130, 132,
141, 143, 92, 0, 144, 92, 146, 0, 149, 0,
-275, -275, -275, -44, -44, -30, -30, -30, -30, -30,
-30, -30, -33, -33, -33, 0, 0, 0, 0, 0,
0, -39, 115, 0, 0, 126, -120, 622, 0, 106,
142, 0, 0, -132, -258, -110, 0, 0, 0, 0,
0, 0, 0, 0, 0, 622, 622, 622, 0, 0,
0, 0, -64, -61, -63, -64, 0, -34, -103, 622,
0, -181, 0, 174, 181, -22, 0, 182, 0, 184,
0, 192, 193, 0, 622, 622, 0, 177, -272, 0,
0, 0, 0, 0, 0, 0, 0, 150, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 24, 0, 0, 0, 0, 506, 255, 191,
145, 95, 0, 0, 0, 0, 0, 0, 0, 0,
0, 237, 0, 0, 0, 0, 0, 0, 0, 59,
204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 714, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, -40, 0, 0,
0, 0, 205, 0, 0, 206, 0, 0, 0, 0,
567, 573, 577, 531, 554, 168, 180, 208, 231, 500,
522, 545, 105, 133, 158, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1230, 0, -23, 0, 0, 185, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 26, 148,
0, 1162, 0, 31, 15, 22, 0, 0, -56, -104,
-45, -37, -92, 55, 0, 0, 0, 0, 0, 0,
0, 0, 43, 0, 63, 0, 0, 0, 0, 154,
0, 0, 0, 0, 71, 0, 87, 0, 0, 0,
30, 212, 91, 109, 82, 184, 234, 185, 127, 235,
164, 165, 124, 128, 125, 121, 117, 119, 242, 83,
110, 235, 95, 29, 12, 13, 14, 15, 115, 116,
18, 19, 20, 21, 176, 177, 178, 179, 180, 181,
30, 30, 30, 30, 30, 30, 194, 30, 195, 86,
86, 86, 112, 113, 114, 161, 162, 163, 97, 30,
30, 30, 30, 29, 29, 29, 29, 29, 29, 92,
29, 166, 167, 168, 169, 170, 171, 172, 87, 89,
91, 99, 29, 29, 29, 29, 173, 174, 175, 97,
98, 99, 100, 30, 84, 101, 102, 103, 30, 97,
97, 97, 97, 97, 85, 97, 104, 133, 153, 156,
156, 105, 106, 133, 107, 108, 29, 97, 97, 97,
97, 121, 99, 99, 99, 99, 99, 131, 99, 86,
132, 28, 86, 134, 135, 84, 136, 84, 84, 84,
99, 99, 99, 99, 76, 85, 189, 85, 85, 85,
192, 97, 197, 84, 84, 84, 84, 87, 198, 199,
200, 201, 202, 85, 85, 85, 85, 77, 203, 204,
205, 206, 214, 86, 99, 86, 86, 86, 133, 78,
207, 133, 208, 215, 209, 76, 210, 84, 76, 211,
73, 86, 86, 86, 86, 216, 219, 85, 87, 220,
87, 87, 87, 76, 76, 76, 76, 79, 77, 223,
227, 77, 229, 231, 240, 236, 87, 87, 87, 87,
78, 241, 243, 78, 244, 86, 77, 77, 77, 77,
80, 73, 245, 246, 73, 249, 2, 76, 78, 78,
78, 78, 251, 121, 252, 113, 119, 111, 79, 73,
87, 79, 239, 250, 69, 160, 30, 248, 233, 157,
77, 118, 120, 122, 123, 222, 79, 79, 79, 79,
226, 80, 78, 30, 80, 0, 213, 129, 130, 126,
221, 0, 0, 73, 0, 0, 0, 0, 0, 80,
80, 80, 80, 0, 0, 69, 0, 30, 69, 0,
79, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 69, 30, 0, 0, 0, 0, 0,
29, 0, 0, 80, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 29, 0, 29, 0, 0,
0, 0, 0, 0, 0, 0, 0, 69, 0, 0,
0, 0, 0, 0, 0, 30, 0, 0, 0, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 0, 30, 0, 0, 0, 0, 0, 0, 0,
0, 0, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 0, 84, 84, 84, 84, 84,
84, 84, 84, 84, 84, 85, 85, 85, 85, 85,
85, 85, 85, 85, 85, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 0, 0, 76, 76, 76, 76, 76,
76, 76, 76, 76, 0, 0, 0, 0, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 77, 77,
77, 77, 77, 77, 77, 77, 77, 0, 0, 0,
78, 78, 78, 78, 78, 78, 78, 78, 78, 0,
0, 73, 73, 73, 73, 73, 28, 0, 0, 81,
0, 24, 0, 0, 0, 59, 0, 0, 79, 79,
79, 79, 79, 79, 79, 79, 79, 0, 0, 0,
0, 82, 0, 0, 0, 0, 0, 0, 0, 0,
74, 80, 80, 80, 80, 80, 80, 80, 80, 80,
81, 0, 0, 81, 83, 0, 59, 0, 0, 59,
0, 0, 0, 75, 0, 69, 69, 69, 81, 81,
81, 81, 82, 0, 59, 82, 70, 0, 0, 0,
0, 74, 71, 0, 74, 0, 72, 0, 0, 0,
82, 82, 82, 82, 0, 83, 0, 0, 83, 74,
0, 0, 81, 0, 75, 0, 0, 75, 59, 0,
0, 0, 0, 83, 83, 83, 83, 70, 0, 0,
70, 0, 75, 71, 82, 0, 71, 72, 0, 0,
72, 0, 0, 74, 0, 70, 0, 0, 0, 0,
0, 71, 0, 0, 0, 72, 0, 83, 0, 0,
0, 0, 0, 0, 0, 0, 75, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 70,
0, 28, 0, 0, 0, 71, 24, 0, 0, 72,
0, 0, 0, 0, 0, 28, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 2, 3, 4, 5, 6,
0, 0, 0, 7, 8, 9, 10, 11, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 48, 23, 0, 0, 0, 48, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
26, 27, 0, 29, 0, 0, 0, 0, 0, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 0, 0, 0, 0, 0, 0, 0,
81, 81, 81, 81, 81, 81, 81, 81, 81, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 82, 82, 82, 82, 82, 82, 82, 82,
82, 74, 74, 74, 74, 74, 28, 0, 0, 0,
0, 24, 0, 0, 0, 83, 83, 83, 83, 83,
83, 83, 83, 83, 75, 75, 75, 75, 75, 0,
0, 0, 0, 0, 0, 0, 0, 70, 70, 70,
0, 0, 0, 71, 71, 71, 0, 72, 72, 72,
2, 3, 4, 5, 6, 0, 0, 0, 7, 8,
9, 10, 11, 0, 2, 3, 4, 5, 6, 145,
146, 147, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 28, 23,
0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 28, 0, 25, 26, 27, 0, 29, 0,
0, 0, 0, 0, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 48, 48, 48, 48, 48, 0, 0, 0,
48, 48, 48, 48, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
0, 48, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 48, 48, 48, 0,
48, 0, 0, 0, 0, 0, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
0, 0, 0, 0, 0, 2, 3, 4, 5, 6,
0, 0, 0, 7, 8, 9, 10, 11, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
26, 27, 0, 0, 0, 0, 0, 0, 0, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 0, 0, 0, 0, 2, 3, 4,
5, 6, 0, 0, 0, 7, 8, 9, 10, 11,
0, 2, 3, 4, 5, 6, 0, 0, 0, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 0, 0, 0, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 94,
0, 0, 26, 27, 0, 0, 0, 0, 0, 0,
0, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 45,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 90, 0, 45, 138, 139,
140, 141, 142, 143, 144, 0, 154, 154, 158, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 45, 45, 45, 45,
45, 45, 45, 148, 45, 45, 45, 45, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 217,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 224, 225, 217,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 237, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 247, 237, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 45, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 45, 45, 45, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 45,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 41, 26, 297, 0, 276, 41, 278, 42, 44,
115, 116, 43, 47, 45, 60, 61, 62, 41, 282,
314, 44, 281, 0, 286, 287, 288, 289, 304, 305,
292, 293, 294, 295, 127, 128, 129, 130, 272, 273,
40, 41, 42, 43, 44, 45, 319, 47, 321, 24,
25, 26, 301, 302, 303, 112, 113, 114, 0, 59,
60, 61, 62, 40, 41, 42, 43, 44, 45, 285,
47, 117, 118, 119, 120, 121, 122, 123, 24, 25,
104, 0, 59, 60, 61, 62, 124, 125, 126, 40,
40, 40, 40, 93, 0, 40, 40, 40, 40, 41,
42, 43, 44, 45, 0, 47, 40, 82, 104, 105,
106, 40, 40, 88, 40, 337, 93, 59, 60, 61,
62, 40, 41, 42, 43, 44, 45, 40, 47, 104,
40, 40, 0, 299, 41, 41, 318, 43, 44, 45,
59, 60, 61, 62, 0, 41, 284, 43, 44, 45,
283, 93, 41, 59, 60, 61, 62, 0, 41, 41,
41, 41, 41, 59, 60, 61, 62, 0, 41, 41,
41, 40, 58, 41, 93, 43, 44, 45, 153, 0,
40, 156, 40, 58, 41, 41, 41, 93, 44, 41,
0, 59, 60, 61, 62, 316, 91, 93, 41, 58,
43, 44, 45, 59, 60, 61, 62, 0, 41, 320,
275, 44, 274, 277, 41, 319, 59, 60, 61, 62,
41, 41, 41, 44, 41, 93, 59, 60, 61, 62,
0, 41, 41, 41, 44, 59, 0, 93, 59, 60,
61, 62, 93, 40, 300, 41, 41, 63, 41, 59,
93, 44, 222, 239, 0, 108, 297, 236, 216, 106,
93, 306, 307, 308, 309, 195, 59, 60, 61, 62,
208, 41, 93, 314, 44, -1, 316, 311, 312, 310,
194, -1, -1, 93, -1, -1, -1, -1, -1, 59,
60, 61, 62, -1, -1, 41, -1, 297, 44, -1,
93, 301, 302, 303, 304, 305, 306, 307, 308, 309,
310, 311, 312, 59, 314, -1, -1, -1, -1, -1,
297, -1, -1, 93, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, -1, 314, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 93, -1, -1,
-1, -1, -1, -1, -1, 297, -1, -1, -1, 301,
302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
312, -1, 314, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 301, 302, 303, 304, 305, 306, 307, 308,
309, 310, 311, 312, -1, 301, 302, 303, 304, 305,
306, 307, 308, 309, 310, 301, 302, 303, 304, 305,
306, 307, 308, 309, 310, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 301, 302, 303, 304, 305, 306, 307,
308, 309, 310, -1, -1, 301, 302, 303, 304, 305,
306, 307, 308, 309, -1, -1, -1, -1, 301, 302,
303, 304, 305, 306, 307, 308, 309, 310, 301, 302,
303, 304, 305, 306, 307, 308, 309, -1, -1, -1,
301, 302, 303, 304, 305, 306, 307, 308, 309, -1,
-1, 301, 302, 303, 304, 305, 40, -1, -1, 0,
-1, 45, -1, -1, -1, 0, -1, -1, 301, 302,
303, 304, 305, 306, 307, 308, 309, -1, -1, -1,
-1, 0, -1, -1, -1, -1, -1, -1, -1, -1,
0, 301, 302, 303, 304, 305, 306, 307, 308, 309,
41, -1, -1, 44, 0, -1, 41, -1, -1, 44,
-1, -1, -1, 0, -1, 301, 302, 303, 59, 60,
61, 62, 41, -1, 59, 44, 0, -1, -1, -1,
-1, 41, 0, -1, 44, -1, 0, -1, -1, -1,
59, 60, 61, 62, -1, 41, -1, -1, 44, 59,
-1, -1, 93, -1, 41, -1, -1, 44, 93, -1,
-1, -1, -1, 59, 60, 61, 62, 41, -1, -1,
44, -1, 59, 41, 93, -1, 44, 41, -1, -1,
44, -1, -1, 93, -1, 59, -1, -1, -1, -1,
-1, 59, -1, -1, -1, 59, -1, 93, -1, -1,
-1, -1, -1, -1, -1, -1, 93, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 93,
-1, 40, -1, -1, -1, 93, 45, -1, -1, 93,
-1, -1, -1, -1, -1, 40, -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, 257, -1, 259, 260, 261, 262, 263,
-1, -1, -1, 267, 268, 269, 270, 271, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 286, 287, 288, 289, 290, 291, 292, 293,
294, 295, 296, 40, 298, -1, -1, -1, 45, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 313,
314, 315, -1, 317, -1, -1, -1, -1, -1, 323,
324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
334, 335, 336, -1, -1, -1, -1, -1, -1, -1,
301, 302, 303, 304, 305, 306, 307, 308, 309, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 301, 302, 303, 304, 305, 306, 307, 308,
309, 301, 302, 303, 304, 305, 40, -1, -1, -1,
-1, 45, -1, -1, -1, 301, 302, 303, 304, 305,
306, 307, 308, 309, 301, 302, 303, 304, 305, -1,
-1, -1, -1, -1, -1, -1, -1, 301, 302, 303,
-1, -1, -1, 301, 302, 303, -1, 301, 302, 303,
259, 260, 261, 262, 263, -1, -1, -1, 267, 268,
269, 270, 271, -1, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 286, 287, 288,
289, 290, 291, 292, 293, 294, 295, 296, 40, 298,
-1, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 40, -1, 313, 314, 315, -1, 317, -1,
-1, -1, -1, -1, 323, 324, 325, 326, 327, 328,
329, 330, 331, 332, 333, 334, 335, 336, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 259, 260, 261, 262, 263, -1, -1, -1,
267, 268, 269, 270, 271, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 286,
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
-1, 298, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 313, 314, 315, -1,
317, -1, -1, -1, -1, -1, 323, 324, 325, 326,
327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
-1, -1, -1, -1, -1, 259, 260, 261, 262, 263,
-1, -1, -1, 267, 268, 269, 270, 271, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 286, 287, 288, 289, 290, 291, 292, 293,
294, 295, 296, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 313,
314, 315, -1, -1, -1, -1, -1, -1, -1, 323,
324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
334, 335, 336, -1, -1, -1, -1, 259, 260, 261,
262, 263, -1, -1, -1, 267, 268, 269, 270, 271,
-1, 259, 260, 261, 262, 263, -1, -1, -1, 267,
268, 269, 270, 271, 286, 287, 288, 289, 290, 291,
292, 293, 294, 295, 296, -1, -1, -1, 286, 287,
288, 289, 290, 291, 292, 293, 294, 295, 296, 28,
-1, -1, 314, 315, -1, -1, -1, -1, -1, -1,
-1, 323, 324, 325, 326, 327, 328, 329, 330, 331,
332, 333, 334, 335, 336, 323, 324, 325, 326, 327,
328, 329, 330, 331, 332, 333, 334, 335, 336, 0,
-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, 26, -1, 28, 97, 98,
99, 100, 101, 102, 103, -1, 105, 106, 107, -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, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 206, 207, 208,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 220, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 235, 236, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 206, 207, 208, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 220,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 235, 236,
"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",0,0,0,0,0,0,0,0,0,0,
"':'","';'","'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,"'['",0,"']'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,"FIXME_01","FIXME_02","FIXME_03","FIXME_04",
"FIXME_05","FIXME_06","FIXME_07","FIXME_08","FIXME_09","FIXME_10","FIXME_11",
"FIXME_12","FIXME_13","FIXME_14","FIXME_15","FIXME_16","FIXME_17","FIXME_18",
"FIXME_19","FIXME_20","FIXME_21","FIXME_22","FIXME_24","FIXME_25","FIXME_26",
"FIXME_27","FIXME_28","FIXME_29","FIXME_30","INTEGER_LITERAL","BOOLEAN_LITERAL",
"CHARACTER_LITERAL","FLOAT_LITERAL","GENERAL_PROCEDURE_NAME","LOCATION_NAME",
"SET_LITERAL","EMPTINESS_LITERAL","CHARACTER_STRING_LITERAL",
"BIT_STRING_LITERAL","TYPENAME","FIELD_NAME","CASE","OF","ESAC","LOGIOR","ORIF",
"LOGXOR","LOGAND","ANDIF","NOTEQUAL","GTR","LEQ","IN","SLASH_SLASH","MOD","REM",
"NOT","POINTER","RECEIVE","UP","IF","THEN","ELSE","FI","ELSIF","ILLEGAL_TOKEN",
"NUM","PRED","SUCC","ABS","CARD","MAX_TOKEN","MIN_TOKEN","SIZE","UPPER","LOWER",
"LENGTH","GDB_REGNAME","GDB_LAST","GDB_VARIABLE","GDB_ASSIGNMENT",
"value : undefined_value",
"undefined_value : FIXME_01",
"location : access_name",
"location : primitive_value POINTER",
"access_name : LOCATION_NAME",
"access_name : GDB_LAST",
"access_name : GDB_REGNAME",
"access_name : GDB_VARIABLE",
"access_name : FIXME_03",
"expression_list : expression",
"expression_list : expression_list ',' expression",
"primitive_value : location_contents",
"primitive_value : value_name",
"primitive_value : literal",
"primitive_value : tuple",
"primitive_value : value_string_element",
"primitive_value : value_string_slice",
"primitive_value : value_array_element",
"primitive_value : value_array_slice",
"primitive_value : value_structure_field",
"primitive_value : expression_conversion",
"primitive_value : value_procedure_call",
"primitive_value : value_built_in_routine_call",
"primitive_value : start_expression",
"primitive_value : zero_adic_operator",
"primitive_value : parenthesised_expression",
"location_contents : location",
"value_name : synonym_name",
"value_name : value_enumeration_name",
"value_name : value_do_with_name",
"value_name : value_receive_name",
"value_name : GENERAL_PROCEDURE_NAME",
"literal : INTEGER_LITERAL",
"literal : BOOLEAN_LITERAL",
"literal : CHARACTER_LITERAL",
"literal : FLOAT_LITERAL",
"literal : EMPTINESS_LITERAL",
"literal : CHARACTER_STRING_LITERAL",
"literal : BIT_STRING_LITERAL",
"value_string_element : string_primitive_value '(' start_element ')'",
"value_string_slice : string_primitive_value '(' left_element ':' right_element ')'",
"value_string_slice : string_primitive_value '(' start_element UP slice_size ')'",
"value_array_element : array_primitive_value '(' $$1 expression_list ')'",
"value_array_slice : array_primitive_value '(' lower_element ':' upper_element ')'",
"value_array_slice : array_primitive_value '(' first_element UP slice_size ')'",
"value_structure_field : primitive_value FIELD_NAME",
"expression_conversion : mode_name parenthesised_expression",
"value_procedure_call : FIXME_05",
"value_built_in_routine_call : chill_value_built_in_routine_call",
"start_expression : FIXME_06",
"zero_adic_operator : FIXME_07",
"parenthesised_expression : '(' expression ')'",
"expression : operand_0",
"expression : single_assignment_action",
"expression : conditional_expression",
"conditional_expression : IF boolean_expression then_alternative else_alternative FI",
"conditional_expression : CASE case_selector_list OF value_case_alternative '[' ELSE sub_expression ']' ESAC",
"then_alternative : THEN subexpression",
"else_alternative : ELSE subexpression",
"else_alternative : ELSIF boolean_expression then_alternative else_alternative",
"sub_expression : expression",
"value_case_alternative : case_label_specification ':' sub_expression ';'",
"operand_0 : operand_0 LOGIOR operand_1",
"operand_0 : operand_0 ORIF operand_1",
"operand_0 : operand_0 LOGXOR operand_1",
"operand_1 : operand_1 LOGAND operand_2",
"operand_1 : operand_1 ANDIF operand_2",
"operand_2 : operand_2 '=' operand_3",
"operand_2 : operand_2 NOTEQUAL operand_3",
"operand_2 : operand_2 '>' operand_3",
"operand_2 : operand_2 GTR operand_3",
"operand_2 : operand_2 '<' operand_3",
"operand_2 : operand_2 LEQ operand_3",
"operand_2 : operand_2 IN operand_3",
"operand_3 : operand_3 '+' operand_4",
"operand_3 : operand_3 '-' operand_4",
"operand_3 : operand_3 SLASH_SLASH operand_4",
"operand_4 : operand_4 '*' operand_5",
"operand_4 : operand_4 '/' operand_5",
"operand_4 : operand_4 MOD operand_5",
"operand_4 : operand_4 REM operand_5",
"operand_5 : '-' operand_6",
"operand_5 : NOT operand_6",
"operand_5 : parenthesised_expression literal",
"operand_6 : POINTER location",
"operand_6 : RECEIVE buffer_location",
"operand_6 : primitive_value",
"single_assignment_action : location GDB_ASSIGNMENT value",
"chill_value_built_in_routine_call : NUM '(' expression ')'",
"chill_value_built_in_routine_call : PRED '(' expression ')'",
"chill_value_built_in_routine_call : SUCC '(' expression ')'",
"chill_value_built_in_routine_call : ABS '(' expression ')'",
"chill_value_built_in_routine_call : CARD '(' expression ')'",
"chill_value_built_in_routine_call : MAX_TOKEN '(' expression ')'",
"chill_value_built_in_routine_call : MIN_TOKEN '(' expression ')'",
"chill_value_built_in_routine_call : SIZE '(' location ')'",
"chill_value_built_in_routine_call : SIZE '(' mode_argument ')'",
"chill_value_built_in_routine_call : UPPER '(' upper_lower_argument ')'",
"chill_value_built_in_routine_call : LOWER '(' upper_lower_argument ')'",
"chill_value_built_in_routine_call : LENGTH '(' length_argument ')'",
"mode_argument : mode_name",
"mode_argument : array_mode_name '(' expression ')'",
"mode_argument : string_mode_name '(' expression ')'",
"mode_argument : variant_structure_mode_name '(' expression_list ')'",
"upper_lower_argument : expression",
"upper_lower_argument : mode_name",
"length_argument : expression",
"array_primitive_value : primitive_value",
"array_mode_name : FIXME_08",
"string_mode_name : FIXME_09",
"variant_structure_mode_name : FIXME_10",
"synonym_name : FIXME_11",
"value_enumeration_name : FIXME_12",
"value_do_with_name : FIXME_13",
"value_receive_name : FIXME_14",
"string_primitive_value : FIXME_15",
"start_element : FIXME_16",
"left_element : FIXME_17",
"right_element : FIXME_18",
"lower_element : FIXME_20",
"upper_element : FIXME_21",
"first_element : FIXME_22",
"boolean_expression : FIXME_26",
"case_selector_list : FIXME_27",
"subexpression : FIXME_28",
"case_label_specification : FIXME_29",
"buffer_location : FIXME_30",
#define YYMAXDEPTH YYSTACKSIZE
#define YYSTACKSIZE YYMAXDEPTH
YYSTYPE yyvs
[YYSTACKSIZE
];
#define yystacksize YYSTACKSIZE
/* Implementation of a dynamically expandable buffer for processing input
characters acquired through lexptr and building a value to return in
static char *tempbuf
; /* Current buffer contents */
static int tempbufsize
; /* Size of allocated buffer */
static int tempbufindex
; /* Current index into buffer */
#define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */
if (tempbufindex + (size) >= tempbufsize) \
growbuf_by_size (size); \
/* Grow the static temp buffer if necessary, including allocating the first one
growby
= max (count
, GROWBY_MIN_SIZE
);
tempbuf
= (char *) xmalloc (tempbufsize
);
tempbuf
= (char *) xrealloc (tempbuf
, tempbufsize
);
/* Try to consume a simple name string token. If successful, returns
a pointer to a nullbyte terminated copy of the name that can be used
in symbol table lookups. If not successful, returns NULL. */
match_simple_name_string ()
} while (isalnum (*tokptr
) || (*tokptr
== '_'));
yylval
.sval
.ptr
= lexptr
;
yylval
.sval
.length
= tokptr
- lexptr
;
result
= copy_name (yylval
.sval
);
for (tokptr
= result
; *tokptr
; tokptr
++)
*tokptr
= tolower(*tokptr
);
/* Start looking for a value composed of valid digits as set by the base
in use. Note that '_' characters are valid anywhere, in any quantity,
and are simply ignored. Since we must find at least one valid digit,
or reject this token as an integer literal, we keep track of how many
digits we have encountered. */
decode_integer_value (base
, tokptrptr
, ivalptr
)
char *tokptr
= *tokptrptr
;
temp
= tolower (*tokptr
);
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
/* Found something not in domain for current base. */
tokptr
--; /* Unconsume what gave us indigestion. */
/* If we didn't find any digits, then we don't have a valid integer
value, so reject the entire token. Otherwise, update the lexical
scan pointer, and return non-zero for success. */
decode_integer_literal (valptr
, tokptrptr
)
char *tokptr
= *tokptrptr
;
/* Look for an explicit base specifier, which is optional. */
/* If we found an explicit base ensure that the character after the
explicit base is a single quote. */
if (explicit_base
&& (*tokptr
++ != '\''))
/* Attempt to decode whatever follows as an integer value in the
indicated base, updating the token pointer in the process and
computing the value into ival. Also, if we have an explicit
base, then the next character must not be a single quote, or we
have a bitstring literal, so reject the entire token in this case.
Otherwise, update the lexical scan pointer, and return non-zero
if (!decode_integer_value (base
, &tokptr
, &ival
))
else if (explicit_base
&& (*tokptr
== '\''))
/* If it wasn't for the fact that floating point values can contain '_'
characters, we could just let strtod do all the hard work by letting it
try to consume as much of the current token buffer as possible and
find a legal conversion. Unfortunately we need to filter out the '_'
characters before calling strtod, which we do by copying the other
legal chars to a local buffer to be converted. However since we also
need to keep track of where the last unconsumed character in the input
buffer is, we have transfer only as many characters as may compose a
legal floating point value. */
/* Make local buffer in which to build the string to convert. This is
required because underscores are valid in chill floating point numbers
but not in the string passed to strtod to convert. The string will be
no longer than our input string. */
copy
= buf
= (char *) alloca (strlen (tokptr
) + 1);
/* Transfer all leading digits to the conversion buffer, discarding any
while (isdigit (*tokptr
) || *tokptr
== '_')
/* Now accept either a '.', or one of [eEdD]. Dot is legal regardless
of whether we found any leading digits, and we simply accept it and
continue on to look for the fractional part and/or exponent. One of
[eEdD] is legal only if we have seen digits, and means that there
is no fractional part. If we find neither of these, then this is
not a floating point number, so return failure. */
/* Accept and then look for fractional part and/or exponent. */
/* We found a '.', copy any fractional digits to the conversion buffer, up
to the first nondigit, non-underscore character. */
while (isdigit (*tokptr
) || *tokptr
== '_')
/* Look for an exponent, which must start with one of [eEdD]. If none
is found, jump directly to trying to convert what we have collected
/* Accept an optional '-' or '+' following one of [eEdD]. */
if (*tokptr
== '+' || *tokptr
== '-')
/* Now copy an exponent into the conversion buffer. Note that at the
moment underscores are *not* allowed in exponents. */
while (isdigit (*tokptr
))
/* If we transfered any chars to the conversion buffer, try to interpret its
contents as a floating point value. If any characters remain, then we
must not have a valid floating point string. */
dval
= strtod (buf
, ©
);
/* Recognize a string literal. A string literal is a nonzero sequence
of characters enclosed in matching single or double quotes, except that
a single character inside single quotes is a character literal, which
we reject as a string literal. To embed the terminator character inside
a string, it is simply doubled (I.E. "this""is""one""string") */
for (tempbufindex
= 0, tokptr
++; *tokptr
!= '\0'; tokptr
++)
if (*(tokptr
+ 1) == *lexptr
)
tempbuf
[tempbufindex
++] = *tokptr
;
if (*tokptr
== '\0' /* no terminator */
|| tempbufindex
== 0 /* no string */
|| (tempbufindex
== 1 && *tokptr
== '\'')) /* char literal */
tempbuf
[tempbufindex
] = '\0';
yylval
.sval
.ptr
= tempbuf
;
yylval
.sval
.length
= tempbufindex
;
return (CHARACTER_STRING_LITERAL
);
/* Recognize a character literal. A character literal is single character
or a control sequence, enclosed in single quotes. A control sequence
is a comma separated list of one or more integer literals, enclosed
in parenthesis and introduced with a circumflex character.
As a GNU chill extension, the syntax C'xx' is also recognized as a
character literal, where xx is a hex value for the character.
Note that more than a single character, enclosed in single quotes, is
Also note that the control sequence form is not in GNU Chill since it
is ambiguous with the string literal form using single quotes. I.E.
is '^(7)' a character literal or a string literal. In theory it it
possible to tell by context, but GNU Chill doesn't accept the control
sequence form, so neither do we (for now the code is disabled).
Returns CHARACTER_LITERAL if a match is found.
match_character_literal ()
if ((tolower (*tokptr
) == 'c') && (*(tokptr
+ 1) == '\''))
/* We have a GNU chill extension form, so skip the leading "C'",
decode the hex value, and then ensure that we have a trailing
single quote character. */
if (!decode_integer_value (16, &tokptr
, &ival
) || (*tokptr
!= '\''))
else if (*tokptr
== '\'')
/* Determine which form we have, either a control sequence or the
single character form. */
if ((*tokptr
== '^') && (*(tokptr
+ 1) == '('))
#if 0 /* Disable, see note above. -fnf */
/* Match and decode a control sequence. Return zero if we don't
find a valid integer literal, or if the next unconsumed character
after the integer literal is not the trailing ')'.
FIXME: We currently don't handle the multiple integer literal
if (!decode_integer_literal (&ival
, &tokptr
) || (*tokptr
++ != ')'))
/* The trailing quote has not yet been consumed. If we don't find
it, then we have no match. */
/* Not a character literal. */
yylval
.typed_val
.val
= ival
;
yylval
.typed_val
.type
= builtin_type_chill_char
;
return (CHARACTER_LITERAL
);
/* Recognize an integer literal, as specified in Z.200 sec 5.2.4.2.
Note that according to 5.2.4.2, a single "_" is also a valid integer
literal, however GNU-chill requires there to be at least one "digit"
in any integer literal. */
if (!decode_integer_literal (&ival
, &tokptr
))
yylval
.typed_val
.val
= ival
;
yylval
.typed_val
.type
= builtin_type_int
;
return (INTEGER_LITERAL
);
/* Recognize a bit-string literal, as specified in Z.200 sec 5.2.4.8
Note that according to 5.2.4.8, a single "_" is also a valid bit-string
literal, however GNU-chill requires there to be at least one "digit"
in any bit-string literal. */
match_bitstring_literal ()
/* Look for the required explicit base specifier. */
/* Ensure that the character after the explicit base is a single quote. */
while (*tokptr
!= '\0' && *tokptr
!= '\'')
digit
= tolower (*tokptr
);
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
/* Found something not in domain for current base. */
/* Extract bits from digit, starting with the msbit appropriate for
the current base, and packing them into the bitstring byte,
starting at the lsbit. */
for (mask
= (base
>> 1); mask
> 0; mask
>>= 1)
tempbuf
[tempbufindex
] |= (1 << bitoffset
);
if (bitoffset
== HOST_CHAR_BIT
)
/* Verify that we consumed everything up to the trailing single quote,
and that we found some bits (IE not just underbars). */
yylval
.sval
.ptr
= tempbuf
;
yylval
.sval
.length
= bitcount
;
return (BIT_STRING_LITERAL
);
/* Recognize tokens that start with '$'. These include:
$regname A native register name or a "standard
Return token GDB_REGNAME.
$variable A convenience variable with a name chosen
Return token GDB_VARIABLE.
$digits Value history with index <digits>, starting
from the first value which has index 1.
$$digits Value history with index <digits> relative
to the last value. I.E. $$0 is the last
value, $$1 is the one previous to that, $$2
is the one previous to $$1, etc.
$ | $0 | $$0 The last value in the value history.
$$ An abbreviation for the second to the last
value in the value history, I.E. $$1
Note that we currently assume that register names and convenience
variables follow the convention of starting with a letter or '_'.
/* We will always have a successful match, even if it is just for
a single '$', the abbreviation for $$0. So advance lexptr. */
if (*tokptr
== '_' || isalpha (*tokptr
))
/* Look for a match with a native register name, usually something
like "r0" for example. */
for (regno
= 0; regno
< NUM_REGS
; regno
++)
namelength
= strlen (reg_names
[regno
]);
if (STREQN (tokptr
, reg_names
[regno
], namelength
)
&& !isalnum (tokptr
[namelength
]))
lexptr
+= namelength
+ 1;
/* Look for a match with a standard register name, usually something
like "pc", which gdb always recognizes as the program counter
regardless of what the native register name is. */
for (regno
= 0; regno
< num_std_regs
; regno
++)
namelength
= strlen (std_regs
[regno
].name
);
if (STREQN (tokptr
, std_regs
[regno
].name
, namelength
)
&& !isalnum (tokptr
[namelength
]))
yylval
.lval
= std_regs
[regno
].regnum
;
/* Attempt to match against a convenience variable. Note that
this will always succeed, because if no variable of that name
already exists, the lookup_internalvar will create one for us.
Also note that both lexptr and tokptr currently point to the
start of the input string we are trying to match, and that we
have already tested the first character for non-numeric, so we
don't have to treat it specially. */
while (*tokptr
== '_' || isalnum (*tokptr
))
yylval
.sval
.ptr
= lexptr
;
yylval
.sval
.length
= tokptr
- lexptr
;
yylval
.ivar
= lookup_internalvar (copy_name (yylval
.sval
));
/* Since we didn't match against a register name or convenience
variable, our only choice left is a history value. */
/* Attempt to decode more characters as an integer value giving
the index in the history list. If successful, the value will
overwrite ival (currently 0 or 1), and if not, ival will be
left alone, which is good since it is currently correct for
decode_integer_literal (&ival
, &tokptr
);
yylval
.lval
= negate
? -ival
: ival
;
static const struct token idtokentab
[] =
static const struct token tokentab2
[] =
{ ":=", GDB_ASSIGNMENT
},
/* Read one token, getting characters through lexptr. */
/* This is where we will check to make sure that the language and the
operators used are compatible. */
/* Skip over any leading whitespace. */
while (isspace (*lexptr
))
/* Look for special single character cases which can't be the first
character of some other multicharacter token. */
/* Look for characters which start a particular kind of multicharacter
token, such as a character literal, register name, convenience
variable name, string literal, etc. */
/* First try to match a string literal, which is any nonzero
sequence of characters enclosed in matching single or double
quotes, except that a single character inside single quotes
is a character literal, so we have to catch that case also. */
token
= match_string_literal ();
token
= match_character_literal ();
token
= match_character_literal ();
token
= match_dollar_tokens ();
/* See if it is a special token of length 2. */
for (i
= 0; i
< sizeof (tokentab2
) / sizeof (tokentab2
[0]); i
++)
if (STREQN (lexptr
, tokentab2
[i
].operator, 2))
return (tokentab2
[i
].token
);
/* Look for single character cases which which could be the first
character of some other multicharacter token, but aren't, or we
would already have found it. */
/* Look for a float literal before looking for an integer literal, so
we match as much of the input stream as possible. */
token
= match_float_literal ();
token
= match_bitstring_literal ();
token
= match_integer_literal ();
/* Try to match a simple name string, and if a match is found, then
further classify what sort of name it is and return an appropriate
token. Note that attempting to match a simple name string consumes
the token from lexptr, so we can't back out if we later find that
we can't classify what sort of name it is. */
simplename
= match_simple_name_string ();
/* See if it is a reserved identifier. */
for (i
= 0; i
< sizeof (idtokentab
) / sizeof (idtokentab
[0]); i
++)
if (STREQ (simplename
, idtokentab
[i
].operator))
return (idtokentab
[i
].token
);
/* Look for other special tokens. */
if (STREQ (simplename
, "true"))
return (BOOLEAN_LITERAL
);
if (STREQ (simplename
, "false"))
return (BOOLEAN_LITERAL
);
sym
= lookup_symbol (simplename
, expression_context_block
,
VAR_NAMESPACE
, (int *) NULL
,
(struct symtab
**) NULL
);
yylval
.ssym
.stoken
.ptr
= NULL
;
yylval
.ssym
.stoken
.length
= 0;
yylval
.ssym
.is_a_field_of_this
= 0; /* FIXME, C++'ism */
switch (SYMBOL_CLASS (sym
))
/* Found a procedure name. */
return (GENERAL_PROCEDURE_NAME
);
/* Found a global or local static variable. */
if (innermost_block
== NULL
|| contained_in (block_found
, innermost_block
))
innermost_block
= block_found
;
yylval
.tsym
.type
= SYMBOL_TYPE (sym
);
error ("Symbol \"%s\" names no location.", simplename
);
else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command.");
error ("No symbol \"%s\" in current context.", simplename
);
/* Catch single character tokens which are not part of some
case '.': /* Not float for example. */
while (isspace (*lexptr
)) lexptr
++;
simplename
= match_simple_name_string ();
printf ("Parsing: %s\n", lexptr
);
error ("Invalid syntax in expression near character '%c'.", yychar
);
error ("Invalid syntax in expression");
#define YYABORT goto yyabort
#define YYREJECT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR goto yyerrlab
register int yym
, yyn
, yystate
;
if (yys
= getenv("YYDEBUG"))
if (yyn
>= '0' && yyn
<= '9')
if (yyn
= yydefred
[yystate
]) goto yyreduce
;
if ((yychar
= yylex()) < 0) yychar
= 0;
if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
if (!yys
) yys
= "illegal-symbol";
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX
, yystate
, yychar
, yys
);
if ((yyn
= yysindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
printf("%sdebug: state %d, shifting to state %d\n",
YYPREFIX
, yystate
, yytable
[yyn
]);
if (yyssp
>= yyss
+ yystacksize
- 1)
*++yyssp
= yystate
= yytable
[yyn
];
if (yyerrflag
> 0) --yyerrflag
;
if ((yyn
= yyrindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
if (yyerrflag
) goto yyinrecovery
;
if ((yyn
= yysindex
[*yyssp
]) && (yyn
+= YYERRCODE
) >= 0 &&
yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == YYERRCODE
)
printf("%sdebug: state %d, error recovery shifting\
to state %d\n", YYPREFIX
, *yyssp
, yytable
[yyn
]);
if (yyssp
>= yyss
+ yystacksize
- 1)
*++yyssp
= yystate
= yytable
[yyn
];
printf("%sdebug: error recovery discarding state %d\n",
if (yyssp
<= yyss
) goto yyabort
;
if (yychar
== 0) goto yyabort
;
if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
if (!yys
) yys
= "illegal-symbol";
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX
, yystate
, yychar
, yys
);
printf("%sdebug: state %d, reducing by rule %d (%s)\n",
YYPREFIX
, yystate
, yyn
, yyrule
[yyn
]);
{ write_exp_elt_opcode(OP_TYPE
);
write_exp_elt_type(yyvsp
[0].tsym
.type
);
write_exp_elt_opcode(OP_TYPE
);}
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (UNOP_IND
);
write_exp_elt_opcode (OP_VAR_VALUE
);
write_exp_elt_block (NULL
);
write_exp_elt_sym (yyvsp
[0].ssym
.sym
);
write_exp_elt_opcode (OP_VAR_VALUE
);
write_exp_elt_opcode (OP_LAST
);
write_exp_elt_longcst (yyvsp
[0].lval
);
write_exp_elt_opcode (OP_LAST
);
write_exp_elt_opcode (OP_REGISTER
);
write_exp_elt_longcst (yyvsp
[0].lval
);
write_exp_elt_opcode (OP_REGISTER
);
write_exp_elt_opcode (OP_INTERNALVAR
);
write_exp_elt_intern (yyvsp
[0].ivar
);
write_exp_elt_opcode (OP_INTERNALVAR
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (OP_VAR_VALUE
);
write_exp_elt_block (NULL
);
write_exp_elt_sym (yyvsp
[0].ssym
.sym
);
write_exp_elt_opcode (OP_VAR_VALUE
);
write_exp_elt_opcode (OP_LONG
);
write_exp_elt_type (yyvsp
[0].typed_val
.type
);
write_exp_elt_longcst ((LONGEST
) (yyvsp
[0].typed_val
.val
));
write_exp_elt_opcode (OP_LONG
);
write_exp_elt_opcode (OP_BOOL
);
write_exp_elt_longcst ((LONGEST
) yyvsp
[0].ulval
);
write_exp_elt_opcode (OP_BOOL
);
write_exp_elt_opcode (OP_LONG
);
write_exp_elt_type (yyvsp
[0].typed_val
.type
);
write_exp_elt_longcst ((LONGEST
) (yyvsp
[0].typed_val
.val
));
write_exp_elt_opcode (OP_LONG
);
write_exp_elt_opcode (OP_DOUBLE
);
write_exp_elt_type (builtin_type_double
);
write_exp_elt_dblcst (yyvsp
[0].dval
);
write_exp_elt_opcode (OP_DOUBLE
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (OP_STRING
);
write_exp_string (yyvsp
[0].sval
);
write_exp_elt_opcode (OP_STRING
);
write_exp_elt_opcode (OP_BITSTRING
);
write_exp_bitstring (yyvsp
[0].sval
);
write_exp_elt_opcode (OP_BITSTRING
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (MULTI_SUBSCRIPT
);
write_exp_elt_longcst ((LONGEST
) end_arglist ());
write_exp_elt_opcode (MULTI_SUBSCRIPT
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
{ write_exp_elt_opcode (STRUCTOP_STRUCT
);
write_exp_string (yyvsp
[0].sval
);
write_exp_elt_opcode (STRUCTOP_STRUCT
);
write_exp_elt_opcode (UNOP_CAST
);
write_exp_elt_type (yyvsp
[-1].tsym
.type
);
write_exp_elt_opcode (UNOP_CAST
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (BINOP_BITWISE_IOR
);
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (BINOP_BITWISE_XOR
);
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (BINOP_BITWISE_AND
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (BINOP_EQUAL
);
write_exp_elt_opcode (BINOP_NOTEQUAL
);
write_exp_elt_opcode (BINOP_GTR
);
write_exp_elt_opcode (BINOP_GEQ
);
write_exp_elt_opcode (BINOP_LESS
);
write_exp_elt_opcode (BINOP_LEQ
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (BINOP_ADD
);
write_exp_elt_opcode (BINOP_SUB
);
write_exp_elt_opcode (BINOP_CONCAT
);
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (BINOP_MUL
);
write_exp_elt_opcode (BINOP_DIV
);
write_exp_elt_opcode (BINOP_MOD
);
write_exp_elt_opcode (BINOP_REM
);
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (UNOP_NEG
);
write_exp_elt_opcode (UNOP_LOGICAL_NOT
);
write_exp_elt_opcode (BINOP_CONCAT
);
write_exp_elt_opcode (UNOP_ADDR
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
write_exp_elt_opcode (BINOP_ASSIGN
);
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
yyval
.voidval
= 0; /* FIXME */
if (yystate
== 0 && yym
== 0)
printf("%sdebug: after reduction, shifting from state 0 to\
state %d\n", YYPREFIX
, YYFINAL
);
if ((yychar
= yylex()) < 0) yychar
= 0;
if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
if (!yys
) yys
= "illegal-symbol";
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX
, YYFINAL
, yychar
, yys
);
if (yychar
== 0) goto yyaccept
;
if ((yyn
= yygindex
[yym
]) && (yyn
+= yystate
) >= 0 &&
yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yystate
)
printf("%sdebug: after reduction, shifting from state %d \
to state %d\n", YYPREFIX
, *yyssp
, yystate
);
if (yyssp
>= yyss
+ yystacksize
- 1)
yyerror("yacc stack overflow");