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