]>
Commit | Line | Data |
---|---|---|
8e37b772 | 1 | /* |
2 | ** Inserted at beginning of c files generated by bison | |
3 | ** REMEMBER: Change bison.reset too. | |
4 | */ | |
5 | ||
6 | /*@-allmacros@*/ | |
7 | /*@+boolint@*/ | |
8 | /*@+charint@*/ | |
9 | /*@-macroparams@*/ | |
10 | /*@-macroundef@*/ | |
11 | /*@-unreachable@*/ | |
12 | /*@-macrospec@*/ | |
13 | /*@-varuse@*/ | |
14 | /*@+ignorequals@*/ | |
15 | /*@-macrostmt@*/ | |
16 | /*@-noeffect@*/ | |
17 | /*@-shadow@*/ | |
18 | /*@-exitarg@*/ | |
19 | /*@-macroredef@*/ | |
20 | /*@-uniondef@*/ | |
21 | /*@-compdef@*/ | |
22 | /*@-matchfields@*/ | |
23 | /*@-exportlocal@*/ | |
24 | /*@-evalorderuncon@*/ | |
25 | /*@-exportheader@*/ | |
26 | /*@-typeuse@*/ | |
27 | /*@-redecl@*/ | |
28 | /*@-redef@*/ | |
29 | /*@-noparams@*/ | |
30 | /*@-ansireserved@*/ | |
31 | /*@-fielduse@*/ | |
32 | /*@-ifblock@*/ | |
33 | /*@-elseifcomplete@*/ | |
34 | /*@-whileblock@*/ | |
35 | /*@-forblock@*/ | |
36 | /*@-branchstate@*/ | |
37 | /*@-readonlytrans@*/ | |
38 | /*@-namechecks@*/ | |
39 | /*@-usedef@*/ | |
40 | /*@-systemunrecog@*/ | |
41 | /*@-dependenttrans@*/ | |
42 | /*@-unqualifiedtrans@*/ | |
43 | /*@-nullassign@*/ | |
bb7c2085 | 44 | /*@-nullpass@*/ |
45 | /*@-nullptrarith*/ | |
46 | /*@-usereleased@*/ | |
8e37b772 | 47 | /*@-declundef@*/ |
48 | ||
bbed3d50 | 49 | /*drl added 11/27/2001*/ |
bb7c2085 | 50 | /*@-bounds@*/ |
8e37b772 | 51 | /* < end of bison.head > */ |
52 | ||
3e7d9038 | 53 | /* A Bison parser, made from mtgrammar.y |
54 | by GNU bison 1.35. */ | |
8e37b772 | 55 | |
56 | #define YYBISON 1 /* Identify Bison output. */ | |
57 | ||
58 | #define yyparse mtparse | |
59 | #define yylex mtlex | |
60 | #define yyerror mterror | |
61 | #define yylval mtlval | |
62 | #define yychar mtchar | |
63 | #define yydebug mtdebug | |
64 | #define yynerrs mtnerrs | |
3e7d9038 | 65 | # define MT_BADTOK 257 |
66 | # define MT_END 258 | |
67 | # define MT_STATE 259 | |
68 | # define MT_GLOBAL 260 | |
69 | # define MT_CONTEXT 261 | |
70 | # define MT_ONEOF 262 | |
71 | # define MT_DEFAULTS 263 | |
72 | # define MT_DEFAULT 264 | |
73 | # define MT_REFERENCE 265 | |
74 | # define MT_PARAMETER 266 | |
75 | # define MT_RESULT 267 | |
76 | # define MT_CLAUSE 268 | |
77 | # define MT_LITERAL 269 | |
78 | # define MT_NULL 270 | |
79 | # define MT_ANNOTATIONS 271 | |
80 | # define MT_ARROW 272 | |
81 | # define MT_MERGE 273 | |
82 | # define MT_TRANSFERS 274 | |
83 | # define MT_PRECONDITIONS 275 | |
84 | # define MT_POSTCONDITIONS 276 | |
85 | # define MT_LOSEREFERENCE 277 | |
86 | # define MT_AS 278 | |
87 | # define MT_ERROR 279 | |
88 | # define MT_PLUS 280 | |
89 | # define MT_STAR 281 | |
90 | # define MT_BAR 282 | |
91 | # define MT_LPAREN 283 | |
92 | # define MT_RPAREN 284 | |
93 | # define MT_LBRACKET 285 | |
94 | # define MT_RBRACKET 286 | |
95 | # define MT_LBRACE 287 | |
96 | # define MT_RBRACE 288 | |
97 | # define MT_COMMA 289 | |
98 | # define MT_CHAR 290 | |
99 | # define MT_INT 291 | |
100 | # define MT_FLOAT 292 | |
101 | # define MT_DOUBLE 293 | |
102 | # define MT_VOID 294 | |
103 | # define MT_ANYTYPE 295 | |
104 | # define MT_INTEGRALTYPE 296 | |
105 | # define MT_UNSIGNEDINTEGRALTYPE 297 | |
106 | # define MT_SIGNEDINTEGRALTYPE 298 | |
107 | # define MT_CONST 299 | |
108 | # define MT_VOLATILE 300 | |
109 | # define MT_RESTRICT 301 | |
110 | # define MT_STRINGLIT 302 | |
111 | # define MT_IDENT 303 | |
8e37b772 | 112 | |
8e37b772 | 113 | |
114 | ||
115 | # include "bison.reset" | |
1b8ae690 | 116 | # include "splintMacros.nf" |
8e37b772 | 117 | # include "llbasic.h" |
118 | ||
3e3ec469 | 119 | # ifndef S_SPLINT_S |
8e37b772 | 120 | extern ctype mtscanner_lookupType (mttok p_tok) /*@modifies p_tok@*/ ; |
121 | # endif | |
122 | ||
123 | /*@i523@*/ /* can't include these here | |
124 | # include "mtgrammar.h" | |
125 | # include "mtscanner.h" | |
126 | */ | |
127 | ||
4dd72714 | 128 | static /*@noreturn@*/ void mterror (char *); |
8e37b772 | 129 | |
130 | /*@-noparams@*/ /* Can't list params since YYSTYPE isn't defined yet. */ | |
4dd72714 | 131 | extern int mtlex () ; |
8e37b772 | 132 | static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */); |
133 | /*@=noparams@*/ | |
134 | ||
135 | # define YYPRINT(file, type, value) yyprint (file, type, value) | |
136 | ||
137 | # define YYDEBUG 1 | |
138 | ||
139 | # include "bison.head" | |
140 | ||
141 | ||
3e7d9038 | 142 | #ifndef YYSTYPE |
8e37b772 | 143 | typedef union { |
144 | mttok tok; | |
145 | mtDeclarationNode mtdecl; | |
146 | mtDeclarationPiece mtpiece; | |
147 | mtDeclarationPieces mtpieces; | |
148 | mtContextNode mtcontext; | |
149 | mtValuesNode mtvalues; | |
150 | mtDefaultsNode mtdefaults; | |
151 | mtDefaultsDeclList mtdeflist; | |
152 | mtAnnotationsNode mtannotations; | |
153 | mtAnnotationList mtannotlist; | |
154 | mtAnnotationDecl mtannotdecl; | |
155 | mtMergeNode mtmerge; | |
156 | mtMergeItem mtmergeitem; | |
157 | mtMergeClauseList mtmergeclauselist; | |
158 | mtMergeClause mtmergeclause; | |
159 | mtTransferClauseList mttransferclauselist; | |
160 | mtTransferClause mttransferclause; | |
161 | mtTransferAction mttransferaction; | |
162 | mtLoseReferenceList mtlosereferencelist; | |
163 | mtLoseReference mtlosereference; | |
f9264521 | 164 | pointers pointers; |
8e37b772 | 165 | /*@only@*/ cstringList cstringlist; |
166 | ctype ctyp; | |
167 | /*@only@*/ qtype qtyp; | |
f9264521 | 168 | qual qual; |
169 | qualList quals; | |
3e7d9038 | 170 | } yystype; |
171 | # define YYSTYPE yystype | |
172 | # define YYSTYPE_IS_TRIVIAL 1 | |
e8b84478 | 173 | #endif |
3e7d9038 | 174 | #ifndef YYDEBUG |
175 | # define YYDEBUG 1 | |
e8b84478 | 176 | #endif |
177 | ||
8e37b772 | 178 | |
179 | ||
f9264521 | 180 | #define YYFINAL 136 |
8e37b772 | 181 | #define YYFLAG -32768 |
f9264521 | 182 | #define YYNTBASE 50 |
8e37b772 | 183 | |
3e7d9038 | 184 | /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ |
f9264521 | 185 | #define YYTRANSLATE(x) ((unsigned)(x) <= 303 ? yytranslate[x] : 93) |
8e37b772 | 186 | |
3e7d9038 | 187 | /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ |
188 | static const char yytranslate[] = | |
189 | { | |
190 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
191 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
192 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
193 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
194 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
195 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
196 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
197 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
198 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
199 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
200 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
201 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
202 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
203 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
204 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
205 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
206 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
207 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
208 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
209 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
210 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
211 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
212 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
213 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
214 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
215 | 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, | |
216 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, | |
217 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, | |
218 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, | |
219 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, | |
220 | 46, 47, 48, 49 | |
8e37b772 | 221 | }; |
222 | ||
3e7d9038 | 223 | #if YYDEBUG |
224 | static const short yyprhs[] = | |
225 | { | |
226 | 0, 0, 1, 3, 7, 12, 15, 16, 19, 21, | |
227 | 23, 25, 27, 29, 31, 33, 35, 37, 39, 42, | |
228 | 43, 45, 48, 51, 54, 57, 60, 63, 64, 66, | |
229 | 68, 71, 73, 77, 80, 81, 83, 85, 87, 90, | |
230 | 92, 95, 98, 102, 104, 106, 108, 110, 113, 117, | |
231 | 120, 124, 126, 128, 130, 132, 134, 136, 138, 140, | |
232 | 142, 144, 146, 149, 151, 155, 158, 161, 165, 170, | |
233 | 173, 175, 178, 183, 186, 188, 191, 197, 199, 201, | |
234 | 204, 207, 210, 213, 215, 218, 222, 224, 227, 233, | |
235 | 235, 237, 239, 242 | |
8e37b772 | 236 | }; |
3e7d9038 | 237 | static const short yyrhs[] = |
238 | { | |
239 | -1, 51, 0, 5, 52, 4, 0, 6, 5, 52, | |
240 | 4, 0, 49, 53, 0, 0, 54, 53, 0, 55, | |
241 | 0, 70, 0, 73, 0, 72, 0, 75, 0, 78, | |
242 | 0, 84, 0, 82, 0, 83, 0, 85, 0, 7, | |
243 | 57, 0, 0, 57, 0, 12, 58, 0, 11, 58, | |
244 | 0, 13, 58, 0, 14, 58, 0, 15, 58, 0, | |
245 | 16, 58, 0, 0, 59, 0, 60, 0, 60, 63, | |
246 | 0, 61, 0, 60, 28, 59, 0, 68, 62, 0, | |
247 | 0, 60, 0, 64, 0, 67, 0, 64, 67, 0, | |
248 | 27, 0, 27, 66, 0, 27, 64, 0, 27, 66, | |
249 | 64, 0, 45, 0, 46, 0, 47, 0, 65, 0, | |
250 | 66, 65, 0, 29, 63, 30, 0, 31, 32, 0, | |
251 | 67, 31, 32, 0, 36, 0, 37, 0, 38, 0, | |
252 | 39, 0, 40, 0, 41, 0, 42, 0, 43, 0, | |
253 | 44, 0, 69, 0, 49, 0, 8, 71, 0, 49, | |
254 | 0, 49, 35, 71, 0, 10, 92, 0, 9, 74, | |
255 | 0, 57, 18, 92, 0, 57, 18, 92, 74, 0, | |
256 | 17, 76, 0, 77, 0, 77, 76, 0, 49, 56, | |
257 | 18, 92, 0, 19, 79, 0, 80, 0, 80, 79, | |
258 | 0, 81, 26, 81, 18, 90, 0, 92, 0, 27, | |
259 | 0, 21, 88, 0, 22, 88, 0, 20, 88, 0, | |
260 | 23, 86, 0, 87, 0, 87, 86, 0, 92, 18, | |
261 | 91, 0, 89, 0, 89, 88, 0, 92, 24, 92, | |
262 | 18, 90, 0, 92, 0, 91, 0, 25, 0, 25, | |
263 | 48, 0, 49, 0 | |
8e37b772 | 264 | }; |
265 | ||
266 | #endif | |
267 | ||
3e7d9038 | 268 | #if YYDEBUG |
269 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | |
270 | static const short yyrline[] = | |
271 | { | |
2f2892c2 | 272 | 0, 160, 161, 165, 167, 172, 177, 178, 183, 184, |
273 | 185, 186, 187, 188, 189, 190, 191, 192, 196, 201, | |
274 | 202, 206, 207, 208, 209, 210, 211, 219, 220, 224, | |
275 | 225, 229, 230, 235, 239, 240, 244, 245, 246, 250, | |
276 | 251, 252, 253, 257, 258, 259, 263, 264, 268, 269, | |
277 | 270, 278, 279, 280, 281, 282, 283, 284, 285, 286, | |
278 | 287, 294, 298, 302, 303, 308, 312, 316, 318, 323, | |
279 | 327, 328, 333, 338, 342, 343, 347, 352, 353, 357, | |
280 | 361, 365, 369, 373, 374, 378, 382, 383, 387, 392, | |
281 | 393, 397, 398, 402 | |
8e37b772 | 282 | }; |
283 | #endif | |
284 | ||
285 | ||
3e7d9038 | 286 | #if (YYDEBUG) || defined YYERROR_VERBOSE |
287 | ||
288 | /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ | |
289 | static const char *const yytname[] = | |
290 | { | |
291 | "$", "error", "$undefined.", "MT_BADTOK", "MT_END", "MT_STATE", | |
292 | "MT_GLOBAL", "MT_CONTEXT", "MT_ONEOF", "MT_DEFAULTS", "MT_DEFAULT", | |
293 | "MT_REFERENCE", "MT_PARAMETER", "MT_RESULT", "MT_CLAUSE", "MT_LITERAL", | |
294 | "MT_NULL", "MT_ANNOTATIONS", "MT_ARROW", "MT_MERGE", "MT_TRANSFERS", | |
295 | "MT_PRECONDITIONS", "MT_POSTCONDITIONS", "MT_LOSEREFERENCE", "MT_AS", | |
296 | "MT_ERROR", "MT_PLUS", "MT_STAR", "MT_BAR", "MT_LPAREN", "MT_RPAREN", | |
297 | "MT_LBRACKET", "MT_RBRACKET", "MT_LBRACE", "MT_RBRACE", "MT_COMMA", | |
298 | "MT_CHAR", "MT_INT", "MT_FLOAT", "MT_DOUBLE", "MT_VOID", "MT_ANYTYPE", | |
299 | "MT_INTEGRALTYPE", "MT_UNSIGNEDINTEGRALTYPE", "MT_SIGNEDINTEGRALTYPE", | |
300 | "MT_CONST", "MT_VOLATILE", "MT_RESTRICT", "MT_STRINGLIT", "MT_IDENT", | |
301 | "file", "mtsDeclaration", "declarationNode", "declarationPieces", | |
302 | "declarationPiece", "contextDeclaration", "optContextSelection", | |
303 | "contextSelection", "optType", "typeExpression", "completeType", | |
304 | "completeTypeAux", "optCompleteType", "abstractDecl", "pointers", | |
305 | "innerMods", "innerModsList", "abstractDeclBase", "typeSpecifier", | |
306 | "typeName", "valuesDeclaration", "valuesList", "defaultNode", | |
307 | "defaultsDeclaration", "defaultDeclarationList", | |
308 | "annotationsDeclaration", "annotationsDeclarationList", | |
309 | "annotationDeclaration", "mergeDeclaration", "mergeClauses", | |
310 | "mergeClause", "mergeItem", "preconditionsDeclaration", | |
311 | "postconditionsDeclaration", "transfersDeclaration", | |
312 | "loseReferenceDeclaration", "lostClauses", "lostClause", | |
313 | "transferClauses", "transferClause", "transferAction", "errorAction", | |
314 | "valueChoice", 0 | |
8e37b772 | 315 | }; |
316 | #endif | |
317 | ||
3e7d9038 | 318 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
319 | static const short yyr1[] = | |
320 | { | |
321 | 0, 50, 50, 51, 51, 52, 53, 53, 54, 54, | |
322 | 54, 54, 54, 54, 54, 54, 54, 54, 55, 56, | |
323 | 56, 57, 57, 57, 57, 57, 57, 58, 58, 59, | |
324 | 59, 60, 60, 61, 62, 62, 63, 63, 63, 64, | |
325 | 64, 64, 64, 65, 65, 65, 66, 66, 67, 67, | |
326 | 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, | |
327 | 68, 69, 70, 71, 71, 72, 73, 74, 74, 75, | |
328 | 76, 76, 77, 78, 79, 79, 80, 81, 81, 82, | |
329 | 83, 84, 85, 86, 86, 87, 88, 88, 89, 90, | |
330 | 90, 91, 91, 92 | |
8e37b772 | 331 | }; |
332 | ||
3e7d9038 | 333 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
334 | static const short yyr2[] = | |
335 | { | |
336 | 0, 0, 1, 3, 4, 2, 0, 2, 1, 1, | |
337 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, | |
338 | 1, 2, 2, 2, 2, 2, 2, 0, 1, 1, | |
339 | 2, 1, 3, 2, 0, 1, 1, 1, 2, 1, | |
340 | 2, 2, 3, 1, 1, 1, 1, 2, 3, 2, | |
341 | 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
342 | 1, 1, 2, 1, 3, 2, 2, 3, 4, 2, | |
343 | 1, 2, 4, 2, 1, 2, 5, 1, 1, 2, | |
344 | 2, 2, 2, 1, 2, 3, 1, 2, 5, 1, | |
345 | 1, 1, 2, 1 | |
8e37b772 | 346 | }; |
347 | ||
3e7d9038 | 348 | /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE |
349 | doesn't specify something else to do. Zero means the default is an | |
350 | error. */ | |
351 | static const short yydefact[] = | |
352 | { | |
353 | 1, 0, 0, 2, 6, 0, 0, 0, 0, 0, | |
354 | 0, 0, 0, 0, 0, 0, 0, 5, 6, 8, | |
355 | 9, 11, 10, 12, 13, 15, 16, 14, 17, 3, | |
356 | 0, 27, 27, 27, 27, 27, 27, 18, 63, 62, | |
357 | 0, 66, 93, 65, 19, 69, 70, 78, 73, 74, | |
358 | 0, 77, 81, 86, 0, 79, 80, 82, 83, 0, | |
359 | 7, 4, 51, 52, 53, 54, 55, 56, 57, 58, | |
360 | 59, 61, 22, 28, 29, 31, 34, 60, 21, 23, | |
361 | 24, 25, 26, 0, 0, 0, 20, 71, 75, 0, | |
362 | 87, 0, 84, 0, 39, 0, 0, 0, 30, 36, | |
363 | 37, 35, 33, 64, 67, 0, 0, 0, 91, 85, | |
364 | 43, 44, 45, 41, 46, 40, 32, 0, 49, 38, | |
365 | 0, 68, 72, 0, 0, 92, 42, 47, 48, 50, | |
366 | 76, 90, 89, 88, 0, 0, 0 | |
8e37b772 | 367 | }; |
368 | ||
3e7d9038 | 369 | static const short yydefgoto[] = |
370 | { | |
371 | 134, 3, 5, 17, 18, 19, 85, 40, 72, 73, | |
372 | 74, 75, 102, 98, 99, 114, 115, 100, 76, 77, | |
373 | 20, 39, 21, 22, 41, 23, 45, 46, 24, 48, | |
374 | 49, 50, 25, 26, 27, 28, 57, 58, 52, 53, | |
375 | 130, 131, 54 | |
8e37b772 | 376 | }; |
377 | ||
3e7d9038 | 378 | static const short yypact[] = |
379 | { | |
380 | 21, -29, 30,-32768, 2, 33, -29, 52, -9, 52, | |
381 | -8, -3, -19, -8, -8, -8, -8,-32768, 2,-32768, | |
382 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, | |
383 | 54, 13, 13, 13, 13, 13, 13,-32768, 24,-32768, | |
384 | 43,-32768,-32768,-32768, 52,-32768, -3,-32768,-32768, -19, | |
385 | 34,-32768,-32768, -8, 46,-32768,-32768,-32768, -8, 57, | |
386 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, | |
387 | -32768,-32768,-32768,-32768, 16,-32768, 13,-32768,-32768,-32768, | |
388 | -32768,-32768,-32768, -9, -8, 58,-32768,-32768,-32768, -19, | |
389 | -32768, -8,-32768, 47, -14, 13, 42, 45,-32768, 5, | |
390 | 49, 50,-32768,-32768, 52, -8, 64, 65, 36,-32768, | |
391 | -32768,-32768,-32768,-32768,-32768, -14,-32768, 55,-32768, 49, | |
392 | 56,-32768,-32768, -20, -20,-32768,-32768,-32768,-32768,-32768, | |
393 | -32768,-32768,-32768,-32768, 86, 87,-32768 | |
8e37b772 | 394 | }; |
395 | ||
3e7d9038 | 396 | static const short yypgoto[] = |
397 | { | |
398 | -32768,-32768, 83, 72,-32768,-32768,-32768, -6, -18, -4, | |
399 | 17,-32768,-32768, -2, -87, -23,-32768, -1,-32768,-32768, | |
400 | -32768, 14,-32768,-32768, -5,-32768, 59,-32768,-32768, 51, | |
401 | -32768, 7,-32768,-32768,-32768,-32768, 44,-32768, -11,-32768, | |
402 | -21, 8, -10 | |
8e37b772 | 403 | }; |
404 | ||
405 | ||
f9264521 | 406 | #define YYLAST 114 |
8e37b772 | 407 | |
408 | ||
3e7d9038 | 409 | static const short yytable[] = |
410 | { | |
411 | 43, 37, 51, 55, 56, 108, 59, 113, 47, 7, | |
412 | 8, 9, 10, 94, 78, 79, 80, 81, 82, 11, | |
413 | 4, 12, 13, 14, 15, 16, 1, 2, 126, 42, | |
414 | 42, 110, 111, 112, 96, 6, 97, 29, 86, 51, | |
415 | 38, 42, 90, 94, 95, 96, 44, 97, 59, 62, | |
416 | 63, 64, 65, 66, 67, 68, 69, 70, 61, 83, | |
417 | 89, 84, 71, 31, 32, 33, 34, 35, 36, 94, | |
418 | 91, 96, 108, 97, 104, 93, 105, 118, 95, 51, | |
419 | 120, 107, 123, 124, 125, 128, 135, 136, 129, 30, | |
420 | 60, 116, 127, 101, 117, 122, 106, 103, 119, 121, | |
421 | 88, 109, 92, 133, 0, 87, 0, 0, 0, 0, | |
422 | 0, 0, 0, 132, 132 | |
8e37b772 | 423 | }; |
424 | ||
3e7d9038 | 425 | static const short yycheck[] = |
426 | { | |
427 | 10, 7, 12, 14, 15, 25, 16, 94, 27, 7, | |
428 | 8, 9, 10, 27, 32, 33, 34, 35, 36, 17, | |
429 | 49, 19, 20, 21, 22, 23, 5, 6, 115, 49, | |
430 | 49, 45, 46, 47, 29, 5, 31, 4, 44, 49, | |
431 | 49, 49, 53, 27, 28, 29, 49, 31, 58, 36, | |
432 | 37, 38, 39, 40, 41, 42, 43, 44, 4, 35, | |
433 | 26, 18, 49, 11, 12, 13, 14, 15, 16, 27, | |
434 | 24, 29, 25, 31, 84, 18, 18, 32, 28, 89, | |
435 | 31, 91, 18, 18, 48, 30, 0, 0, 32, 6, | |
436 | 18, 95, 115, 76, 96, 105, 89, 83, 99, 104, | |
437 | 49, 93, 58, 124, -1, 46, -1, -1, -1, -1, | |
438 | -1, -1, -1, 123, 124 | |
8e37b772 | 439 | }; |
440 | #define YYPURE 1 | |
441 | ||
442 | /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ | |
3e3ec469 | 443 | |
8e37b772 | 444 | /* Skeleton output parser for bison, |
3e7d9038 | 445 | |
446 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software | |
447 | Foundation, Inc. | |
8e37b772 | 448 | |
449 | This program is free software; you can redistribute it and/or modify | |
450 | it under the terms of the GNU General Public License as published by | |
451 | the Free Software Foundation; either version 2, or (at your option) | |
452 | any later version. | |
453 | ||
454 | This program is distributed in the hope that it will be useful, | |
455 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
456 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
457 | GNU General Public License for more details. | |
458 | ||
459 | You should have received a copy of the GNU General Public License | |
460 | along with this program; if not, write to the Free Software | |
461 | Foundation, Inc., 59 Temple Place - Suite 330, | |
462 | Boston, MA 02111-1307, USA. */ | |
463 | ||
464 | /* As a special exception, when this file is copied by Bison into a | |
465 | Bison output file, you may use that output file without restriction. | |
466 | This special exception was added by the Free Software Foundation | |
467 | in version 1.24 of Bison. */ | |
468 | ||
3e7d9038 | 469 | /* This is the parser code that is written into each bison parser when |
470 | the %semantic_parser declaration is not specified in the grammar. | |
471 | It was written by Richard Stallman by simplifying the hairy parser | |
472 | used when %semantic_parser is specified. */ | |
473 | ||
474 | /* All symbols defined below should begin with yy or YY, to avoid | |
475 | infringing on user name space. This should be done even for local | |
476 | variables, as they might otherwise be expanded by user macros. | |
477 | There are some unavoidable exceptions within include files to | |
478 | define necessary library symbols; they are noted "INFRINGES ON | |
479 | USER NAME SPACE" below. */ | |
480 | ||
481 | #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) | |
482 | ||
483 | /* The parser invokes alloca or malloc; define the necessary symbols. */ | |
484 | ||
485 | # if YYSTACK_USE_ALLOCA | |
486 | # define YYSTACK_ALLOC alloca | |
487 | # else | |
488 | # ifndef YYSTACK_USE_ALLOCA | |
489 | # if defined (alloca) || defined (_ALLOCA_H) | |
490 | # define YYSTACK_ALLOC alloca | |
491 | # else | |
492 | # ifdef __GNUC__ | |
493 | # define YYSTACK_ALLOC __builtin_alloca | |
494 | # endif | |
495 | # endif | |
496 | # endif | |
497 | # endif | |
498 | ||
499 | # ifdef YYSTACK_ALLOC | |
500 | /* Pacify GCC's `empty if-body' warning. */ | |
501 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) | |
502 | # else | |
503 | # if defined (__STDC__) || defined (__cplusplus) | |
504 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
505 | # define YYSIZE_T size_t | |
506 | # endif | |
507 | # define YYSTACK_ALLOC malloc | |
508 | # define YYSTACK_FREE free | |
509 | # endif | |
510 | #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ | |
511 | ||
512 | ||
513 | #if (! defined (yyoverflow) \ | |
514 | && (! defined (__cplusplus) \ | |
515 | || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | |
516 | ||
517 | /* A type that is properly aligned for any stack member. */ | |
518 | union yyalloc | |
519 | { | |
520 | short yyss; | |
521 | YYSTYPE yyvs; | |
522 | # if YYLSP_NEEDED | |
523 | YYLTYPE yyls; | |
524 | # endif | |
525 | }; | |
526 | ||
527 | /* The size of the maximum gap between one aligned stack and the next. */ | |
528 | # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) | |
529 | ||
530 | /* The size of an array large to enough to hold all stacks, each with | |
531 | N elements. */ | |
532 | # if YYLSP_NEEDED | |
533 | # define YYSTACK_BYTES(N) \ | |
534 | ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ | |
535 | + 2 * YYSTACK_GAP_MAX) | |
536 | # else | |
537 | # define YYSTACK_BYTES(N) \ | |
538 | ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ | |
539 | + YYSTACK_GAP_MAX) | |
540 | # endif | |
541 | ||
542 | /* Copy COUNT objects from FROM to TO. The source and destination do | |
543 | not overlap. */ | |
544 | # ifndef YYCOPY | |
545 | # if 1 < __GNUC__ | |
546 | # define YYCOPY(To, From, Count) \ | |
547 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | |
548 | # else | |
549 | # define YYCOPY(To, From, Count) \ | |
550 | do \ | |
551 | { \ | |
552 | register YYSIZE_T yyi; \ | |
553 | for (yyi = 0; yyi < (Count); yyi++) \ | |
554 | (To)[yyi] = (From)[yyi]; \ | |
555 | } \ | |
556 | while (0) | |
557 | # endif | |
558 | # endif | |
559 | ||
560 | /* Relocate STACK from its old location to the new one. The | |
561 | local variables YYSIZE and YYSTACKSIZE give the old and new number of | |
562 | elements in the stack, and YYPTR gives the new location of the | |
563 | stack. Advance YYPTR to a properly aligned location for the next | |
564 | stack. */ | |
565 | # define YYSTACK_RELOCATE(Stack) \ | |
566 | do \ | |
567 | { \ | |
568 | YYSIZE_T yynewbytes; \ | |
569 | YYCOPY (&yyptr->Stack, Stack, yysize); \ | |
570 | Stack = &yyptr->Stack; \ | |
571 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ | |
572 | yyptr += yynewbytes / sizeof (*yyptr); \ | |
573 | } \ | |
574 | while (0) | |
8e37b772 | 575 | |
e8b84478 | 576 | #endif |
3e7d9038 | 577 | |
578 | ||
579 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) | |
580 | # define YYSIZE_T __SIZE_TYPE__ | |
8e37b772 | 581 | #endif |
3e7d9038 | 582 | #if ! defined (YYSIZE_T) && defined (size_t) |
583 | # define YYSIZE_T size_t | |
584 | #endif | |
585 | #if ! defined (YYSIZE_T) | |
586 | # if defined (__STDC__) || defined (__cplusplus) | |
587 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | |
588 | # define YYSIZE_T size_t | |
589 | # endif | |
590 | #endif | |
591 | #if ! defined (YYSIZE_T) | |
592 | # define YYSIZE_T unsigned int | |
e55c0c6d | 593 | #endif |
e8b84478 | 594 | |
8e37b772 | 595 | #define yyerrok (yyerrstatus = 0) |
596 | #define yyclearin (yychar = YYEMPTY) | |
597 | #define YYEMPTY -2 | |
598 | #define YYEOF 0 | |
599 | #define YYACCEPT goto yyacceptlab | |
600 | #define YYABORT goto yyabortlab | |
601 | #define YYERROR goto yyerrlab1 | |
3e7d9038 | 602 | /* Like YYERROR except do call yyerror. This remains here temporarily |
603 | to ease the transition to the new meaning of YYERROR, for GCC. | |
8e37b772 | 604 | Once GCC version 2 has supplanted version 1, this can go. */ |
605 | #define YYFAIL goto yyerrlab | |
606 | #define YYRECOVERING() (!!yyerrstatus) | |
3e7d9038 | 607 | #define YYBACKUP(Token, Value) \ |
8e37b772 | 608 | do \ |
609 | if (yychar == YYEMPTY && yylen == 1) \ | |
3e7d9038 | 610 | { \ |
611 | yychar = (Token); \ | |
612 | yylval = (Value); \ | |
8e37b772 | 613 | yychar1 = YYTRANSLATE (yychar); \ |
614 | YYPOPSTACK; \ | |
615 | goto yybackup; \ | |
616 | } \ | |
617 | else \ | |
3e7d9038 | 618 | { \ |
619 | yyerror ("syntax error: cannot back up"); \ | |
620 | YYERROR; \ | |
621 | } \ | |
8e37b772 | 622 | while (0) |
623 | ||
624 | #define YYTERROR 1 | |
625 | #define YYERRCODE 256 | |
626 | ||
e8b84478 | 627 | |
3e7d9038 | 628 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions |
629 | are run). | |
8e37b772 | 630 | |
3e7d9038 | 631 | When YYLLOC_DEFAULT is run, CURRENT is set the location of the |
632 | first token. By default, to implement support for ranges, extend | |
633 | its range to the last symbol. */ | |
8e37b772 | 634 | |
3e7d9038 | 635 | #ifndef YYLLOC_DEFAULT |
636 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ | |
637 | Current.last_line = Rhs[N].last_line; \ | |
638 | Current.last_column = Rhs[N].last_column; | |
8e37b772 | 639 | #endif |
640 | ||
e8b84478 | 641 | |
3e7d9038 | 642 | /* YYLEX -- calling `yylex' with the right arguments. */ |
643 | ||
644 | #if YYPURE | |
645 | # if YYLSP_NEEDED | |
646 | # ifdef YYLEX_PARAM | |
647 | # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) | |
648 | # else | |
649 | # define YYLEX yylex (&yylval, &yylloc) | |
650 | # endif | |
651 | # else /* !YYLSP_NEEDED */ | |
652 | # ifdef YYLEX_PARAM | |
653 | # define YYLEX yylex (&yylval, YYLEX_PARAM) | |
654 | # else | |
655 | # define YYLEX yylex (&yylval) | |
656 | # endif | |
657 | # endif /* !YYLSP_NEEDED */ | |
658 | #else /* !YYPURE */ | |
659 | # define YYLEX yylex () | |
660 | #endif /* !YYPURE */ | |
661 | ||
662 | ||
663 | /* Enable debugging if requested. */ | |
664 | #if YYDEBUG | |
665 | ||
666 | # ifndef YYFPRINTF | |
667 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ | |
668 | # define YYFPRINTF fprintf | |
669 | # endif | |
8e37b772 | 670 | |
3e7d9038 | 671 | # define YYDPRINTF(Args) \ |
672 | do { \ | |
673 | if (yydebug) \ | |
674 | YYFPRINTF Args; \ | |
675 | } while (0) | |
676 | /* Nonzero means print parse trace. It is left uninitialized so that | |
677 | multiple parsers can coexist. */ | |
678 | int yydebug; | |
679 | #else /* !YYDEBUG */ | |
680 | # define YYDPRINTF(Args) | |
681 | #endif /* !YYDEBUG */ | |
682 | ||
683 | /* YYINITDEPTH -- initial size of the parser's stacks. */ | |
8e37b772 | 684 | #ifndef YYINITDEPTH |
3e7d9038 | 685 | # define YYINITDEPTH 200 |
8e37b772 | 686 | #endif |
687 | ||
3e7d9038 | 688 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
689 | if the built-in stack extension method is used). | |
690 | ||
691 | Do not make this value too large; the results are undefined if | |
692 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) | |
693 | evaluated with infinite-precision integer arithmetic. */ | |
e8b84478 | 694 | |
8e37b772 | 695 | #if YYMAXDEPTH == 0 |
3e7d9038 | 696 | # undef YYMAXDEPTH |
8e37b772 | 697 | #endif |
698 | ||
699 | #ifndef YYMAXDEPTH | |
3e7d9038 | 700 | # define YYMAXDEPTH 10000 |
8e37b772 | 701 | #endif |
702 | \f | |
3e7d9038 | 703 | #ifdef YYERROR_VERBOSE |
704 | ||
705 | # ifndef yystrlen | |
706 | # if defined (__GLIBC__) && defined (_STRING_H) | |
707 | # define yystrlen strlen | |
708 | # else | |
709 | /* Return the length of YYSTR. */ | |
710 | static YYSIZE_T | |
711 | # if defined (__STDC__) || defined (__cplusplus) | |
712 | yystrlen (const char *yystr) | |
713 | # else | |
714 | yystrlen (yystr) | |
715 | const char *yystr; | |
716 | # endif | |
8e37b772 | 717 | { |
3e7d9038 | 718 | register const char *yys = yystr; |
8e37b772 | 719 | |
3e7d9038 | 720 | while (*yys++ != '\0') |
721 | continue; | |
8e37b772 | 722 | |
3e7d9038 | 723 | return yys - yystr - 1; |
724 | } | |
725 | # endif | |
726 | # endif | |
e8b84478 | 727 | |
3e7d9038 | 728 | # ifndef yystpcpy |
729 | # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) | |
730 | # define yystpcpy stpcpy | |
731 | # else | |
732 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | |
733 | YYDEST. */ | |
734 | static char * | |
735 | # if defined (__STDC__) || defined (__cplusplus) | |
736 | yystpcpy (char *yydest, const char *yysrc) | |
737 | # else | |
738 | yystpcpy (yydest, yysrc) | |
739 | char *yydest; | |
740 | const char *yysrc; | |
741 | # endif | |
e8b84478 | 742 | { |
3e7d9038 | 743 | register char *yyd = yydest; |
744 | register const char *yys = yysrc; | |
e8b84478 | 745 | |
3e7d9038 | 746 | while ((*yyd++ = *yys++) != '\0') |
747 | continue; | |
e8b84478 | 748 | |
3e7d9038 | 749 | return yyd - 1; |
750 | } | |
751 | # endif | |
752 | # endif | |
8e37b772 | 753 | #endif |
754 | \f | |
3e3ec469 | 755 | |
8e37b772 | 756 | |
757 | /* The user can define YYPARSE_PARAM as the name of an argument to be passed | |
758 | into yyparse. The argument should have type void *. | |
759 | It should actually point to an object. | |
760 | Grammar actions can access the variable by casting it | |
761 | to the proper pointer type. */ | |
762 | ||
763 | #ifdef YYPARSE_PARAM | |
3e7d9038 | 764 | # if defined (__STDC__) || defined (__cplusplus) |
765 | # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM | |
766 | # define YYPARSE_PARAM_DECL | |
767 | # else | |
768 | # define YYPARSE_PARAM_ARG YYPARSE_PARAM | |
769 | # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; | |
770 | # endif | |
771 | #else /* !YYPARSE_PARAM */ | |
772 | # define YYPARSE_PARAM_ARG | |
773 | # define YYPARSE_PARAM_DECL | |
774 | #endif /* !YYPARSE_PARAM */ | |
8e37b772 | 775 | |
776 | /* Prevent warning if -Wstrict-prototypes. */ | |
777 | #ifdef __GNUC__ | |
3e7d9038 | 778 | # ifdef YYPARSE_PARAM |
8e37b772 | 779 | int yyparse (void *); |
3e7d9038 | 780 | # else |
8e37b772 | 781 | int yyparse (void); |
3e7d9038 | 782 | # endif |
8e37b772 | 783 | #endif |
3e7d9038 | 784 | |
785 | /* YY_DECL_VARIABLES -- depending whether we use a pure parser, | |
786 | variables are global, or local to YYPARSE. */ | |
787 | ||
788 | #define YY_DECL_NON_LSP_VARIABLES \ | |
789 | /* The lookahead symbol. */ \ | |
790 | int yychar; \ | |
791 | \ | |
792 | /* The semantic value of the lookahead symbol. */ \ | |
793 | YYSTYPE yylval; \ | |
794 | \ | |
795 | /* Number of parse errors so far. */ \ | |
796 | int yynerrs; | |
797 | ||
798 | #if YYLSP_NEEDED | |
799 | # define YY_DECL_VARIABLES \ | |
800 | YY_DECL_NON_LSP_VARIABLES \ | |
801 | \ | |
802 | /* Location data for the lookahead symbol. */ \ | |
803 | YYLTYPE yylloc; | |
804 | #else | |
805 | # define YY_DECL_VARIABLES \ | |
806 | YY_DECL_NON_LSP_VARIABLES | |
8e37b772 | 807 | #endif |
808 | ||
3e7d9038 | 809 | |
810 | /* If nonreentrant, generate the variables here. */ | |
811 | ||
812 | #if !YYPURE | |
813 | YY_DECL_VARIABLES | |
814 | #endif /* !YYPURE */ | |
815 | ||
8e37b772 | 816 | int |
3e7d9038 | 817 | yyparse (YYPARSE_PARAM_ARG) |
8e37b772 | 818 | YYPARSE_PARAM_DECL |
819 | { | |
3e7d9038 | 820 | /* If reentrant, generate the variables here. */ |
821 | #if YYPURE | |
822 | YY_DECL_VARIABLES | |
823 | #endif /* !YYPURE */ | |
824 | ||
8e37b772 | 825 | register int yystate; |
826 | register int yyn; | |
3e7d9038 | 827 | int yyresult; |
828 | /* Number of tokens to shift before error messages enabled. */ | |
829 | int yyerrstatus; | |
830 | /* Lookahead token as an internal (translated) token number. */ | |
831 | int yychar1 = 0; | |
832 | ||
833 | /* Three stacks and their tools: | |
834 | `yyss': related to states, | |
835 | `yyvs': related to semantic values, | |
836 | `yyls': related to locations. | |
837 | ||
838 | Refer to the stacks thru separate pointers, to allow yyoverflow | |
839 | to reallocate them elsewhere. */ | |
840 | ||
841 | /* The state stack. */ | |
842 | short yyssa[YYINITDEPTH]; | |
843 | short *yyss = yyssa; | |
8e37b772 | 844 | register short *yyssp; |
8e37b772 | 845 | |
3e7d9038 | 846 | /* The semantic value stack. */ |
847 | YYSTYPE yyvsa[YYINITDEPTH]; | |
848 | YYSTYPE *yyvs = yyvsa; | |
849 | register YYSTYPE *yyvsp; | |
e8b84478 | 850 | |
3e7d9038 | 851 | #if YYLSP_NEEDED |
852 | /* The location stack. */ | |
853 | YYLTYPE yylsa[YYINITDEPTH]; | |
8e37b772 | 854 | YYLTYPE *yyls = yylsa; |
855 | YYLTYPE *yylsp; | |
3e7d9038 | 856 | #endif |
8e37b772 | 857 | |
3e7d9038 | 858 | #if YYLSP_NEEDED |
859 | # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) | |
8e37b772 | 860 | #else |
3e7d9038 | 861 | # define YYPOPSTACK (yyvsp--, yyssp--) |
8e37b772 | 862 | #endif |
863 | ||
3e7d9038 | 864 | YYSIZE_T yystacksize = YYINITDEPTH; |
8e37b772 | 865 | |
8e37b772 | 866 | |
3e7d9038 | 867 | /* The variables used to return semantic value and location from the |
868 | action routines. */ | |
869 | YYSTYPE yyval; | |
870 | #if YYLSP_NEEDED | |
871 | YYLTYPE yyloc; | |
872 | #endif | |
8e37b772 | 873 | |
3e7d9038 | 874 | /* When reducing, the number of symbols on the RHS of the reduced |
875 | rule. */ | |
8e37b772 | 876 | int yylen; |
877 | ||
3e7d9038 | 878 | YYDPRINTF ((stderr, "Starting parse\n")); |
8e37b772 | 879 | |
880 | yystate = 0; | |
881 | yyerrstatus = 0; | |
882 | yynerrs = 0; | |
883 | yychar = YYEMPTY; /* Cause a token to be read. */ | |
884 | ||
885 | /* Initialize stack pointers. | |
886 | Waste one element of value and location stack | |
887 | so that they stay on the same level as the state stack. | |
888 | The wasted elements are never initialized. */ | |
889 | ||
3e7d9038 | 890 | yyssp = yyss; |
8e37b772 | 891 | yyvsp = yyvs; |
3e7d9038 | 892 | #if YYLSP_NEEDED |
8e37b772 | 893 | yylsp = yyls; |
894 | #endif | |
3e7d9038 | 895 | goto yysetstate; |
8e37b772 | 896 | |
3e7d9038 | 897 | /*------------------------------------------------------------. |
898 | | yynewstate -- Push a new state, which is found in yystate. | | |
899 | `------------------------------------------------------------*/ | |
900 | yynewstate: | |
901 | /* In all cases, when you get here, the value and location stacks | |
902 | have just been pushed. so pushing a state here evens the stacks. | |
903 | */ | |
904 | yyssp++; | |
8e37b772 | 905 | |
3e7d9038 | 906 | yysetstate: |
907 | *yyssp = yystate; | |
8e37b772 | 908 | |
909 | if (yyssp >= yyss + yystacksize - 1) | |
910 | { | |
8e37b772 | 911 | /* Get the current used size of the three stacks, in elements. */ |
3e7d9038 | 912 | YYSIZE_T yysize = yyssp - yyss + 1; |
8e37b772 | 913 | |
914 | #ifdef yyoverflow | |
3e7d9038 | 915 | { |
916 | /* Give user a chance to reallocate the stack. Use copies of | |
917 | these so that the &'s don't force the real ones into | |
918 | memory. */ | |
919 | YYSTYPE *yyvs1 = yyvs; | |
920 | short *yyss1 = yyss; | |
921 | ||
922 | /* Each stack pointer address is followed by the size of the | |
923 | data in use in that stack, in bytes. */ | |
924 | # if YYLSP_NEEDED | |
925 | YYLTYPE *yyls1 = yyls; | |
926 | /* This used to be a conditional around just the two extra args, | |
927 | but that might be undefined if yyoverflow is a macro. */ | |
928 | yyoverflow ("parser stack overflow", | |
929 | &yyss1, yysize * sizeof (*yyssp), | |
930 | &yyvs1, yysize * sizeof (*yyvsp), | |
931 | &yyls1, yysize * sizeof (*yylsp), | |
932 | &yystacksize); | |
933 | yyls = yyls1; | |
934 | # else | |
935 | yyoverflow ("parser stack overflow", | |
936 | &yyss1, yysize * sizeof (*yyssp), | |
937 | &yyvs1, yysize * sizeof (*yyvsp), | |
938 | &yystacksize); | |
939 | # endif | |
940 | yyss = yyss1; | |
941 | yyvs = yyvs1; | |
942 | } | |
8e37b772 | 943 | #else /* no yyoverflow */ |
3e7d9038 | 944 | # ifndef YYSTACK_RELOCATE |
945 | goto yyoverflowlab; | |
946 | # else | |
8e37b772 | 947 | /* Extend the stack our own way. */ |
948 | if (yystacksize >= YYMAXDEPTH) | |
3e7d9038 | 949 | goto yyoverflowlab; |
8e37b772 | 950 | yystacksize *= 2; |
951 | if (yystacksize > YYMAXDEPTH) | |
952 | yystacksize = YYMAXDEPTH; | |
3e7d9038 | 953 | |
954 | { | |
955 | short *yyss1 = yyss; | |
956 | union yyalloc *yyptr = | |
957 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | |
958 | if (! yyptr) | |
959 | goto yyoverflowlab; | |
960 | YYSTACK_RELOCATE (yyss); | |
961 | YYSTACK_RELOCATE (yyvs); | |
962 | # if YYLSP_NEEDED | |
963 | YYSTACK_RELOCATE (yyls); | |
964 | # endif | |
965 | # undef YYSTACK_RELOCATE | |
966 | if (yyss1 != yyssa) | |
967 | YYSTACK_FREE (yyss1); | |
968 | } | |
969 | # endif | |
8e37b772 | 970 | #endif /* no yyoverflow */ |
971 | ||
3e7d9038 | 972 | yyssp = yyss + yysize - 1; |
973 | yyvsp = yyvs + yysize - 1; | |
974 | #if YYLSP_NEEDED | |
975 | yylsp = yyls + yysize - 1; | |
8e37b772 | 976 | #endif |
977 | ||
3e7d9038 | 978 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
979 | (unsigned long int) yystacksize)); | |
8e37b772 | 980 | |
981 | if (yyssp >= yyss + yystacksize - 1) | |
982 | YYABORT; | |
983 | } | |
984 | ||
3e7d9038 | 985 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
8e37b772 | 986 | |
987 | goto yybackup; | |
3e7d9038 | 988 | |
989 | ||
990 | /*-----------. | |
991 | | yybackup. | | |
992 | `-----------*/ | |
993 | yybackup: | |
8e37b772 | 994 | |
995 | /* Do appropriate processing given the current state. */ | |
996 | /* Read a lookahead token if we need one and don't already have one. */ | |
997 | /* yyresume: */ | |
998 | ||
999 | /* First try to decide what to do without reference to lookahead token. */ | |
1000 | ||
1001 | yyn = yypact[yystate]; | |
1002 | if (yyn == YYFLAG) | |
1003 | goto yydefault; | |
1004 | ||
1005 | /* Not known => get a lookahead token if don't already have one. */ | |
1006 | ||
1007 | /* yychar is either YYEMPTY or YYEOF | |
1008 | or a valid token in external form. */ | |
1009 | ||
1010 | if (yychar == YYEMPTY) | |
1011 | { | |
3e7d9038 | 1012 | YYDPRINTF ((stderr, "Reading a token: ")); |
8e37b772 | 1013 | yychar = YYLEX; |
1014 | } | |
1015 | ||
1016 | /* Convert token to internal form (in yychar1) for indexing tables with */ | |
1017 | ||
1018 | if (yychar <= 0) /* This means end of input. */ | |
1019 | { | |
1020 | yychar1 = 0; | |
1021 | yychar = YYEOF; /* Don't call YYLEX any more */ | |
1022 | ||
3e7d9038 | 1023 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
8e37b772 | 1024 | } |
1025 | else | |
1026 | { | |
3e7d9038 | 1027 | yychar1 = YYTRANSLATE (yychar); |
8e37b772 | 1028 | |
3e7d9038 | 1029 | #if YYDEBUG |
1030 | /* We have to keep this `#if YYDEBUG', since we use variables | |
1031 | which are defined only if `YYDEBUG' is set. */ | |
8e37b772 | 1032 | if (yydebug) |
1033 | { | |
3e7d9038 | 1034 | YYFPRINTF (stderr, "Next token is %d (%s", |
1035 | yychar, yytname[yychar1]); | |
1036 | /* Give the individual parser a way to print the precise | |
1037 | meaning of a token, for further debugging info. */ | |
1038 | # ifdef YYPRINT | |
8e37b772 | 1039 | YYPRINT (stderr, yychar, yylval); |
3e7d9038 | 1040 | # endif |
1041 | YYFPRINTF (stderr, ")\n"); | |
8e37b772 | 1042 | } |
1043 | #endif | |
1044 | } | |
1045 | ||
1046 | yyn += yychar1; | |
1047 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) | |
1048 | goto yydefault; | |
1049 | ||
1050 | yyn = yytable[yyn]; | |
1051 | ||
1052 | /* yyn is what to do for this token type in this state. | |
1053 | Negative => reduce, -yyn is rule number. | |
1054 | Positive => shift, yyn is new state. | |
1055 | New state is final state => don't bother to shift, | |
1056 | just return success. | |
1057 | 0, or most negative number => error. */ | |
1058 | ||
1059 | if (yyn < 0) | |
1060 | { | |
1061 | if (yyn == YYFLAG) | |
1062 | goto yyerrlab; | |
1063 | yyn = -yyn; | |
1064 | goto yyreduce; | |
1065 | } | |
1066 | else if (yyn == 0) | |
1067 | goto yyerrlab; | |
1068 | ||
1069 | if (yyn == YYFINAL) | |
1070 | YYACCEPT; | |
1071 | ||
1072 | /* Shift the lookahead token. */ | |
3e7d9038 | 1073 | YYDPRINTF ((stderr, "Shifting token %d (%s), ", |
1074 | yychar, yytname[yychar1])); | |
8e37b772 | 1075 | |
1076 | /* Discard the token being shifted unless it is eof. */ | |
1077 | if (yychar != YYEOF) | |
1078 | yychar = YYEMPTY; | |
1079 | ||
1080 | *++yyvsp = yylval; | |
3e7d9038 | 1081 | #if YYLSP_NEEDED |
8e37b772 | 1082 | *++yylsp = yylloc; |
1083 | #endif | |
1084 | ||
3e7d9038 | 1085 | /* Count tokens shifted since error; after three, turn off error |
1086 | status. */ | |
1087 | if (yyerrstatus) | |
1088 | yyerrstatus--; | |
8e37b772 | 1089 | |
1090 | yystate = yyn; | |
1091 | goto yynewstate; | |
1092 | ||
e8b84478 | 1093 | |
3e7d9038 | 1094 | /*-----------------------------------------------------------. |
1095 | | yydefault -- do the default action for the current state. | | |
1096 | `-----------------------------------------------------------*/ | |
1097 | yydefault: | |
8e37b772 | 1098 | yyn = yydefact[yystate]; |
1099 | if (yyn == 0) | |
1100 | goto yyerrlab; | |
3e7d9038 | 1101 | goto yyreduce; |
1102 | ||
8e37b772 | 1103 | |
3e7d9038 | 1104 | /*-----------------------------. |
1105 | | yyreduce -- Do a reduction. | | |
1106 | `-----------------------------*/ | |
8e37b772 | 1107 | yyreduce: |
3e7d9038 | 1108 | /* yyn is the number of a rule to reduce with. */ |
8e37b772 | 1109 | yylen = yyr2[yyn]; |
8e37b772 | 1110 | |
3e7d9038 | 1111 | /* If YYLEN is nonzero, implement the default value of the action: |
1112 | `$$ = $1'. | |
1113 | ||
1114 | Otherwise, the following line sets YYVAL to the semantic value of | |
1115 | the lookahead token. This behavior is undocumented and Bison | |
1116 | users should not rely upon it. Assigning to YYVAL | |
1117 | unconditionally makes the parser a bit smaller, and it avoids a | |
1118 | GCC warning that YYVAL may be used uninitialized. */ | |
1119 | yyval = yyvsp[1-yylen]; | |
1120 | ||
1121 | #if YYLSP_NEEDED | |
1122 | /* Similarly for the default location. Let the user run additional | |
1123 | commands if for instance locations are ranges. */ | |
1124 | yyloc = yylsp[1-yylen]; | |
1125 | YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); | |
1126 | #endif | |
1127 | ||
1128 | #if YYDEBUG | |
1129 | /* We have to keep this `#if YYDEBUG', since we use variables which | |
1130 | are defined only if `YYDEBUG' is set. */ | |
8e37b772 | 1131 | if (yydebug) |
1132 | { | |
3e7d9038 | 1133 | int yyi; |
8e37b772 | 1134 | |
3e7d9038 | 1135 | YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", |
1136 | yyn, yyrline[yyn]); | |
8e37b772 | 1137 | |
1138 | /* Print the symbols being reduced, and their result. */ | |
3e7d9038 | 1139 | for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) |
1140 | YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); | |
1141 | YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); | |
8e37b772 | 1142 | } |
1143 | #endif | |
1144 | ||
8e37b772 | 1145 | switch (yyn) { |
1146 | ||
1147 | case 1: | |
8e37b772 | 1148 | {; |
1149 | break;} | |
1150 | case 2: | |
8e37b772 | 1151 | {; |
1152 | break;} | |
1153 | case 3: | |
8e37b772 | 1154 | { mtreader_processDeclaration (yyvsp[-1].mtdecl); ; |
1155 | break;} | |
1156 | case 4: | |
8e37b772 | 1157 | { mtreader_processGlobalDeclaration (yyvsp[-1].mtdecl); ; |
1158 | break;} | |
1159 | case 5: | |
8e37b772 | 1160 | { yyval.mtdecl = mtDeclarationNode_create (yyvsp[-1].tok, yyvsp[0].mtpieces); ; |
1161 | break;} | |
1162 | case 6: | |
8e37b772 | 1163 | { yyval.mtpieces = mtDeclarationPieces_create (); ; |
1164 | break;} | |
1165 | case 7: | |
8e37b772 | 1166 | { yyval.mtpieces = mtDeclarationPieces_append (yyvsp[0].mtpieces, yyvsp[-1].mtpiece); ; |
1167 | break;} | |
1168 | case 8: | |
8e37b772 | 1169 | { yyval.mtpiece = mtDeclarationPiece_createContext (yyvsp[0].mtcontext); ; |
1170 | break;} | |
1171 | case 9: | |
8e37b772 | 1172 | { yyval.mtpiece = mtDeclarationPiece_createValues (yyvsp[0].mtvalues); ; |
1173 | break;} | |
1174 | case 10: | |
8e37b772 | 1175 | { yyval.mtpiece = mtDeclarationPiece_createDefaults (yyvsp[0].mtdefaults); ; |
1176 | break;} | |
1177 | case 11: | |
8e37b772 | 1178 | { yyval.mtpiece = mtDeclarationPiece_createValueDefault (yyvsp[0].tok); ; |
1179 | break;} | |
1180 | case 12: | |
8e37b772 | 1181 | { yyval.mtpiece = mtDeclarationPiece_createAnnotations (yyvsp[0].mtannotations); ; |
1182 | break;} | |
1183 | case 13: | |
8e37b772 | 1184 | { yyval.mtpiece = mtDeclarationPiece_createMerge (yyvsp[0].mtmerge); ; |
1185 | break;} | |
1186 | case 14: | |
8e37b772 | 1187 | { yyval.mtpiece = mtDeclarationPiece_createTransfers (yyvsp[0].mttransferclauselist); ; |
1188 | break;} | |
1189 | case 15: | |
8e37b772 | 1190 | { yyval.mtpiece = mtDeclarationPiece_createPreconditions (yyvsp[0].mttransferclauselist); ; |
1191 | break;} | |
1192 | case 16: | |
8e37b772 | 1193 | { yyval.mtpiece = mtDeclarationPiece_createPostconditions (yyvsp[0].mttransferclauselist); ; |
1194 | break;} | |
1195 | case 17: | |
8e37b772 | 1196 | { yyval.mtpiece = mtDeclarationPiece_createLosers (yyvsp[0].mtlosereferencelist); ; |
1197 | break;} | |
1198 | case 18: | |
8e37b772 | 1199 | { yyval.mtcontext = yyvsp[0].mtcontext; ; |
1200 | break;} | |
1201 | case 19: | |
8e37b772 | 1202 | { yyval.mtcontext = mtContextNode_createAny (); ; |
1203 | break;} | |
1204 | case 21: | |
8e37b772 | 1205 | { yyval.mtcontext = mtContextNode_createParameter (yyvsp[0].ctyp); ; |
1206 | break;} | |
1207 | case 22: | |
8e37b772 | 1208 | { yyval.mtcontext = mtContextNode_createReference (yyvsp[0].ctyp); ; |
1209 | break;} | |
1210 | case 23: | |
8e37b772 | 1211 | { yyval.mtcontext = mtContextNode_createResult (yyvsp[0].ctyp); ; |
1212 | break;} | |
1213 | case 24: | |
8e37b772 | 1214 | { yyval.mtcontext = mtContextNode_createClause (yyvsp[0].ctyp); ; |
1215 | break;} | |
1216 | case 25: | |
8e37b772 | 1217 | { yyval.mtcontext = mtContextNode_createLiteral (yyvsp[0].ctyp); ; |
1218 | break;} | |
1219 | case 26: | |
8e37b772 | 1220 | { yyval.mtcontext = mtContextNode_createNull (yyvsp[0].ctyp); ; |
1221 | break;} | |
1222 | case 27: | |
8e37b772 | 1223 | { yyval.ctyp = ctype_unknown; ; |
1224 | break;} | |
1225 | case 28: | |
8e37b772 | 1226 | { DPRINTF (("Type: %s", qtype_unparse (yyvsp[0].qtyp))); yyval.ctyp = qtype_getType (yyvsp[0].qtyp); ; |
1227 | break;} | |
1228 | case 30: | |
8e37b772 | 1229 | { yyval.qtyp = qtype_newBase (yyvsp[-1].qtyp, yyvsp[0].ctyp); ; |
1230 | break;} | |
1231 | case 31: | |
8e37b772 | 1232 | { yyval.qtyp = yyvsp[0].qtyp; ; |
1233 | break;} | |
1234 | case 32: | |
8e37b772 | 1235 | { yyval.qtyp = qtype_mergeAlt (yyvsp[-2].qtyp, yyvsp[0].qtyp); ; |
1236 | break;} | |
1237 | case 33: | |
8e37b772 | 1238 | { yyval.qtyp = qtype_combine (yyvsp[0].qtyp, yyvsp[-1].ctyp); ; |
1239 | break;} | |
1240 | case 34: | |
8e37b772 | 1241 | { yyval.qtyp = qtype_unknown (); ; |
1242 | break;} | |
1243 | case 35: | |
8e37b772 | 1244 | { yyval.qtyp = yyvsp[0].qtyp; ; |
1245 | break;} | |
1246 | case 36: | |
f9264521 | 1247 | { yyval.ctyp = ctype_adjustPointers (yyvsp[0].pointers, ctype_unknown); ; |
8e37b772 | 1248 | break;} |
1249 | case 38: | |
f9264521 | 1250 | { yyval.ctyp = ctype_adjustPointers (yyvsp[-1].pointers, yyvsp[0].ctyp); ; |
8e37b772 | 1251 | break;} |
1252 | case 39: | |
f9264521 | 1253 | { yyval.pointers = pointers_createMt (yyvsp[0].tok); ; |
8e37b772 | 1254 | break;} |
1255 | case 40: | |
f9264521 | 1256 | { yyval.pointers = pointers_createModsMt (yyvsp[-1].tok, yyvsp[0].quals); ; |
8e37b772 | 1257 | break;} |
1258 | case 41: | |
f9264521 | 1259 | { yyval.pointers = pointers_extend (pointers_createMt (yyvsp[-1].tok), yyvsp[0].pointers); ; |
8e37b772 | 1260 | break;} |
1261 | case 42: | |
f9264521 | 1262 | { yyval.pointers = pointers_extend (pointers_createModsMt (yyvsp[-2].tok, yyvsp[-1].quals), yyvsp[0].pointers); ; |
8e37b772 | 1263 | break;} |
1264 | case 43: | |
f9264521 | 1265 | { yyval.qual = qual_createConst (); ; |
8e37b772 | 1266 | break;} |
1267 | case 44: | |
f9264521 | 1268 | { yyval.qual = qual_createVolatile (); ; |
8e37b772 | 1269 | break;} |
1270 | case 45: | |
f9264521 | 1271 | { yyval.qual = qual_createRestrict (); ; |
8e37b772 | 1272 | break;} |
1273 | case 46: | |
f9264521 | 1274 | { yyval.quals = qualList_single (yyvsp[0].qual); ; |
8e37b772 | 1275 | break;} |
1276 | case 47: | |
f9264521 | 1277 | { yyval.quals = qualList_add (yyvsp[-1].quals, yyvsp[0].qual); ; |
8e37b772 | 1278 | break;} |
1279 | case 48: | |
f9264521 | 1280 | { yyval.ctyp = ctype_expectFunction (yyvsp[-1].ctyp); ; |
8e37b772 | 1281 | break;} |
1282 | case 49: | |
f9264521 | 1283 | { yyval.ctyp = ctype_makeArray (ctype_unknown); ; |
8e37b772 | 1284 | break;} |
1285 | case 50: | |
f9264521 | 1286 | { yyval.ctyp = ctype_makeArray (yyvsp[-2].ctyp); ; |
8e37b772 | 1287 | break;} |
1288 | case 51: | |
f9264521 | 1289 | { yyval.ctyp = ctype_char; ; |
8e37b772 | 1290 | break;} |
1291 | case 52: | |
f9264521 | 1292 | { yyval.ctyp = ctype_int; ; |
8e37b772 | 1293 | break;} |
1294 | case 53: | |
f9264521 | 1295 | { yyval.ctyp = ctype_float; ; |
8e37b772 | 1296 | break;} |
1297 | case 54: | |
f9264521 | 1298 | { yyval.ctyp = ctype_double; ; |
8e37b772 | 1299 | break;} |
1300 | case 55: | |
f9264521 | 1301 | { yyval.ctyp = ctype_void; ; |
8e37b772 | 1302 | break;} |
1303 | case 56: | |
f9264521 | 1304 | { yyval.ctyp = ctype_unknown; ; |
8e37b772 | 1305 | break;} |
1306 | case 57: | |
f9264521 | 1307 | { yyval.ctyp = ctype_anyintegral; ; |
8e37b772 | 1308 | break;} |
1309 | case 58: | |
f9264521 | 1310 | { yyval.ctyp = ctype_unsignedintegral; ; |
8e37b772 | 1311 | break;} |
f9264521 | 1312 | case 59: |
1313 | { yyval.ctyp = ctype_signedintegral; ; | |
8e37b772 | 1314 | break;} |
1315 | case 61: | |
f9264521 | 1316 | { yyval.ctyp = mtscanner_lookupType (yyvsp[0].tok); ; |
8e37b772 | 1317 | break;} |
1318 | case 62: | |
f9264521 | 1319 | { yyval.mtvalues = mtValuesNode_create (yyvsp[0].cstringlist); ; |
8e37b772 | 1320 | break;} |
1321 | case 63: | |
f9264521 | 1322 | { yyval.cstringlist = cstringList_single (mttok_getText (yyvsp[0].tok)); ; |
8e37b772 | 1323 | break;} |
1324 | case 64: | |
f9264521 | 1325 | { yyval.cstringlist = cstringList_prepend (yyvsp[0].cstringlist, mttok_getText (yyvsp[-2].tok)); ; |
8e37b772 | 1326 | break;} |
1327 | case 65: | |
f9264521 | 1328 | { yyval.tok = yyvsp[0].tok; ; |
8e37b772 | 1329 | break;} |
1330 | case 66: | |
f9264521 | 1331 | { yyval.mtdefaults = mtDefaultsNode_create (yyvsp[-1].tok, yyvsp[0].mtdeflist); ; |
8e37b772 | 1332 | break;} |
1333 | case 67: | |
f9264521 | 1334 | { yyval.mtdeflist = mtDefaultsDeclList_single (mtDefaultsDecl_create (yyvsp[-2].mtcontext, yyvsp[0].tok)); ; |
8e37b772 | 1335 | break;} |
1336 | case 68: | |
f9264521 | 1337 | { yyval.mtdeflist = mtDefaultsDeclList_prepend (yyvsp[0].mtdeflist, mtDefaultsDecl_create (yyvsp[-3].mtcontext, yyvsp[-1].tok)); ; |
8e37b772 | 1338 | break;} |
1339 | case 69: | |
f9264521 | 1340 | { yyval.mtannotations = mtAnnotationsNode_create (yyvsp[0].mtannotlist); ; |
8e37b772 | 1341 | break;} |
1342 | case 70: | |
f9264521 | 1343 | { yyval.mtannotlist = mtAnnotationList_single (yyvsp[0].mtannotdecl); ; |
8e37b772 | 1344 | break;} |
1345 | case 71: | |
f9264521 | 1346 | { yyval.mtannotlist = mtAnnotationList_prepend (yyvsp[0].mtannotlist, yyvsp[-1].mtannotdecl); ; |
8e37b772 | 1347 | break;} |
1348 | case 72: | |
f9264521 | 1349 | { yyval.mtannotdecl = mtAnnotationDecl_create (yyvsp[-3].tok, yyvsp[-2].mtcontext, yyvsp[0].tok); ; |
8e37b772 | 1350 | break;} |
1351 | case 73: | |
f9264521 | 1352 | { yyval.mtmerge = mtMergeNode_create (yyvsp[0].mtmergeclauselist); ; |
8e37b772 | 1353 | break;} |
1354 | case 74: | |
f9264521 | 1355 | { yyval.mtmergeclauselist = mtMergeClauseList_single (yyvsp[0].mtmergeclause); ; |
8e37b772 | 1356 | break;} |
1357 | case 75: | |
f9264521 | 1358 | { yyval.mtmergeclauselist = mtMergeClauseList_prepend (yyvsp[0].mtmergeclauselist, yyvsp[-1].mtmergeclause); ; |
8e37b772 | 1359 | break;} |
1360 | case 76: | |
f9264521 | 1361 | { yyval.mtmergeclause = mtMergeClause_create (yyvsp[-4].mtmergeitem, yyvsp[-2].mtmergeitem, yyvsp[0].mttransferaction); ; |
8e37b772 | 1362 | break;} |
1363 | case 77: | |
f9264521 | 1364 | { yyval.mtmergeitem = mtMergeItem_createValue (yyvsp[0].tok); ; |
8e37b772 | 1365 | break;} |
1366 | case 78: | |
f9264521 | 1367 | { yyval.mtmergeitem = mtMergeItem_createStar (yyvsp[0].tok); ; |
8e37b772 | 1368 | break;} |
1369 | case 79: | |
8e37b772 | 1370 | { yyval.mttransferclauselist = yyvsp[0].mttransferclauselist; ; |
1371 | break;} | |
1372 | case 80: | |
8e37b772 | 1373 | { yyval.mttransferclauselist = yyvsp[0].mttransferclauselist; ; |
1374 | break;} | |
1375 | case 81: | |
f9264521 | 1376 | { yyval.mttransferclauselist = yyvsp[0].mttransferclauselist; ; |
8e37b772 | 1377 | break;} |
1378 | case 82: | |
f9264521 | 1379 | { yyval.mtlosereferencelist = yyvsp[0].mtlosereferencelist; ; |
8e37b772 | 1380 | break;} |
1381 | case 83: | |
f9264521 | 1382 | { yyval.mtlosereferencelist = mtLoseReferenceList_single (yyvsp[0].mtlosereference); ; |
8e37b772 | 1383 | break;} |
1384 | case 84: | |
f9264521 | 1385 | { yyval.mtlosereferencelist = mtLoseReferenceList_prepend (yyvsp[0].mtlosereferencelist, yyvsp[-1].mtlosereference); ; |
8e37b772 | 1386 | break;} |
1387 | case 85: | |
f9264521 | 1388 | { yyval.mtlosereference = mtLoseReference_create (yyvsp[-2].tok, yyvsp[0].mttransferaction); ; |
8e37b772 | 1389 | break;} |
1390 | case 86: | |
f9264521 | 1391 | { yyval.mttransferclauselist = mtTransferClauseList_single (yyvsp[0].mttransferclause); ; |
8e37b772 | 1392 | break;} |
1393 | case 87: | |
f9264521 | 1394 | { yyval.mttransferclauselist = mtTransferClauseList_prepend (yyvsp[0].mttransferclauselist, yyvsp[-1].mttransferclause); ; |
8e37b772 | 1395 | break;} |
1396 | case 88: | |
f9264521 | 1397 | { yyval.mttransferclause = mtTransferClause_create (yyvsp[-4].tok, yyvsp[-2].tok, yyvsp[0].mttransferaction); ; |
8e37b772 | 1398 | break;} |
1399 | case 89: | |
f9264521 | 1400 | { yyval.mttransferaction = mtTransferAction_createValue (yyvsp[0].tok); ; |
8e37b772 | 1401 | break;} |
1402 | case 90: | |
f9264521 | 1403 | { yyval.mttransferaction = yyvsp[0].mttransferaction; ; |
8e37b772 | 1404 | break;} |
1405 | case 91: | |
f9264521 | 1406 | { yyval.mttransferaction = mtTransferAction_createError (yyvsp[0].tok); ; |
1407 | break;} | |
1408 | case 92: | |
8e37b772 | 1409 | { yyval.mttransferaction = mtTransferAction_createErrorMessage (yyvsp[0].tok); ; |
1410 | break;} | |
1411 | } | |
3e7d9038 | 1412 | |
3e3ec469 | 1413 | |
8e37b772 | 1414 | \f |
1415 | yyvsp -= yylen; | |
1416 | yyssp -= yylen; | |
3e7d9038 | 1417 | #if YYLSP_NEEDED |
8e37b772 | 1418 | yylsp -= yylen; |
1419 | #endif | |
1420 | ||
3e7d9038 | 1421 | #if YYDEBUG |
8e37b772 | 1422 | if (yydebug) |
1423 | { | |
3e7d9038 | 1424 | short *yyssp1 = yyss - 1; |
1425 | YYFPRINTF (stderr, "state stack now"); | |
1426 | while (yyssp1 != yyssp) | |
1427 | YYFPRINTF (stderr, " %d", *++yyssp1); | |
1428 | YYFPRINTF (stderr, "\n"); | |
8e37b772 | 1429 | } |
1430 | #endif | |
1431 | ||
1432 | *++yyvsp = yyval; | |
3e7d9038 | 1433 | #if YYLSP_NEEDED |
1434 | *++yylsp = yyloc; | |
8e37b772 | 1435 | #endif |
1436 | ||
3e7d9038 | 1437 | /* Now `shift' the result of the reduction. Determine what state |
1438 | that goes to, based on the state we popped back to and the rule | |
1439 | number reduced by. */ | |
8e37b772 | 1440 | |
1441 | yyn = yyr1[yyn]; | |
1442 | ||
1443 | yystate = yypgoto[yyn - YYNTBASE] + *yyssp; | |
1444 | if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) | |
1445 | yystate = yytable[yystate]; | |
1446 | else | |
1447 | yystate = yydefgoto[yyn - YYNTBASE]; | |
1448 | ||
1449 | goto yynewstate; | |
1450 | ||
8e37b772 | 1451 | |
3e7d9038 | 1452 | /*------------------------------------. |
1453 | | yyerrlab -- here on detecting error | | |
1454 | `------------------------------------*/ | |
1455 | yyerrlab: | |
1456 | /* If not already recovering from an error, report this error. */ | |
1457 | if (!yyerrstatus) | |
8e37b772 | 1458 | { |
1459 | ++yynerrs; | |
1460 | ||
1461 | #ifdef YYERROR_VERBOSE | |
1462 | yyn = yypact[yystate]; | |
1463 | ||
1464 | if (yyn > YYFLAG && yyn < YYLAST) | |
1465 | { | |
3e7d9038 | 1466 | YYSIZE_T yysize = 0; |
1467 | char *yymsg; | |
1468 | int yyx, yycount; | |
1469 | ||
1470 | yycount = 0; | |
1471 | /* Start YYX at -YYN if negative to avoid negative indexes in | |
1472 | YYCHECK. */ | |
1473 | for (yyx = yyn < 0 ? -yyn : 0; | |
1474 | yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) | |
1475 | if (yycheck[yyx + yyn] == yyx) | |
1476 | yysize += yystrlen (yytname[yyx]) + 15, yycount++; | |
1477 | yysize += yystrlen ("parse error, unexpected ") + 1; | |
1478 | yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); | |
1479 | yymsg = (char *) YYSTACK_ALLOC (yysize); | |
1480 | if (yymsg != 0) | |
8e37b772 | 1481 | { |
3e7d9038 | 1482 | char *yyp = yystpcpy (yymsg, "parse error, unexpected "); |
1483 | yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); | |
8e37b772 | 1484 | |
3e7d9038 | 1485 | if (yycount < 5) |
8e37b772 | 1486 | { |
3e7d9038 | 1487 | yycount = 0; |
1488 | for (yyx = yyn < 0 ? -yyn : 0; | |
1489 | yyx < (int) (sizeof (yytname) / sizeof (char *)); | |
1490 | yyx++) | |
1491 | if (yycheck[yyx + yyn] == yyx) | |
8e37b772 | 1492 | { |
3e7d9038 | 1493 | const char *yyq = ! yycount ? ", expecting " : " or "; |
1494 | yyp = yystpcpy (yyp, yyq); | |
1495 | yyp = yystpcpy (yyp, yytname[yyx]); | |
1496 | yycount++; | |
8e37b772 | 1497 | } |
1498 | } | |
3e7d9038 | 1499 | yyerror (yymsg); |
1500 | YYSTACK_FREE (yymsg); | |
8e37b772 | 1501 | } |
1502 | else | |
3e7d9038 | 1503 | yyerror ("parse error; also virtual memory exhausted"); |
8e37b772 | 1504 | } |
1505 | else | |
3e7d9038 | 1506 | #endif /* defined (YYERROR_VERBOSE) */ |
1507 | yyerror ("parse error"); | |
8e37b772 | 1508 | } |
e8b84478 | 1509 | goto yyerrlab1; |
e55c0c6d | 1510 | |
3e7d9038 | 1511 | |
1512 | /*--------------------------------------------------. | |
1513 | | yyerrlab1 -- error raised explicitly by an action | | |
1514 | `--------------------------------------------------*/ | |
1515 | yyerrlab1: | |
8e37b772 | 1516 | if (yyerrstatus == 3) |
1517 | { | |
3e7d9038 | 1518 | /* If just tried and failed to reuse lookahead token after an |
1519 | error, discard it. */ | |
8e37b772 | 1520 | |
1521 | /* return failure if at end of input */ | |
1522 | if (yychar == YYEOF) | |
1523 | YYABORT; | |
3e7d9038 | 1524 | YYDPRINTF ((stderr, "Discarding token %d (%s).\n", |
1525 | yychar, yytname[yychar1])); | |
8e37b772 | 1526 | yychar = YYEMPTY; |
1527 | } | |
1528 | ||
3e7d9038 | 1529 | /* Else will try to reuse lookahead token after shifting the error |
1530 | token. */ | |
8e37b772 | 1531 | |
1532 | yyerrstatus = 3; /* Each real token shifted decrements this */ | |
1533 | ||
1534 | goto yyerrhandle; | |
1535 | ||
8e37b772 | 1536 | |
3e7d9038 | 1537 | /*-------------------------------------------------------------------. |
1538 | | yyerrdefault -- current state does not do anything special for the | | |
1539 | | error token. | | |
1540 | `-------------------------------------------------------------------*/ | |
1541 | yyerrdefault: | |
8e37b772 | 1542 | #if 0 |
1543 | /* This is wrong; only states that explicitly want error tokens | |
1544 | should shift them. */ | |
3e7d9038 | 1545 | |
1546 | /* If its default is to accept any token, ok. Otherwise pop it. */ | |
1547 | yyn = yydefact[yystate]; | |
1548 | if (yyn) | |
1549 | goto yydefault; | |
8e37b772 | 1550 | #endif |
1551 | ||
8e37b772 | 1552 | |
3e7d9038 | 1553 | /*---------------------------------------------------------------. |
1554 | | yyerrpop -- pop the current state because it cannot handle the | | |
1555 | | error token | | |
1556 | `---------------------------------------------------------------*/ | |
1557 | yyerrpop: | |
1558 | if (yyssp == yyss) | |
1559 | YYABORT; | |
8e37b772 | 1560 | yyvsp--; |
1561 | yystate = *--yyssp; | |
3e7d9038 | 1562 | #if YYLSP_NEEDED |
8e37b772 | 1563 | yylsp--; |
1564 | #endif | |
1565 | ||
3e7d9038 | 1566 | #if YYDEBUG |
8e37b772 | 1567 | if (yydebug) |
1568 | { | |
3e7d9038 | 1569 | short *yyssp1 = yyss - 1; |
1570 | YYFPRINTF (stderr, "Error: state stack now"); | |
1571 | while (yyssp1 != yyssp) | |
1572 | YYFPRINTF (stderr, " %d", *++yyssp1); | |
1573 | YYFPRINTF (stderr, "\n"); | |
8e37b772 | 1574 | } |
1575 | #endif | |
1576 | ||
3e7d9038 | 1577 | /*--------------. |
1578 | | yyerrhandle. | | |
1579 | `--------------*/ | |
8e37b772 | 1580 | yyerrhandle: |
8e37b772 | 1581 | yyn = yypact[yystate]; |
1582 | if (yyn == YYFLAG) | |
1583 | goto yyerrdefault; | |
1584 | ||
1585 | yyn += YYTERROR; | |
1586 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) | |
1587 | goto yyerrdefault; | |
1588 | ||
1589 | yyn = yytable[yyn]; | |
1590 | if (yyn < 0) | |
1591 | { | |
1592 | if (yyn == YYFLAG) | |
1593 | goto yyerrpop; | |
1594 | yyn = -yyn; | |
1595 | goto yyreduce; | |
1596 | } | |
1597 | else if (yyn == 0) | |
1598 | goto yyerrpop; | |
1599 | ||
1600 | if (yyn == YYFINAL) | |
1601 | YYACCEPT; | |
1602 | ||
3e7d9038 | 1603 | YYDPRINTF ((stderr, "Shifting error token, ")); |
8e37b772 | 1604 | |
1605 | *++yyvsp = yylval; | |
3e7d9038 | 1606 | #if YYLSP_NEEDED |
8e37b772 | 1607 | *++yylsp = yylloc; |
1608 | #endif | |
1609 | ||
1610 | yystate = yyn; | |
1611 | goto yynewstate; | |
1612 | ||
8e37b772 | 1613 | |
3e7d9038 | 1614 | /*-------------------------------------. |
1615 | | yyacceptlab -- YYACCEPT comes here. | | |
1616 | `-------------------------------------*/ | |
1617 | yyacceptlab: | |
1618 | yyresult = 0; | |
1619 | goto yyreturn; | |
1620 | ||
1621 | /*-----------------------------------. | |
1622 | | yyabortlab -- YYABORT comes here. | | |
1623 | `-----------------------------------*/ | |
1624 | yyabortlab: | |
1625 | yyresult = 1; | |
1626 | goto yyreturn; | |
1627 | ||
1628 | /*---------------------------------------------. | |
1629 | | yyoverflowab -- parser overflow comes here. | | |
1630 | `---------------------------------------------*/ | |
1631 | yyoverflowlab: | |
1632 | yyerror ("parser stack overflow"); | |
1633 | yyresult = 2; | |
1634 | /* Fall through. */ | |
1635 | ||
1636 | yyreturn: | |
1637 | #ifndef yyoverflow | |
1638 | if (yyss != yyssa) | |
1639 | YYSTACK_FREE (yyss); | |
8e37b772 | 1640 | #endif |
3e7d9038 | 1641 | return yyresult; |
8e37b772 | 1642 | } |
8e37b772 | 1643 | |
1644 | ||
1645 | # include "bison.reset" | |
1646 | ||
1647 | extern char *yytext; | |
1648 | ||
1649 | static void mterror (char *s) | |
1650 | { | |
1651 | ||
1652 | if (s != NULL) | |
1653 | { | |
1654 | llparseerror | |
1655 | (message ("Parse error in meta-state file: %s", cstring_fromChars (s))); | |
1656 | } | |
1657 | else | |
1658 | { | |
1659 | llparseerror | |
1660 | (message ("Parse error in meta-state file")); | |
1661 | } | |
1662 | ||
1663 | } | |
1664 | ||
1665 | static void yyprint (FILE *file, int type, YYSTYPE value) | |
1666 | { | |
1667 | cstring tname = mttok_unparse (value.tok); | |
1668 | fprintf (file, " (%s)", cstring_toCharsSafe (tname)); | |
1669 | cstring_free (tname); | |
1670 | } | |
1671 | ||
1672 | ||
1673 | ||
1674 | ||
1675 | /* | |
1676 | ** Resets all flags in bison.head | |
1677 | */ | |
1678 | ||
1679 | ||
1680 | /*@=allmacros@*/ | |
1681 | /*@=boolint@*/ | |
1682 | /*@=charint@*/ | |
1683 | /*@=macroparams@*/ | |
1684 | /*@=macroundef@*/ | |
1685 | /*@=unreachable@*/ | |
1686 | /*@=macrospec@*/ | |
1687 | /*@=varuse@*/ | |
1688 | /*@=ignorequals@*/ | |
1689 | /*@=macrostmt@*/ | |
1690 | /*@=noeffect@*/ | |
1691 | /*@=shadow@*/ | |
1692 | /*@=exitarg@*/ | |
1693 | /*@=macroredef@*/ | |
1694 | /*@=uniondef@*/ | |
1695 | /*@=compdef@*/ | |
1696 | /*@=matchfields@*/ | |
1697 | /*@=exportlocal@*/ | |
1698 | /*@=evalorderuncon@*/ | |
1699 | /*@=exportheader@*/ | |
1700 | /*@=typeuse@*/ | |
1701 | /*@=redecl@*/ | |
1702 | /*@=redef@*/ | |
1703 | /*@=noparams@*/ | |
1704 | /*@=ansireserved@*/ | |
1705 | /*@=fielduse@*/ | |
1706 | /*@=ifblock@*/ | |
1707 | /*@=elseifcomplete@*/ | |
1708 | /*@=whileblock@*/ | |
1709 | /*@=forblock@*/ | |
1710 | /*@=branchstate@*/ | |
1711 | /*@=readonlytrans@*/ | |
1712 | /*@=namechecks@*/ | |
1713 | /*@=usedef@*/ | |
1714 | /*@=systemunrecog@*/ | |
1715 | /*@=dependenttrans@*/ | |
1716 | /*@=unqualifiedtrans@*/ | |
1717 | /*@=declundef@*/ | |
bbed3d50 | 1718 | |
1719 | ||
1720 | /*drl added 11/27/2001*/ | |
bb7c2085 | 1721 | /*@=bounds@*/ |