static char yysccsid
[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define yyclearin (yychar=(-1))
#define yyerrok (yyerrflag=0)
#define YYRECOVERING (yyerrflag!=0)
#define yyerrflag m2_errflag
#define yydefred m2_defred
#define yysindex m2_sindex
#define yyrindex m2_rindex
#define yygindex m2_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 m2_maxdepth
#define yyerrflag m2_errflag
#define yyreds m2_reds /* With YYDEBUG defined */
#define yytoks m2_toks /* With YYDEBUG defined */
#define YYDEBUG 0 /* Default to no yydebug support */
yyerror
PARAMS ((char *));
make_qualname
PARAMS ((char *, char *));
parse_number
PARAMS ((int));
/* The sign of the number being parsed. */
static int number_sign
= 1;
/* The block that the module specified by the qualifer on an identifer is
static struct block
*modblock
=0;
struct internalvar
*ivar
;
0, 0, 2, 1, 8, 1, 1, 1, 9, 9,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 3, 12, 1, 13, 1, 10, 10, 10,
11, 11, 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, 7, 7, 4, 4, 4, 4,
1, 1, 1, 2, 0, 3, 2, 2, 1, 1,
4, 4, 4, 4, 4, 4, 4, 6, 4, 4,
4, 2, 4, 6, 4, 6, 3, 1, 3, 6,
6, 3, 4, 0, 5, 0, 5, 0, 1, 3,
1, 3, 4, 4, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 1, 1, 1, 3, 1, 1, 3, 1,
65, 66, 63, 64, 67, 68, 73, 80, 75, 81,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 70, 71, 78, 0,
5, 0, 9, 10, 0, 0, 0, 2, 28, 69,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 4, 0, 34, 36,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 45, 0, 0, 32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 29, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 27, 0, 0, 0, 0,
79, 76, 72, 11, 12, 14, 13, 15, 16, 17,
0, 19, 20, 21, 0, 23, 0, 25, 0, 0,
0, 0, 0, 0, 0, 44, 33, 0, 0, 0,
0, 0, 0, 35, 37, 18, 24, 26, 30, 31,
66, 38, 39, 40, 47, 42, 43, 64, 44, 68,
short m2_sindex
[] = { 1597,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1779, -27, -21, -15, -10, -6, -3, -2, 18, 20,
24, 31, 38, 39, 59, 77, 0, 0, 0, 1597,
0, 1597, 0, 0, 1597, 0, 1670, 0, 0, 0,
-26, -256, 0, 1597, 1597, -24, -26, 1597, 1597, 1597,
1597, -218, -218, 1597, -218, 1597, 1597, 1597, 1597, 1597,
1597, 1597, -24, 1597, 939, 1670, -37, -17, 1597, 1597,
1597, 1597, 1597, 1597, 1597, 1597, -118, 1597, 1597, 1597,
1597, 1597, 1597, 1597, 1597, 1597, 0, -186, 0, 0,
1597, 1597, -259, -24, -30, 967, 1002, 1044, 1079, 78,
83, 1160, 74, 1268, 1323, 1351, 866, 894, 1183, 1404,
-24, 0, 1597, 1597, 0, 1727, -25, -25, -25, -25,
-25, -25, -25, 1597, 0, 8, 80, 192, 117, 49,
49, -24, -24, -24, -24, 0, 1597, 1597, 1449, -11,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1597, 0, 0, 0, 1597, 0, 1597, 0, 1597, 1597,
-24, 1670, 1670, -44, -20, 0, 0, 1484, 1512, 1547,
1617, 1628, 1597, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, -9, 0, 121, 0, 0, 0,
135, 0, 1, 0, 0, 12, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 40, 0, 0, -35, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, -9, 0, 68, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
106, 0, 0, 0, 0, 98, 568, 575, 598, 653,
677, 779, 838, -9, 0, 0, 561, 539, 502, 465,
489, 134, 145, 220, 411, 0, 0, -12, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
435, -18, -42, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2066, 0, 61, 0, 341, 0, 0, 0, 0, -88,
short m2_table
[] = { 173,
77, 41, 91, 140, 124, 39, 141, 142, 39, 91,
143, 22, 48, 91, 90, 90, 83, 81, 49, 82,
175, 84, 40, 114, 50, 40, 114, 42, 38, 51,
93, 38, 114, 52, 38, 77, 53, 54, 80, 7,
77, 77, 77, 77, 77, 77, 22, 77, 174, 165,
41, 10, 22, 22, 22, 22, 22, 55, 22, 56,
77, 77, 77, 57, 77, 89, 89, 8, 87, 87,
58, 22, 22, 22, 7, 22, 42, 59, 60, 136,
7, 7, 7, 7, 7, 92, 7, 113, 90, 39,
83, 77, 92, 77, 77, 84, 92, 62, 61, 7,
7, 7, 8, 7, 22, 6, 40, 115, 8, 8,
8, 8, 8, 167, 8, 38, 62, 151, 148, 90,
1, 83, 81, 149, 82, 77, 84, 8, 8, 8,
92, 8, 7, 47, 3, 0, 22, 125, 62, 89,
6, 62, 87, 80, 48, 0, 6, 6, 6, 6,
6, 10, 6, 0, 0, 0, 90, 0, 83, 81,
8, 82, 0, 84, 7, 6, 6, 6, 47, 6,
89, 0, 0, 87, 47, 47, 47, 47, 47, 48,
47, 0, 0, 0, 0, 48, 48, 48, 48, 48,
62, 48, 8, 47, 47, 47, 0, 47, 6, 0,
0, 0, 0, 0, 48, 48, 48, 89, 48, 0,
87, 0, 0, 0, 0, 0, 0, 0, 0, 49,
0, 0, 62, 0, 0, 0, 47, 0, 0, 0,
6, 90, 0, 83, 81, 0, 82, 48, 84, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 49, 80, 0, 0, 47, 0,
49, 49, 49, 49, 49, 0, 49, 0, 0, 48,
0, 78, 79, 85, 86, 0, 88, 88, 0, 49,
49, 49, 89, 49, 0, 87, 0, 74, 0, 0,
0, 0, 77, 77, 77, 77, 77, 77, 77, 77,
77, 0, 77, 22, 22, 22, 22, 22, 22, 22,
22, 22, 49, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 7, 7, 7, 7, 7, 7, 7, 7, 7,
41, 0, 0, 0, 49, 0, 0, 85, 86, 0,
88, 0, 0, 0, 0, 0, 0, 0, 0, 8,
8, 8, 8, 8, 8, 8, 8, 8, 0, 0,
0, 0, 0, 0, 0, 67, 0, 79, 85, 86,
0, 88, 0, 0, 0, 95, 0, 0, 0, 0,
0, 0, 100, 101, 0, 103, 0, 6, 6, 6,
6, 6, 6, 6, 6, 6, 0, 0, 0, 0,
50, 0, 0, 0, 0, 85, 86, 126, 88, 0,
0, 0, 0, 0, 0, 47, 47, 47, 47, 47,
47, 47, 47, 47, 43, 0, 48, 48, 48, 48,
48, 48, 48, 48, 48, 50, 0, 0, 0, 0,
0, 50, 50, 50, 50, 50, 0, 50, 0, 0,
0, 0, 0, 0, 51, 0, 0, 0, 0, 43,
50, 50, 50, 0, 50, 43, 43, 43, 43, 43,
0, 43, 0, 0, 0, 0, 0, 0, 52, 0,
85, 86, 0, 88, 43, 43, 43, 0, 43, 51,
0, 46, 0, 50, 0, 51, 0, 51, 51, 51,
0, 49, 49, 49, 49, 49, 49, 49, 49, 49,
0, 0, 0, 52, 51, 51, 51, 43, 51, 52,
0, 52, 52, 52, 0, 50, 46, 0, 60, 0,
0, 0, 46, 0, 0, 46, 0, 0, 52, 52,
52, 0, 52, 0, 0, 0, 0, 51, 0, 43,
61, 46, 46, 46, 0, 46, 0, 58, 0, 0,
0, 0, 0, 60, 59, 0, 0, 0, 0, 60,
0, 52, 60, 0, 0, 0, 0, 0, 0, 51,
0, 0, 0, 0, 46, 61, 0, 56, 60, 60,
60, 61, 58, 0, 61, 0, 0, 0, 58, 59,
0, 58, 0, 52, 0, 59, 0, 0, 59, 0,
61, 61, 61, 0, 0, 0, 46, 58, 58, 58,
0, 60, 56, 0, 59, 59, 59, 0, 56, 0,
0, 56, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 57, 61, 0, 0, 0, 56, 56, 56,
58, 0, 0, 60, 0, 0, 0, 59, 0, 0,
0, 0, 0, 0, 0, 0, 53, 0, 0, 0,
0, 0, 0, 0, 0, 61, 0, 57, 0, 0,
56, 0, 58, 57, 0, 0, 57, 0, 0, 59,
0, 0, 50, 50, 50, 50, 50, 50, 50, 50,
50, 53, 57, 57, 57, 0, 0, 53, 0, 0,
53, 0, 56, 0, 0, 0, 43, 43, 43, 43,
43, 43, 43, 43, 43, 0, 53, 53, 53, 0,
0, 0, 0, 0, 0, 57, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 51, 51, 51, 51,
51, 51, 51, 0, 0, 0, 0, 0, 0, 53,
0, 0, 0, 0, 0, 0, 0, 57, 54, 0,
52, 52, 52, 52, 52, 52, 52, 0, 0, 0,
0, 0, 0, 46, 46, 46, 46, 46, 46, 46,
0, 53, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 54, 0, 0, 0, 0, 0, 54,
0, 0, 54, 0, 0, 0, 0, 0, 0, 0,
60, 60, 60, 60, 60, 60, 60, 55, 54, 54,
54, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 61, 61, 61, 61, 61, 61, 0, 58,
58, 58, 58, 58, 0, 0, 59, 59, 59, 59,
59, 54, 55, 0, 0, 0, 0, 0, 55, 0,
0, 55, 0, 0, 0, 0, 0, 0, 0, 56,
56, 56, 56, 56, 0, 0, 0, 55, 55, 55,
76, 0, 0, 54, 0, 90, 156, 83, 81, 155,
82, 0, 84, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 70, 74, 71, 76, 80,
55, 0, 0, 90, 158, 83, 81, 157, 82, 0,
84, 0, 0, 0, 57, 57, 57, 57, 57, 0,
0, 0, 0, 70, 74, 71, 89, 80, 0, 87,
0, 0, 55, 0, 0, 0, 0, 0, 53, 53,
53, 53, 53, 76, 0, 0, 0, 0, 90, 112,
83, 81, 0, 82, 89, 84, 0, 87, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 70, 74,
71, 76, 80, 0, 0, 0, 90, 144, 83, 81,
0, 82, 0, 84, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 70, 74, 71, 89,
80, 0, 87, 0, 0, 0, 76, 0, 0, 0,
0, 90, 145, 83, 81, 0, 82, 0, 84, 0,
0, 0, 0, 0, 0, 0, 0, 89, 0, 0,
87, 70, 74, 71, 0, 80, 0, 0, 0, 0,
54, 54, 54, 54, 54, 0, 0, 0, 76, 0,
0, 0, 0, 90, 146, 83, 81, 0, 82, 0,
84, 0, 89, 0, 0, 87, 0, 0, 0, 0,
0, 0, 0, 70, 74, 71, 0, 80, 0, 0,
0, 0, 0, 76, 0, 0, 0, 0, 90, 147,
83, 81, 0, 82, 0, 84, 0, 0, 0, 55,
55, 55, 55, 55, 89, 0, 0, 87, 70, 74,
71, 0, 80, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 69, 72, 73,
75, 77, 78, 79, 85, 86, 0, 88, 0, 89,
0, 0, 87, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 69, 72, 73, 75, 77,
78, 79, 85, 86, 76, 88, 0, 0, 0, 90,
150, 83, 81, 0, 82, 0, 84, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 76, 0, 70,
74, 71, 90, 80, 83, 81, 159, 82, 0, 84,
69, 72, 73, 75, 77, 78, 79, 85, 86, 0,
88, 0, 70, 74, 71, 0, 80, 0, 0, 0,
89, 0, 0, 87, 0, 0, 0, 0, 69, 72,
73, 75, 77, 78, 79, 85, 86, 0, 88, 0,
0, 0, 0, 89, 0, 0, 87, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 69, 72, 73, 75, 77, 78, 79,
85, 86, 76, 88, 0, 0, 0, 90, 152, 83,
81, 0, 82, 0, 84, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 70, 74, 71,
0, 80, 0, 0, 0, 69, 72, 73, 75, 77,
78, 79, 85, 86, 0, 88, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 76, 89, 0,
0, 87, 90, 153, 83, 81, 0, 82, 0, 84,
69, 72, 73, 75, 77, 78, 79, 85, 86, 0,
88, 0, 70, 74, 71, 76, 80, 0, 0, 0,
90, 154, 83, 81, 0, 82, 0, 84, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70, 74, 71, 89, 80, 0, 87, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 76, 0,
0, 89, 0, 90, 87, 83, 81, 160, 82, 0,
84, 69, 72, 73, 75, 77, 78, 79, 85, 86,
0, 88, 0, 70, 74, 71, 0, 80, 0, 0,
0, 0, 0, 0, 69, 72, 73, 75, 77, 78,
79, 85, 86, 76, 88, 0, 0, 0, 90, 166,
83, 81, 0, 82, 89, 84, 0, 87, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 70, 74,
71, 0, 80, 0, 0, 0, 0, 0, 76, 0,
0, 0, 0, 90, 176, 83, 81, 0, 82, 0,
84, 0, 0, 0, 0, 0, 0, 0, 0, 89,
0, 0, 87, 70, 74, 71, 76, 80, 0, 0,
0, 90, 177, 83, 81, 0, 82, 0, 84, 69,
72, 73, 75, 77, 78, 79, 85, 86, 0, 88,
0, 70, 74, 71, 89, 80, 0, 87, 0, 0,
0, 76, 0, 0, 0, 0, 90, 178, 83, 81,
0, 82, 0, 84, 0, 0, 0, 0, 0, 0,
0, 0, 89, 0, 0, 87, 70, 74, 71, 0,
80, 0, 0, 0, 69, 72, 73, 75, 77, 78,
79, 85, 86, 0, 88, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 32, 89, 0, 30,
87, 31, 69, 72, 73, 75, 77, 78, 79, 85,
86, 76, 88, 0, 0, 0, 90, 179, 83, 81,
0, 82, 76, 84, 0, 0, 0, 90, 180, 83,
81, 0, 82, 0, 84, 0, 70, 74, 71, 0,
80, 0, 0, 0, 0, 0, 0, 70, 74, 71,
0, 80, 0, 0, 0, 69, 72, 73, 75, 77,
78, 79, 85, 86, 76, 88, 0, 89, 0, 90,
87, 83, 81, 0, 82, 0, 84, 0, 89, 35,
0, 87, 34, 0, 0, 0, 0, 0, 0, 70,
74, 71, 0, 80, 0, 0, 0, 0, 0, 0,
69, 72, 73, 75, 77, 78, 79, 85, 86, 0,
88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89, 76, 0, 87, 0, 0, 90, 0, 83, 81,
0, 82, 0, 84, 0, 69, 72, 73, 75, 77,
78, 79, 85, 86, 0, 88, 70, 74, 71, 0,
80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 69, 72, 73, 75, 77, 78, 79,
85, 86, 0, 88, 0, 0, 0, 89, 45, 0,
87, 30, 0, 31, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 69, 72,
73, 75, 77, 78, 79, 85, 86, 0, 88, 0,
0, 0, 0, 1, 0, 0, 2, 3, 4, 5,
6, 7, 8, 9, 0, 0, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 0, 27, 28, 29, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 33,
0, 35, 0, 0, 34, 0, 0, 0, 69, 72,
73, 75, 77, 78, 79, 85, 86, 0, 88, 69,
72, 73, 75, 77, 78, 79, 85, 86, 0, 88,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 69, 72, 73, 75, 77, 78, 79, 85, 86,
0, 88, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
73, 75, 77, 78, 79, 85, 86, 0, 88, 0,
0, 0, 0, 0, 0, 1, 0, 0, 2, 3,
4, 5, 6, 7, 8, 9, 0, 0, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 37, 27, 28, 29, 0,
0, 0, 0, 0, 0, 0, 46, 0, 0, 0,
0, 33, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 63, 0, 65, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 94,
65, 0, 0, 96, 97, 98, 99, 0, 0, 102,
0, 104, 105, 106, 107, 108, 109, 110, 0, 111,
0, 0, 0, 0, 116, 117, 118, 119, 120, 121,
122, 123, 0, 127, 128, 129, 130, 131, 132, 133,
134, 135, 0, 0, 0, 0, 139, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 161, 162,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 163, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 168, 0, 0, 0,
169, 0, 170, 0, 171, 172, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 181,
0, 44, 40, 92, 123, 41, 266, 267, 44, 40,
41, 0, 40, 40, 40, 40, 42, 43, 40, 45,
41, 47, 41, 44, 40, 44, 44, 44, 41, 40,
287, 44, 44, 40, 44, 35, 40, 40, 64, 0,
40, 41, 42, 43, 44, 45, 35, 47, 93, 138,
93, 270, 41, 42, 43, 44, 45, 40, 47, 40,
60, 61, 62, 40, 64, 91, 91, 0, 94, 94,
40, 60, 61, 62, 35, 64, 93, 40, 40, 266,
41, 42, 43, 44, 45, 123, 47, 125, 40, 125,
42, 91, 123, 93, 94, 47, 123, 0, 40, 60,
61, 62, 35, 64, 93, 0, 125, 125, 41, 42,
43, 44, 45, 125, 47, 125, 40, 44, 41, 40,
0, 42, 43, 41, 45, 125, 47, 60, 61, 62,
123, 64, 93, 0, 0, -1, 125, 77, 41, 91,
35, 44, 94, 64, 0, -1, 41, 42, 43, 44,
45, 270, 47, -1, -1, -1, 40, -1, 42, 43,
93, 45, -1, 47, 125, 60, 61, 62, 35, 64,
91, -1, -1, 94, 41, 42, 43, 44, 45, 35,
47, -1, -1, -1, -1, 41, 42, 43, 44, 45,
93, 47, 125, 60, 61, 62, -1, 64, 93, -1,
-1, -1, -1, -1, 60, 61, 62, 91, 64, -1,
94, -1, -1, -1, -1, -1, -1, -1, -1, 0,
-1, -1, 125, -1, -1, -1, 93, -1, -1, -1,
125, 40, -1, 42, 43, -1, 45, 93, 47, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 35, 64, -1, -1, 125, -1,
41, 42, 43, 44, 45, -1, 47, -1, -1, 125,
-1, 297, 298, 299, 300, -1, 302, 302, -1, 60,
61, 62, 91, 64, -1, 94, -1, 287, -1, -1,
-1, -1, 292, 293, 294, 295, 296, 297, 298, 299,
300, -1, 302, 292, 293, 294, 295, 296, 297, 298,
299, 300, 93, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 292, 293, 294, 295, 296, 297, 298, 299, 300,
0, -1, -1, -1, 125, -1, -1, 299, 300, -1,
302, -1, -1, -1, -1, -1, -1, -1, -1, 292,
293, 294, 295, 296, 297, 298, 299, 300, -1, -1,
-1, -1, -1, -1, -1, 35, -1, 298, 299, 300,
-1, 302, -1, -1, -1, 45, -1, -1, -1, -1,
-1, -1, 52, 53, -1, 55, -1, 292, 293, 294,
295, 296, 297, 298, 299, 300, -1, -1, -1, -1,
0, -1, -1, -1, -1, 299, 300, 77, 302, -1,
-1, -1, -1, -1, -1, 292, 293, 294, 295, 296,
297, 298, 299, 300, 0, -1, 292, 293, 294, 295,
296, 297, 298, 299, 300, 35, -1, -1, -1, -1,
-1, 41, 42, 43, 44, 45, -1, 47, -1, -1,
-1, -1, -1, -1, 0, -1, -1, -1, -1, 35,
60, 61, 62, -1, 64, 41, 42, 43, 44, 45,
-1, 47, -1, -1, -1, -1, -1, -1, 0, -1,
299, 300, -1, 302, 60, 61, 62, -1, 64, 35,
-1, 0, -1, 93, -1, 41, -1, 43, 44, 45,
-1, 292, 293, 294, 295, 296, 297, 298, 299, 300,
-1, -1, -1, 35, 60, 61, 62, 93, 64, 41,
-1, 43, 44, 45, -1, 125, 35, -1, 0, -1,
-1, -1, 41, -1, -1, 44, -1, -1, 60, 61,
62, -1, 64, -1, -1, -1, -1, 93, -1, 125,
0, 60, 61, 62, -1, 64, -1, 0, -1, -1,
-1, -1, -1, 35, 0, -1, -1, -1, -1, 41,
-1, 93, 44, -1, -1, -1, -1, -1, -1, 125,
-1, -1, -1, -1, 93, 35, -1, 0, 60, 61,
62, 41, 35, -1, 44, -1, -1, -1, 41, 35,
-1, 44, -1, 125, -1, 41, -1, -1, 44, -1,
60, 61, 62, -1, -1, -1, 125, 60, 61, 62,
-1, 93, 35, -1, 60, 61, 62, -1, 41, -1,
-1, 44, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 0, 93, -1, -1, -1, 60, 61, 62,
93, -1, -1, 125, -1, -1, -1, 93, -1, -1,
-1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
-1, -1, -1, -1, -1, 125, -1, 35, -1, -1,
93, -1, 125, 41, -1, -1, 44, -1, -1, 125,
-1, -1, 292, 293, 294, 295, 296, 297, 298, 299,
300, 35, 60, 61, 62, -1, -1, 41, -1, -1,
44, -1, 125, -1, -1, -1, 292, 293, 294, 295,
296, 297, 298, 299, 300, -1, 60, 61, 62, -1,
-1, -1, -1, -1, -1, 93, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 292, 293, 294, 295,
296, 297, 298, -1, -1, -1, -1, -1, -1, 93,
-1, -1, -1, -1, -1, -1, -1, 125, 0, -1,
292, 293, 294, 295, 296, 297, 298, -1, -1, -1,
-1, -1, -1, 292, 293, 294, 295, 296, 297, 298,
-1, 125, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 35, -1, -1, -1, -1, -1, 41,
-1, -1, 44, -1, -1, -1, -1, -1, -1, -1,
292, 293, 294, 295, 296, 297, 298, 0, 60, 61,
62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 292, 293, 294, 295, 296, 297, -1, 292,
293, 294, 295, 296, -1, -1, 292, 293, 294, 295,
296, 93, 35, -1, -1, -1, -1, -1, 41, -1,
-1, 44, -1, -1, -1, -1, -1, -1, -1, 292,
293, 294, 295, 296, -1, -1, -1, 60, 61, 62,
35, -1, -1, 125, -1, 40, 41, 42, 43, 44,
45, -1, 47, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 60, 61, 62, 35, 64,
93, -1, -1, 40, 41, 42, 43, 44, 45, -1,
47, -1, -1, -1, 292, 293, 294, 295, 296, -1,
-1, -1, -1, 60, 61, 62, 91, 64, -1, 94,
-1, -1, 125, -1, -1, -1, -1, -1, 292, 293,
294, 295, 296, 35, -1, -1, -1, -1, 40, 41,
42, 43, -1, 45, 91, 47, -1, 94, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 60, 61,
62, 35, 64, -1, -1, -1, 40, 41, 42, 43,
-1, 45, -1, 47, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 60, 61, 62, 91,
64, -1, 94, -1, -1, -1, 35, -1, -1, -1,
-1, 40, 41, 42, 43, -1, 45, -1, 47, -1,
-1, -1, -1, -1, -1, -1, -1, 91, -1, -1,
94, 60, 61, 62, -1, 64, -1, -1, -1, -1,
292, 293, 294, 295, 296, -1, -1, -1, 35, -1,
-1, -1, -1, 40, 41, 42, 43, -1, 45, -1,
47, -1, 91, -1, -1, 94, -1, -1, -1, -1,
-1, -1, -1, 60, 61, 62, -1, 64, -1, -1,
-1, -1, -1, 35, -1, -1, -1, -1, 40, 41,
42, 43, -1, 45, -1, 47, -1, -1, -1, 292,
293, 294, 295, 296, 91, -1, -1, 94, 60, 61,
62, -1, 64, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 292, 293, 294,
295, 296, 297, 298, 299, 300, -1, 302, -1, 91,
-1, -1, 94, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 292, 293, 294, 295, 296,
297, 298, 299, 300, 35, 302, -1, -1, -1, 40,
41, 42, 43, -1, 45, -1, 47, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 35, -1, 60,
61, 62, 40, 64, 42, 43, 44, 45, -1, 47,
292, 293, 294, 295, 296, 297, 298, 299, 300, -1,
302, -1, 60, 61, 62, -1, 64, -1, -1, -1,
91, -1, -1, 94, -1, -1, -1, -1, 292, 293,
294, 295, 296, 297, 298, 299, 300, -1, 302, -1,
-1, -1, -1, 91, -1, -1, 94, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 292, 293, 294, 295, 296, 297, 298,
299, 300, 35, 302, -1, -1, -1, 40, 41, 42,
43, -1, 45, -1, 47, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 60, 61, 62,
-1, 64, -1, -1, -1, 292, 293, 294, 295, 296,
297, 298, 299, 300, -1, 302, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 35, 91, -1,
-1, 94, 40, 41, 42, 43, -1, 45, -1, 47,
292, 293, 294, 295, 296, 297, 298, 299, 300, -1,
302, -1, 60, 61, 62, 35, 64, -1, -1, -1,
40, 41, 42, 43, -1, 45, -1, 47, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
60, 61, 62, 91, 64, -1, 94, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 35, -1,
-1, 91, -1, 40, 94, 42, 43, 44, 45, -1,
47, 292, 293, 294, 295, 296, 297, 298, 299, 300,
-1, 302, -1, 60, 61, 62, -1, 64, -1, -1,
-1, -1, -1, -1, 292, 293, 294, 295, 296, 297,
298, 299, 300, 35, 302, -1, -1, -1, 40, 41,
42, 43, -1, 45, 91, 47, -1, 94, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 60, 61,
62, -1, 64, -1, -1, -1, -1, -1, 35, -1,
-1, -1, -1, 40, 41, 42, 43, -1, 45, -1,
47, -1, -1, -1, -1, -1, -1, -1, -1, 91,
-1, -1, 94, 60, 61, 62, 35, 64, -1, -1,
-1, 40, 41, 42, 43, -1, 45, -1, 47, 292,
293, 294, 295, 296, 297, 298, 299, 300, -1, 302,
-1, 60, 61, 62, 91, 64, -1, 94, -1, -1,
-1, 35, -1, -1, -1, -1, 40, 41, 42, 43,
-1, 45, -1, 47, -1, -1, -1, -1, -1, -1,
-1, -1, 91, -1, -1, 94, 60, 61, 62, -1,
64, -1, -1, -1, 292, 293, 294, 295, 296, 297,
298, 299, 300, -1, 302, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 40, 91, -1, 43,
94, 45, 292, 293, 294, 295, 296, 297, 298, 299,
300, 35, 302, -1, -1, -1, 40, 41, 42, 43,
-1, 45, 35, 47, -1, -1, -1, 40, 41, 42,
43, -1, 45, -1, 47, -1, 60, 61, 62, -1,
64, -1, -1, -1, -1, -1, -1, 60, 61, 62,
-1, 64, -1, -1, -1, 292, 293, 294, 295, 296,
297, 298, 299, 300, 35, 302, -1, 91, -1, 40,
94, 42, 43, -1, 45, -1, 47, -1, 91, 123,
-1, 94, 126, -1, -1, -1, -1, -1, -1, 60,
61, 62, -1, 64, -1, -1, -1, -1, -1, -1,
292, 293, 294, 295, 296, 297, 298, 299, 300, -1,
302, -1, -1, -1, -1, -1, -1, -1, -1, -1,
91, 35, -1, 94, -1, -1, 40, -1, 42, 43,
-1, 45, -1, 47, -1, 292, 293, 294, 295, 296,
297, 298, 299, 300, -1, 302, 60, 61, 62, -1,
64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 292, 293, 294, 295, 296, 297, 298,
299, 300, -1, 302, -1, -1, -1, 91, 40, -1,
94, 43, -1, 45, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 292, 293,
294, 295, 296, 297, 298, 299, 300, -1, 302, -1,
-1, -1, -1, 257, -1, -1, 260, 261, 262, 263,
264, 265, 266, 267, -1, -1, 270, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
284, 285, 286, -1, 288, 289, 290, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 303,
-1, 123, -1, -1, 126, -1, -1, -1, 292, 293,
294, 295, 296, 297, 298, 299, 300, -1, 302, 292,
293, 294, 295, 296, 297, 298, 299, 300, -1, 302,
-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, 292, 293, 294, 295, 296, 297, 298, 299, 300,
-1, 302, -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, 293,
294, 295, 296, 297, 298, 299, 300, -1, 302, -1,
-1, -1, -1, -1, -1, 257, -1, -1, 260, 261,
262, 263, 264, 265, 266, 267, -1, -1, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
282, 283, 284, 285, 286, 0, 288, 289, 290, -1,
-1, -1, -1, -1, -1, -1, 11, -1, -1, -1,
-1, 303, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 30, -1, 32, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 44,
45, -1, -1, 48, 49, 50, 51, -1, -1, 54,
-1, 56, 57, 58, 59, 60, 61, 62, -1, 64,
-1, -1, -1, -1, 69, 70, 71, 72, 73, 74,
75, 76, -1, 78, 79, 80, 81, 82, 83, 84,
85, 86, -1, -1, -1, -1, 91, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 113, 114,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 137, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 151, -1, -1, -1,
155, -1, 157, -1, 159, 160, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 173,
"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,"INT","HEX","ERROR","UINT","M2_TRUE",
"M2_FALSE","CHAR","FLOAT","STRING","NAME","BLOCKNAME","IDENT","VARNAME",
"TYPENAME","SIZE","CAP","ORD","HIGH","ABS","MIN_FUNC","MAX_FUNC","FLOAT_FUNC",
"VAL","CHR","ODD","TRUNC","INC","DEC","INCL","EXCL","COLONCOLON","LAST",
"REGNAME","INTERNAL_VAR","ABOVE_COMMA","ASSIGN","LEQ","GEQ","NOTEQUAL","IN",
"OROR","LOGICAL_AND","DIV","MOD","UNARY","DOT","NOT","QID",
"exp : HIGH '(' exp ')'",
"exp : MIN_FUNC '(' type ')'",
"exp : MAX_FUNC '(' type ')'",
"exp : FLOAT_FUNC '(' exp ')'",
"exp : VAL '(' type ',' exp ')'",
"exp : TRUNC '(' exp ')'",
"exp : INC '(' exp ',' exp ')'",
"exp : DEC '(' exp ',' exp ')'",
"exp : INCL '(' exp ',' exp ')'",
"exp : EXCL '(' exp ',' exp ')'",
"set : type '{' arglist '}'",
"exp : exp '[' $$2 non_empty_arglist ']'",
"exp : exp '(' $$3 arglist ')'",
"arglist : arglist ',' exp",
"non_empty_arglist : exp",
"non_empty_arglist : non_empty_arglist ',' exp",
"exp : '{' type '}' exp",
"exp : type '(' exp ')'",
"exp : exp NOTEQUAL exp",
"exp : exp LOGICAL_AND exp",
"exp : SIZE '(' type ')'",
"fblock : block COLONCOLON BLOCKNAME",
"variable : INTERNAL_VAR",
"variable : block COLONCOLON NAME",
#define YYMAXDEPTH YYSTACKSIZE
#define YYSTACKSIZE YYMAXDEPTH
YYSTYPE yyvs
[YYSTACKSIZE
];
#define yystacksize YYSTACKSIZE
return (MAX_OF_TYPE(builtin_type_m2_int
) - b
) < a
;
return (MAX_OF_TYPE(builtin_type_m2_card
) - b
) < a
;
/* Take care of parsing a number (anything that starts with a digit).
Set yylval and return the token type; update lexptr.
LEN is the number of characters in it. */
/*** Needs some error checking for the float case ***/
register char *p
= lexptr
;
register LONGEST prevn
= 0;
register int c
,i
,ischar
=0;
register int base
= input_radix
;
int unsigned_p
= number_sign
== 1 ? 1 : 0;
else if(p
[len
-1] == 'C' || p
[len
-1] == 'B')
ischar
= p
[len
-1] == 'C';
for (c
= 0; c
< len
; c
++)
if (p
[c
] == '.' && base
== 10)
/* It's a float since it contains a point. */
if (p
[c
] == '.' && base
!= 10)
error("Floating point numbers must be base 10.");
if (base
== 10 && (p
[c
] < '0' || p
[c
] > '9'))
error("Invalid digit \'%c\' in number.",p
[c
]);
if( base
== 8 && (c
== '8' || c
== '9'))
error("Invalid digit \'%c\' in octal number.",c
);
if (c
>= '0' && c
<= '9')
if (base
== 16 && c
>= 'A' && c
<= 'F')
if(!unsigned_p
&& number_sign
== 1 && (prevn
>= n
))
unsigned_p
=1; /* Try something unsigned */
/* Don't do the range check if n==i and i==0, since that special
case will give an overflow error. */
if(RANGE_CHECK
&& n
!=i
&& i
)
if((unsigned_p
&& (unsigned)prevn
>= (unsigned)n
) ||
((!unsigned_p
&& number_sign
==-1) && -prevn
<= -n
))
range_error("Overflow on numeric constant.");
if(*p
== 'B' || *p
== 'C' || *p
== 'H')
lexptr
++; /* Advance past B,C or H */
else if ( unsigned_p
&& number_sign
== 1)
else if((unsigned_p
&& (n
<0))) {
range_error("Overflow on numeric constant -- number too large.");
/* But, this can return if range_check == range_warn. */
{ {'<', '>'}, NOTEQUAL
},
{ {':', ':'}, COLONCOLON
},
/* Some specific keywords */
static struct keyword keytab
[] =
{"IN", IN
},/* Note space after IN */
/* Read one token, getting characters through lexptr. */
/* This is where we will check to make sure that the language and the operators used are
/* See if it is a special token of length 2 */
for( i
= 0 ; i
< sizeof tokentab2
/ sizeof tokentab2
[0] ; i
++)
if(STREQN(tokentab2
[i
].name
, tokstart
, 2))
return tokentab2
[i
].token
;
if (comma_terminates
&& paren_depth
== 0)
/* Might be a floating point number. */
if (lexptr
[1] >= '0' && lexptr
[1] <= '9')
break; /* Falls into number code. */
/* These are character tokens that appear as-is in the YACC grammar */
for (namelen
= 1; (c
= tokstart
[namelen
]) != quote
&& c
!= '\0'; namelen
++)
if (c
>= '0' && c
<= '9')
if (c
>= '0' && c
<= '9')
error("Unterminated string or character constant.");
yylval
.sval
.ptr
= tokstart
+ 1;
yylval
.sval
.length
= namelen
- 1;
if(namelen
== 2) /* Single character */
yylval
.ulval
= tokstart
[1];
/* Note: We have already dealt with the case of the token '.'.
if ((c
>= '0' && c
<= '9'))
int got_dot
= 0, got_e
= 0;
register char *p
= tokstart
;
if (!got_e
&& (*p
== 'e' || *p
== 'E'))
else if (!got_dot
&& *p
== '.')
else if (got_e
&& (p
[-1] == 'e' || p
[-1] == 'E')
&& (*p
== '-' || *p
== '+'))
/* This is the sign of the exponent, not the end of the
else if ((*p
< '0' || *p
> '9') &&
(*p
< 'A' || *p
> 'F') &&
(*p
!= 'H')) /* Modula-2 hexadecimal number */
toktype
= parse_number (p
- tokstart
);
char *err_copy
= (char *) alloca (p
- tokstart
+ 1);
memcpy (err_copy
, tokstart
, p
- tokstart
);
err_copy
[p
- tokstart
] = 0;
error ("Invalid number \"%s\".", err_copy
);
if (!(c
== '_' || c
== '$'
|| (c
>= 'a' && c
<= 'z') || (c
>= 'A' && c
<= 'Z')))
/* We must have come across a bad character (e.g. ';'). */
error ("Invalid character '%c' in expression.", c
);
/* It's a name. See how long it is. */
for (c
= tokstart
[namelen
];
(c
== '_' || c
== '$' || (c
>= '0' && c
<= '9')
|| (c
>= 'a' && c
<= 'z') || (c
>= 'A' && c
<= 'Z'));
/* The token "if" terminates the expression and is NOT
removed from the input stream. */
if (namelen
== 2 && tokstart
[0] == 'i' && tokstart
[1] == 'f')
/* Handle the tokens $digits; also $ (short for $0) and $$ (short for $$1)
and $$digits (equivalent to $<-digits> if you could type that).
Make token type LAST, and put the number (the digits) in yylval. */
/* Double dollar means negate the number and add -1 as well.
Thus $$ alone means -1. */
if (namelen
>= 2 && tokstart
[1] == '$')
/* Just dollars (one or two) */
/* Is the rest of the token digits? */
if (!(tokstart
[c
] >= '0' && tokstart
[c
] <= '9'))
yylval
.lval
= atoi (tokstart
+ 1 + negate
);
yylval
.lval
= - yylval
.lval
;
/* Handle tokens that refer to machine registers:
$ followed by a register name. */
for (c
= 0; c
< NUM_REGS
; c
++)
if (namelen
- 1 == strlen (reg_names
[c
])
&& STREQN (tokstart
+ 1, reg_names
[c
], namelen
- 1))
for (c
= 0; c
< num_std_regs
; c
++)
if (namelen
- 1 == strlen (std_regs
[c
].name
)
&& STREQN (tokstart
+ 1, std_regs
[c
].name
, namelen
- 1))
yylval
.lval
= std_regs
[c
].regnum
;
/* Lookup special keywords */
for(i
= 0 ; i
< sizeof(keytab
) / sizeof(keytab
[0]) ; i
++)
if(namelen
== strlen(keytab
[i
].keyw
) && STREQN(tokstart
,keytab
[i
].keyw
,namelen
))
yylval
.sval
.ptr
= tokstart
;
yylval
.sval
.length
= namelen
;
/* Any other names starting in $ are debugger internal variables. */
yylval
.ivar
= (struct internalvar
*) lookup_internalvar (copy_name (yylval
.sval
) + 1);
/* Use token-type BLOCKNAME for symbols that happen to be defined as
functions. If this is not so, then ...
Use token-type TYPENAME for symbols that happen to be defined
currently as names of types; NAME for other symbols.
The caller is not constrained to care about the distinction. */
char *tmp
= copy_name (yylval
.sval
);
if (lookup_partial_symtab (tmp
))
sym
= lookup_symbol (tmp
, expression_context_block
,
if (sym
&& SYMBOL_CLASS (sym
) == LOC_BLOCK
)
if (lookup_typename (copy_name (yylval
.sval
), expression_context_block
, 1))
error("internal: Undefined class in m2lex()");
error("internal: Unforseen case in m2lex()");
/* Built-in BOOLEAN type. This is sort of a hack. */
if(STREQN(tokstart
,"TRUE",4))
else if(STREQN(tokstart
,"FALSE",5))
/* Must be another type of name... */
char *new = xmalloc(strlen(mod
)+strlen(ident
)+2);
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].tval
);
write_exp_elt_opcode(OP_TYPE
);
{ write_exp_elt_opcode (UNOP_IND
); }
write_exp_elt_opcode (UNOP_NEG
); }
{ write_exp_elt_opcode(UNOP_PLUS
); }
{ write_exp_elt_opcode (UNOP_LOGICAL_NOT
); }
{ write_exp_elt_opcode (UNOP_CAP
); }
{ write_exp_elt_opcode (UNOP_ORD
); }
{ write_exp_elt_opcode (UNOP_ABS
); }
{ write_exp_elt_opcode (UNOP_HIGH
); }
{ write_exp_elt_opcode (UNOP_MIN
);
write_exp_elt_type (yyvsp
[-1].tval
);
write_exp_elt_opcode (UNOP_MIN
); }
{ write_exp_elt_opcode (UNOP_MAX
);
write_exp_elt_type (yyvsp
[-1].tval
);
write_exp_elt_opcode (UNOP_MIN
); }
{ write_exp_elt_opcode (UNOP_FLOAT
); }
{ write_exp_elt_opcode (BINOP_VAL
);
write_exp_elt_type (yyvsp
[-3].tval
);
write_exp_elt_opcode (BINOP_VAL
); }
{ write_exp_elt_opcode (UNOP_CHR
); }
{ write_exp_elt_opcode (UNOP_ODD
); }
{ write_exp_elt_opcode (UNOP_TRUNC
); }
{ write_exp_elt_opcode (UNOP_SIZEOF
); }
{ write_exp_elt_opcode(UNOP_PREINCREMENT
); }
{ write_exp_elt_opcode(BINOP_ASSIGN_MODIFY
);
write_exp_elt_opcode(BINOP_ADD
);
write_exp_elt_opcode(BINOP_ASSIGN_MODIFY
); }
{ write_exp_elt_opcode(UNOP_PREDECREMENT
);}
{ write_exp_elt_opcode(BINOP_ASSIGN_MODIFY
);
write_exp_elt_opcode(BINOP_SUB
);
write_exp_elt_opcode(BINOP_ASSIGN_MODIFY
); }
{ write_exp_elt_opcode (STRUCTOP_STRUCT
);
write_exp_string (yyvsp
[0].sval
);
write_exp_elt_opcode (STRUCTOP_STRUCT
); }
{ error("Sets are not implemented.");}
{ error("Sets are not implemented.");}
{ error("Sets are not implemented.");}
{ error("Sets are not implemented.");}
{ error("Sets are not implemented.");}
{ write_exp_elt_opcode (MULTI_SUBSCRIPT
);
write_exp_elt_longcst ((LONGEST
) end_arglist());
write_exp_elt_opcode (MULTI_SUBSCRIPT
); }
{ write_exp_elt_opcode (OP_FUNCALL
);
write_exp_elt_longcst ((LONGEST
) end_arglist ());
write_exp_elt_opcode (OP_FUNCALL
); }
{ write_exp_elt_opcode (UNOP_MEMVAL
);
write_exp_elt_type (yyvsp
[-2].tval
);
write_exp_elt_opcode (UNOP_MEMVAL
); }
{ write_exp_elt_opcode (UNOP_CAST
);
write_exp_elt_type (yyvsp
[-3].tval
);
write_exp_elt_opcode (UNOP_CAST
); }
{ write_exp_elt_opcode (BINOP_REPEAT
); }
{ write_exp_elt_opcode (BINOP_MUL
); }
{ write_exp_elt_opcode (BINOP_DIV
); }
{ write_exp_elt_opcode (BINOP_INTDIV
); }
{ write_exp_elt_opcode (BINOP_REM
); }
{ write_exp_elt_opcode (BINOP_ADD
); }
{ write_exp_elt_opcode (BINOP_SUB
); }
{ write_exp_elt_opcode (BINOP_EQUAL
); }
{ write_exp_elt_opcode (BINOP_NOTEQUAL
); }
{ write_exp_elt_opcode (BINOP_NOTEQUAL
); }
{ write_exp_elt_opcode (BINOP_LEQ
); }
{ write_exp_elt_opcode (BINOP_GEQ
); }
{ write_exp_elt_opcode (BINOP_LESS
); }
{ write_exp_elt_opcode (BINOP_GTR
); }
{ write_exp_elt_opcode (BINOP_LOGICAL_AND
); }
{ write_exp_elt_opcode (BINOP_LOGICAL_OR
); }
{ write_exp_elt_opcode (BINOP_ASSIGN
); }
{ 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_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 (builtin_type_m2_int
);
write_exp_elt_longcst ((LONGEST
) yyvsp
[0].lval
);
write_exp_elt_opcode (OP_LONG
); }
write_exp_elt_opcode (OP_LONG
);
write_exp_elt_type (builtin_type_m2_card
);
write_exp_elt_longcst ((LONGEST
) yyvsp
[0].ulval
);
write_exp_elt_opcode (OP_LONG
);
{ write_exp_elt_opcode (OP_LONG
);
write_exp_elt_type (builtin_type_m2_char
);
write_exp_elt_longcst ((LONGEST
) yyvsp
[0].ulval
);
write_exp_elt_opcode (OP_LONG
); }
{ write_exp_elt_opcode (OP_DOUBLE
);
write_exp_elt_type (builtin_type_m2_real
);
write_exp_elt_dblcst (yyvsp
[0].dval
);
write_exp_elt_opcode (OP_DOUBLE
); }
{ write_exp_elt_opcode (OP_LAST
);
write_exp_elt_longcst ((LONGEST
) yyvsp
[0].lval
);
write_exp_elt_opcode (OP_LAST
); }
{ write_exp_elt_opcode (OP_REGISTER
);
write_exp_elt_longcst ((LONGEST
) yyvsp
[0].lval
);
write_exp_elt_opcode (OP_REGISTER
); }
{ write_exp_elt_opcode (OP_LONG
);
write_exp_elt_type (builtin_type_int
);
write_exp_elt_longcst ((LONGEST
) TYPE_LENGTH (yyvsp
[-1].tval
));
write_exp_elt_opcode (OP_LONG
); }
{ write_exp_elt_opcode (OP_M2_STRING
);
write_exp_string (yyvsp
[0].sval
);
write_exp_elt_opcode (OP_M2_STRING
); }
{ yyval
.bval
= SYMBOL_BLOCK_VALUE(yyvsp
[0].sym
); }
= lookup_symbol (copy_name (yyvsp
[0].sval
), expression_context_block
,
= lookup_symbol (copy_name (yyvsp
[0].sval
), yyvsp
[-2].bval
,
if (!tem
|| SYMBOL_CLASS (tem
) != LOC_BLOCK
)
error ("No function \"%s\" in specified context.",
copy_name (yyvsp
[0].sval
));
{ write_exp_elt_opcode(OP_VAR_VALUE
);
write_exp_elt_block (NULL
);
write_exp_elt_sym (yyvsp
[0].sym
);
write_exp_elt_opcode (OP_VAR_VALUE
); }
{ write_exp_elt_opcode (OP_INTERNALVAR
);
write_exp_elt_intern (yyvsp
[0].ivar
);
write_exp_elt_opcode (OP_INTERNALVAR
); }
sym
= lookup_symbol (copy_name (yyvsp
[0].sval
), yyvsp
[-2].bval
,
error ("No symbol \"%s\" in specified context.",
copy_name (yyvsp
[0].sval
));
write_exp_elt_opcode (OP_VAR_VALUE
);
/* block_found is set by lookup_symbol. */
write_exp_elt_block (block_found
);
write_exp_elt_opcode (OP_VAR_VALUE
); }
sym
= lookup_symbol (copy_name (yyvsp
[0].sval
),
expression_context_block
,
if (symbol_read_needs_frame (sym
))
if (innermost_block
== 0 ||
contained_in (block_found
,
innermost_block
= block_found
;
write_exp_elt_opcode (OP_VAR_VALUE
);
/* We want to use the selected frame, not
another more inner frame which happens to
write_exp_elt_block (NULL
);
write_exp_elt_opcode (OP_VAR_VALUE
);
struct minimal_symbol
*msymbol
;
register char *arg
= copy_name (yyvsp
[0].sval
);
msymbol
= lookup_minimal_symbol (arg
,
(struct objfile
*) NULL
);
write_exp_elt_opcode (OP_LONG
);
write_exp_elt_type (builtin_type_long
);
write_exp_elt_longcst ((LONGEST
) SYMBOL_VALUE_ADDRESS (msymbol
));
write_exp_elt_opcode (OP_LONG
);
write_exp_elt_opcode (UNOP_MEMVAL
);
if (msymbol
-> type
== mst_data
||
msymbol
-> type
== mst_bss
)
write_exp_elt_type (builtin_type_int
);
else if (msymbol
-> type
== mst_text
)
write_exp_elt_type (lookup_function_type (builtin_type_int
));
write_exp_elt_type (builtin_type_char
);
write_exp_elt_opcode (UNOP_MEMVAL
);
else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"symbol-file\" command.");
error ("No symbol \"%s\" in current context.",
copy_name (yyvsp
[0].sval
));
{ yyval
.tval
= lookup_typename (copy_name (yyvsp
[0].sval
),
expression_context_block
, 0); }
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");