1 |
/* A Bison parser, made from parse-gram.y |
/* A Bison parser, made from parse-gram.y |
2 |
by GNU bison 1.35. */ |
by GNU bison 1.49b. */ |
3 |
|
|
4 |
#define YYBISON 1 /* Identify Bison output. */ |
/* Skeleton output parser for Bison, |
5 |
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software |
6 |
|
Foundation, Inc. |
7 |
|
|
8 |
|
This program is free software; you can redistribute it and/or modify |
9 |
|
it under the terms of the GNU General Public License as published by |
10 |
|
the Free Software Foundation; either version 2, or (at your option) |
11 |
|
any later version. |
12 |
|
|
13 |
|
This program is distributed in the hope that it will be useful, |
14 |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
|
GNU General Public License for more details. |
17 |
|
|
18 |
|
You should have received a copy of the GNU General Public License |
19 |
|
along with this program; if not, write to the Free Software |
20 |
|
Foundation, Inc., 59 Temple Place - Suite 330, |
21 |
|
Boston, MA 02111-1307, USA. */ |
22 |
|
|
23 |
|
/* As a special exception, when this file is copied by Bison into a |
24 |
|
Bison output file, you may use that output file without restriction. |
25 |
|
This special exception was added by the Free Software Foundation |
26 |
|
in version 1.24 of Bison. */ |
27 |
|
|
28 |
|
/* This is the parser code that is written into each bison parser when |
29 |
|
the %semantic_parser declaration is not specified in the grammar. |
30 |
|
It was written by Richard Stallman by simplifying the original so |
31 |
|
called ``semantic'' parser. */ |
32 |
|
|
33 |
|
/* All symbols defined below should begin with yy or YY, to avoid |
34 |
|
infringing on user name space. This should be done even for local |
35 |
|
variables, as they might otherwise be expanded by user macros. |
36 |
|
There are some unavoidable exceptions within include files to |
37 |
|
define necessary library symbols; they are noted "INFRINGES ON |
38 |
|
USER NAME SPACE" below. */ |
39 |
|
|
40 |
|
/* Identify Bison output. */ |
41 |
|
#define YYBISON 1 |
42 |
|
|
43 |
|
/* Pure parsers. */ |
44 |
|
#define YYPURE 1 |
45 |
|
|
46 |
|
/* Using locations. */ |
47 |
|
#define YYLSP_NEEDED 1 |
48 |
|
|
49 |
|
/* If NAME_PREFIX is specified substitute the variables and functions |
50 |
|
names. */ |
51 |
#define yyparse gram_parse |
#define yyparse gram_parse |
52 |
#define yylex gram_lex |
#define yylex gram_lex |
53 |
#define yyerror gram_error |
#define yyerror gram_error |
54 |
#define yylval gram_lval |
#define yylval gram_lval |
55 |
#define yychar gram_char |
#define yychar gram_char |
56 |
#define yydebug gram_debug |
#define yydebug gram_debug |
57 |
#define yynerrs gram_nerrs |
#define yynerrs gram_nerrs |
58 |
#define YYLSP_NEEDED 1 |
#if YYLSP_NEEDED |
59 |
|
# define yylloc gram_lloc |
60 |
|
#endif |
61 |
|
|
|
# define GRAM_EOF 0 |
|
|
# define STRING 257 |
|
|
# define CHARACTER 258 |
|
|
# define INT 259 |
|
|
# define PERCENT_TOKEN 260 |
|
|
# define PERCENT_NTERM 261 |
|
|
# define PERCENT_TYPE 262 |
|
|
# define PERCENT_UNION 263 |
|
|
# define PERCENT_EXPECT 264 |
|
|
# define PERCENT_START 265 |
|
|
# define PERCENT_LEFT 266 |
|
|
# define PERCENT_RIGHT 267 |
|
|
# define PERCENT_NONASSOC 268 |
|
|
# define PERCENT_PREC 269 |
|
|
# define PERCENT_VERBOSE 270 |
|
|
# define PERCENT_ERROR_VERBOSE 271 |
|
|
# define PERCENT_OUTPUT 272 |
|
|
# define PERCENT_FILE_PREFIX 273 |
|
|
# define PERCENT_NAME_PREFIX 274 |
|
|
# define PERCENT_DEFINE 275 |
|
|
# define PERCENT_PURE_PARSER 276 |
|
|
# define PERCENT_DEFINES 277 |
|
|
# define PERCENT_YACC 278 |
|
|
# define PERCENT_DEBUG 279 |
|
|
# define PERCENT_LOCATIONS 280 |
|
|
# define PERCENT_NO_LINES 281 |
|
|
# define PERCENT_SKELETON 282 |
|
|
# define PERCENT_TOKEN_TABLE 283 |
|
|
# define TYPE 284 |
|
|
# define EQUAL 285 |
|
|
# define SEMICOLON 286 |
|
|
# define COLON 287 |
|
|
# define PIPE 288 |
|
|
# define ID 289 |
|
|
# define PERCENT_PERCENT 290 |
|
|
# define PROLOGUE 291 |
|
|
# define EPILOGUE 292 |
|
|
# define BRACED_CODE 293 |
|
62 |
|
|
63 |
|
/* Copy the first part of user declarations. */ |
64 |
#line 31 "parse-gram.y" |
#line 31 "parse-gram.y" |
65 |
|
|
66 |
#include "system.h" |
#include "system.h" |
100 |
associativity current_assoc; |
associativity current_assoc; |
101 |
int current_prec = 0; |
int current_prec = 0; |
102 |
|
|
103 |
#line 72 "parse-gram.y" |
|
104 |
|
/* Tokens. */ |
105 |
|
#ifndef YYTOKENTYPE |
106 |
|
# if defined (__STDC__) || defined (__cplusplus) |
107 |
|
/* Put the tokens into the symbol table, so that GDB and other debuggers |
108 |
|
know about them. */ |
109 |
|
enum yytokentype { |
110 |
|
GRAM_EOF = 0, |
111 |
|
STRING = 258, |
112 |
|
CHARACTER = 259, |
113 |
|
INT = 260, |
114 |
|
PERCENT_TOKEN = 261, |
115 |
|
PERCENT_NTERM = 262, |
116 |
|
PERCENT_TYPE = 263, |
117 |
|
PERCENT_UNION = 264, |
118 |
|
PERCENT_EXPECT = 265, |
119 |
|
PERCENT_START = 266, |
120 |
|
PERCENT_LEFT = 267, |
121 |
|
PERCENT_RIGHT = 268, |
122 |
|
PERCENT_NONASSOC = 269, |
123 |
|
PERCENT_PREC = 270, |
124 |
|
PERCENT_VERBOSE = 271, |
125 |
|
PERCENT_ERROR_VERBOSE = 272, |
126 |
|
PERCENT_OUTPUT = 273, |
127 |
|
PERCENT_FILE_PREFIX = 274, |
128 |
|
PERCENT_NAME_PREFIX = 275, |
129 |
|
PERCENT_DEFINE = 276, |
130 |
|
PERCENT_PURE_PARSER = 277, |
131 |
|
PERCENT_DEFINES = 278, |
132 |
|
PERCENT_YACC = 279, |
133 |
|
PERCENT_DEBUG = 280, |
134 |
|
PERCENT_LOCATIONS = 281, |
135 |
|
PERCENT_NO_LINES = 282, |
136 |
|
PERCENT_SKELETON = 283, |
137 |
|
PERCENT_TOKEN_TABLE = 284, |
138 |
|
TYPE = 285, |
139 |
|
EQUAL = 286, |
140 |
|
SEMICOLON = 287, |
141 |
|
COLON = 288, |
142 |
|
PIPE = 289, |
143 |
|
ID = 290, |
144 |
|
PERCENT_PERCENT = 291, |
145 |
|
PROLOGUE = 292, |
146 |
|
EPILOGUE = 293, |
147 |
|
BRACED_CODE = 294 |
148 |
|
}; |
149 |
|
# endif |
150 |
|
/* POSIX requires `int' for tokens in interfaces. */ |
151 |
|
# define YYTOKENTYPE int |
152 |
|
#endif /* !YYTOKENTYPE */ |
153 |
|
#define GRAM_EOF 0 |
154 |
|
#define STRING 258 |
155 |
|
#define CHARACTER 259 |
156 |
|
#define INT 260 |
157 |
|
#define PERCENT_TOKEN 261 |
158 |
|
#define PERCENT_NTERM 262 |
159 |
|
#define PERCENT_TYPE 263 |
160 |
|
#define PERCENT_UNION 264 |
161 |
|
#define PERCENT_EXPECT 265 |
162 |
|
#define PERCENT_START 266 |
163 |
|
#define PERCENT_LEFT 267 |
164 |
|
#define PERCENT_RIGHT 268 |
165 |
|
#define PERCENT_NONASSOC 269 |
166 |
|
#define PERCENT_PREC 270 |
167 |
|
#define PERCENT_VERBOSE 271 |
168 |
|
#define PERCENT_ERROR_VERBOSE 272 |
169 |
|
#define PERCENT_OUTPUT 273 |
170 |
|
#define PERCENT_FILE_PREFIX 274 |
171 |
|
#define PERCENT_NAME_PREFIX 275 |
172 |
|
#define PERCENT_DEFINE 276 |
173 |
|
#define PERCENT_PURE_PARSER 277 |
174 |
|
#define PERCENT_DEFINES 278 |
175 |
|
#define PERCENT_YACC 279 |
176 |
|
#define PERCENT_DEBUG 280 |
177 |
|
#define PERCENT_LOCATIONS 281 |
178 |
|
#define PERCENT_NO_LINES 282 |
179 |
|
#define PERCENT_SKELETON 283 |
180 |
|
#define PERCENT_TOKEN_TABLE 284 |
181 |
|
#define TYPE 285 |
182 |
|
#define EQUAL 286 |
183 |
|
#define SEMICOLON 287 |
184 |
|
#define COLON 288 |
185 |
|
#define PIPE 289 |
186 |
|
#define ID 290 |
187 |
|
#define PERCENT_PERCENT 291 |
188 |
|
#define PROLOGUE 292 |
189 |
|
#define EPILOGUE 293 |
190 |
|
#define BRACED_CODE 294 |
191 |
|
|
192 |
|
|
193 |
|
|
194 |
|
|
195 |
|
/* Enabling traces. */ |
196 |
|
#ifndef YYDEBUG |
197 |
|
# define YYDEBUG 1 |
198 |
|
#endif |
199 |
|
|
200 |
|
/* Enabling verbose error messages. */ |
201 |
|
#ifdef YYERROR_VERBOSE |
202 |
|
# undef YYERROR_VERBOSE |
203 |
|
# define YYERROR_VERBOSE 1 |
204 |
|
#else |
205 |
|
# define YYERROR_VERBOSE 0 |
206 |
|
#endif |
207 |
|
|
208 |
#ifndef YYSTYPE |
#ifndef YYSTYPE |
209 |
typedef union |
#line 73 "parse-gram.y" |
210 |
{ |
typedef union { |
211 |
symbol_t *symbol; |
symbol_t *symbol; |
212 |
int integer; |
int integer; |
213 |
char *string; |
char *string; |
222 |
{ |
{ |
223 |
int first_line; |
int first_line; |
224 |
int first_column; |
int first_column; |
|
|
|
225 |
int last_line; |
int last_line; |
226 |
int last_column; |
int last_column; |
227 |
} yyltype; |
} yyltype; |
|
|
|
228 |
# define YYLTYPE yyltype |
# define YYLTYPE yyltype |
229 |
# define YYLTYPE_IS_TRIVIAL 1 |
# define YYLTYPE_IS_TRIVIAL 1 |
230 |
#endif |
#endif |
231 |
|
|
232 |
#ifndef YYDEBUG |
/* Copy the second part of user declarations. */ |
|
# define YYDEBUG 1 |
|
|
#endif |
|
233 |
|
|
234 |
|
|
235 |
|
/* Line 217 of /usr/local/share/bison/bison.simple. */ |
236 |
|
#line 237 "parse-gram.c" |
237 |
|
|
238 |
#define YYFINAL 94 |
#if ! defined (yyoverflow) || YYERROR_VERBOSE |
|
#define YYFLAG -32768 |
|
|
#define YYNTBASE 41 |
|
|
|
|
|
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ |
|
|
#define YYTRANSLATE(x) ((unsigned)(x) <= 293 ? yytranslate[x] : 68) |
|
|
|
|
|
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ |
|
|
static const char yytranslate[] = |
|
|
{ |
|
|
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, 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, 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, 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 |
|
|
}; |
|
|
|
|
|
#if YYDEBUG |
|
|
static const short yyprhs[] = |
|
|
{ |
|
|
0, 0, 1, 7, 8, 11, 13, 15, 17, 21, |
|
|
23, 25, 28, 32, 34, 38, 40, 44, 46, 49, |
|
|
51, 53, 55, 57, 58, 62, 65, 66, 70, 71, |
|
|
76, 80, 81, 86, 88, 90, 92, 93, 95, 97, |
|
|
100, 102, 105, 107, 109, 112, 115, 119, 121, 124, |
|
|
126, 129, 130, 136, 138, 142, 143, 146, 149, 153, |
|
|
155, 157, 159, 161, 163, 165, 166, 169, 170 |
|
|
}; |
|
|
static const short yyrhs[] = |
|
|
{ |
|
|
-1, 42, 43, 37, 57, 66, 0, 0, 43, 44, |
|
|
0, 45, 0, 38, 0, 26, 0, 22, 65, 65, |
|
|
0, 24, 0, 18, 0, 11, 6, 0, 20, 32, |
|
|
65, 0, 27, 0, 21, 32, 65, 0, 28, 0, |
|
|
19, 32, 65, 0, 23, 0, 29, 65, 0, 30, |
|
|
0, 17, 0, 25, 0, 49, 0, 0, 8, 46, |
|
|
56, 0, 12, 62, 0, 0, 7, 47, 56, 0, |
|
|
0, 9, 31, 48, 53, 0, 10, 40, 67, 0, |
|
|
0, 51, 52, 50, 54, 0, 13, 0, 14, 0, |
|
|
15, 0, 0, 31, 0, 36, 0, 53, 36, 0, |
|
|
62, 0, 54, 62, 0, 31, 0, 36, 0, 36, |
|
|
6, 0, 36, 64, 0, 36, 6, 64, 0, 55, |
|
|
0, 56, 55, 0, 58, 0, 57, 58, 0, 0, |
|
|
36, 34, 59, 60, 33, 0, 61, 0, 60, 35, |
|
|
61, 0, 0, 61, 62, 0, 61, 63, 0, 61, |
|
|
16, 62, 0, 36, 0, 64, 0, 5, 0, 40, |
|
|
0, 4, 0, 4, 0, 0, 37, 39, 0, 0, |
|
|
33, 0 |
|
|
}; |
|
|
|
|
|
#endif |
|
|
|
|
|
#if YYDEBUG |
|
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
|
|
static const short yyrline[] = |
|
|
{ |
|
|
0, 131, 131, 139, 141, 144, 146, 150, 151, 152, |
|
|
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, |
|
|
163, 164, 167, 169, 169, 174, 178, 178, 183, 183, |
|
|
187, 195, 195, 202, 204, 205, 208, 210, 214, 216, |
|
|
220, 226, 235, 240, 245, 251, 257, 267, 270, 274, |
|
|
276, 279, 279, 284, 286, 289, 292, 294, 296, 300, |
|
|
302, 303, 306, 312, 321, 329, 334, 340, 342 |
|
|
}; |
|
|
#endif |
|
|
|
|
|
|
|
|
#if (YYDEBUG) || defined YYERROR_VERBOSE |
|
|
|
|
|
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ |
|
|
static const char *const yytname[] = |
|
|
{ |
|
|
"$", "error", "$undefined.", "\"end of string\"", "STRING", "CHARACTER", |
|
|
"INT", "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%union\"", |
|
|
"\"%expect\"", "\"%start\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"", |
|
|
"\"%prec\"", "\"%verbose\"", "\"%error-verbose\"", "\"%output\"", |
|
|
"\"%file-prefix\"", "\"%name-prefix\"", "\"%define\"", |
|
|
"\"%pure-parser\"", "\"%defines\"", "\"%yacc\"", "\"%debug\"", |
|
|
"\"%locations\"", "\"%no-lines\"", "\"%skeleton\"", "\"%token-table\"", |
|
|
"TYPE", "\"=\"", "\";\"", "\":\"", "\"|\"", "\"identifier\"", "\"%%\"", |
|
|
"PROLOGUE", "EPILOGUE", "BRACED_CODE", "input", "@1", "directives", |
|
|
"directive", "grammar_directives", "@2", "@3", "@4", |
|
|
"precedence_directives", "@5", "precedence_directive", "type.opt", |
|
|
"nterms_to_type.1", "terms_to_prec.1", "symbol_def", "symbol_defs.1", |
|
|
"gram", "rules", "@6", "rhses.1", "rhs", "symbol", "action", |
|
|
"string_as_id", "string_content", "epilogue.opt", "semi_colon_opt", 0 |
|
|
}; |
|
|
#endif |
|
|
|
|
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
|
|
static const short yyr1[] = |
|
|
{ |
|
|
0, 42, 41, 43, 43, 44, 44, 44, 44, 44, |
|
|
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, |
|
|
44, 44, 45, 46, 45, 45, 47, 45, 48, 45, |
|
|
45, 50, 49, 51, 51, 51, 52, 52, 53, 53, |
|
|
54, 54, 55, 55, 55, 55, 55, 56, 56, 57, |
|
|
57, 59, 58, 60, 60, 61, 61, 61, 61, 62, |
|
|
62, 62, 63, 64, 65, 66, 66, 67, 67 |
|
|
}; |
|
|
|
|
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
|
|
static const short yyr2[] = |
|
|
{ |
|
|
0, 0, 5, 0, 2, 1, 1, 1, 3, 1, |
|
|
1, 2, 3, 1, 3, 1, 3, 1, 2, 1, |
|
|
1, 1, 1, 0, 3, 2, 0, 3, 0, 4, |
|
|
3, 0, 4, 1, 1, 1, 0, 1, 1, 2, |
|
|
1, 2, 1, 1, 2, 2, 3, 1, 2, 1, |
|
|
2, 0, 5, 1, 3, 0, 2, 2, 3, 1, |
|
|
1, 1, 1, 1, 1, 0, 2, 0, 1 |
|
|
}; |
|
|
|
|
|
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE |
|
|
doesn't specify something else to do. Zero means the default is an |
|
|
error. */ |
|
|
static const short yydefact[] = |
|
|
{ |
|
|
1, 3, 0, 26, 23, 0, 0, 0, 0, 33, |
|
|
34, 35, 20, 10, 0, 0, 0, 0, 17, 9, |
|
|
21, 7, 13, 15, 0, 19, 0, 6, 4, 5, |
|
|
22, 36, 0, 0, 28, 67, 11, 63, 61, 59, |
|
|
25, 60, 0, 0, 0, 64, 0, 18, 0, 65, |
|
|
49, 37, 31, 42, 43, 47, 27, 24, 0, 68, |
|
|
30, 16, 12, 14, 8, 51, 0, 50, 2, 0, |
|
|
44, 45, 48, 38, 29, 55, 66, 32, 40, 46, |
|
|
39, 0, 53, 41, 52, 55, 0, 62, 56, 57, |
|
|
54, 58, 0, 0, 0 |
|
|
}; |
|
|
|
|
|
static const short yydefgoto[] = |
|
|
{ |
|
|
92, 1, 2, 28, 29, 33, 32, 58, 30, 69, |
|
|
31, 52, 74, 77, 55, 56, 49, 50, 75, 81, |
|
|
82, 88, 89, 41, 46, 68, 60 |
|
|
}; |
|
|
|
|
|
static const short yypact[] = |
|
|
{ |
|
|
-32768,-32768, 72,-32768,-32768, -22, -29, 8, -1,-32768, |
|
|
-32768,-32768,-32768,-32768, -16, -14, -11, 22,-32768,-32768, |
|
|
-32768,-32768,-32768,-32768, 22,-32768, -6,-32768,-32768,-32768, |
|
|
-32768, 0, -24, -24,-32768, 1,-32768,-32768,-32768,-32768, |
|
|
-32768,-32768, 22, 22, 22,-32768, 22,-32768, -2, -17, |
|
|
-32768,-32768,-32768,-32768, 4,-32768, -24, -24, 2,-32768, |
|
|
-32768,-32768,-32768,-32768,-32768,-32768, 3,-32768,-32768, -1, |
|
|
32,-32768,-32768,-32768, 5,-32768,-32768, -1,-32768,-32768, |
|
|
-32768, -18, -3,-32768,-32768,-32768, -1,-32768,-32768,-32768, |
|
|
-3,-32768, 39, 40,-32768 |
|
|
}; |
|
|
|
|
|
static const short yypgoto[] = |
|
|
{ |
|
|
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, |
|
|
-32768,-32768,-32768,-32768, -28, 10,-32768, -5,-32768,-32768, |
|
|
-40, -8,-32768, -48, -19,-32768,-32768 |
|
|
}; |
|
|
|
|
|
|
|
|
#define YYLAST 110 |
|
|
|
|
|
|
|
|
static const short yytable[] = |
|
|
{ |
|
|
40, 37, 38, 37, 38, 47, 71, 53, 37, 34, |
|
|
70, 35, 54, 86, 36, 84, 42, 85, 43, 48, |
|
|
66, 44, 79, 61, 62, 63, 45, 64, 72, 72, |
|
|
48, 51, 65, 39, 59, 39, 37, 87, 73, 93, |
|
|
94, 80, 76, 57, 67, 90, 0, 0, 0, 0, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
0, 78, 0, 0, 0, 0, 0, 0, 0, 83, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 91, 3, |
|
|
4, 5, 6, 7, 8, 9, 10, 11, 0, 12, |
|
|
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
|
|
23, 24, 25, 0, 0, 0, 0, 0, 0, 26, |
|
|
27 |
|
|
}; |
|
|
|
|
|
static const short yycheck[] = |
|
|
{ |
|
|
8, 4, 5, 4, 5, 24, 54, 31, 4, 31, |
|
|
6, 40, 36, 16, 6, 33, 32, 35, 32, 36, |
|
|
37, 32, 70, 42, 43, 44, 4, 46, 56, 57, |
|
|
36, 31, 34, 36, 33, 36, 4, 40, 36, 0, |
|
|
0, 36, 39, 33, 49, 85, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, 69, -1, -1, -1, -1, -1, -1, -1, 77, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, 86, 7, |
|
|
8, 9, 10, 11, 12, 13, 14, 15, -1, 17, |
|
|
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
|
|
28, 29, 30, -1, -1, -1, -1, -1, -1, 37, |
|
|
38 |
|
|
}; |
|
|
#define YYPURE 1 |
|
|
|
|
|
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ |
|
|
#line 3 "/usr/share/bison/bison.simple" |
|
|
|
|
|
/* Skeleton output parser for bison, |
|
|
|
|
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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., 59 Temple Place - Suite 330, |
|
|
Boston, MA 02111-1307, USA. */ |
|
|
|
|
|
/* As a special exception, when this file is copied by Bison into a |
|
|
Bison output file, you may use that output file without restriction. |
|
|
This special exception was added by the Free Software Foundation |
|
|
in version 1.24 of Bison. */ |
|
|
|
|
|
/* This is the parser code that is written into each bison parser when |
|
|
the %semantic_parser declaration is not specified in the grammar. |
|
|
It was written by Richard Stallman by simplifying the hairy parser |
|
|
used when %semantic_parser is specified. */ |
|
|
|
|
|
/* 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. */ |
|
|
|
|
|
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) |
|
239 |
|
|
240 |
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
241 |
|
|
264 |
# define YYSTACK_ALLOC malloc |
# define YYSTACK_ALLOC malloc |
265 |
# define YYSTACK_FREE free |
# define YYSTACK_FREE free |
266 |
# endif |
# endif |
267 |
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ |
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
268 |
|
|
269 |
|
|
270 |
#if (! defined (yyoverflow) \ |
#if (! defined (yyoverflow) \ |
308 |
{ \ |
{ \ |
309 |
register YYSIZE_T yyi; \ |
register YYSIZE_T yyi; \ |
310 |
for (yyi = 0; yyi < (Count); yyi++) \ |
for (yyi = 0; yyi < (Count); yyi++) \ |
311 |
(To)[yyi] = (From)[yyi]; \ |
(To)[yyi] = (From)[yyi]; \ |
312 |
} \ |
} \ |
313 |
while (0) |
while (0) |
314 |
# endif |
# endif |
332 |
|
|
333 |
#endif |
#endif |
334 |
|
|
335 |
|
/* YYFINAL -- State number of the termination state. */ |
336 |
|
#define YYFINAL 3 |
337 |
|
#define YYFLAG -32768 |
338 |
|
#define YYLAST 110 |
339 |
|
|
340 |
|
/* YYNTOKENS -- Number of terminals. */ |
341 |
|
#define YYNTOKENS 40 |
342 |
|
/* YYNNTS -- Number of nonterminals. */ |
343 |
|
#define YYNNTS 28 |
344 |
|
/* YYNRULES -- Number of rules. */ |
345 |
|
#define YYNRULES 69 |
346 |
|
/* YYNRULES -- Number of states. */ |
347 |
|
#define YYNSTATES 94 |
348 |
|
|
349 |
|
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
350 |
|
#define YYUNDEFTOK 2 |
351 |
|
#define YYMAXUTOK 294 |
352 |
|
|
353 |
|
#define YYTRANSLATE(X) \ |
354 |
|
((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK) |
355 |
|
|
356 |
|
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
357 |
|
static const unsigned char yytranslate[] = |
358 |
|
{ |
359 |
|
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
360 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
361 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
362 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
363 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
364 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
365 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
366 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
367 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
368 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
369 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
370 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
371 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
372 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
373 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
374 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
375 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
376 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
377 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
378 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
379 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
380 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
381 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
382 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
383 |
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
384 |
|
2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
385 |
|
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
386 |
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
387 |
|
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
388 |
|
35, 36, 37, 38, 39 |
389 |
|
}; |
390 |
|
|
391 |
|
#if YYDEBUG |
392 |
|
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
393 |
|
YYRHS. */ |
394 |
|
static const unsigned char yyprhs[] = |
395 |
|
{ |
396 |
|
0, 0, 3, 4, 10, 11, 14, 16, 18, 20, |
397 |
|
24, 26, 28, 31, 35, 37, 41, 43, 47, 49, |
398 |
|
52, 54, 56, 58, 60, 61, 65, 68, 69, 73, |
399 |
|
74, 79, 83, 84, 89, 91, 93, 95, 96, 98, |
400 |
|
100, 103, 105, 108, 110, 112, 115, 118, 122, 124, |
401 |
|
127, 129, 132, 133, 139, 141, 145, 146, 149, 152, |
402 |
|
156, 158, 160, 162, 164, 166, 168, 169, 172, 173 |
403 |
|
}; |
404 |
|
|
405 |
|
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
406 |
|
static const signed char yyrhs[] = |
407 |
|
{ |
408 |
|
41, 0, -1, -1, 42, 43, 36, 57, 66, -1, |
409 |
|
-1, 43, 44, -1, 45, -1, 37, -1, 25, -1, |
410 |
|
21, 65, 65, -1, 23, -1, 17, -1, 10, 5, |
411 |
|
-1, 19, 31, 65, -1, 26, -1, 20, 31, 65, |
412 |
|
-1, 27, -1, 18, 31, 65, -1, 22, -1, 28, |
413 |
|
65, -1, 29, -1, 16, -1, 24, -1, 49, -1, |
414 |
|
-1, 7, 46, 56, -1, 11, 62, -1, -1, 6, |
415 |
|
47, 56, -1, -1, 8, 30, 48, 53, -1, 9, |
416 |
|
39, 67, -1, -1, 51, 52, 50, 54, -1, 12, |
417 |
|
-1, 13, -1, 14, -1, -1, 30, -1, 35, -1, |
418 |
|
53, 35, -1, 62, -1, 54, 62, -1, 30, -1, |
419 |
|
35, -1, 35, 5, -1, 35, 64, -1, 35, 5, |
420 |
|
64, -1, 55, -1, 56, 55, -1, 58, -1, 57, |
421 |
|
58, -1, -1, 35, 33, 59, 60, 32, -1, 61, |
422 |
|
-1, 60, 34, 61, -1, -1, 61, 62, -1, 61, |
423 |
|
63, -1, 61, 15, 62, -1, 35, -1, 64, -1, |
424 |
|
4, -1, 39, -1, 3, -1, 3, -1, -1, 36, |
425 |
|
38, -1, -1, 32, -1 |
426 |
|
}; |
427 |
|
|
428 |
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
429 |
|
static const unsigned short yyrline[] = |
430 |
|
{ |
431 |
|
0, 131, 131, 131, 139, 141, 144, 146, 150, 151, |
432 |
|
152, 153, 154, 155, 156, 157, 158, 159, 160, 161, |
433 |
|
162, 163, 164, 167, 169, 169, 174, 178, 178, 183, |
434 |
|
183, 187, 195, 195, 202, 204, 205, 208, 210, 214, |
435 |
|
216, 220, 226, 235, 240, 245, 251, 257, 267, 270, |
436 |
|
274, 276, 279, 279, 284, 286, 289, 292, 294, 296, |
437 |
|
300, 302, 303, 306, 312, 321, 329, 334, 340, 342 |
438 |
|
}; |
439 |
|
#endif |
440 |
|
|
441 |
|
#if YYDEBUG || YYERROR_VERBOSE |
442 |
|
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
443 |
|
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
444 |
|
static const char *const yytname[] = |
445 |
|
{ |
446 |
|
"\"end of string\"", "error", "$undefined.", "STRING", "CHARACTER", "INT", |
447 |
|
"\"%token\"", "\"%nterm\"", "\"%type\"", "\"%union\"", "\"%expect\"", |
448 |
|
"\"%start\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"", "\"%prec\"", |
449 |
|
"\"%verbose\"", "\"%error-verbose\"", "\"%output\"", "\"%file-prefix\"", |
450 |
|
"\"%name-prefix\"", "\"%define\"", "\"%pure-parser\"", "\"%defines\"", |
451 |
|
"\"%yacc\"", "\"%debug\"", "\"%locations\"", "\"%no-lines\"", |
452 |
|
"\"%skeleton\"", "\"%token-table\"", "TYPE", "\"=\"", "\";\"", "\":\"", |
453 |
|
"\"|\"", "\"identifier\"", "\"%%\"", "PROLOGUE", "EPILOGUE", |
454 |
|
"BRACED_CODE", "$axiom", "input", "@1", "directives", "directive", |
455 |
|
"grammar_directives", "@2", "@3", "@4", "precedence_directives", "@5", |
456 |
|
"precedence_directive", "type.opt", "nterms_to_type.1", |
457 |
|
"terms_to_prec.1", "symbol_def", "symbol_defs.1", "gram", "rules", "@6", |
458 |
|
"rhses.1", "rhs", "symbol", "action", "string_as_id", "string_content", |
459 |
|
"epilogue.opt", "semi_colon_opt", 0 |
460 |
|
}; |
461 |
|
#endif |
462 |
|
|
463 |
|
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
464 |
|
token YYLEX-NUM. */ |
465 |
|
static const short yytoknum[] = |
466 |
|
{ |
467 |
|
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
468 |
|
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
469 |
|
275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
470 |
|
285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
471 |
|
-1 |
472 |
|
}; |
473 |
|
|
474 |
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
475 |
|
static const unsigned char yyr1[] = |
476 |
|
{ |
477 |
|
0, 40, 42, 41, 43, 43, 44, 44, 44, 44, |
478 |
|
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, |
479 |
|
44, 44, 44, 45, 46, 45, 45, 47, 45, 48, |
480 |
|
45, 45, 50, 49, 51, 51, 51, 52, 52, 53, |
481 |
|
53, 54, 54, 55, 55, 55, 55, 55, 56, 56, |
482 |
|
57, 57, 59, 58, 60, 60, 61, 61, 61, 61, |
483 |
|
62, 62, 62, 63, 64, 65, 66, 66, 67, 67 |
484 |
|
}; |
485 |
|
|
486 |
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
487 |
|
static const unsigned char yyr2[] = |
488 |
|
{ |
489 |
|
0, 2, 0, 5, 0, 2, 1, 1, 1, 3, |
490 |
|
1, 1, 2, 3, 1, 3, 1, 3, 1, 2, |
491 |
|
1, 1, 1, 1, 0, 3, 2, 0, 3, 0, |
492 |
|
4, 3, 0, 4, 1, 1, 1, 0, 1, 1, |
493 |
|
2, 1, 2, 1, 1, 2, 2, 3, 1, 2, |
494 |
|
1, 2, 0, 5, 1, 3, 0, 2, 2, 3, |
495 |
|
1, 1, 1, 1, 1, 1, 0, 2, 0, 1 |
496 |
|
}; |
497 |
|
|
498 |
|
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
499 |
|
STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
500 |
|
means the default is an error. */ |
501 |
|
static const short yydefact[] = |
502 |
|
{ |
503 |
|
2, 0, 4, 0, 0, 27, 24, 0, 0, 0, |
504 |
|
0, 34, 35, 36, 21, 11, 0, 0, 0, 0, |
505 |
|
18, 10, 22, 8, 14, 16, 0, 20, 0, 7, |
506 |
|
5, 6, 23, 37, 0, 0, 29, 68, 12, 64, |
507 |
|
62, 60, 26, 61, 0, 0, 0, 65, 0, 19, |
508 |
|
0, 66, 50, 38, 32, 43, 44, 48, 28, 25, |
509 |
|
0, 69, 31, 17, 13, 15, 9, 52, 0, 51, |
510 |
|
3, 0, 45, 46, 49, 39, 30, 56, 67, 33, |
511 |
|
41, 47, 40, 0, 54, 42, 53, 56, 0, 63, |
512 |
|
57, 58, 55, 59 |
513 |
|
}; |
514 |
|
|
515 |
|
/* YYPGOTO[NTERM-NUM]. */ |
516 |
|
static const short yydefgoto[] = |
517 |
|
{ |
518 |
|
-1, 1, 2, 4, 30, 31, 35, 34, 60, 32, |
519 |
|
71, 33, 54, 76, 79, 57, 58, 51, 52, 77, |
520 |
|
83, 84, 90, 91, 43, 48, 70, 62 |
521 |
|
}; |
522 |
|
|
523 |
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
524 |
|
STATE-NUM. */ |
525 |
|
static const short yypact[] = |
526 |
|
{ |
527 |
|
-32768, 9,-32768,-32768, 73,-32768,-32768, -19, -24, 12, |
528 |
|
0,-32768,-32768,-32768,-32768,-32768, -5, -3, -1, 26, |
529 |
|
-32768,-32768,-32768,-32768,-32768,-32768, 26,-32768, -4,-32768, |
530 |
|
-32768,-32768,-32768, 2, -23, -23,-32768, 4,-32768,-32768, |
531 |
|
-32768,-32768,-32768,-32768, 26, 26, 26,-32768, 26,-32768, |
532 |
|
1, -17,-32768,-32768,-32768,-32768, 5,-32768, -23, -23, |
533 |
|
3,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 6,-32768, |
534 |
|
-32768, 0, 36,-32768,-32768,-32768, 7,-32768,-32768, 0, |
535 |
|
-32768,-32768,-32768, -18, -2,-32768,-32768,-32768, 0,-32768, |
536 |
|
-32768,-32768, -2,-32768 |
537 |
|
}; |
538 |
|
|
539 |
|
/* YYPGOTO[NTERM-NUM]. */ |
540 |
|
static const short yypgoto[] = |
541 |
|
{ |
542 |
|
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, |
543 |
|
-32768,-32768,-32768,-32768,-32768, -38, 8,-32768, -11,-32768, |
544 |
|
-32768, -46, -10,-32768, -50, -21,-32768,-32768 |
545 |
|
}; |
546 |
|
|
547 |
|
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
548 |
|
positive, shift that token. If negative, reduce the rule which |
549 |
|
number is the opposite. If zero, do what YYDEFACT says. */ |
550 |
|
static const short yytable[] = |
551 |
|
{ |
552 |
|
42, 39, 40, 39, 40, 49, 73, 55, 39, 3, |
553 |
|
72, 36, 56, 88, 86, 37, 87, 38, 50, 68, |
554 |
|
74, 74, 81, 63, 64, 65, 44, 66, 45, 47, |
555 |
|
46, 50, 53, 41, 67, 41, 61, 89, 75, 39, |
556 |
|
69, 92, 82, 59, 78, 0, 0, 0, 0, 0, |
557 |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
558 |
|
0, 80, 0, 0, 0, 0, 0, 0, 0, 85, |
559 |
|
0, 0, 0, 0, 0, 0, 0, 0, 93, 5, |
560 |
|
6, 7, 8, 9, 10, 11, 12, 13, 0, 14, |
561 |
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
562 |
|
25, 26, 27, 0, 0, 0, 0, 0, 0, 28, |
563 |
|
29 |
564 |
|
}; |
565 |
|
|
566 |
|
static const short yycheck[] = |
567 |
|
{ |
568 |
|
10, 3, 4, 3, 4, 26, 56, 30, 3, 0, |
569 |
|
5, 30, 35, 15, 32, 39, 34, 5, 35, 36, |
570 |
|
58, 59, 72, 44, 45, 46, 31, 48, 31, 3, |
571 |
|
31, 35, 30, 35, 33, 35, 32, 39, 35, 3, |
572 |
|
51, 87, 35, 35, 38, -1, -1, -1, -1, -1, |
573 |
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
574 |
|
-1, 71, -1, -1, -1, -1, -1, -1, -1, 79, |
575 |
|
-1, -1, -1, -1, -1, -1, -1, -1, 88, 6, |
576 |
|
7, 8, 9, 10, 11, 12, 13, 14, -1, 16, |
577 |
|
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
578 |
|
27, 28, 29, -1, -1, -1, -1, -1, -1, 36, |
579 |
|
37 |
580 |
|
}; |
581 |
|
|
582 |
|
#if YYDEBUG |
583 |
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
584 |
|
symbol of state STATE-NUM. */ |
585 |
|
static const unsigned char yystos[] = |
586 |
|
{ |
587 |
|
0, 41, 42, 0, 43, 6, 7, 8, 9, 10, |
588 |
|
11, 12, 13, 14, 16, 17, 18, 19, 20, 21, |
589 |
|
22, 23, 24, 25, 26, 27, 28, 29, 36, 37, |
590 |
|
44, 45, 49, 51, 47, 46, 30, 39, 5, 3, |
591 |
|
4, 35, 62, 64, 31, 31, 31, 3, 65, 65, |
592 |
|
35, 57, 58, 30, 52, 30, 35, 55, 56, 56, |
593 |
|
48, 32, 67, 65, 65, 65, 65, 33, 36, 58, |
594 |
|
66, 50, 5, 64, 55, 35, 53, 59, 38, 54, |
595 |
|
62, 64, 35, 60, 61, 62, 32, 34, 15, 39, |
596 |
|
62, 63, 61, 62 |
597 |
|
}; |
598 |
|
#endif |
599 |
|
|
600 |
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
601 |
# define YYSIZE_T __SIZE_TYPE__ |
# define YYSIZE_T __SIZE_TYPE__ |
617 |
#define yyclearin (yychar = YYEMPTY) |
#define yyclearin (yychar = YYEMPTY) |
618 |
#define YYEMPTY -2 |
#define YYEMPTY -2 |
619 |
#define YYEOF 0 |
#define YYEOF 0 |
620 |
|
|
621 |
#define YYACCEPT goto yyacceptlab |
#define YYACCEPT goto yyacceptlab |
622 |
#define YYABORT goto yyabortlab |
#define YYABORT goto yyabortlab |
623 |
#define YYERROR goto yyerrlab1 |
#define YYERROR goto yyerrlab1 |
624 |
|
|
625 |
/* Like YYERROR except do call yyerror. This remains here temporarily |
/* Like YYERROR except do call yyerror. This remains here temporarily |
626 |
to ease the transition to the new meaning of YYERROR, for GCC. |
to ease the transition to the new meaning of YYERROR, for GCC. |
627 |
Once GCC version 2 has supplanted version 1, this can go. */ |
Once GCC version 2 has supplanted version 1, this can go. */ |
628 |
|
|
629 |
#define YYFAIL goto yyerrlab |
#define YYFAIL goto yyerrlab |
630 |
|
|
631 |
#define YYRECOVERING() (!!yyerrstatus) |
#define YYRECOVERING() (!!yyerrstatus) |
632 |
|
|
633 |
#define YYBACKUP(Token, Value) \ |
#define YYBACKUP(Token, Value) \ |
634 |
do \ |
do \ |
635 |
if (yychar == YYEMPTY && yylen == 1) \ |
if (yychar == YYEMPTY && yylen == 1) \ |
650 |
#define YYTERROR 1 |
#define YYTERROR 1 |
651 |
#define YYERRCODE 256 |
#define YYERRCODE 256 |
652 |
|
|
|
|
|
653 |
/* YYLLOC_DEFAULT -- Compute the default location (before the actions |
/* YYLLOC_DEFAULT -- Compute the default location (before the actions |
654 |
are run). |
are run). */ |
|
|
|
|
When YYLLOC_DEFAULT is run, CURRENT is set the location of the |
|
|
first token. By default, to implement support for ranges, extend |
|
|
its range to the last symbol. */ |
|
655 |
|
|
656 |
#ifndef YYLLOC_DEFAULT |
#ifndef YYLLOC_DEFAULT |
657 |
# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
658 |
Current.last_line = Rhs[N].last_line; \ |
Current.first_line = Rhs[1].first_line; \ |
659 |
Current.last_column = Rhs[N].last_column; |
Current.first_column = Rhs[1].first_column; \ |
660 |
|
Current.last_line = Rhs[N].last_line; \ |
661 |
|
Current.last_column = Rhs[N].last_column; |
662 |
#endif |
#endif |
663 |
|
|
|
|
|
664 |
/* YYLEX -- calling `yylex' with the right arguments. */ |
/* YYLEX -- calling `yylex' with the right arguments. */ |
665 |
|
|
666 |
#if YYPURE |
#if YYPURE |
681 |
# define YYLEX yylex () |
# define YYLEX yylex () |
682 |
#endif /* !YYPURE */ |
#endif /* !YYPURE */ |
683 |
|
|
|
|
|
684 |
/* Enable debugging if requested. */ |
/* Enable debugging if requested. */ |
685 |
#if YYDEBUG |
#if YYDEBUG |
686 |
|
|
720 |
#ifndef YYMAXDEPTH |
#ifndef YYMAXDEPTH |
721 |
# define YYMAXDEPTH 10000 |
# define YYMAXDEPTH 10000 |
722 |
#endif |
#endif |
723 |
|
|
724 |
|
|
725 |
#ifdef YYERROR_VERBOSE |
|
726 |
|
#if YYERROR_VERBOSE |
727 |
|
|
728 |
# ifndef yystrlen |
# ifndef yystrlen |
729 |
# if defined (__GLIBC__) && defined (_STRING_H) |
# if defined (__GLIBC__) && defined (_STRING_H) |
773 |
} |
} |
774 |
# endif |
# endif |
775 |
# endif |
# endif |
|
#endif |
|
|
|
|
|
#line 315 "/usr/share/bison/bison.simple" |
|
776 |
|
|
777 |
|
#endif /* !YYERROR_VERBOSE */ |
778 |
|
|
779 |
|
|
780 |
|
|
781 |
/* The user can define YYPARSE_PARAM as the name of an argument to be passed |
/* The user can define YYPARSE_PARAM as the name of an argument to be passed |
782 |
into yyparse. The argument should have type void *. |
into yyparse. The argument should have type void *. |
813 |
/* The lookahead symbol. */ \ |
/* The lookahead symbol. */ \ |
814 |
int yychar; \ |
int yychar; \ |
815 |
\ |
\ |
816 |
/* The semantic value of the lookahead symbol. */ \ |
/* The semantic value of the lookahead symbol. */ \ |
817 |
YYSTYPE yylval; \ |
YYSTYPE yylval; \ |
818 |
\ |
\ |
819 |
/* Number of parse errors so far. */ \ |
/* Number of parse errors so far. */ \ |
830 |
YY_DECL_NON_LSP_VARIABLES |
YY_DECL_NON_LSP_VARIABLES |
831 |
#endif |
#endif |
832 |
|
|
833 |
|
/* If nonreentrant, generate the variables here. */ |
|
/* If nonreentrant, generate the variables here. */ |
|
834 |
|
|
835 |
#if !YYPURE |
#if !YYPURE |
836 |
YY_DECL_VARIABLES |
YY_DECL_VARIABLES |
840 |
yyparse (YYPARSE_PARAM_ARG) |
yyparse (YYPARSE_PARAM_ARG) |
841 |
YYPARSE_PARAM_DECL |
YYPARSE_PARAM_DECL |
842 |
{ |
{ |
843 |
/* If reentrant, generate the variables here. */ |
/* If reentrant, generate the variables here. */ |
844 |
#if YYPURE |
#if YYPURE |
845 |
YY_DECL_VARIABLES |
YY_DECL_VARIABLES |
846 |
#endif /* !YYPURE */ |
#endif /* !YYPURE */ |
861 |
Refer to the stacks thru separate pointers, to allow yyoverflow |
Refer to the stacks thru separate pointers, to allow yyoverflow |
862 |
to reallocate them elsewhere. */ |
to reallocate them elsewhere. */ |
863 |
|
|
864 |
/* The state stack. */ |
/* The state stack. */ |
865 |
short yyssa[YYINITDEPTH]; |
short yyssa[YYINITDEPTH]; |
866 |
short *yyss = yyssa; |
short *yyss = yyssa; |
867 |
register short *yyssp; |
register short *yyssp; |
886 |
|
|
887 |
YYSIZE_T yystacksize = YYINITDEPTH; |
YYSIZE_T yystacksize = YYINITDEPTH; |
888 |
|
|
|
|
|
889 |
/* The variables used to return semantic value and location from the |
/* The variables used to return semantic value and location from the |
890 |
action routines. */ |
action routines. */ |
891 |
YYSTYPE yyval; |
YYSTYPE yyval; |
894 |
#endif |
#endif |
895 |
|
|
896 |
/* When reducing, the number of symbols on the RHS of the reduced |
/* When reducing, the number of symbols on the RHS of the reduced |
897 |
rule. */ |
rule. */ |
898 |
int yylen; |
int yylen; |
899 |
|
|
900 |
YYDPRINTF ((stderr, "Starting parse\n")); |
YYDPRINTF ((stderr, "Starting parse\n")); |
981 |
goto yyoverflowlab; |
goto yyoverflowlab; |
982 |
YYSTACK_RELOCATE (yyss); |
YYSTACK_RELOCATE (yyss); |
983 |
YYSTACK_RELOCATE (yyvs); |
YYSTACK_RELOCATE (yyvs); |
984 |
# if YYLSP_NEEDED |
# if YYLSP_NEEDED |
985 |
YYSTACK_RELOCATE (yyls); |
YYSTACK_RELOCATE (yyls); |
986 |
# endif |
# endif |
987 |
# undef YYSTACK_RELOCATE |
# undef YYSTACK_RELOCATE |
988 |
if (yyss1 != yyssa) |
if (yyss1 != yyssa) |
989 |
YYSTACK_FREE (yyss1); |
YYSTACK_FREE (yyss1); |
990 |
} |
} |
1008 |
|
|
1009 |
goto yybackup; |
goto yybackup; |
1010 |
|
|
|
|
|
1011 |
/*-----------. |
/*-----------. |
1012 |
| yybackup. | |
| yybackup. | |
1013 |
`-----------*/ |
`-----------*/ |
1034 |
yychar = YYLEX; |
yychar = YYLEX; |
1035 |
} |
} |
1036 |
|
|
1037 |
/* Convert token to internal form (in yychar1) for indexing tables with */ |
/* Convert token to internal form (in yychar1) for indexing tables with. */ |
1038 |
|
|
1039 |
if (yychar <= 0) /* This means end of input. */ |
if (yychar <= 0) /* This means end of input. */ |
1040 |
{ |
{ |
1041 |
yychar1 = 0; |
yychar1 = 0; |
1042 |
yychar = YYEOF; /* Don't call YYLEX any more */ |
yychar = YYEOF; /* Don't call YYLEX any more. */ |
1043 |
|
|
1044 |
YYDPRINTF ((stderr, "Now at end of input.\n")); |
YYDPRINTF ((stderr, "Now at end of input.\n")); |
1045 |
} |
} |
1140 |
yyval = yyvsp[1-yylen]; |
yyval = yyvsp[1-yylen]; |
1141 |
|
|
1142 |
#if YYLSP_NEEDED |
#if YYLSP_NEEDED |
1143 |
/* Similarly for the default location. Let the user run additional |
/* Default location. */ |
|
commands if for instance locations are ranges. */ |
|
|
yyloc = yylsp[1-yylen]; |
|
1144 |
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
1145 |
#endif |
#endif |
1146 |
|
|
1152 |
int yyi; |
int yyi; |
1153 |
|
|
1154 |
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", |
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", |
1155 |
yyn, yyrline[yyn]); |
yyn - 1, yyrline[yyn]); |
1156 |
|
|
1157 |
/* Print the symbols being reduced, and their result. */ |
/* Print the symbols being reduced, and their result. */ |
1158 |
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) |
for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++) |
1159 |
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); |
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); |
1160 |
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); |
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); |
1161 |
} |
} |
1162 |
#endif |
#endif |
1163 |
|
switch (yyn) |
1164 |
switch (yyn) { |
{ |
1165 |
|
case 2: |
|
case 1: |
|
1166 |
#line 131 "parse-gram.y" |
#line 131 "parse-gram.y" |
1167 |
{ LOCATION_RESET (yylloc); } |
{ LOCATION_RESET (yylloc); } |
1168 |
break; |
break; |
1169 |
case 2: |
|
1170 |
|
case 3: |
1171 |
#line 133 "parse-gram.y" |
#line 133 "parse-gram.y" |
1172 |
{ |
{ |
1173 |
yycontrol->errcode = 0; |
yycontrol->errcode = 0; |
1174 |
epilogue_set (yyvsp[0].string, yylsp[0].first_line); |
epilogue_set (yyvsp[0].string, yylsp[0].first_line); |
1175 |
} |
} |
1176 |
break; |
break; |
1177 |
case 6: |
|
1178 |
|
case 7: |
1179 |
#line 147 "parse-gram.y" |
#line 147 "parse-gram.y" |
1180 |
{ |
{ |
1181 |
prologue_augment (yyvsp[0].string, yylsp[0].first_line); |
prologue_augment (yyvsp[0].string, yylsp[0].first_line); |
1182 |
} |
} |
1183 |
break; |
break; |
1184 |
case 7: |
|
1185 |
|
case 8: |
1186 |
#line 150 "parse-gram.y" |
#line 150 "parse-gram.y" |
1187 |
{ debug_flag = 1; } |
{ debug_flag = 1; } |
1188 |
break; |
break; |
1189 |
case 8: |
|
1190 |
|
case 9: |
1191 |
#line 151 "parse-gram.y" |
#line 151 "parse-gram.y" |
1192 |
{ muscle_insert (yyvsp[-1].string, yyvsp[0].string); } |
{ muscle_insert (yyvsp[-1].string, yyvsp[0].string); } |
1193 |
break; |
break; |
1194 |
case 9: |
|
1195 |
|
case 10: |
1196 |
#line 152 "parse-gram.y" |
#line 152 "parse-gram.y" |
1197 |
{ defines_flag = 1; } |
{ defines_flag = 1; } |
1198 |
break; |
break; |
1199 |
case 10: |
|
1200 |
|
case 11: |
1201 |
#line 153 "parse-gram.y" |
#line 153 "parse-gram.y" |
1202 |
{ error_verbose = 1; } |
{ error_verbose = 1; } |
1203 |
break; |
break; |
1204 |
case 11: |
|
1205 |
|
case 12: |
1206 |
#line 154 "parse-gram.y" |
#line 154 "parse-gram.y" |
1207 |
{ expected_conflicts = yyvsp[0].integer; } |
{ expected_conflicts = yyvsp[0].integer; } |
1208 |
break; |
break; |
1209 |
case 12: |
|
1210 |
|
case 13: |
1211 |
#line 155 "parse-gram.y" |
#line 155 "parse-gram.y" |
1212 |
{ spec_file_prefix = yyvsp[0].string; } |
{ spec_file_prefix = yyvsp[0].string; } |
1213 |
break; |
break; |
1214 |
case 13: |
|
1215 |
|
case 14: |
1216 |
#line 156 "parse-gram.y" |
#line 156 "parse-gram.y" |
1217 |
{ locations_flag = 1; } |
{ locations_flag = 1; } |
1218 |
break; |
break; |
1219 |
case 14: |
|
1220 |
|
case 15: |
1221 |
#line 157 "parse-gram.y" |
#line 157 "parse-gram.y" |
1222 |
{ spec_name_prefix = yyvsp[0].string; } |
{ spec_name_prefix = yyvsp[0].string; } |
1223 |
break; |
break; |
1224 |
case 15: |
|
1225 |
|
case 16: |
1226 |
#line 158 "parse-gram.y" |
#line 158 "parse-gram.y" |
1227 |
{ no_lines_flag = 1; } |
{ no_lines_flag = 1; } |
1228 |
break; |
break; |
1229 |
case 16: |
|
1230 |
|
case 17: |
1231 |
#line 159 "parse-gram.y" |
#line 159 "parse-gram.y" |
1232 |
{ spec_outfile = yyvsp[0].string; } |
{ spec_outfile = yyvsp[0].string; } |
1233 |
break; |
break; |
1234 |
case 17: |
|
1235 |
|
case 18: |
1236 |
#line 160 "parse-gram.y" |
#line 160 "parse-gram.y" |
1237 |
{ pure_parser = 1; } |
{ pure_parser = 1; } |
1238 |
break; |
break; |
1239 |
case 18: |
|
1240 |
|
case 19: |
1241 |
#line 161 "parse-gram.y" |
#line 161 "parse-gram.y" |
1242 |
{ skeleton = yyvsp[0].string; } |
{ skeleton = yyvsp[0].string; } |
1243 |
break; |
break; |
1244 |
case 19: |
|
1245 |
|
case 20: |
1246 |
#line 162 "parse-gram.y" |
#line 162 "parse-gram.y" |
1247 |
{ token_table_flag = 1; } |
{ token_table_flag = 1; } |
1248 |
break; |
break; |
1249 |
case 20: |
|
1250 |
|
case 21: |
1251 |
#line 163 "parse-gram.y" |
#line 163 "parse-gram.y" |
1252 |
{ report_flag = 1; } |
{ report_flag = 1; } |
1253 |
break; |
break; |
1254 |
case 21: |
|
1255 |
|
case 22: |
1256 |
#line 164 "parse-gram.y" |
#line 164 "parse-gram.y" |
1257 |
{ yacc_flag = 1; } |
{ yacc_flag = 1; } |
1258 |
break; |
break; |
1259 |
case 23: |
|
1260 |
|
case 24: |
1261 |
#line 169 "parse-gram.y" |
#line 169 "parse-gram.y" |
1262 |
{ current_class = nterm_sym; } |
{ current_class = nterm_sym; } |
1263 |
break; |
break; |
1264 |
case 24: |
|
1265 |
|
case 25: |
1266 |
#line 170 "parse-gram.y" |
#line 170 "parse-gram.y" |
1267 |
{ |
{ |
1268 |
current_class = unknown_sym; |
current_class = unknown_sym; |
1269 |
current_type = NULL; |
current_type = NULL; |
1270 |
} |
} |
1271 |
break; |
break; |
1272 |
case 25: |
|
1273 |
|
case 26: |
1274 |
#line 175 "parse-gram.y" |
#line 175 "parse-gram.y" |
1275 |
{ |
{ |
1276 |
grammar_start_symbol_set (yyvsp[0].symbol); |
grammar_start_symbol_set (yyvsp[0].symbol); |
1277 |
} |
} |
1278 |
break; |
break; |
1279 |
case 26: |
|
1280 |
|
case 27: |
1281 |
#line 178 "parse-gram.y" |
#line 178 "parse-gram.y" |
1282 |
{ current_class = token_sym; } |
{ current_class = token_sym; } |
1283 |
break; |
break; |
1284 |
case 27: |
|
1285 |
|
case 28: |
1286 |
#line 179 "parse-gram.y" |
#line 179 "parse-gram.y" |
1287 |
{ |
{ |
1288 |
current_class = unknown_sym; |
current_class = unknown_sym; |
1289 |
current_type = NULL; |
current_type = NULL; |
1290 |
} |
} |
1291 |
break; |
break; |
1292 |
case 28: |
|
1293 |
|
case 29: |
1294 |
#line 183 "parse-gram.y" |
#line 183 "parse-gram.y" |
1295 |
{current_type = yyvsp[0].string; } |
{current_type = yyvsp[0].string; } |
1296 |
break; |
break; |
1297 |
case 29: |
|
1298 |
|
case 30: |
1299 |
#line 184 "parse-gram.y" |
#line 184 "parse-gram.y" |
1300 |
{ |
{ |
1301 |
current_type = NULL; |
current_type = NULL; |
1302 |
} |
} |
1303 |
break; |
break; |
1304 |
case 30: |
|
1305 |
|
case 31: |
1306 |
#line 188 "parse-gram.y" |
#line 188 "parse-gram.y" |
1307 |
{ |
{ |
1308 |
typed = 1; |
typed = 1; |
1309 |
MUSCLE_INSERT_INT ("stype_line", yylsp[-1].first_line); |
MUSCLE_INSERT_INT ("stype_line", yylsp[-1].first_line); |
1310 |
muscle_insert ("stype", yyvsp[-1].string); |
muscle_insert ("stype", yyvsp[-1].string); |
1311 |
} |
} |
1312 |
break; |
break; |
1313 |
case 31: |
|
1314 |
|
case 32: |
1315 |
#line 197 "parse-gram.y" |
#line 197 "parse-gram.y" |
1316 |
{ current_assoc = yyvsp[-1].assoc; ++current_prec; } |
{ current_assoc = yyvsp[-1].assoc; ++current_prec; } |
1317 |
break; |
break; |
1318 |
case 32: |
|
1319 |
|
case 33: |
1320 |
#line 199 "parse-gram.y" |
#line 199 "parse-gram.y" |
1321 |
{ current_assoc = non_assoc; current_type = NULL; } |
{ current_assoc = non_assoc; current_type = NULL; } |
1322 |
break; |
break; |
1323 |
case 33: |
|
1324 |
|
case 34: |
1325 |
#line 203 "parse-gram.y" |
#line 203 "parse-gram.y" |
1326 |
{ yyval.assoc = left_assoc; } |
{ yyval.assoc = left_assoc; } |
1327 |
break; |
break; |
1328 |
case 34: |
|
1329 |
|
case 35: |
1330 |
#line 204 "parse-gram.y" |
#line 204 "parse-gram.y" |
1331 |
{ yyval.assoc = right_assoc; } |
{ yyval.assoc = right_assoc; } |
1332 |
break; |
break; |
1333 |
case 35: |
|
1334 |
|
case 36: |
1335 |
#line 205 "parse-gram.y" |
#line 205 "parse-gram.y" |
1336 |
{ yyval.assoc = non_assoc; } |
{ yyval.assoc = non_assoc; } |
1337 |
break; |
break; |
1338 |
case 36: |
|
1339 |
|
case 37: |
1340 |
#line 209 "parse-gram.y" |
#line 209 "parse-gram.y" |
1341 |
{ current_type = NULL;} |
{ current_type = NULL;} |
1342 |
break; |
break; |
1343 |
case 37: |
|
1344 |
|
case 38: |
1345 |
#line 210 "parse-gram.y" |
#line 210 "parse-gram.y" |
1346 |
{ current_type = yyvsp[0].string; } |
{ current_type = yyvsp[0].string; } |
1347 |
break; |
break; |
1348 |
case 38: |
|
1349 |
|
case 39: |
1350 |
#line 215 "parse-gram.y" |
#line 215 "parse-gram.y" |
1351 |
{ symbol_type_set (yyvsp[0].symbol, current_type); } |
{ symbol_type_set (yyvsp[0].symbol, current_type); } |
1352 |
break; |
break; |
1353 |
case 39: |
|
1354 |
|
case 40: |
1355 |
#line 216 "parse-gram.y" |
#line 216 "parse-gram.y" |
1356 |
{ symbol_type_set (yyvsp[0].symbol, current_type); } |
{ symbol_type_set (yyvsp[0].symbol, current_type); } |
1357 |
break; |
break; |
1358 |
case 40: |
|
1359 |
|
case 41: |
1360 |
#line 222 "parse-gram.y" |
#line 222 "parse-gram.y" |
1361 |
{ |
{ |
1362 |
symbol_type_set (yyvsp[0].symbol, current_type); |
symbol_type_set (yyvsp[0].symbol, current_type); |
1363 |
symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc); |
symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc); |
1364 |
} |
} |
1365 |
break; |
break; |
1366 |
case 41: |
|
1367 |
|
case 42: |
1368 |
#line 227 "parse-gram.y" |
#line 227 "parse-gram.y" |
1369 |
{ |
{ |
1370 |
symbol_type_set (yyvsp[0].symbol, current_type); |
symbol_type_set (yyvsp[0].symbol, current_type); |
1371 |
symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc); |
symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc); |
1372 |
} |
} |
1373 |
break; |
break; |
1374 |
case 42: |
|
1375 |
|
case 43: |
1376 |
#line 237 "parse-gram.y" |
#line 237 "parse-gram.y" |
1377 |
{ |
{ |
1378 |
current_type = yyvsp[0].string; |
current_type = yyvsp[0].string; |
1379 |
} |
} |
1380 |
break; |
break; |
1381 |
case 43: |
|
1382 |
|
case 44: |
1383 |
#line 241 "parse-gram.y" |
#line 241 "parse-gram.y" |
1384 |
{ |
{ |
1385 |
symbol_class_set (yyvsp[0].symbol, current_class); |
symbol_class_set (yyvsp[0].symbol, current_class); |
1386 |
symbol_type_set (yyvsp[0].symbol, current_type); |
symbol_type_set (yyvsp[0].symbol, current_type); |
1387 |
} |
} |
1388 |
break; |
break; |
1389 |
case 44: |
|
1390 |
|
case 45: |
1391 |
#line 246 "parse-gram.y" |
#line 246 "parse-gram.y" |
1392 |
{ |
{ |
1393 |
symbol_class_set (yyvsp[-1].symbol, current_class); |
symbol_class_set (yyvsp[-1].symbol, current_class); |
1394 |
symbol_type_set (yyvsp[-1].symbol, current_type); |
symbol_type_set (yyvsp[-1].symbol, current_type); |
1395 |
symbol_user_token_number_set (yyvsp[-1].symbol, yyvsp[0].integer); |
symbol_user_token_number_set (yyvsp[-1].symbol, yyvsp[0].integer); |
1396 |
} |
} |
1397 |
break; |
break; |
1398 |
case 45: |
|
1399 |
|
case 46: |
1400 |
#line 252 "parse-gram.y" |
#line 252 "parse-gram.y" |
1401 |
{ |
{ |
1402 |
symbol_class_set (yyvsp[-1].symbol, current_class); |
symbol_class_set (yyvsp[-1].symbol, current_class); |
1403 |
symbol_type_set (yyvsp[-1].symbol, current_type); |
symbol_type_set (yyvsp[-1].symbol, current_type); |
1404 |
symbol_make_alias (yyvsp[-1].symbol, yyvsp[0].symbol); |
symbol_make_alias (yyvsp[-1].symbol, yyvsp[0].symbol); |
1405 |
} |
} |
1406 |
break; |
break; |
1407 |
case 46: |
|
1408 |
|
case 47: |
1409 |
#line 258 "parse-gram.y" |
#line 258 "parse-gram.y" |
1410 |
{ |
{ |
1411 |
symbol_class_set (yyvsp[-2].symbol, current_class); |
symbol_class_set (yyvsp[-2].symbol, current_class); |
1412 |
symbol_type_set (yyvsp[-2].symbol, current_type); |
symbol_type_set (yyvsp[-2].symbol, current_type); |
1413 |
symbol_user_token_number_set (yyvsp[-2].symbol, yyvsp[-1].integer); |
symbol_user_token_number_set (yyvsp[-2].symbol, yyvsp[-1].integer); |
1414 |
symbol_make_alias (yyvsp[-2].symbol, yyvsp[0].symbol); |
symbol_make_alias (yyvsp[-2].symbol, yyvsp[0].symbol); |
1415 |
} |
} |
1416 |
break; |
break; |
1417 |
case 47: |
|
1418 |
|
case 48: |
1419 |
#line 269 "parse-gram.y" |
#line 269 "parse-gram.y" |
1420 |
{;} |
{;} |
1421 |
break; |
break; |
1422 |
case 48: |
|
1423 |
|
case 49: |
1424 |
#line 271 "parse-gram.y" |
#line 271 "parse-gram.y" |
1425 |
{;} |
{;} |
1426 |
break; |
break; |
1427 |
case 51: |
|
1428 |
|
case 52: |
1429 |
#line 280 "parse-gram.y" |
#line 280 "parse-gram.y" |
1430 |
{ current_lhs = yyvsp[-1].symbol; } |
{ current_lhs = yyvsp[-1].symbol; } |
1431 |
break; |
break; |
1432 |
case 52: |
|
1433 |
|
case 53: |
1434 |
#line 281 "parse-gram.y" |
#line 281 "parse-gram.y" |
1435 |
{;} |
{;} |
1436 |
break; |
break; |
1437 |
case 53: |
|
1438 |
|
case 54: |
1439 |
#line 285 "parse-gram.y" |
#line 285 "parse-gram.y" |
1440 |
{ grammar_rule_end (); } |
{ grammar_rule_end (); } |
1441 |
break; |
break; |
1442 |
case 54: |
|
1443 |
|
case 55: |
1444 |
#line 286 "parse-gram.y" |
#line 286 "parse-gram.y" |
1445 |
{ grammar_rule_end (); } |
{ grammar_rule_end (); } |
1446 |
break; |
break; |
1447 |
case 55: |
|
1448 |
|
case 56: |
1449 |
#line 291 "parse-gram.y" |
#line 291 "parse-gram.y" |
1450 |
{ grammar_rule_begin (current_lhs); } |
{ grammar_rule_begin (current_lhs); } |
1451 |
break; |
break; |
1452 |
case 56: |
|
1453 |
|
case 57: |
1454 |
#line 293 "parse-gram.y" |
#line 293 "parse-gram.y" |
1455 |
{ grammar_current_rule_symbol_append (yyvsp[0].symbol); } |
{ grammar_current_rule_symbol_append (yyvsp[0].symbol); } |
1456 |
break; |
break; |
1457 |
case 57: |
|
1458 |
|
case 58: |
1459 |
#line 295 "parse-gram.y" |
#line 295 "parse-gram.y" |
1460 |
{ grammar_current_rule_action_append (yyvsp[0].string, yylsp[0].first_line); } |
{ grammar_current_rule_action_append (yyvsp[0].string, yylsp[0].first_line); } |
1461 |
break; |
break; |
1462 |
case 58: |
|
1463 |
|
case 59: |
1464 |
#line 297 "parse-gram.y" |
#line 297 "parse-gram.y" |
1465 |
{ grammar_current_rule_prec_set (yyvsp[0].symbol); } |
{ grammar_current_rule_prec_set (yyvsp[0].symbol); } |
1466 |
break; |
break; |
1467 |
case 59: |
|
1468 |
|
case 60: |
1469 |
#line 301 "parse-gram.y" |
#line 301 "parse-gram.y" |
1470 |
{ yyval.symbol = yyvsp[0].symbol; } |
{ yyval.symbol = yyvsp[0].symbol; } |
1471 |
break; |
break; |
1472 |
case 60: |
|
1473 |
|
case 61: |
1474 |
#line 302 "parse-gram.y" |
#line 302 "parse-gram.y" |
1475 |
{ yyval.symbol = yyvsp[0].symbol; } |
{ yyval.symbol = yyvsp[0].symbol; } |
1476 |
break; |
break; |
1477 |
case 61: |
|
1478 |
|
case 62: |
1479 |
#line 303 "parse-gram.y" |
#line 303 "parse-gram.y" |
1480 |
{ yyval.symbol = getsym (yyvsp[0].string); } |
{ yyval.symbol = getsym (yyvsp[0].string); } |
1481 |
break; |
break; |
1482 |
case 62: |
|
1483 |
|
case 63: |
1484 |
#line 308 "parse-gram.y" |
#line 308 "parse-gram.y" |
1485 |
{ yyval.string = yyvsp[0].string; } |
{ yyval.string = yyvsp[0].string; } |
1486 |
break; |
break; |
1487 |
case 63: |
|
1488 |
|
case 64: |
1489 |
#line 314 "parse-gram.y" |
#line 314 "parse-gram.y" |
1490 |
{ |
{ |
1491 |
yyval.symbol = getsym (yyvsp[0].string); |
yyval.symbol = getsym (yyvsp[0].string); |
1492 |
symbol_class_set (yyval.symbol, token_sym); |
symbol_class_set (yyval.symbol, token_sym); |
1493 |
} |
} |
1494 |
break; |
break; |
1495 |
case 64: |
|
1496 |
|
case 65: |
1497 |
#line 323 "parse-gram.y" |
#line 323 "parse-gram.y" |
1498 |
{ |
{ |
1499 |
yyval.string = yyvsp[0].string + 1; |
yyval.string = yyvsp[0].string + 1; |
1500 |
yyval.string[strlen (yyval.string) - 1] = '\0'; |
yyval.string[strlen (yyval.string) - 1] = '\0'; |
1501 |
} |
} |
1502 |
break; |
break; |
1503 |
case 65: |
|
1504 |
|
case 66: |
1505 |
#line 331 "parse-gram.y" |
#line 331 "parse-gram.y" |
1506 |
{ |
{ |
1507 |
yyval.string = xstrdup (""); |
yyval.string = xstrdup (""); |
1508 |
} |
} |
1509 |
break; |
break; |
1510 |
case 66: |
|
1511 |
|
case 67: |
1512 |
#line 335 "parse-gram.y" |
#line 335 "parse-gram.y" |
1513 |
{ |
{ |
1514 |
yyval.string = yyvsp[0].string; |
yyval.string = yyvsp[0].string; |
1515 |
} |
} |
1516 |
break; |
break; |
|
} |
|
1517 |
|
|
|
#line 705 "/usr/share/bison/bison.simple" |
|
1518 |
|
|
1519 |
|
} |
1520 |
|
|
1521 |
|
/* Line 1010 of /usr/local/share/bison/bison.simple. */ |
1522 |
|
#line 1523 "parse-gram.c" |
1523 |
|
|
1524 |
yyvsp -= yylen; |
yyvsp -= yylen; |
1525 |
yyssp -= yylen; |
yyssp -= yylen; |
1549 |
|
|
1550 |
yyn = yyr1[yyn]; |
yyn = yyr1[yyn]; |
1551 |
|
|
1552 |
yystate = yypgoto[yyn - YYNTBASE] + *yyssp; |
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
1553 |
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
1554 |
yystate = yytable[yystate]; |
yystate = yytable[yystate]; |
1555 |
else |
else |
1556 |
yystate = yydefgoto[yyn - YYNTBASE]; |
yystate = yydefgoto[yyn - YYNTOKENS]; |
1557 |
|
|
1558 |
goto yynewstate; |
goto yynewstate; |
1559 |
|
|
1567 |
{ |
{ |
1568 |
++yynerrs; |
++yynerrs; |
1569 |
|
|
1570 |
#ifdef YYERROR_VERBOSE |
#if YYERROR_VERBOSE |
1571 |
yyn = yypact[yystate]; |
yyn = yypact[yystate]; |
1572 |
|
|
1573 |
if (yyn > YYFLAG && yyn < YYLAST) |
if (yyn > YYFLAG && yyn < YYLAST) |
1607 |
} |
} |
1608 |
yyerror (yymsg); |
yyerror (yymsg); |
1609 |
YYSTACK_FREE (yymsg); |
YYSTACK_FREE (yymsg); |
1610 |
} |
} |
1611 |
else |
else |
1612 |
yyerror ("parse error; also virtual memory exhausted"); |
yyerror ("parse error; also virtual memory exhausted"); |
1613 |
} |
} |
1614 |
else |
else |
1615 |
#endif /* defined (YYERROR_VERBOSE) */ |
#endif /* YYERROR_VERBOSE */ |
1616 |
yyerror ("parse error"); |
yyerror ("parse error"); |
1617 |
} |
} |
1618 |
goto yyerrlab1; |
goto yyerrlab1; |
1619 |
|
|
1620 |
|
|
1621 |
/*--------------------------------------------------. |
/*----------------------------------------------------. |
1622 |
| yyerrlab1 -- error raised explicitly by an action | |
| yyerrlab1 -- error raised explicitly by an action. | |
1623 |
`--------------------------------------------------*/ |
`----------------------------------------------------*/ |
1624 |
yyerrlab1: |
yyerrlab1: |
1625 |
if (yyerrstatus == 3) |
if (yyerrstatus == 3) |
1626 |
{ |
{ |
1627 |
/* If just tried and failed to reuse lookahead token after an |
/* If just tried and failed to reuse lookahead token after an |
1628 |
error, discard it. */ |
error, discard it. */ |
1629 |
|
|
1630 |
/* return failure if at end of input */ |
/* Return failure if at end of input. */ |
1631 |
if (yychar == YYEOF) |
if (yychar == YYEOF) |
1632 |
YYABORT; |
YYABORT; |
1633 |
YYDPRINTF ((stderr, "Discarding token %d (%s).\n", |
YYDPRINTF ((stderr, "Discarding token %d (%s).\n", |
1638 |
/* Else will try to reuse lookahead token after shifting the error |
/* Else will try to reuse lookahead token after shifting the error |
1639 |
token. */ |
token. */ |
1640 |
|
|
1641 |
yyerrstatus = 3; /* Each real token shifted decrements this */ |
yyerrstatus = 3; /* Each real token shifted decrements this. */ |
|
|
|
|
goto yyerrhandle; |
|
1642 |
|
|
1643 |
|
for (;;) |
1644 |
|
{ |
1645 |
|
yyn = yypact[yystate]; |
1646 |
|
if (yyn != YYFLAG) |
1647 |
|
{ |
1648 |
|
yyn += YYTERROR; |
1649 |
|
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
1650 |
|
{ |
1651 |
|
yyn = yytable[yyn]; |
1652 |
|
if (0 < yyn) |
1653 |
|
break; |
1654 |
|
} |
1655 |
|
} |
1656 |
|
|
1657 |
/*-------------------------------------------------------------------. |
/* Pop the current state because it cannot handle the error token. */ |
1658 |
| yyerrdefault -- current state does not do anything special for the | |
if (yyssp == yyss) |
1659 |
| error token. | |
YYABORT; |
|
`-------------------------------------------------------------------*/ |
|
|
yyerrdefault: |
|
|
#if 0 |
|
|
/* This is wrong; only states that explicitly want error tokens |
|
|
should shift them. */ |
|
1660 |
|
|
1661 |
/* If its default is to accept any token, ok. Otherwise pop it. */ |
#if YYDEBUG |
1662 |
yyn = yydefact[yystate]; |
if (yydebug) |
1663 |
if (yyn) |
{ |
1664 |
goto yydefault; |
if (yystos[yystate] < YYNTOKENS) |
1665 |
|
{ |
1666 |
|
YYFPRINTF (stderr, "Error: popping token %d (%s", |
1667 |
|
yytoknum[yystos[yystate]], yytname[yystos[yystate]]); |
1668 |
|
# ifdef YYPRINT |
1669 |
|
YYPRINT (stderr, yytoknum[yystos[yystate]], *yyvsp); |
1670 |
|
# endif |
1671 |
|
YYFPRINTF (stderr, ")\n"); |
1672 |
|
} |
1673 |
|
else |
1674 |
|
{ |
1675 |
|
YYFPRINTF (stderr, "Error: popping nonterminal (%s)\n", |
1676 |
|
yytname[yystos[yystate]]); |
1677 |
|
} |
1678 |
|
} |
1679 |
#endif |
#endif |
1680 |
|
|
1681 |
|
yyvsp--; |
1682 |
/*---------------------------------------------------------------. |
yystate = *--yyssp; |
|
| yyerrpop -- pop the current state because it cannot handle the | |
|
|
| error token | |
|
|
`---------------------------------------------------------------*/ |
|
|
yyerrpop: |
|
|
if (yyssp == yyss) |
|
|
YYABORT; |
|
|
yyvsp--; |
|
|
yystate = *--yyssp; |
|
1683 |
#if YYLSP_NEEDED |
#if YYLSP_NEEDED |
1684 |
yylsp--; |
yylsp--; |
1685 |
#endif |
#endif |
1686 |
|
|
1687 |
#if YYDEBUG |
#if YYDEBUG |
1688 |
if (yydebug) |
if (yydebug) |
1689 |
{ |
{ |
1690 |
short *yyssp1 = yyss - 1; |
short *yyssp1 = yyss - 1; |
1691 |
YYFPRINTF (stderr, "Error: state stack now"); |
YYFPRINTF (stderr, "Error: state stack now"); |
1692 |
while (yyssp1 != yyssp) |
while (yyssp1 != yyssp) |
1693 |
YYFPRINTF (stderr, " %d", *++yyssp1); |
YYFPRINTF (stderr, " %d", *++yyssp1); |
1694 |
YYFPRINTF (stderr, "\n"); |
YYFPRINTF (stderr, "\n"); |
1695 |
} |
} |
1696 |
#endif |
#endif |
|
|
|
|
/*--------------. |
|
|
| yyerrhandle. | |
|
|
`--------------*/ |
|
|
yyerrhandle: |
|
|
yyn = yypact[yystate]; |
|
|
if (yyn == YYFLAG) |
|
|
goto yyerrdefault; |
|
|
|
|
|
yyn += YYTERROR; |
|
|
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) |
|
|
goto yyerrdefault; |
|
|
|
|
|
yyn = yytable[yyn]; |
|
|
if (yyn < 0) |
|
|
{ |
|
|
if (yyn == YYFLAG) |
|
|
goto yyerrpop; |
|
|
yyn = -yyn; |
|
|
goto yyreduce; |
|
1697 |
} |
} |
|
else if (yyn == 0) |
|
|
goto yyerrpop; |
|
1698 |
|
|
1699 |
if (yyn == YYFINAL) |
if (yyn == YYFINAL) |
1700 |
YYACCEPT; |
YYACCEPT; |
1739 |
#endif |
#endif |
1740 |
return yyresult; |
return yyresult; |
1741 |
} |
} |
1742 |
|
|
1743 |
#line 344 "parse-gram.y" |
#line 344 "parse-gram.y" |
1744 |
|
|
1745 |
/*------------------------------------------------------------------. |
/*------------------------------------------------------------------. |
1790 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1791 |
fprintf (stderr, ": %s\n", msg); |
fprintf (stderr, ": %s\n", msg); |
1792 |
} |
} |
1793 |
|
|