1 | /* A Bison parser, made by GNU Bison 2.7.12-4996. */ |
---|
2 | |
---|
3 | /* Bison implementation for Yacc-like parsers in C |
---|
4 | |
---|
5 | Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. |
---|
6 | |
---|
7 | This program is free software: you can redistribute it and/or modify |
---|
8 | it under the terms of the GNU General Public License as published by |
---|
9 | the Free Software Foundation, either version 3 of the License, or |
---|
10 | (at your option) any later version. |
---|
11 | |
---|
12 | This program is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | GNU General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU General Public License |
---|
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
---|
19 | |
---|
20 | /* As a special exception, you may create a larger work that contains |
---|
21 | part or all of the Bison parser skeleton and distribute that work |
---|
22 | under terms of your choice, so long as that work isn't itself a |
---|
23 | parser generator using the skeleton or a modified version thereof |
---|
24 | as a parser skeleton. Alternatively, if you modify or redistribute |
---|
25 | the parser skeleton itself, you may (at your option) remove this |
---|
26 | special exception, which will cause the skeleton and the resulting |
---|
27 | Bison output files to be licensed under the GNU General Public |
---|
28 | License without this special exception. |
---|
29 | |
---|
30 | This special exception was added by the Free Software Foundation in |
---|
31 | version 2.2 of Bison. */ |
---|
32 | |
---|
33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
---|
34 | simplifying the original so-called "semantic" parser. */ |
---|
35 | |
---|
36 | /* All symbols defined below should begin with yy or YY, to avoid |
---|
37 | infringing on user name space. This should be done even for local |
---|
38 | variables, as they might otherwise be expanded by user macros. |
---|
39 | There are some unavoidable exceptions within include files to |
---|
40 | define necessary library symbols; they are noted "INFRINGES ON |
---|
41 | USER NAME SPACE" below. */ |
---|
42 | |
---|
43 | /* Identify Bison output. */ |
---|
44 | #define YYBISON 1 |
---|
45 | |
---|
46 | /* Bison version. */ |
---|
47 | #define YYBISON_VERSION "2.7.12-4996" |
---|
48 | |
---|
49 | /* Skeleton name. */ |
---|
50 | #define YYSKELETON_NAME "yacc.c" |
---|
51 | |
---|
52 | /* Pure parsers. */ |
---|
53 | #define YYPURE 0 |
---|
54 | |
---|
55 | /* Push parsers. */ |
---|
56 | #define YYPUSH 0 |
---|
57 | |
---|
58 | /* Pull parsers. */ |
---|
59 | #define YYPULL 1 |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | /* Copy the first part of user declarations. */ |
---|
65 | /* Line 371 of yacc.c */ |
---|
66 | #line 35 "convert.y" |
---|
67 | |
---|
68 | #include <stdlib.h> |
---|
69 | #include <stdio.h> |
---|
70 | #include <string.h> |
---|
71 | #include "decl.h" |
---|
72 | |
---|
73 | /* Line 371 of yacc.c */ |
---|
74 | #line 75 "convert.tab.c" |
---|
75 | |
---|
76 | # ifndef YY_NULL |
---|
77 | # if defined __cplusplus && 201103L <= __cplusplus |
---|
78 | # define YY_NULL nullptr |
---|
79 | # else |
---|
80 | # define YY_NULL 0 |
---|
81 | # endif |
---|
82 | # endif |
---|
83 | |
---|
84 | /* Enabling verbose error messages. */ |
---|
85 | #ifdef YYERROR_VERBOSE |
---|
86 | # undef YYERROR_VERBOSE |
---|
87 | # define YYERROR_VERBOSE 1 |
---|
88 | #else |
---|
89 | # define YYERROR_VERBOSE 0 |
---|
90 | #endif |
---|
91 | |
---|
92 | |
---|
93 | /* Enabling traces. */ |
---|
94 | #ifndef YYDEBUG |
---|
95 | # define YYDEBUG 0 |
---|
96 | #endif |
---|
97 | #if YYDEBUG |
---|
98 | extern int yydebug; |
---|
99 | #endif |
---|
100 | |
---|
101 | /* Tokens. */ |
---|
102 | #ifndef YYTOKENTYPE |
---|
103 | # define YYTOKENTYPE |
---|
104 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
---|
105 | know about them. */ |
---|
106 | enum yytokentype { |
---|
107 | TOK_SEP = 258, |
---|
108 | TOK_USE = 259, |
---|
109 | TOK_MODULEMAIN = 260, |
---|
110 | TOK_NOTGRIDDEP = 261, |
---|
111 | TOK_USEITEM = 262, |
---|
112 | TOK_NAME = 263, |
---|
113 | TOK_PROBTYPE = 264 |
---|
114 | }; |
---|
115 | #endif |
---|
116 | |
---|
117 | |
---|
118 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
---|
119 | typedef union YYSTYPE |
---|
120 | { |
---|
121 | /* Line 387 of yacc.c */ |
---|
122 | #line 42 "convert.y" |
---|
123 | |
---|
124 | int ival; |
---|
125 | char na[LONG_C]; |
---|
126 | listnom * ln; |
---|
127 | |
---|
128 | |
---|
129 | /* Line 387 of yacc.c */ |
---|
130 | #line 131 "convert.tab.c" |
---|
131 | } YYSTYPE; |
---|
132 | # define YYSTYPE_IS_TRIVIAL 1 |
---|
133 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
---|
134 | # define YYSTYPE_IS_DECLARED 1 |
---|
135 | #endif |
---|
136 | |
---|
137 | extern YYSTYPE yylval; |
---|
138 | |
---|
139 | #ifdef YYPARSE_PARAM |
---|
140 | #if defined __STDC__ || defined __cplusplus |
---|
141 | int yyparse (void *YYPARSE_PARAM); |
---|
142 | #else |
---|
143 | int yyparse (); |
---|
144 | #endif |
---|
145 | #else /* ! YYPARSE_PARAM */ |
---|
146 | #if defined __STDC__ || defined __cplusplus |
---|
147 | int yyparse (void); |
---|
148 | #else |
---|
149 | int yyparse (); |
---|
150 | #endif |
---|
151 | #endif /* ! YYPARSE_PARAM */ |
---|
152 | |
---|
153 | |
---|
154 | |
---|
155 | /* Copy the second part of user declarations. */ |
---|
156 | |
---|
157 | /* Line 390 of yacc.c */ |
---|
158 | #line 159 "convert.tab.c" |
---|
159 | |
---|
160 | #ifdef short |
---|
161 | # undef short |
---|
162 | #endif |
---|
163 | |
---|
164 | #ifdef YYTYPE_UINT8 |
---|
165 | typedef YYTYPE_UINT8 yytype_uint8; |
---|
166 | #else |
---|
167 | typedef unsigned char yytype_uint8; |
---|
168 | #endif |
---|
169 | |
---|
170 | #ifdef YYTYPE_INT8 |
---|
171 | typedef YYTYPE_INT8 yytype_int8; |
---|
172 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
---|
173 | || defined __cplusplus || defined _MSC_VER) |
---|
174 | typedef signed char yytype_int8; |
---|
175 | #else |
---|
176 | typedef short int yytype_int8; |
---|
177 | #endif |
---|
178 | |
---|
179 | #ifdef YYTYPE_UINT16 |
---|
180 | typedef YYTYPE_UINT16 yytype_uint16; |
---|
181 | #else |
---|
182 | typedef unsigned short int yytype_uint16; |
---|
183 | #endif |
---|
184 | |
---|
185 | #ifdef YYTYPE_INT16 |
---|
186 | typedef YYTYPE_INT16 yytype_int16; |
---|
187 | #else |
---|
188 | typedef short int yytype_int16; |
---|
189 | #endif |
---|
190 | |
---|
191 | #ifndef YYSIZE_T |
---|
192 | # ifdef __SIZE_TYPE__ |
---|
193 | # define YYSIZE_T __SIZE_TYPE__ |
---|
194 | # elif defined size_t |
---|
195 | # define YYSIZE_T size_t |
---|
196 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
197 | || defined __cplusplus || defined _MSC_VER) |
---|
198 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
---|
199 | # define YYSIZE_T size_t |
---|
200 | # else |
---|
201 | # define YYSIZE_T unsigned int |
---|
202 | # endif |
---|
203 | #endif |
---|
204 | |
---|
205 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
---|
206 | |
---|
207 | #ifndef YY_ |
---|
208 | # if defined YYENABLE_NLS && YYENABLE_NLS |
---|
209 | # if ENABLE_NLS |
---|
210 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
---|
211 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
---|
212 | # endif |
---|
213 | # endif |
---|
214 | # ifndef YY_ |
---|
215 | # define YY_(Msgid) Msgid |
---|
216 | # endif |
---|
217 | #endif |
---|
218 | |
---|
219 | #ifndef __attribute__ |
---|
220 | /* This feature is available in gcc versions 2.5 and later. */ |
---|
221 | # if (! defined __GNUC__ || __GNUC__ < 2 \ |
---|
222 | || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) |
---|
223 | # define __attribute__(Spec) /* empty */ |
---|
224 | # endif |
---|
225 | #endif |
---|
226 | |
---|
227 | /* Suppress unused-variable warnings by "using" E. */ |
---|
228 | #if ! defined lint || defined __GNUC__ |
---|
229 | # define YYUSE(E) ((void) (E)) |
---|
230 | #else |
---|
231 | # define YYUSE(E) /* empty */ |
---|
232 | #endif |
---|
233 | |
---|
234 | |
---|
235 | /* Identity function, used to suppress warnings about constant conditions. */ |
---|
236 | #ifndef lint |
---|
237 | # define YYID(N) (N) |
---|
238 | #else |
---|
239 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
240 | || defined __cplusplus || defined _MSC_VER) |
---|
241 | static int |
---|
242 | YYID (int yyi) |
---|
243 | #else |
---|
244 | static int |
---|
245 | YYID (yyi) |
---|
246 | int yyi; |
---|
247 | #endif |
---|
248 | { |
---|
249 | return yyi; |
---|
250 | } |
---|
251 | #endif |
---|
252 | |
---|
253 | #if ! defined yyoverflow || YYERROR_VERBOSE |
---|
254 | |
---|
255 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
---|
256 | |
---|
257 | # ifdef YYSTACK_USE_ALLOCA |
---|
258 | # if YYSTACK_USE_ALLOCA |
---|
259 | # ifdef __GNUC__ |
---|
260 | # define YYSTACK_ALLOC __builtin_alloca |
---|
261 | # elif defined __BUILTIN_VA_ARG_INCR |
---|
262 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
---|
263 | # elif defined _AIX |
---|
264 | # define YYSTACK_ALLOC __alloca |
---|
265 | # elif defined _MSC_VER |
---|
266 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
---|
267 | # define alloca _alloca |
---|
268 | # else |
---|
269 | # define YYSTACK_ALLOC alloca |
---|
270 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
271 | || defined __cplusplus || defined _MSC_VER) |
---|
272 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
---|
273 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
---|
274 | # ifndef EXIT_SUCCESS |
---|
275 | # define EXIT_SUCCESS 0 |
---|
276 | # endif |
---|
277 | # endif |
---|
278 | # endif |
---|
279 | # endif |
---|
280 | # endif |
---|
281 | |
---|
282 | # ifdef YYSTACK_ALLOC |
---|
283 | /* Pacify GCC's `empty if-body' warning. */ |
---|
284 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
---|
285 | # ifndef YYSTACK_ALLOC_MAXIMUM |
---|
286 | /* The OS might guarantee only one guard page at the bottom of the stack, |
---|
287 | and a page size can be as small as 4096 bytes. So we cannot safely |
---|
288 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
---|
289 | to allow for a few compiler-allocated temporary stack slots. */ |
---|
290 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
---|
291 | # endif |
---|
292 | # else |
---|
293 | # define YYSTACK_ALLOC YYMALLOC |
---|
294 | # define YYSTACK_FREE YYFREE |
---|
295 | # ifndef YYSTACK_ALLOC_MAXIMUM |
---|
296 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
---|
297 | # endif |
---|
298 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
---|
299 | && ! ((defined YYMALLOC || defined malloc) \ |
---|
300 | && (defined YYFREE || defined free))) |
---|
301 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
---|
302 | # ifndef EXIT_SUCCESS |
---|
303 | # define EXIT_SUCCESS 0 |
---|
304 | # endif |
---|
305 | # endif |
---|
306 | # ifndef YYMALLOC |
---|
307 | # define YYMALLOC malloc |
---|
308 | # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
309 | || defined __cplusplus || defined _MSC_VER) |
---|
310 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
---|
311 | # endif |
---|
312 | # endif |
---|
313 | # ifndef YYFREE |
---|
314 | # define YYFREE free |
---|
315 | # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
316 | || defined __cplusplus || defined _MSC_VER) |
---|
317 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
---|
318 | # endif |
---|
319 | # endif |
---|
320 | # endif |
---|
321 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
---|
322 | |
---|
323 | |
---|
324 | #if (! defined yyoverflow \ |
---|
325 | && (! defined __cplusplus \ |
---|
326 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
---|
327 | |
---|
328 | /* A type that is properly aligned for any stack member. */ |
---|
329 | union yyalloc |
---|
330 | { |
---|
331 | yytype_int16 yyss_alloc; |
---|
332 | YYSTYPE yyvs_alloc; |
---|
333 | }; |
---|
334 | |
---|
335 | /* The size of the maximum gap between one aligned stack and the next. */ |
---|
336 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
---|
337 | |
---|
338 | /* The size of an array large to enough to hold all stacks, each with |
---|
339 | N elements. */ |
---|
340 | # define YYSTACK_BYTES(N) \ |
---|
341 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
---|
342 | + YYSTACK_GAP_MAXIMUM) |
---|
343 | |
---|
344 | # define YYCOPY_NEEDED 1 |
---|
345 | |
---|
346 | /* Relocate STACK from its old location to the new one. The |
---|
347 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
---|
348 | elements in the stack, and YYPTR gives the new location of the |
---|
349 | stack. Advance YYPTR to a properly aligned location for the next |
---|
350 | stack. */ |
---|
351 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
---|
352 | do \ |
---|
353 | { \ |
---|
354 | YYSIZE_T yynewbytes; \ |
---|
355 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
---|
356 | Stack = &yyptr->Stack_alloc; \ |
---|
357 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
---|
358 | yyptr += yynewbytes / sizeof (*yyptr); \ |
---|
359 | } \ |
---|
360 | while (YYID (0)) |
---|
361 | |
---|
362 | #endif |
---|
363 | |
---|
364 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
---|
365 | /* Copy COUNT objects from SRC to DST. The source and destination do |
---|
366 | not overlap. */ |
---|
367 | # ifndef YYCOPY |
---|
368 | # if defined __GNUC__ && 1 < __GNUC__ |
---|
369 | # define YYCOPY(Dst, Src, Count) \ |
---|
370 | __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
---|
371 | # else |
---|
372 | # define YYCOPY(Dst, Src, Count) \ |
---|
373 | do \ |
---|
374 | { \ |
---|
375 | YYSIZE_T yyi; \ |
---|
376 | for (yyi = 0; yyi < (Count); yyi++) \ |
---|
377 | (Dst)[yyi] = (Src)[yyi]; \ |
---|
378 | } \ |
---|
379 | while (YYID (0)) |
---|
380 | # endif |
---|
381 | # endif |
---|
382 | #endif /* !YYCOPY_NEEDED */ |
---|
383 | |
---|
384 | /* YYFINAL -- State number of the termination state. */ |
---|
385 | #define YYFINAL 2 |
---|
386 | /* YYLAST -- Last index in YYTABLE. */ |
---|
387 | #define YYLAST 23 |
---|
388 | |
---|
389 | /* YYNTOKENS -- Number of terminals. */ |
---|
390 | #define YYNTOKENS 18 |
---|
391 | /* YYNNTS -- Number of nonterminals. */ |
---|
392 | #define YYNNTS 3 |
---|
393 | /* YYNRULES -- Number of rules. */ |
---|
394 | #define YYNRULES 10 |
---|
395 | /* YYNRULES -- Number of states. */ |
---|
396 | #define YYNSTATES 24 |
---|
397 | |
---|
398 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
---|
399 | #define YYUNDEFTOK 2 |
---|
400 | #define YYMAXUTOK 264 |
---|
401 | |
---|
402 | #define YYTRANSLATE(YYX) \ |
---|
403 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
---|
404 | |
---|
405 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
---|
406 | static const yytype_uint8 yytranslate[] = |
---|
407 | { |
---|
408 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
409 | 17, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
410 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
411 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
412 | 13, 14, 2, 2, 10, 2, 2, 2, 2, 2, |
---|
413 | 2, 2, 2, 2, 2, 2, 2, 2, 12, 11, |
---|
414 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
415 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
416 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
417 | 2, 15, 2, 16, 2, 2, 2, 2, 2, 2, |
---|
418 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
419 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
420 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
421 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
422 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
423 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
424 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
425 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
426 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
427 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
428 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
429 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
430 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
431 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
432 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
433 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
---|
434 | 5, 6, 7, 8, 9 |
---|
435 | }; |
---|
436 | |
---|
437 | #if YYDEBUG |
---|
438 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
---|
439 | YYRHS. */ |
---|
440 | static const yytype_uint8 yyprhs[] = |
---|
441 | { |
---|
442 | 0, 0, 3, 4, 7, 9, 13, 19, 27, 31, |
---|
443 | 36 |
---|
444 | }; |
---|
445 | |
---|
446 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
---|
447 | static const yytype_int8 yyrhs[] = |
---|
448 | { |
---|
449 | 19, 0, -1, -1, 19, 20, -1, 17, -1, 9, |
---|
450 | 8, 11, -1, 9, 8, 10, 8, 11, -1, 9, |
---|
451 | 8, 10, 8, 10, 8, 11, -1, 5, 8, 11, |
---|
452 | -1, 6, 3, 8, 11, -1, 4, 7, 11, -1 |
---|
453 | }; |
---|
454 | |
---|
455 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
---|
456 | static const yytype_uint8 yyrline[] = |
---|
457 | { |
---|
458 | 0, 63, 63, 64, 66, 67, 68, 69, 71, 74, |
---|
459 | 75 |
---|
460 | }; |
---|
461 | #endif |
---|
462 | |
---|
463 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
---|
464 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
---|
465 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
---|
466 | static const char *const yytname[] = |
---|
467 | { |
---|
468 | "$end", "error", "$undefined", "TOK_SEP", "TOK_USE", "TOK_MODULEMAIN", |
---|
469 | "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", "TOK_PROBTYPE", "','", |
---|
470 | "';'", "':'", "'('", "')'", "'['", "']'", "'\\n'", "$accept", "input", |
---|
471 | "line", YY_NULL |
---|
472 | }; |
---|
473 | #endif |
---|
474 | |
---|
475 | # ifdef YYPRINT |
---|
476 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
---|
477 | token YYLEX-NUM. */ |
---|
478 | static const yytype_uint16 yytoknum[] = |
---|
479 | { |
---|
480 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
---|
481 | 44, 59, 58, 40, 41, 91, 93, 10 |
---|
482 | }; |
---|
483 | # endif |
---|
484 | |
---|
485 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
---|
486 | static const yytype_uint8 yyr1[] = |
---|
487 | { |
---|
488 | 0, 18, 19, 19, 20, 20, 20, 20, 20, 20, |
---|
489 | 20 |
---|
490 | }; |
---|
491 | |
---|
492 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
---|
493 | static const yytype_uint8 yyr2[] = |
---|
494 | { |
---|
495 | 0, 2, 0, 2, 1, 3, 5, 7, 3, 4, |
---|
496 | 3 |
---|
497 | }; |
---|
498 | |
---|
499 | /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. |
---|
500 | Performed when YYTABLE doesn't specify something else to do. Zero |
---|
501 | means the default is an error. */ |
---|
502 | static const yytype_uint8 yydefact[] = |
---|
503 | { |
---|
504 | 2, 0, 1, 0, 0, 0, 0, 4, 3, 0, |
---|
505 | 0, 0, 0, 10, 8, 0, 0, 5, 9, 0, |
---|
506 | 0, 6, 0, 7 |
---|
507 | }; |
---|
508 | |
---|
509 | /* YYDEFGOTO[NTERM-NUM]. */ |
---|
510 | static const yytype_int8 yydefgoto[] = |
---|
511 | { |
---|
512 | -1, 1, 8 |
---|
513 | }; |
---|
514 | |
---|
515 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
---|
516 | STATE-NUM. */ |
---|
517 | #define YYPACT_NINF -10 |
---|
518 | static const yytype_int8 yypact[] = |
---|
519 | { |
---|
520 | -10, 0, -10, -4, 2, 8, 4, -10, -10, 3, |
---|
521 | 5, 7, -9, -10, -10, 9, 10, -10, -10, -3, |
---|
522 | 11, -10, 12, -10 |
---|
523 | }; |
---|
524 | |
---|
525 | /* YYPGOTO[NTERM-NUM]. */ |
---|
526 | static const yytype_int8 yypgoto[] = |
---|
527 | { |
---|
528 | -10, -10, -10 |
---|
529 | }; |
---|
530 | |
---|
531 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
---|
532 | positive, shift that token. If negative, reduce the rule which |
---|
533 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
---|
534 | #define YYTABLE_NINF -1 |
---|
535 | static const yytype_uint8 yytable[] = |
---|
536 | { |
---|
537 | 2, 16, 17, 9, 3, 4, 5, 20, 21, 6, |
---|
538 | 10, 11, 12, 0, 13, 15, 14, 7, 19, 22, |
---|
539 | 18, 0, 0, 23 |
---|
540 | }; |
---|
541 | |
---|
542 | #define yypact_value_is_default(Yystate) \ |
---|
543 | (!!((Yystate) == (-10))) |
---|
544 | |
---|
545 | #define yytable_value_is_error(Yytable_value) \ |
---|
546 | YYID (0) |
---|
547 | |
---|
548 | static const yytype_int8 yycheck[] = |
---|
549 | { |
---|
550 | 0, 10, 11, 7, 4, 5, 6, 10, 11, 9, |
---|
551 | 8, 3, 8, -1, 11, 8, 11, 17, 8, 8, |
---|
552 | 11, -1, -1, 11 |
---|
553 | }; |
---|
554 | |
---|
555 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
---|
556 | symbol of state STATE-NUM. */ |
---|
557 | static const yytype_uint8 yystos[] = |
---|
558 | { |
---|
559 | 0, 19, 0, 4, 5, 6, 9, 17, 20, 7, |
---|
560 | 8, 3, 8, 11, 11, 8, 10, 11, 11, 8, |
---|
561 | 10, 11, 8, 11 |
---|
562 | }; |
---|
563 | |
---|
564 | #define yyerrok (yyerrstatus = 0) |
---|
565 | #define yyclearin (yychar = YYEMPTY) |
---|
566 | #define YYEMPTY (-2) |
---|
567 | #define YYEOF 0 |
---|
568 | |
---|
569 | #define YYACCEPT goto yyacceptlab |
---|
570 | #define YYABORT goto yyabortlab |
---|
571 | #define YYERROR goto yyerrorlab |
---|
572 | |
---|
573 | |
---|
574 | /* Like YYERROR except do call yyerror. This remains here temporarily |
---|
575 | to ease the transition to the new meaning of YYERROR, for GCC. |
---|
576 | Once GCC version 2 has supplanted version 1, this can go. However, |
---|
577 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
---|
578 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
---|
579 | discussed. */ |
---|
580 | |
---|
581 | #define YYFAIL goto yyerrlab |
---|
582 | #if defined YYFAIL |
---|
583 | /* This is here to suppress warnings from the GCC cpp's |
---|
584 | -Wunused-macros. Normally we don't worry about that warning, but |
---|
585 | some users do, and we want to make it easy for users to remove |
---|
586 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
---|
587 | #endif |
---|
588 | |
---|
589 | #define YYRECOVERING() (!!yyerrstatus) |
---|
590 | |
---|
591 | #define YYBACKUP(Token, Value) \ |
---|
592 | do \ |
---|
593 | if (yychar == YYEMPTY) \ |
---|
594 | { \ |
---|
595 | yychar = (Token); \ |
---|
596 | yylval = (Value); \ |
---|
597 | YYPOPSTACK (yylen); \ |
---|
598 | yystate = *yyssp; \ |
---|
599 | goto yybackup; \ |
---|
600 | } \ |
---|
601 | else \ |
---|
602 | { \ |
---|
603 | yyerror (YY_("syntax error: cannot back up")); \ |
---|
604 | YYERROR; \ |
---|
605 | } \ |
---|
606 | while (YYID (0)) |
---|
607 | |
---|
608 | /* Error token number */ |
---|
609 | #define YYTERROR 1 |
---|
610 | #define YYERRCODE 256 |
---|
611 | |
---|
612 | |
---|
613 | /* This macro is provided for backward compatibility. */ |
---|
614 | #ifndef YY_LOCATION_PRINT |
---|
615 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
---|
616 | #endif |
---|
617 | |
---|
618 | |
---|
619 | /* YYLEX -- calling `yylex' with the right arguments. */ |
---|
620 | #ifdef YYLEX_PARAM |
---|
621 | # define YYLEX yylex (YYLEX_PARAM) |
---|
622 | #else |
---|
623 | # define YYLEX yylex () |
---|
624 | #endif |
---|
625 | |
---|
626 | /* Enable debugging if requested. */ |
---|
627 | #if YYDEBUG |
---|
628 | |
---|
629 | # ifndef YYFPRINTF |
---|
630 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
---|
631 | # define YYFPRINTF fprintf |
---|
632 | # endif |
---|
633 | |
---|
634 | # define YYDPRINTF(Args) \ |
---|
635 | do { \ |
---|
636 | if (yydebug) \ |
---|
637 | YYFPRINTF Args; \ |
---|
638 | } while (YYID (0)) |
---|
639 | |
---|
640 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
---|
641 | do { \ |
---|
642 | if (yydebug) \ |
---|
643 | { \ |
---|
644 | YYFPRINTF (stderr, "%s ", Title); \ |
---|
645 | yy_symbol_print (stderr, \ |
---|
646 | Type, Value); \ |
---|
647 | YYFPRINTF (stderr, "\n"); \ |
---|
648 | } \ |
---|
649 | } while (YYID (0)) |
---|
650 | |
---|
651 | |
---|
652 | /*--------------------------------. |
---|
653 | | Print this symbol on YYOUTPUT. | |
---|
654 | `--------------------------------*/ |
---|
655 | |
---|
656 | /*ARGSUSED*/ |
---|
657 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
658 | || defined __cplusplus || defined _MSC_VER) |
---|
659 | static void |
---|
660 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
---|
661 | #else |
---|
662 | static void |
---|
663 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
---|
664 | FILE *yyoutput; |
---|
665 | int yytype; |
---|
666 | YYSTYPE const * const yyvaluep; |
---|
667 | #endif |
---|
668 | { |
---|
669 | FILE *yyo = yyoutput; |
---|
670 | YYUSE (yyo); |
---|
671 | if (!yyvaluep) |
---|
672 | return; |
---|
673 | # ifdef YYPRINT |
---|
674 | if (yytype < YYNTOKENS) |
---|
675 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
---|
676 | # else |
---|
677 | YYUSE (yyoutput); |
---|
678 | # endif |
---|
679 | YYUSE (yytype); |
---|
680 | } |
---|
681 | |
---|
682 | |
---|
683 | /*--------------------------------. |
---|
684 | | Print this symbol on YYOUTPUT. | |
---|
685 | `--------------------------------*/ |
---|
686 | |
---|
687 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
688 | || defined __cplusplus || defined _MSC_VER) |
---|
689 | static void |
---|
690 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
---|
691 | #else |
---|
692 | static void |
---|
693 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
---|
694 | FILE *yyoutput; |
---|
695 | int yytype; |
---|
696 | YYSTYPE const * const yyvaluep; |
---|
697 | #endif |
---|
698 | { |
---|
699 | if (yytype < YYNTOKENS) |
---|
700 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
---|
701 | else |
---|
702 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
---|
703 | |
---|
704 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
---|
705 | YYFPRINTF (yyoutput, ")"); |
---|
706 | } |
---|
707 | |
---|
708 | /*------------------------------------------------------------------. |
---|
709 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
---|
710 | | TOP (included). | |
---|
711 | `------------------------------------------------------------------*/ |
---|
712 | |
---|
713 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
714 | || defined __cplusplus || defined _MSC_VER) |
---|
715 | static void |
---|
716 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
---|
717 | #else |
---|
718 | static void |
---|
719 | yy_stack_print (yybottom, yytop) |
---|
720 | yytype_int16 *yybottom; |
---|
721 | yytype_int16 *yytop; |
---|
722 | #endif |
---|
723 | { |
---|
724 | YYFPRINTF (stderr, "Stack now"); |
---|
725 | for (; yybottom <= yytop; yybottom++) |
---|
726 | { |
---|
727 | int yybot = *yybottom; |
---|
728 | YYFPRINTF (stderr, " %d", yybot); |
---|
729 | } |
---|
730 | YYFPRINTF (stderr, "\n"); |
---|
731 | } |
---|
732 | |
---|
733 | # define YY_STACK_PRINT(Bottom, Top) \ |
---|
734 | do { \ |
---|
735 | if (yydebug) \ |
---|
736 | yy_stack_print ((Bottom), (Top)); \ |
---|
737 | } while (YYID (0)) |
---|
738 | |
---|
739 | |
---|
740 | /*------------------------------------------------. |
---|
741 | | Report that the YYRULE is going to be reduced. | |
---|
742 | `------------------------------------------------*/ |
---|
743 | |
---|
744 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
745 | || defined __cplusplus || defined _MSC_VER) |
---|
746 | static void |
---|
747 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
---|
748 | #else |
---|
749 | static void |
---|
750 | yy_reduce_print (yyvsp, yyrule) |
---|
751 | YYSTYPE *yyvsp; |
---|
752 | int yyrule; |
---|
753 | #endif |
---|
754 | { |
---|
755 | int yynrhs = yyr2[yyrule]; |
---|
756 | int yyi; |
---|
757 | unsigned long int yylno = yyrline[yyrule]; |
---|
758 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
---|
759 | yyrule - 1, yylno); |
---|
760 | /* The symbols being reduced. */ |
---|
761 | for (yyi = 0; yyi < yynrhs; yyi++) |
---|
762 | { |
---|
763 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
---|
764 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
---|
765 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
---|
766 | ); |
---|
767 | YYFPRINTF (stderr, "\n"); |
---|
768 | } |
---|
769 | } |
---|
770 | |
---|
771 | # define YY_REDUCE_PRINT(Rule) \ |
---|
772 | do { \ |
---|
773 | if (yydebug) \ |
---|
774 | yy_reduce_print (yyvsp, Rule); \ |
---|
775 | } while (YYID (0)) |
---|
776 | |
---|
777 | /* Nonzero means print parse trace. It is left uninitialized so that |
---|
778 | multiple parsers can coexist. */ |
---|
779 | int yydebug; |
---|
780 | #else /* !YYDEBUG */ |
---|
781 | # define YYDPRINTF(Args) |
---|
782 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
---|
783 | # define YY_STACK_PRINT(Bottom, Top) |
---|
784 | # define YY_REDUCE_PRINT(Rule) |
---|
785 | #endif /* !YYDEBUG */ |
---|
786 | |
---|
787 | |
---|
788 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
---|
789 | #ifndef YYINITDEPTH |
---|
790 | # define YYINITDEPTH 200 |
---|
791 | #endif |
---|
792 | |
---|
793 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
---|
794 | if the built-in stack extension method is used). |
---|
795 | |
---|
796 | Do not make this value too large; the results are undefined if |
---|
797 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
---|
798 | evaluated with infinite-precision integer arithmetic. */ |
---|
799 | |
---|
800 | #ifndef YYMAXDEPTH |
---|
801 | # define YYMAXDEPTH 10000 |
---|
802 | #endif |
---|
803 | |
---|
804 | |
---|
805 | #if YYERROR_VERBOSE |
---|
806 | |
---|
807 | # ifndef yystrlen |
---|
808 | # if defined __GLIBC__ && defined _STRING_H |
---|
809 | # define yystrlen strlen |
---|
810 | # else |
---|
811 | /* Return the length of YYSTR. */ |
---|
812 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
813 | || defined __cplusplus || defined _MSC_VER) |
---|
814 | static YYSIZE_T |
---|
815 | yystrlen (const char *yystr) |
---|
816 | #else |
---|
817 | static YYSIZE_T |
---|
818 | yystrlen (yystr) |
---|
819 | const char *yystr; |
---|
820 | #endif |
---|
821 | { |
---|
822 | YYSIZE_T yylen; |
---|
823 | for (yylen = 0; yystr[yylen]; yylen++) |
---|
824 | continue; |
---|
825 | return yylen; |
---|
826 | } |
---|
827 | # endif |
---|
828 | # endif |
---|
829 | |
---|
830 | # ifndef yystpcpy |
---|
831 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
---|
832 | # define yystpcpy stpcpy |
---|
833 | # else |
---|
834 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
---|
835 | YYDEST. */ |
---|
836 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
837 | || defined __cplusplus || defined _MSC_VER) |
---|
838 | static char * |
---|
839 | yystpcpy (char *yydest, const char *yysrc) |
---|
840 | #else |
---|
841 | static char * |
---|
842 | yystpcpy (yydest, yysrc) |
---|
843 | char *yydest; |
---|
844 | const char *yysrc; |
---|
845 | #endif |
---|
846 | { |
---|
847 | char *yyd = yydest; |
---|
848 | const char *yys = yysrc; |
---|
849 | |
---|
850 | while ((*yyd++ = *yys++) != '\0') |
---|
851 | continue; |
---|
852 | |
---|
853 | return yyd - 1; |
---|
854 | } |
---|
855 | # endif |
---|
856 | # endif |
---|
857 | |
---|
858 | # ifndef yytnamerr |
---|
859 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
---|
860 | quotes and backslashes, so that it's suitable for yyerror. The |
---|
861 | heuristic is that double-quoting is unnecessary unless the string |
---|
862 | contains an apostrophe, a comma, or backslash (other than |
---|
863 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
---|
864 | null, do not copy; instead, return the length of what the result |
---|
865 | would have been. */ |
---|
866 | static YYSIZE_T |
---|
867 | yytnamerr (char *yyres, const char *yystr) |
---|
868 | { |
---|
869 | if (*yystr == '"') |
---|
870 | { |
---|
871 | YYSIZE_T yyn = 0; |
---|
872 | char const *yyp = yystr; |
---|
873 | |
---|
874 | for (;;) |
---|
875 | switch (*++yyp) |
---|
876 | { |
---|
877 | case '\'': |
---|
878 | case ',': |
---|
879 | goto do_not_strip_quotes; |
---|
880 | |
---|
881 | case '\\': |
---|
882 | if (*++yyp != '\\') |
---|
883 | goto do_not_strip_quotes; |
---|
884 | /* Fall through. */ |
---|
885 | default: |
---|
886 | if (yyres) |
---|
887 | yyres[yyn] = *yyp; |
---|
888 | yyn++; |
---|
889 | break; |
---|
890 | |
---|
891 | case '"': |
---|
892 | if (yyres) |
---|
893 | yyres[yyn] = '\0'; |
---|
894 | return yyn; |
---|
895 | } |
---|
896 | do_not_strip_quotes: ; |
---|
897 | } |
---|
898 | |
---|
899 | if (! yyres) |
---|
900 | return yystrlen (yystr); |
---|
901 | |
---|
902 | return yystpcpy (yyres, yystr) - yyres; |
---|
903 | } |
---|
904 | # endif |
---|
905 | |
---|
906 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
---|
907 | about the unexpected token YYTOKEN for the state stack whose top is |
---|
908 | YYSSP. |
---|
909 | |
---|
910 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
---|
911 | not large enough to hold the message. In that case, also set |
---|
912 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
---|
913 | required number of bytes is too large to store. */ |
---|
914 | static int |
---|
915 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
---|
916 | yytype_int16 *yyssp, int yytoken) |
---|
917 | { |
---|
918 | YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); |
---|
919 | YYSIZE_T yysize = yysize0; |
---|
920 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
---|
921 | /* Internationalized format string. */ |
---|
922 | const char *yyformat = YY_NULL; |
---|
923 | /* Arguments of yyformat. */ |
---|
924 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
---|
925 | /* Number of reported tokens (one for the "unexpected", one per |
---|
926 | "expected"). */ |
---|
927 | int yycount = 0; |
---|
928 | |
---|
929 | /* There are many possibilities here to consider: |
---|
930 | - Assume YYFAIL is not used. It's too flawed to consider. See |
---|
931 | <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> |
---|
932 | for details. YYERROR is fine as it does not invoke this |
---|
933 | function. |
---|
934 | - If this state is a consistent state with a default action, then |
---|
935 | the only way this function was invoked is if the default action |
---|
936 | is an error action. In that case, don't check for expected |
---|
937 | tokens because there are none. |
---|
938 | - The only way there can be no lookahead present (in yychar) is if |
---|
939 | this state is a consistent state with a default action. Thus, |
---|
940 | detecting the absence of a lookahead is sufficient to determine |
---|
941 | that there is no unexpected or expected token to report. In that |
---|
942 | case, just report a simple "syntax error". |
---|
943 | - Don't assume there isn't a lookahead just because this state is a |
---|
944 | consistent state with a default action. There might have been a |
---|
945 | previous inconsistent state, consistent state with a non-default |
---|
946 | action, or user semantic action that manipulated yychar. |
---|
947 | - Of course, the expected token list depends on states to have |
---|
948 | correct lookahead information, and it depends on the parser not |
---|
949 | to perform extra reductions after fetching a lookahead from the |
---|
950 | scanner and before detecting a syntax error. Thus, state merging |
---|
951 | (from LALR or IELR) and default reductions corrupt the expected |
---|
952 | token list. However, the list is correct for canonical LR with |
---|
953 | one exception: it will still contain any token that will not be |
---|
954 | accepted due to an error action in a later state. |
---|
955 | */ |
---|
956 | if (yytoken != YYEMPTY) |
---|
957 | { |
---|
958 | int yyn = yypact[*yyssp]; |
---|
959 | yyarg[yycount++] = yytname[yytoken]; |
---|
960 | if (!yypact_value_is_default (yyn)) |
---|
961 | { |
---|
962 | /* Start YYX at -YYN if negative to avoid negative indexes in |
---|
963 | YYCHECK. In other words, skip the first -YYN actions for |
---|
964 | this state because they are default actions. */ |
---|
965 | int yyxbegin = yyn < 0 ? -yyn : 0; |
---|
966 | /* Stay within bounds of both yycheck and yytname. */ |
---|
967 | int yychecklim = YYLAST - yyn + 1; |
---|
968 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
---|
969 | int yyx; |
---|
970 | |
---|
971 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
---|
972 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
---|
973 | && !yytable_value_is_error (yytable[yyx + yyn])) |
---|
974 | { |
---|
975 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
---|
976 | { |
---|
977 | yycount = 1; |
---|
978 | yysize = yysize0; |
---|
979 | break; |
---|
980 | } |
---|
981 | yyarg[yycount++] = yytname[yyx]; |
---|
982 | { |
---|
983 | YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); |
---|
984 | if (! (yysize <= yysize1 |
---|
985 | && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
---|
986 | return 2; |
---|
987 | yysize = yysize1; |
---|
988 | } |
---|
989 | } |
---|
990 | } |
---|
991 | } |
---|
992 | |
---|
993 | switch (yycount) |
---|
994 | { |
---|
995 | # define YYCASE_(N, S) \ |
---|
996 | case N: \ |
---|
997 | yyformat = S; \ |
---|
998 | break |
---|
999 | YYCASE_(0, YY_("syntax error")); |
---|
1000 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
---|
1001 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
---|
1002 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
---|
1003 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
---|
1004 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
---|
1005 | # undef YYCASE_ |
---|
1006 | } |
---|
1007 | |
---|
1008 | { |
---|
1009 | YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
---|
1010 | if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
---|
1011 | return 2; |
---|
1012 | yysize = yysize1; |
---|
1013 | } |
---|
1014 | |
---|
1015 | if (*yymsg_alloc < yysize) |
---|
1016 | { |
---|
1017 | *yymsg_alloc = 2 * yysize; |
---|
1018 | if (! (yysize <= *yymsg_alloc |
---|
1019 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
---|
1020 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
---|
1021 | return 1; |
---|
1022 | } |
---|
1023 | |
---|
1024 | /* Avoid sprintf, as that infringes on the user's name space. |
---|
1025 | Don't have undefined behavior even if the translation |
---|
1026 | produced a string with the wrong number of "%s"s. */ |
---|
1027 | { |
---|
1028 | char *yyp = *yymsg; |
---|
1029 | int yyi = 0; |
---|
1030 | while ((*yyp = *yyformat) != '\0') |
---|
1031 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
---|
1032 | { |
---|
1033 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
---|
1034 | yyformat += 2; |
---|
1035 | } |
---|
1036 | else |
---|
1037 | { |
---|
1038 | yyp++; |
---|
1039 | yyformat++; |
---|
1040 | } |
---|
1041 | } |
---|
1042 | return 0; |
---|
1043 | } |
---|
1044 | #endif /* YYERROR_VERBOSE */ |
---|
1045 | |
---|
1046 | /*-----------------------------------------------. |
---|
1047 | | Release the memory associated to this symbol. | |
---|
1048 | `-----------------------------------------------*/ |
---|
1049 | |
---|
1050 | /*ARGSUSED*/ |
---|
1051 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1052 | || defined __cplusplus || defined _MSC_VER) |
---|
1053 | static void |
---|
1054 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
---|
1055 | #else |
---|
1056 | static void |
---|
1057 | yydestruct (yymsg, yytype, yyvaluep) |
---|
1058 | const char *yymsg; |
---|
1059 | int yytype; |
---|
1060 | YYSTYPE *yyvaluep; |
---|
1061 | #endif |
---|
1062 | { |
---|
1063 | YYUSE (yyvaluep); |
---|
1064 | |
---|
1065 | if (!yymsg) |
---|
1066 | yymsg = "Deleting"; |
---|
1067 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
---|
1068 | |
---|
1069 | YYUSE (yytype); |
---|
1070 | } |
---|
1071 | |
---|
1072 | |
---|
1073 | |
---|
1074 | |
---|
1075 | /* The lookahead symbol. */ |
---|
1076 | int yychar; |
---|
1077 | |
---|
1078 | |
---|
1079 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
1080 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
1081 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
---|
1082 | #endif |
---|
1083 | #ifndef YY_INITIAL_VALUE |
---|
1084 | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
---|
1085 | #endif |
---|
1086 | |
---|
1087 | /* The semantic value of the lookahead symbol. */ |
---|
1088 | YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); |
---|
1089 | |
---|
1090 | /* Number of syntax errors so far. */ |
---|
1091 | int yynerrs; |
---|
1092 | |
---|
1093 | |
---|
1094 | /*----------. |
---|
1095 | | yyparse. | |
---|
1096 | `----------*/ |
---|
1097 | |
---|
1098 | #ifdef YYPARSE_PARAM |
---|
1099 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1100 | || defined __cplusplus || defined _MSC_VER) |
---|
1101 | int |
---|
1102 | yyparse (void *YYPARSE_PARAM) |
---|
1103 | #else |
---|
1104 | int |
---|
1105 | yyparse (YYPARSE_PARAM) |
---|
1106 | void *YYPARSE_PARAM; |
---|
1107 | #endif |
---|
1108 | #else /* ! YYPARSE_PARAM */ |
---|
1109 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1110 | || defined __cplusplus || defined _MSC_VER) |
---|
1111 | int |
---|
1112 | yyparse (void) |
---|
1113 | #else |
---|
1114 | int |
---|
1115 | yyparse () |
---|
1116 | |
---|
1117 | #endif |
---|
1118 | #endif |
---|
1119 | { |
---|
1120 | int yystate; |
---|
1121 | /* Number of tokens to shift before error messages enabled. */ |
---|
1122 | int yyerrstatus; |
---|
1123 | |
---|
1124 | /* The stacks and their tools: |
---|
1125 | `yyss': related to states. |
---|
1126 | `yyvs': related to semantic values. |
---|
1127 | |
---|
1128 | Refer to the stacks through separate pointers, to allow yyoverflow |
---|
1129 | to reallocate them elsewhere. */ |
---|
1130 | |
---|
1131 | /* The state stack. */ |
---|
1132 | yytype_int16 yyssa[YYINITDEPTH]; |
---|
1133 | yytype_int16 *yyss; |
---|
1134 | yytype_int16 *yyssp; |
---|
1135 | |
---|
1136 | /* The semantic value stack. */ |
---|
1137 | YYSTYPE yyvsa[YYINITDEPTH]; |
---|
1138 | YYSTYPE *yyvs; |
---|
1139 | YYSTYPE *yyvsp; |
---|
1140 | |
---|
1141 | YYSIZE_T yystacksize; |
---|
1142 | |
---|
1143 | int yyn; |
---|
1144 | int yyresult; |
---|
1145 | /* Lookahead token as an internal (translated) token number. */ |
---|
1146 | int yytoken = 0; |
---|
1147 | /* The variables used to return semantic value and location from the |
---|
1148 | action routines. */ |
---|
1149 | YYSTYPE yyval; |
---|
1150 | |
---|
1151 | #if YYERROR_VERBOSE |
---|
1152 | /* Buffer for error messages, and its allocated size. */ |
---|
1153 | char yymsgbuf[128]; |
---|
1154 | char *yymsg = yymsgbuf; |
---|
1155 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
---|
1156 | #endif |
---|
1157 | |
---|
1158 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
---|
1159 | |
---|
1160 | /* The number of symbols on the RHS of the reduced rule. |
---|
1161 | Keep to zero when no symbol should be popped. */ |
---|
1162 | int yylen = 0; |
---|
1163 | |
---|
1164 | yyssp = yyss = yyssa; |
---|
1165 | yyvsp = yyvs = yyvsa; |
---|
1166 | yystacksize = YYINITDEPTH; |
---|
1167 | |
---|
1168 | YYDPRINTF ((stderr, "Starting parse\n")); |
---|
1169 | |
---|
1170 | yystate = 0; |
---|
1171 | yyerrstatus = 0; |
---|
1172 | yynerrs = 0; |
---|
1173 | yychar = YYEMPTY; /* Cause a token to be read. */ |
---|
1174 | goto yysetstate; |
---|
1175 | |
---|
1176 | /*------------------------------------------------------------. |
---|
1177 | | yynewstate -- Push a new state, which is found in yystate. | |
---|
1178 | `------------------------------------------------------------*/ |
---|
1179 | yynewstate: |
---|
1180 | /* In all cases, when you get here, the value and location stacks |
---|
1181 | have just been pushed. So pushing a state here evens the stacks. */ |
---|
1182 | yyssp++; |
---|
1183 | |
---|
1184 | yysetstate: |
---|
1185 | *yyssp = yystate; |
---|
1186 | |
---|
1187 | if (yyss + yystacksize - 1 <= yyssp) |
---|
1188 | { |
---|
1189 | /* Get the current used size of the three stacks, in elements. */ |
---|
1190 | YYSIZE_T yysize = yyssp - yyss + 1; |
---|
1191 | |
---|
1192 | #ifdef yyoverflow |
---|
1193 | { |
---|
1194 | /* Give user a chance to reallocate the stack. Use copies of |
---|
1195 | these so that the &'s don't force the real ones into |
---|
1196 | memory. */ |
---|
1197 | YYSTYPE *yyvs1 = yyvs; |
---|
1198 | yytype_int16 *yyss1 = yyss; |
---|
1199 | |
---|
1200 | /* Each stack pointer address is followed by the size of the |
---|
1201 | data in use in that stack, in bytes. This used to be a |
---|
1202 | conditional around just the two extra args, but that might |
---|
1203 | be undefined if yyoverflow is a macro. */ |
---|
1204 | yyoverflow (YY_("memory exhausted"), |
---|
1205 | &yyss1, yysize * sizeof (*yyssp), |
---|
1206 | &yyvs1, yysize * sizeof (*yyvsp), |
---|
1207 | &yystacksize); |
---|
1208 | |
---|
1209 | yyss = yyss1; |
---|
1210 | yyvs = yyvs1; |
---|
1211 | } |
---|
1212 | #else /* no yyoverflow */ |
---|
1213 | # ifndef YYSTACK_RELOCATE |
---|
1214 | goto yyexhaustedlab; |
---|
1215 | # else |
---|
1216 | /* Extend the stack our own way. */ |
---|
1217 | if (YYMAXDEPTH <= yystacksize) |
---|
1218 | goto yyexhaustedlab; |
---|
1219 | yystacksize *= 2; |
---|
1220 | if (YYMAXDEPTH < yystacksize) |
---|
1221 | yystacksize = YYMAXDEPTH; |
---|
1222 | |
---|
1223 | { |
---|
1224 | yytype_int16 *yyss1 = yyss; |
---|
1225 | union yyalloc *yyptr = |
---|
1226 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
---|
1227 | if (! yyptr) |
---|
1228 | goto yyexhaustedlab; |
---|
1229 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
---|
1230 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
---|
1231 | # undef YYSTACK_RELOCATE |
---|
1232 | if (yyss1 != yyssa) |
---|
1233 | YYSTACK_FREE (yyss1); |
---|
1234 | } |
---|
1235 | # endif |
---|
1236 | #endif /* no yyoverflow */ |
---|
1237 | |
---|
1238 | yyssp = yyss + yysize - 1; |
---|
1239 | yyvsp = yyvs + yysize - 1; |
---|
1240 | |
---|
1241 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
---|
1242 | (unsigned long int) yystacksize)); |
---|
1243 | |
---|
1244 | if (yyss + yystacksize - 1 <= yyssp) |
---|
1245 | YYABORT; |
---|
1246 | } |
---|
1247 | |
---|
1248 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
---|
1249 | |
---|
1250 | if (yystate == YYFINAL) |
---|
1251 | YYACCEPT; |
---|
1252 | |
---|
1253 | goto yybackup; |
---|
1254 | |
---|
1255 | /*-----------. |
---|
1256 | | yybackup. | |
---|
1257 | `-----------*/ |
---|
1258 | yybackup: |
---|
1259 | |
---|
1260 | /* Do appropriate processing given the current state. Read a |
---|
1261 | lookahead token if we need one and don't already have one. */ |
---|
1262 | |
---|
1263 | /* First try to decide what to do without reference to lookahead token. */ |
---|
1264 | yyn = yypact[yystate]; |
---|
1265 | if (yypact_value_is_default (yyn)) |
---|
1266 | goto yydefault; |
---|
1267 | |
---|
1268 | /* Not known => get a lookahead token if don't already have one. */ |
---|
1269 | |
---|
1270 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
---|
1271 | if (yychar == YYEMPTY) |
---|
1272 | { |
---|
1273 | YYDPRINTF ((stderr, "Reading a token: ")); |
---|
1274 | yychar = YYLEX; |
---|
1275 | } |
---|
1276 | |
---|
1277 | if (yychar <= YYEOF) |
---|
1278 | { |
---|
1279 | yychar = yytoken = YYEOF; |
---|
1280 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
---|
1281 | } |
---|
1282 | else |
---|
1283 | { |
---|
1284 | yytoken = YYTRANSLATE (yychar); |
---|
1285 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
---|
1286 | } |
---|
1287 | |
---|
1288 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
---|
1289 | detect an error, take that action. */ |
---|
1290 | yyn += yytoken; |
---|
1291 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
---|
1292 | goto yydefault; |
---|
1293 | yyn = yytable[yyn]; |
---|
1294 | if (yyn <= 0) |
---|
1295 | { |
---|
1296 | if (yytable_value_is_error (yyn)) |
---|
1297 | goto yyerrlab; |
---|
1298 | yyn = -yyn; |
---|
1299 | goto yyreduce; |
---|
1300 | } |
---|
1301 | |
---|
1302 | /* Count tokens shifted since error; after three, turn off error |
---|
1303 | status. */ |
---|
1304 | if (yyerrstatus) |
---|
1305 | yyerrstatus--; |
---|
1306 | |
---|
1307 | /* Shift the lookahead token. */ |
---|
1308 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
---|
1309 | |
---|
1310 | /* Discard the shifted token. */ |
---|
1311 | yychar = YYEMPTY; |
---|
1312 | |
---|
1313 | yystate = yyn; |
---|
1314 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
1315 | *++yyvsp = yylval; |
---|
1316 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
---|
1317 | |
---|
1318 | goto yynewstate; |
---|
1319 | |
---|
1320 | |
---|
1321 | /*-----------------------------------------------------------. |
---|
1322 | | yydefault -- do the default action for the current state. | |
---|
1323 | `-----------------------------------------------------------*/ |
---|
1324 | yydefault: |
---|
1325 | yyn = yydefact[yystate]; |
---|
1326 | if (yyn == 0) |
---|
1327 | goto yyerrlab; |
---|
1328 | goto yyreduce; |
---|
1329 | |
---|
1330 | |
---|
1331 | /*-----------------------------. |
---|
1332 | | yyreduce -- Do a reduction. | |
---|
1333 | `-----------------------------*/ |
---|
1334 | yyreduce: |
---|
1335 | /* yyn is the number of a rule to reduce with. */ |
---|
1336 | yylen = yyr2[yyn]; |
---|
1337 | |
---|
1338 | /* If YYLEN is nonzero, implement the default value of the action: |
---|
1339 | `$$ = $1'. |
---|
1340 | |
---|
1341 | Otherwise, the following line sets YYVAL to garbage. |
---|
1342 | This behavior is undocumented and Bison |
---|
1343 | users should not rely upon it. Assigning to YYVAL |
---|
1344 | unconditionally makes the parser a bit smaller, and it avoids a |
---|
1345 | GCC warning that YYVAL may be used uninitialized. */ |
---|
1346 | yyval = yyvsp[1-yylen]; |
---|
1347 | |
---|
1348 | |
---|
1349 | YY_REDUCE_PRINT (yyn); |
---|
1350 | switch (yyn) |
---|
1351 | { |
---|
1352 | case 5: |
---|
1353 | /* Line 1787 of yacc.c */ |
---|
1354 | #line 67 "convert.y" |
---|
1355 | {initdimprob(1,(yyvsp[(2) - (3)].na),"0","0");} |
---|
1356 | break; |
---|
1357 | |
---|
1358 | case 6: |
---|
1359 | /* Line 1787 of yacc.c */ |
---|
1360 | #line 68 "convert.y" |
---|
1361 | {initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0");} |
---|
1362 | break; |
---|
1363 | |
---|
1364 | case 7: |
---|
1365 | /* Line 1787 of yacc.c */ |
---|
1366 | #line 70 "convert.y" |
---|
1367 | {initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na));} |
---|
1368 | break; |
---|
1369 | |
---|
1370 | case 8: |
---|
1371 | /* Line 1787 of yacc.c */ |
---|
1372 | #line 72 "convert.y" |
---|
1373 | {listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); |
---|
1374 | Addmoduletothelist((yyvsp[(2) - (3)].na));} |
---|
1375 | break; |
---|
1376 | |
---|
1377 | case 9: |
---|
1378 | /* Line 1787 of yacc.c */ |
---|
1379 | #line 74 "convert.y" |
---|
1380 | {Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na));} |
---|
1381 | break; |
---|
1382 | |
---|
1383 | case 10: |
---|
1384 | /* Line 1787 of yacc.c */ |
---|
1385 | #line 75 "convert.y" |
---|
1386 | { |
---|
1387 | if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS")) |
---|
1388 | fixedgrids=1; |
---|
1389 | if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) |
---|
1390 | onlyfixedgrids=1; |
---|
1391 | } |
---|
1392 | break; |
---|
1393 | |
---|
1394 | |
---|
1395 | /* Line 1787 of yacc.c */ |
---|
1396 | #line 1397 "convert.tab.c" |
---|
1397 | default: break; |
---|
1398 | } |
---|
1399 | /* User semantic actions sometimes alter yychar, and that requires |
---|
1400 | that yytoken be updated with the new translation. We take the |
---|
1401 | approach of translating immediately before every use of yytoken. |
---|
1402 | One alternative is translating here after every semantic action, |
---|
1403 | but that translation would be missed if the semantic action invokes |
---|
1404 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
---|
1405 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
---|
1406 | incorrect destructor might then be invoked immediately. In the |
---|
1407 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
---|
1408 | to an incorrect destructor call or verbose syntax error message |
---|
1409 | before the lookahead is translated. */ |
---|
1410 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
---|
1411 | |
---|
1412 | YYPOPSTACK (yylen); |
---|
1413 | yylen = 0; |
---|
1414 | YY_STACK_PRINT (yyss, yyssp); |
---|
1415 | |
---|
1416 | *++yyvsp = yyval; |
---|
1417 | |
---|
1418 | /* Now `shift' the result of the reduction. Determine what state |
---|
1419 | that goes to, based on the state we popped back to and the rule |
---|
1420 | number reduced by. */ |
---|
1421 | |
---|
1422 | yyn = yyr1[yyn]; |
---|
1423 | |
---|
1424 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
---|
1425 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
---|
1426 | yystate = yytable[yystate]; |
---|
1427 | else |
---|
1428 | yystate = yydefgoto[yyn - YYNTOKENS]; |
---|
1429 | |
---|
1430 | goto yynewstate; |
---|
1431 | |
---|
1432 | |
---|
1433 | /*------------------------------------. |
---|
1434 | | yyerrlab -- here on detecting error | |
---|
1435 | `------------------------------------*/ |
---|
1436 | yyerrlab: |
---|
1437 | /* Make sure we have latest lookahead translation. See comments at |
---|
1438 | user semantic actions for why this is necessary. */ |
---|
1439 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
---|
1440 | |
---|
1441 | /* If not already recovering from an error, report this error. */ |
---|
1442 | if (!yyerrstatus) |
---|
1443 | { |
---|
1444 | ++yynerrs; |
---|
1445 | #if ! YYERROR_VERBOSE |
---|
1446 | yyerror (YY_("syntax error")); |
---|
1447 | #else |
---|
1448 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
---|
1449 | yyssp, yytoken) |
---|
1450 | { |
---|
1451 | char const *yymsgp = YY_("syntax error"); |
---|
1452 | int yysyntax_error_status; |
---|
1453 | yysyntax_error_status = YYSYNTAX_ERROR; |
---|
1454 | if (yysyntax_error_status == 0) |
---|
1455 | yymsgp = yymsg; |
---|
1456 | else if (yysyntax_error_status == 1) |
---|
1457 | { |
---|
1458 | if (yymsg != yymsgbuf) |
---|
1459 | YYSTACK_FREE (yymsg); |
---|
1460 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
---|
1461 | if (!yymsg) |
---|
1462 | { |
---|
1463 | yymsg = yymsgbuf; |
---|
1464 | yymsg_alloc = sizeof yymsgbuf; |
---|
1465 | yysyntax_error_status = 2; |
---|
1466 | } |
---|
1467 | else |
---|
1468 | { |
---|
1469 | yysyntax_error_status = YYSYNTAX_ERROR; |
---|
1470 | yymsgp = yymsg; |
---|
1471 | } |
---|
1472 | } |
---|
1473 | yyerror (yymsgp); |
---|
1474 | if (yysyntax_error_status == 2) |
---|
1475 | goto yyexhaustedlab; |
---|
1476 | } |
---|
1477 | # undef YYSYNTAX_ERROR |
---|
1478 | #endif |
---|
1479 | } |
---|
1480 | |
---|
1481 | |
---|
1482 | |
---|
1483 | if (yyerrstatus == 3) |
---|
1484 | { |
---|
1485 | /* If just tried and failed to reuse lookahead token after an |
---|
1486 | error, discard it. */ |
---|
1487 | |
---|
1488 | if (yychar <= YYEOF) |
---|
1489 | { |
---|
1490 | /* Return failure if at end of input. */ |
---|
1491 | if (yychar == YYEOF) |
---|
1492 | YYABORT; |
---|
1493 | } |
---|
1494 | else |
---|
1495 | { |
---|
1496 | yydestruct ("Error: discarding", |
---|
1497 | yytoken, &yylval); |
---|
1498 | yychar = YYEMPTY; |
---|
1499 | } |
---|
1500 | } |
---|
1501 | |
---|
1502 | /* Else will try to reuse lookahead token after shifting the error |
---|
1503 | token. */ |
---|
1504 | goto yyerrlab1; |
---|
1505 | |
---|
1506 | |
---|
1507 | /*---------------------------------------------------. |
---|
1508 | | yyerrorlab -- error raised explicitly by YYERROR. | |
---|
1509 | `---------------------------------------------------*/ |
---|
1510 | yyerrorlab: |
---|
1511 | |
---|
1512 | /* Pacify compilers like GCC when the user code never invokes |
---|
1513 | YYERROR and the label yyerrorlab therefore never appears in user |
---|
1514 | code. */ |
---|
1515 | if (/*CONSTCOND*/ 0) |
---|
1516 | goto yyerrorlab; |
---|
1517 | |
---|
1518 | /* Do not reclaim the symbols of the rule which action triggered |
---|
1519 | this YYERROR. */ |
---|
1520 | YYPOPSTACK (yylen); |
---|
1521 | yylen = 0; |
---|
1522 | YY_STACK_PRINT (yyss, yyssp); |
---|
1523 | yystate = *yyssp; |
---|
1524 | goto yyerrlab1; |
---|
1525 | |
---|
1526 | |
---|
1527 | /*-------------------------------------------------------------. |
---|
1528 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
---|
1529 | `-------------------------------------------------------------*/ |
---|
1530 | yyerrlab1: |
---|
1531 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
---|
1532 | |
---|
1533 | for (;;) |
---|
1534 | { |
---|
1535 | yyn = yypact[yystate]; |
---|
1536 | if (!yypact_value_is_default (yyn)) |
---|
1537 | { |
---|
1538 | yyn += YYTERROR; |
---|
1539 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
---|
1540 | { |
---|
1541 | yyn = yytable[yyn]; |
---|
1542 | if (0 < yyn) |
---|
1543 | break; |
---|
1544 | } |
---|
1545 | } |
---|
1546 | |
---|
1547 | /* Pop the current state because it cannot handle the error token. */ |
---|
1548 | if (yyssp == yyss) |
---|
1549 | YYABORT; |
---|
1550 | |
---|
1551 | |
---|
1552 | yydestruct ("Error: popping", |
---|
1553 | yystos[yystate], yyvsp); |
---|
1554 | YYPOPSTACK (1); |
---|
1555 | yystate = *yyssp; |
---|
1556 | YY_STACK_PRINT (yyss, yyssp); |
---|
1557 | } |
---|
1558 | |
---|
1559 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
1560 | *++yyvsp = yylval; |
---|
1561 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
---|
1562 | |
---|
1563 | |
---|
1564 | /* Shift the error token. */ |
---|
1565 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
---|
1566 | |
---|
1567 | yystate = yyn; |
---|
1568 | goto yynewstate; |
---|
1569 | |
---|
1570 | |
---|
1571 | /*-------------------------------------. |
---|
1572 | | yyacceptlab -- YYACCEPT comes here. | |
---|
1573 | `-------------------------------------*/ |
---|
1574 | yyacceptlab: |
---|
1575 | yyresult = 0; |
---|
1576 | goto yyreturn; |
---|
1577 | |
---|
1578 | /*-----------------------------------. |
---|
1579 | | yyabortlab -- YYABORT comes here. | |
---|
1580 | `-----------------------------------*/ |
---|
1581 | yyabortlab: |
---|
1582 | yyresult = 1; |
---|
1583 | goto yyreturn; |
---|
1584 | |
---|
1585 | #if !defined yyoverflow || YYERROR_VERBOSE |
---|
1586 | /*-------------------------------------------------. |
---|
1587 | | yyexhaustedlab -- memory exhaustion comes here. | |
---|
1588 | `-------------------------------------------------*/ |
---|
1589 | yyexhaustedlab: |
---|
1590 | yyerror (YY_("memory exhausted")); |
---|
1591 | yyresult = 2; |
---|
1592 | /* Fall through. */ |
---|
1593 | #endif |
---|
1594 | |
---|
1595 | yyreturn: |
---|
1596 | if (yychar != YYEMPTY) |
---|
1597 | { |
---|
1598 | /* Make sure we have latest lookahead translation. See comments at |
---|
1599 | user semantic actions for why this is necessary. */ |
---|
1600 | yytoken = YYTRANSLATE (yychar); |
---|
1601 | yydestruct ("Cleanup: discarding lookahead", |
---|
1602 | yytoken, &yylval); |
---|
1603 | } |
---|
1604 | /* Do not reclaim the symbols of the rule which action triggered |
---|
1605 | this YYABORT or YYACCEPT. */ |
---|
1606 | YYPOPSTACK (yylen); |
---|
1607 | YY_STACK_PRINT (yyss, yyssp); |
---|
1608 | while (yyssp != yyss) |
---|
1609 | { |
---|
1610 | yydestruct ("Cleanup: popping", |
---|
1611 | yystos[*yyssp], yyvsp); |
---|
1612 | YYPOPSTACK (1); |
---|
1613 | } |
---|
1614 | #ifndef yyoverflow |
---|
1615 | if (yyss != yyssa) |
---|
1616 | YYSTACK_FREE (yyss); |
---|
1617 | #endif |
---|
1618 | #if YYERROR_VERBOSE |
---|
1619 | if (yymsg != yymsgbuf) |
---|
1620 | YYSTACK_FREE (yymsg); |
---|
1621 | #endif |
---|
1622 | /* Make sure YYID is used. */ |
---|
1623 | return YYID (yyresult); |
---|
1624 | } |
---|
1625 | |
---|
1626 | |
---|
1627 | /* Line 2050 of yacc.c */ |
---|
1628 | #line 82 "convert.y" |
---|
1629 | |
---|
1630 | |
---|
1631 | int main(int argc,char *argv[]) |
---|
1632 | { |
---|
1633 | extern FILE * yyin ; |
---|
1634 | FILE *dependglobaloutput; |
---|
1635 | int i; |
---|
1636 | listnom *parcours; |
---|
1637 | listvar *newvar; |
---|
1638 | int stylegiven = 0; |
---|
1639 | int infreegiven ; |
---|
1640 | int infixedgiven ; |
---|
1641 | int lengthmainfile; |
---|
1642 | |
---|
1643 | if (argc < 2) |
---|
1644 | { |
---|
1645 | printf("usage : conv <file> [-rm] [-incdir <directory>] \n"); |
---|
1646 | printf(" [-comdirin <directory>] [-comdirout <directory>]\n"); |
---|
1647 | printf(" [-convfile <FILENAME >] -SubloopScalar -SubloopScalar1 \n"); |
---|
1648 | printf(" [-free|-fixed]\n"); |
---|
1649 | exit(0); |
---|
1650 | } |
---|
1651 | /******************************************************************************/ |
---|
1652 | /* 1- Variables initialization */ |
---|
1653 | /******************************************************************************/ |
---|
1654 | List_Global_Var=(listvar *)NULL; |
---|
1655 | List_GlobalParameter_Var=(listvar *)NULL; |
---|
1656 | List_Allocate_Var=(listallocate *)NULL; |
---|
1657 | List_Common_Var=(listvar *)NULL; |
---|
1658 | List_SubroutineWhereAgrifUsed=(listnom *)NULL; |
---|
1659 | List_Subroutine_For_Alloc=(listnom *)NULL; |
---|
1660 | List_Include=(listusemodule *)NULL; |
---|
1661 | List_NameOfModuleUsed=(listusemodule *)NULL; |
---|
1662 | listofmoduletmp=(listusemodule *)NULL; |
---|
1663 | List_SubroutineDeclaration_Var=(listvar *)NULL; |
---|
1664 | List_UsedInSubroutine_Var=(listvar *)NULL; |
---|
1665 | List_NotGridDepend_Var=(listvar *)NULL; |
---|
1666 | Listofavailableindices=(listindice *)NULL; |
---|
1667 | List_CouplePointed_Var=(listvarpointtovar *)NULL; |
---|
1668 | List_ModuleUsed_Var = (listvar *)NULL; |
---|
1669 | List_ModuleUsedInModuleUsed_Var = (listvar *)NULL; |
---|
1670 | List_GlobParamModuleUsed_Var = (listparameter *)NULL; |
---|
1671 | List_GlobParamModuleUsedInModuleUsed_Var = (listparameter *)NULL; |
---|
1672 | List_SubroutineArgument_Var = (listvar *)NULL; |
---|
1673 | List_FunctionType_Var = (listvar *)NULL; |
---|
1674 | tmpuselocallist = (listusemodule *)NULL; |
---|
1675 | List_ContainsSubroutine = (listnom *)NULL; |
---|
1676 | oldfortranout = (FILE *)NULL; |
---|
1677 | |
---|
1678 | strcpy(mainfile,argv[1]); |
---|
1679 | strcpy(nomdir,"AGRIF_INC"); |
---|
1680 | strcpy(commondirin,"."); |
---|
1681 | strcpy(commondirout,"."); |
---|
1682 | strcpy(filetoparse," "); |
---|
1683 | strcpy(subofagrifinitgrids,""); |
---|
1684 | strcpy(meetagrifinitgrids,""); |
---|
1685 | strcpy(mpiinitvar,""); |
---|
1686 | |
---|
1687 | length_last = 0 ; |
---|
1688 | length_first = 0 ; |
---|
1689 | length_v_typevar = 0 ; |
---|
1690 | length_v_nomvar = 0 ; |
---|
1691 | length_v_dimchar = 0 ; |
---|
1692 | length_v_modulename = 0 ; |
---|
1693 | length_v_commonname = 0 ; |
---|
1694 | length_v_vallengspec = 0 ; |
---|
1695 | length_v_nameinttypename = 0 ; |
---|
1696 | length_v_commoninfile = 0 ; |
---|
1697 | length_v_subroutinename = 0 ; |
---|
1698 | length_v_precision = 0 ; |
---|
1699 | length_v_IntentSpec = 0 ; |
---|
1700 | length_v_initialvalue = 0 ; |
---|
1701 | length_v_readedlistdimension = 0 ; |
---|
1702 | length_u_usemodule = 0 ; |
---|
1703 | length_u_charusemodule = 0 ; |
---|
1704 | length_u_cursubroutine = 0 ; |
---|
1705 | length_u_modulename = 0 ; |
---|
1706 | length_n_name = 0 ; |
---|
1707 | length_c_namevar = 0 ; |
---|
1708 | length_c_namepointedvar = 0 ; |
---|
1709 | length_o_nom = 0 ; |
---|
1710 | length_o_module = 0 ; |
---|
1711 | length_a_nomvar = 0 ; |
---|
1712 | length_a_subroutine = 0 ; |
---|
1713 | length_a_module = 0 ; |
---|
1714 | length_t_usemodule = 0 ; |
---|
1715 | length_t_cursubroutine = 0 ; |
---|
1716 | length_curfilename = 0 ; |
---|
1717 | length_nomfileoutput = 0 ; |
---|
1718 | length_motparse = 0 ; |
---|
1719 | length_mainfile = 0 ; |
---|
1720 | length_nomdir = 0 ; |
---|
1721 | length_commondirout = 0 ; |
---|
1722 | length_commondirin = 0 ; |
---|
1723 | length_filetoparse = 0 ; |
---|
1724 | length_curbuf = 0 ; |
---|
1725 | length_toprintglob = 0 ; |
---|
1726 | length_tmpvargridname = 0 ; |
---|
1727 | length_ligne_Subloop = 0 ; |
---|
1728 | length_lvargridname_toamr = 0 ; |
---|
1729 | length_toprint_utilagrif = 0 ; |
---|
1730 | length_toprinttmp_utilchar = 0 ; |
---|
1731 | length_ligne_writedecl = 0 ; |
---|
1732 | length_newname_toamr = 0 ; |
---|
1733 | length_newname_writedecl = 0 ; |
---|
1734 | length_ligne_toamr = 0 ; |
---|
1735 | length_tmpligne_writedecl = 0 ; |
---|
1736 | value_char_size = 0 ; |
---|
1737 | value_char_size1 = 0 ; |
---|
1738 | value_char_size2 = 0 ; |
---|
1739 | value_char_size3 = 0 ; |
---|
1740 | inallocate = 0; |
---|
1741 | infixed = 1; |
---|
1742 | infree = 0; |
---|
1743 | |
---|
1744 | checkexistcommon=1; |
---|
1745 | todebug=0; |
---|
1746 | onlyfixedgrids=0; |
---|
1747 | fixedgrids=0; |
---|
1748 | InAgrifParentDef = 0; |
---|
1749 | IndicenbmaillesX=0; |
---|
1750 | IndicenbmaillesY=0; |
---|
1751 | IndicenbmaillesZ=0; |
---|
1752 | created_dimensionlist = 1; |
---|
1753 | indicemaxtabvars = 0; /* current indice in the table tabvars */ |
---|
1754 | SubloopScalar = 0; |
---|
1755 | todebug = 0; |
---|
1756 | todebugfree = 0; |
---|
1757 | retour77 = 1 ; |
---|
1758 | mark = 0 ; |
---|
1759 | shouldincludempif = 0 ; |
---|
1760 | Read_val_max(); |
---|
1761 | /******************************************************************************/ |
---|
1762 | /* 2- Program arguments */ |
---|
1763 | /******************************************************************************/ |
---|
1764 | |
---|
1765 | if ((yyin=fopen(argv[1],"r"))==NULL) |
---|
1766 | { |
---|
1767 | printf("the file %s doesn't exist \n",argv[1]); |
---|
1768 | exit(0); |
---|
1769 | } |
---|
1770 | |
---|
1771 | i=2; |
---|
1772 | while (i<argc) |
---|
1773 | { |
---|
1774 | if (!strcasecmp(argv[i],"-incdir")) |
---|
1775 | { |
---|
1776 | strcpy(nomdir,argv[i+1]); |
---|
1777 | i++; |
---|
1778 | } |
---|
1779 | else if (!strcasecmp(argv[i],"-comdirin")) /* input directory */ |
---|
1780 | { |
---|
1781 | strcpy(commondirin,argv[i+1]); |
---|
1782 | i++; |
---|
1783 | } |
---|
1784 | else if (!strcasecmp(argv[i],"-comdirout")) /* output directory */ |
---|
1785 | { |
---|
1786 | strcpy(commondirout,argv[i+1]); |
---|
1787 | i++; |
---|
1788 | } |
---|
1789 | else if (!strcasecmp(argv[i],"-convfile")) /* file to parse */ |
---|
1790 | { |
---|
1791 | strcpy(filetoparse,argv[i+1]); |
---|
1792 | i++; |
---|
1793 | lengthmainfile = strlen(filetoparse); |
---|
1794 | if (!strcasecmp(&filetoparse[lengthmainfile-4],".f90")) |
---|
1795 | { |
---|
1796 | infixed = 0; |
---|
1797 | infree = 1; |
---|
1798 | } |
---|
1799 | else |
---|
1800 | { |
---|
1801 | infixed = 1; |
---|
1802 | infree = 0; |
---|
1803 | } |
---|
1804 | } |
---|
1805 | else if (!strcasecmp(argv[i],"-free")) /* file to parse */ |
---|
1806 | { |
---|
1807 | stylegiven = 1; |
---|
1808 | infreegiven = 1 ; |
---|
1809 | infixedgiven = 0; |
---|
1810 | } |
---|
1811 | else if (!strcasecmp(argv[i],"-fixed")) /* file to parse */ |
---|
1812 | { |
---|
1813 | stylegiven = 1; |
---|
1814 | infreegiven = 0; |
---|
1815 | infixedgiven = 1; |
---|
1816 | } |
---|
1817 | else if (!strcasecmp(argv[i],"-SubloopScalar")) /* file to parse */ |
---|
1818 | { |
---|
1819 | SubloopScalar = 1 ; |
---|
1820 | } |
---|
1821 | else if (!strcasecmp(argv[i],"-SubloopScalar1")) /* file to parse */ |
---|
1822 | { |
---|
1823 | SubloopScalar = 2 ; |
---|
1824 | } |
---|
1825 | else if (!strcasecmp(argv[i],"-todebug")) /* file to parse */ |
---|
1826 | { |
---|
1827 | todebug = 1 ; |
---|
1828 | } |
---|
1829 | else if (!strcasecmp(argv[i],"-mark")) /* file to parse */ |
---|
1830 | { |
---|
1831 | mark = 1 ; |
---|
1832 | } |
---|
1833 | else if (!strcasecmp(argv[i],"-todebugfree")) /* file to parse */ |
---|
1834 | { |
---|
1835 | todebugfree = 1 ; |
---|
1836 | } |
---|
1837 | else if (!strcasecmp(argv[i],"-rm")) |
---|
1838 | { |
---|
1839 | checkexistcommon=0; |
---|
1840 | } |
---|
1841 | else |
---|
1842 | { |
---|
1843 | printf("Unkwon option : %s\n",argv[i]); |
---|
1844 | exit(0); |
---|
1845 | } |
---|
1846 | i++; |
---|
1847 | } |
---|
1848 | |
---|
1849 | if (stylegiven == 1) |
---|
1850 | { |
---|
1851 | infree = infreegiven; |
---|
1852 | infixed = infixedgiven; |
---|
1853 | } |
---|
1854 | Save_Length(nomdir,34); |
---|
1855 | Save_Length(commondirout,35); |
---|
1856 | Save_Length(commondirin,36); |
---|
1857 | Save_Length(filetoparse,37); |
---|
1858 | |
---|
1859 | /******************************************************************************/ |
---|
1860 | /* 3- Parsing of the conv file <name>.in */ |
---|
1861 | /******************************************************************************/ |
---|
1862 | |
---|
1863 | if ((yyin=fopen(argv[1],"r"))==NULL) |
---|
1864 | { |
---|
1865 | printf("the file %s doesn't exist \n",argv[1]); |
---|
1866 | exit(0); |
---|
1867 | } |
---|
1868 | strcpy(mainfile,argv[1]); |
---|
1869 | Save_Length(mainfile,33); |
---|
1870 | |
---|
1871 | if ( strstr(filetoparse,".f90") || |
---|
1872 | strstr(filetoparse,".F90") ) retour77 = 0; |
---|
1873 | |
---|
1874 | yyparse(); |
---|
1875 | |
---|
1876 | /******************************************************************************/ |
---|
1877 | /* 4- Preparation of the file parsing */ |
---|
1878 | /******************************************************************************/ |
---|
1879 | if ((yyin=fopen(filetoparse,"r"))==NULL) /* Is the file to parse exist ? */ |
---|
1880 | { |
---|
1881 | printf("the file %s doesn't exist \n",filetoparse); |
---|
1882 | exit(0); |
---|
1883 | } |
---|
1884 | /* mainfile : the name of the file to parse */ |
---|
1885 | strcpy(mainfile,filetoparse); |
---|
1886 | /* */ |
---|
1887 | if ((dependglobaloutput=fopen(".dependglobal_agrif","r"))!=NULL) |
---|
1888 | { |
---|
1889 | fscanf(dependglobaloutput,"%d\n",&indicemaxtabvars); |
---|
1890 | fclose(dependglobaloutput); |
---|
1891 | } |
---|
1892 | Readthedependavailablefile(); |
---|
1893 | /* Read the .dependnbxnby file which contains indices of nbmaillsX, */ |
---|
1894 | /* nbmailleY and nbmailleZ */ |
---|
1895 | Readthedependnbxnbyfile(); |
---|
1896 | Read_Subroutine_For_Alloc(); |
---|
1897 | /******************************************************************************/ |
---|
1898 | /* 5- Parsing of the input file (2 times) */ |
---|
1899 | /******************************************************************************/ |
---|
1900 | /* Record all variable in list */ |
---|
1901 | firstpass = 1; |
---|
1902 | processfortran(filetoparse); |
---|
1903 | /* */ |
---|
1904 | CompleteThelistvarindoloop(); |
---|
1905 | /* Read list of module used */ |
---|
1906 | RecordUseModulesVariables(); |
---|
1907 | /* Read list of module used in module used */ |
---|
1908 | RecordUseModulesUseModulesVariables(); |
---|
1909 | /* Save variables are considered as globals ones */ |
---|
1910 | Update_List_Global_Var_From_List_Save_Var(); |
---|
1911 | /* Update all lists */ |
---|
1912 | ListUpdate(); |
---|
1913 | /* */ |
---|
1914 | Clean_List_Global_Var(); |
---|
1915 | /* Indice tabvars identification */ |
---|
1916 | IndiceTabvarsIdentification(); |
---|
1917 | /* Update all lists */ |
---|
1918 | ListUpdate(); |
---|
1919 | /* The allocation subroutine is necessary ???? */ |
---|
1920 | New_Allocate_Subroutine_Is_Necessary(); |
---|
1921 | /* The allocation subroutine is necessary for common list */ |
---|
1922 | New_Allocate_Subroutine_For_Common_Is_Necessary(); |
---|
1923 | /* Sort List_SubroutineArgument_Var */ |
---|
1924 | Sort_List_SubroutineArgument_Var(); |
---|
1925 | /* Clean all lists */ |
---|
1926 | ListClean(); |
---|
1927 | /* Update Indice of List_UsedInSubroutine_Var from module used */ |
---|
1928 | List_UsedInSubroutine_Var_Update_From_Module_Used(); |
---|
1929 | /* Update List_SubroutineWhereAgrifUsed */ |
---|
1930 | UpdateList_SubroutineWhereAgrifUsed(); |
---|
1931 | /* Update List_UsedInSubroutine_Var with v_readedlistdimension */ |
---|
1932 | UpdateList_UsedInSubroutine_With_dimension();; |
---|
1933 | /* */ |
---|
1934 | ModifyThelistvarindoloop(); |
---|
1935 | /* */ |
---|
1936 | UpdateListDeclarationWithDimensionList(); |
---|
1937 | /* */ |
---|
1938 | GiveTypeOfVariables(); |
---|
1939 | Affiche(); |
---|
1940 | /* Build new subroutines */ |
---|
1941 | firstpass = 0; |
---|
1942 | processfortran(filetoparse); |
---|
1943 | |
---|
1944 | newvar = (listvar *)NULL; |
---|
1945 | /*newvar = List_Global_Var; */ |
---|
1946 | while ( newvar ) |
---|
1947 | { |
---|
1948 | printf("++++ %s %d %s %s %s\n", |
---|
1949 | newvar->var->v_nomvar, |
---|
1950 | newvar->var->v_nbdim, |
---|
1951 | newvar->var->v_subroutinename, |
---|
1952 | newvar->var->v_modulename, |
---|
1953 | newvar->var->v_typevar |
---|
1954 | ); |
---|
1955 | newvar = newvar->suiv; |
---|
1956 | } |
---|
1957 | /******************************************************************************/ |
---|
1958 | /* 6- Write informations in output files */ |
---|
1959 | /******************************************************************************/ |
---|
1960 | |
---|
1961 | /* Write the .dependglobal_agrif file which contain the max indice */ |
---|
1962 | /* of the tabvars table */ |
---|
1963 | dependglobaloutput = fopen(".dependglobal_agrif","w"); |
---|
1964 | fprintf(dependglobaloutput,"%d\n",indicemaxtabvars); |
---|
1965 | fclose(dependglobaloutput); |
---|
1966 | /* Write the list of available indice */ |
---|
1967 | Writethedependavailablefile(); |
---|
1968 | /* Write the .dependnbxnby file which contains indices of nbmaillsX, */ |
---|
1969 | /* nbmailleY and nbmailleZ */ |
---|
1970 | Writethedependnbxnbyfile(); |
---|
1971 | /* Write the .depend<namefile> file which contain general informations */ |
---|
1972 | /* about variable of this file */ |
---|
1973 | parcours = List_NameOfModule; |
---|
1974 | while( parcours ) |
---|
1975 | { |
---|
1976 | Writethedependlistofmoduleused(parcours->o_nom); |
---|
1977 | WritedependParameterList(parcours->o_nom); |
---|
1978 | Writethedependfile(parcours->o_nom,List_Global_Var); |
---|
1979 | parcours=parcours->suiv; |
---|
1980 | } |
---|
1981 | parcours = List_NameOfCommon; |
---|
1982 | while( parcours ) |
---|
1983 | { |
---|
1984 | Writethedependfile(parcours->o_nom,List_Common_Var); |
---|
1985 | parcours=parcours->suiv; |
---|
1986 | } |
---|
1987 | Write_Subroutine_For_Alloc(); |
---|
1988 | /******************************************************************************/ |
---|
1989 | /* 7- Create files in AGRIF_INC directory */ |
---|
1990 | /******************************************************************************/ |
---|
1991 | creefichieramr(NameTamponfile); |
---|
1992 | |
---|
1993 | Write_val_max(); |
---|
1994 | |
---|
1995 | if ( todebug == 1 ) printf("Out of CONV \n"); |
---|
1996 | return 0; |
---|
1997 | } |
---|
1998 | #line 2 "convert.yy.c" |
---|
1999 | |
---|
2000 | #line 4 "convert.yy.c" |
---|
2001 | |
---|
2002 | #define YY_INT_ALIGNED short int |
---|
2003 | |
---|
2004 | /* A lexical scanner generated by flex */ |
---|
2005 | |
---|
2006 | #define FLEX_SCANNER |
---|
2007 | #define YY_FLEX_MAJOR_VERSION 2 |
---|
2008 | #define YY_FLEX_MINOR_VERSION 5 |
---|
2009 | #define YY_FLEX_SUBMINOR_VERSION 37 |
---|
2010 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
---|
2011 | #define FLEX_BETA |
---|
2012 | #endif |
---|
2013 | |
---|
2014 | /* First, we deal with platform-specific or compiler-specific issues. */ |
---|
2015 | |
---|
2016 | /* begin standard C headers. */ |
---|
2017 | #include <stdio.h> |
---|
2018 | #include <string.h> |
---|
2019 | #include <errno.h> |
---|
2020 | #include <stdlib.h> |
---|
2021 | |
---|
2022 | /* end standard C headers. */ |
---|
2023 | |
---|
2024 | /* flex integer type definitions */ |
---|
2025 | |
---|
2026 | #ifndef FLEXINT_H |
---|
2027 | #define FLEXINT_H |
---|
2028 | |
---|
2029 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
---|
2030 | |
---|
2031 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
---|
2032 | |
---|
2033 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
---|
2034 | * if you want the limit (max/min) macros for int types. |
---|
2035 | */ |
---|
2036 | #ifndef __STDC_LIMIT_MACROS |
---|
2037 | #define __STDC_LIMIT_MACROS 1 |
---|
2038 | #endif |
---|
2039 | |
---|
2040 | #include <inttypes.h> |
---|
2041 | typedef int8_t flex_int8_t; |
---|
2042 | typedef uint8_t flex_uint8_t; |
---|
2043 | typedef int16_t flex_int16_t; |
---|
2044 | typedef uint16_t flex_uint16_t; |
---|
2045 | typedef int32_t flex_int32_t; |
---|
2046 | typedef uint32_t flex_uint32_t; |
---|
2047 | #else |
---|
2048 | typedef signed char flex_int8_t; |
---|
2049 | typedef short int flex_int16_t; |
---|
2050 | typedef int flex_int32_t; |
---|
2051 | typedef unsigned char flex_uint8_t; |
---|
2052 | typedef unsigned short int flex_uint16_t; |
---|
2053 | typedef unsigned int flex_uint32_t; |
---|
2054 | |
---|
2055 | /* Limits of integral types. */ |
---|
2056 | #ifndef INT8_MIN |
---|
2057 | #define INT8_MIN (-128) |
---|
2058 | #endif |
---|
2059 | #ifndef INT16_MIN |
---|
2060 | #define INT16_MIN (-32767-1) |
---|
2061 | #endif |
---|
2062 | #ifndef INT32_MIN |
---|
2063 | #define INT32_MIN (-2147483647-1) |
---|
2064 | #endif |
---|
2065 | #ifndef INT8_MAX |
---|
2066 | #define INT8_MAX (127) |
---|
2067 | #endif |
---|
2068 | #ifndef INT16_MAX |
---|
2069 | #define INT16_MAX (32767) |
---|
2070 | #endif |
---|
2071 | #ifndef INT32_MAX |
---|
2072 | #define INT32_MAX (2147483647) |
---|
2073 | #endif |
---|
2074 | #ifndef UINT8_MAX |
---|
2075 | #define UINT8_MAX (255U) |
---|
2076 | #endif |
---|
2077 | #ifndef UINT16_MAX |
---|
2078 | #define UINT16_MAX (65535U) |
---|
2079 | #endif |
---|
2080 | #ifndef UINT32_MAX |
---|
2081 | #define UINT32_MAX (4294967295U) |
---|
2082 | #endif |
---|
2083 | |
---|
2084 | #endif /* ! C99 */ |
---|
2085 | |
---|
2086 | #endif /* ! FLEXINT_H */ |
---|
2087 | |
---|
2088 | #ifdef __cplusplus |
---|
2089 | |
---|
2090 | /* The "const" storage-class-modifier is valid. */ |
---|
2091 | #define YY_USE_CONST |
---|
2092 | |
---|
2093 | #else /* ! __cplusplus */ |
---|
2094 | |
---|
2095 | /* C99 requires __STDC__ to be defined as 1. */ |
---|
2096 | #if defined (__STDC__) |
---|
2097 | |
---|
2098 | #define YY_USE_CONST |
---|
2099 | |
---|
2100 | #endif /* defined (__STDC__) */ |
---|
2101 | #endif /* ! __cplusplus */ |
---|
2102 | |
---|
2103 | #ifdef YY_USE_CONST |
---|
2104 | #define yyconst const |
---|
2105 | #else |
---|
2106 | #define yyconst |
---|
2107 | #endif |
---|
2108 | |
---|
2109 | /* Returned upon end-of-file. */ |
---|
2110 | #define YY_NULL 0 |
---|
2111 | |
---|
2112 | /* Promotes a possibly negative, possibly signed char to an unsigned |
---|
2113 | * integer for use as an array index. If the signed char is negative, |
---|
2114 | * we want to instead treat it as an 8-bit unsigned char, hence the |
---|
2115 | * double cast. |
---|
2116 | */ |
---|
2117 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
---|
2118 | |
---|
2119 | /* Enter a start condition. This macro really ought to take a parameter, |
---|
2120 | * but we do it the disgusting crufty way forced on us by the ()-less |
---|
2121 | * definition of BEGIN. |
---|
2122 | */ |
---|
2123 | #define BEGIN (yy_start) = 1 + 2 * |
---|
2124 | |
---|
2125 | /* Translate the current start state into a value that can be later handed |
---|
2126 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
---|
2127 | * compatibility. |
---|
2128 | */ |
---|
2129 | #define YY_START (((yy_start) - 1) / 2) |
---|
2130 | #define YYSTATE YY_START |
---|
2131 | |
---|
2132 | /* Action number for EOF rule of a given start state. */ |
---|
2133 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
---|
2134 | |
---|
2135 | /* Special action meaning "start processing a new file". */ |
---|
2136 | #define YY_NEW_FILE yyrestart(yyin ) |
---|
2137 | |
---|
2138 | #define YY_END_OF_BUFFER_CHAR 0 |
---|
2139 | |
---|
2140 | /* Size of default input buffer. */ |
---|
2141 | #ifndef YY_BUF_SIZE |
---|
2142 | #define YY_BUF_SIZE 16384 |
---|
2143 | #endif |
---|
2144 | |
---|
2145 | /* The state buf must be large enough to hold one state per character in the main buffer. |
---|
2146 | */ |
---|
2147 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
---|
2148 | |
---|
2149 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
---|
2150 | #define YY_TYPEDEF_YY_BUFFER_STATE |
---|
2151 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
---|
2152 | #endif |
---|
2153 | |
---|
2154 | #ifndef YY_TYPEDEF_YY_SIZE_T |
---|
2155 | #define YY_TYPEDEF_YY_SIZE_T |
---|
2156 | typedef size_t yy_size_t; |
---|
2157 | #endif |
---|
2158 | |
---|
2159 | extern yy_size_t yyleng; |
---|
2160 | |
---|
2161 | extern FILE *yyin, *yyout; |
---|
2162 | |
---|
2163 | #define EOB_ACT_CONTINUE_SCAN 0 |
---|
2164 | #define EOB_ACT_END_OF_FILE 1 |
---|
2165 | #define EOB_ACT_LAST_MATCH 2 |
---|
2166 | |
---|
2167 | #define YY_LESS_LINENO(n) |
---|
2168 | |
---|
2169 | /* Return all but the first "n" matched characters back to the input stream. */ |
---|
2170 | #define yyless(n) \ |
---|
2171 | do \ |
---|
2172 | { \ |
---|
2173 | /* Undo effects of setting up yytext. */ \ |
---|
2174 | int yyless_macro_arg = (n); \ |
---|
2175 | YY_LESS_LINENO(yyless_macro_arg);\ |
---|
2176 | *yy_cp = (yy_hold_char); \ |
---|
2177 | YY_RESTORE_YY_MORE_OFFSET \ |
---|
2178 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
---|
2179 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
---|
2180 | } \ |
---|
2181 | while ( 0 ) |
---|
2182 | |
---|
2183 | #define unput(c) yyunput( c, (yytext_ptr) ) |
---|
2184 | |
---|
2185 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
---|
2186 | #define YY_STRUCT_YY_BUFFER_STATE |
---|
2187 | struct yy_buffer_state |
---|
2188 | { |
---|
2189 | FILE *yy_input_file; |
---|
2190 | |
---|
2191 | char *yy_ch_buf; /* input buffer */ |
---|
2192 | char *yy_buf_pos; /* current position in input buffer */ |
---|
2193 | |
---|
2194 | /* Size of input buffer in bytes, not including room for EOB |
---|
2195 | * characters. |
---|
2196 | */ |
---|
2197 | yy_size_t yy_buf_size; |
---|
2198 | |
---|
2199 | /* Number of characters read into yy_ch_buf, not including EOB |
---|
2200 | * characters. |
---|
2201 | */ |
---|
2202 | yy_size_t yy_n_chars; |
---|
2203 | |
---|
2204 | /* Whether we "own" the buffer - i.e., we know we created it, |
---|
2205 | * and can realloc() it to grow it, and should free() it to |
---|
2206 | * delete it. |
---|
2207 | */ |
---|
2208 | int yy_is_our_buffer; |
---|
2209 | |
---|
2210 | /* Whether this is an "interactive" input source; if so, and |
---|
2211 | * if we're using stdio for input, then we want to use getc() |
---|
2212 | * instead of fread(), to make sure we stop fetching input after |
---|
2213 | * each newline. |
---|
2214 | */ |
---|
2215 | int yy_is_interactive; |
---|
2216 | |
---|
2217 | /* Whether we're considered to be at the beginning of a line. |
---|
2218 | * If so, '^' rules will be active on the next match, otherwise |
---|
2219 | * not. |
---|
2220 | */ |
---|
2221 | int yy_at_bol; |
---|
2222 | |
---|
2223 | int yy_bs_lineno; /**< The line count. */ |
---|
2224 | int yy_bs_column; /**< The column count. */ |
---|
2225 | |
---|
2226 | /* Whether to try to fill the input buffer when we reach the |
---|
2227 | * end of it. |
---|
2228 | */ |
---|
2229 | int yy_fill_buffer; |
---|
2230 | |
---|
2231 | int yy_buffer_status; |
---|
2232 | |
---|
2233 | #define YY_BUFFER_NEW 0 |
---|
2234 | #define YY_BUFFER_NORMAL 1 |
---|
2235 | /* When an EOF's been seen but there's still some text to process |
---|
2236 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
---|
2237 | * shouldn't try reading from the input source any more. We might |
---|
2238 | * still have a bunch of tokens to match, though, because of |
---|
2239 | * possible backing-up. |
---|
2240 | * |
---|
2241 | * When we actually see the EOF, we change the status to "new" |
---|
2242 | * (via yyrestart()), so that the user can continue scanning by |
---|
2243 | * just pointing yyin at a new input file. |
---|
2244 | */ |
---|
2245 | #define YY_BUFFER_EOF_PENDING 2 |
---|
2246 | |
---|
2247 | }; |
---|
2248 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
---|
2249 | |
---|
2250 | /* Stack of input buffers. */ |
---|
2251 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
---|
2252 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
---|
2253 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ |
---|
2254 | |
---|
2255 | /* We provide macros for accessing buffer states in case in the |
---|
2256 | * future we want to put the buffer states in a more general |
---|
2257 | * "scanner state". |
---|
2258 | * |
---|
2259 | * Returns the top of the stack, or NULL. |
---|
2260 | */ |
---|
2261 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
---|
2262 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
---|
2263 | : NULL) |
---|
2264 | |
---|
2265 | /* Same as previous macro, but useful when we know that the buffer stack is not |
---|
2266 | * NULL or when we need an lvalue. For internal use only. |
---|
2267 | */ |
---|
2268 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
---|
2269 | |
---|
2270 | /* yy_hold_char holds the character lost when yytext is formed. */ |
---|
2271 | static char yy_hold_char; |
---|
2272 | static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ |
---|
2273 | yy_size_t yyleng; |
---|
2274 | |
---|
2275 | /* Points to current character in buffer. */ |
---|
2276 | static char *yy_c_buf_p = (char *) 0; |
---|
2277 | static int yy_init = 0; /* whether we need to initialize */ |
---|
2278 | static int yy_start = 0; /* start state number */ |
---|
2279 | |
---|
2280 | /* Flag which is used to allow yywrap()'s to do buffer switches |
---|
2281 | * instead of setting up a fresh yyin. A bit of a hack ... |
---|
2282 | */ |
---|
2283 | static int yy_did_buffer_switch_on_eof; |
---|
2284 | |
---|
2285 | void yyrestart (FILE *input_file ); |
---|
2286 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); |
---|
2287 | YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); |
---|
2288 | void yy_delete_buffer (YY_BUFFER_STATE b ); |
---|
2289 | void yy_flush_buffer (YY_BUFFER_STATE b ); |
---|
2290 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); |
---|
2291 | void yypop_buffer_state (void ); |
---|
2292 | |
---|
2293 | static void yyensure_buffer_stack (void ); |
---|
2294 | static void yy_load_buffer_state (void ); |
---|
2295 | static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); |
---|
2296 | |
---|
2297 | #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) |
---|
2298 | |
---|
2299 | YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); |
---|
2300 | YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); |
---|
2301 | YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); |
---|
2302 | |
---|
2303 | void *yyalloc (yy_size_t ); |
---|
2304 | void *yyrealloc (void *,yy_size_t ); |
---|
2305 | void yyfree (void * ); |
---|
2306 | |
---|
2307 | #define yy_new_buffer yy_create_buffer |
---|
2308 | |
---|
2309 | #define yy_set_interactive(is_interactive) \ |
---|
2310 | { \ |
---|
2311 | if ( ! YY_CURRENT_BUFFER ){ \ |
---|
2312 | yyensure_buffer_stack (); \ |
---|
2313 | YY_CURRENT_BUFFER_LVALUE = \ |
---|
2314 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ |
---|
2315 | } \ |
---|
2316 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
---|
2317 | } |
---|
2318 | |
---|
2319 | #define yy_set_bol(at_bol) \ |
---|
2320 | { \ |
---|
2321 | if ( ! YY_CURRENT_BUFFER ){\ |
---|
2322 | yyensure_buffer_stack (); \ |
---|
2323 | YY_CURRENT_BUFFER_LVALUE = \ |
---|
2324 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ |
---|
2325 | } \ |
---|
2326 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
---|
2327 | } |
---|
2328 | |
---|
2329 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
---|
2330 | |
---|
2331 | /* Begin user sect3 */ |
---|
2332 | |
---|
2333 | typedef unsigned char YY_CHAR; |
---|
2334 | |
---|
2335 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; |
---|
2336 | |
---|
2337 | typedef int yy_state_type; |
---|
2338 | |
---|
2339 | extern int yylineno; |
---|
2340 | |
---|
2341 | int yylineno = 1; |
---|
2342 | |
---|
2343 | extern char *yytext; |
---|
2344 | #define yytext_ptr yytext |
---|
2345 | |
---|
2346 | static yy_state_type yy_get_previous_state (void ); |
---|
2347 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); |
---|
2348 | static int yy_get_next_buffer (void ); |
---|
2349 | static void yy_fatal_error (yyconst char msg[] ); |
---|
2350 | |
---|
2351 | /* Done after the current pattern has been matched and before the |
---|
2352 | * corresponding action - sets up yytext. |
---|
2353 | */ |
---|
2354 | #define YY_DO_BEFORE_ACTION \ |
---|
2355 | (yytext_ptr) = yy_bp; \ |
---|
2356 | yyleng = (size_t) (yy_cp - yy_bp); \ |
---|
2357 | (yy_hold_char) = *yy_cp; \ |
---|
2358 | *yy_cp = '\0'; \ |
---|
2359 | (yy_c_buf_p) = yy_cp; |
---|
2360 | |
---|
2361 | #define YY_NUM_RULES 12 |
---|
2362 | #define YY_END_OF_BUFFER 13 |
---|
2363 | /* This struct is not used in this scanner, |
---|
2364 | but its presence is necessary. */ |
---|
2365 | struct yy_trans_info |
---|
2366 | { |
---|
2367 | flex_int32_t yy_verify; |
---|
2368 | flex_int32_t yy_nxt; |
---|
2369 | }; |
---|
2370 | static yyconst flex_int16_t yy_accept[77] = |
---|
2371 | { 0, |
---|
2372 | 0, 0, 0, 0, 13, 12, 11, 10, 12, 9, |
---|
2373 | 12, 12, 12, 9, 8, 8, 8, 8, 8, 8, |
---|
2374 | 11, 0, 4, 7, 7, 7, 5, 8, 8, 8, |
---|
2375 | 8, 8, 8, 8, 6, 8, 8, 8, 8, 3, |
---|
2376 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
---|
2377 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
---|
2378 | 8, 8, 8, 8, 8, 2, 8, 8, 8, 1, |
---|
2379 | 8, 8, 8, 8, 6, 0 |
---|
2380 | } ; |
---|
2381 | |
---|
2382 | static yyconst flex_int32_t yy_ec[256] = |
---|
2383 | { 0, |
---|
2384 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
---|
2385 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2386 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2387 | 1, 2, 1, 1, 1, 1, 4, 1, 1, 5, |
---|
2388 | 6, 1, 1, 7, 1, 1, 1, 8, 9, 10, |
---|
2389 | 11, 8, 8, 8, 12, 8, 8, 13, 14, 1, |
---|
2390 | 1, 1, 1, 1, 15, 16, 16, 17, 18, 19, |
---|
2391 | 20, 16, 21, 16, 16, 22, 23, 24, 25, 26, |
---|
2392 | 16, 27, 28, 29, 30, 16, 16, 31, 32, 16, |
---|
2393 | 33, 1, 34, 1, 35, 1, 36, 16, 16, 37, |
---|
2394 | |
---|
2395 | 38, 39, 40, 16, 41, 16, 16, 42, 43, 44, |
---|
2396 | 45, 46, 16, 47, 48, 49, 50, 16, 16, 51, |
---|
2397 | 52, 16, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2398 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2399 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2400 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2401 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2402 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2403 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2404 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2405 | |
---|
2406 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2407 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2408 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2409 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2410 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2411 | 1, 1, 1, 1, 1 |
---|
2412 | } ; |
---|
2413 | |
---|
2414 | static yyconst flex_int32_t yy_meta[53] = |
---|
2415 | { 0, |
---|
2416 | 1, 1, 2, 1, 1, 1, 1, 3, 3, 3, |
---|
2417 | 3, 3, 1, 1, 3, 3, 3, 3, 3, 3, |
---|
2418 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
---|
2419 | 3, 3, 1, 1, 3, 3, 3, 3, 3, 3, |
---|
2420 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
---|
2421 | 3, 3 |
---|
2422 | } ; |
---|
2423 | |
---|
2424 | static yyconst flex_int16_t yy_base[79] = |
---|
2425 | { 0, |
---|
2426 | 0, 0, 0, 0, 150, 164, 147, 164, 144, 164, |
---|
2427 | 36, 37, 38, 134, 0, 44, 32, 34, 44, 33, |
---|
2428 | 144, 141, 140, 164, 164, 164, 164, 0, 131, 31, |
---|
2429 | 34, 42, 39, 49, 0, 50, 49, 38, 56, 0, |
---|
2430 | 59, 52, 107, 68, 106, 72, 75, 72, 77, 81, |
---|
2431 | 79, 76, 75, 86, 73, 88, 85, 89, 90, 79, |
---|
2432 | 93, 86, 99, 97, 103, 0, 37, 115, 114, 0, |
---|
2433 | 108, 116, 121, 112, 0, 164, 160, 57 |
---|
2434 | } ; |
---|
2435 | |
---|
2436 | static yyconst flex_int16_t yy_def[79] = |
---|
2437 | { 0, |
---|
2438 | 76, 1, 1, 1, 76, 76, 76, 76, 77, 76, |
---|
2439 | 76, 76, 76, 76, 78, 78, 78, 78, 78, 78, |
---|
2440 | 76, 77, 77, 76, 76, 76, 76, 78, 78, 78, |
---|
2441 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
---|
2442 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
---|
2443 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
---|
2444 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
---|
2445 | 78, 78, 78, 78, 78, 0, 76, 76 |
---|
2446 | } ; |
---|
2447 | |
---|
2448 | static yyconst flex_int16_t yy_nxt[217] = |
---|
2449 | { 0, |
---|
2450 | 6, 7, 8, 9, 10, 10, 10, 6, 11, 12, |
---|
2451 | 13, 6, 14, 10, 15, 15, 15, 15, 16, 15, |
---|
2452 | 15, 15, 15, 17, 18, 19, 15, 15, 15, 20, |
---|
2453 | 15, 15, 10, 10, 15, 15, 15, 15, 16, 15, |
---|
2454 | 15, 15, 15, 17, 18, 19, 15, 15, 15, 20, |
---|
2455 | 15, 15, 24, 25, 26, 29, 31, 32, 33, 28, |
---|
2456 | 34, 36, 37, 38, 30, 39, 40, 41, 42, 43, |
---|
2457 | 44, 69, 24, 25, 26, 45, 31, 32, 46, 33, |
---|
2458 | 34, 36, 37, 38, 30, 39, 40, 41, 42, 43, |
---|
2459 | 48, 44, 50, 51, 52, 45, 53, 54, 46, 55, |
---|
2460 | |
---|
2461 | 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, |
---|
2462 | 48, 66, 50, 51, 52, 67, 53, 54, 68, 55, |
---|
2463 | 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, |
---|
2464 | 35, 66, 70, 71, 72, 67, 73, 74, 68, 75, |
---|
2465 | 49, 47, 35, 23, 23, 21, 27, 23, 21, 76, |
---|
2466 | 35, 76, 70, 71, 72, 76, 73, 74, 76, 75, |
---|
2467 | 22, 76, 22, 5, 76, 76, 76, 76, 76, 76, |
---|
2468 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2469 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2470 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2471 | |
---|
2472 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2473 | 76, 76, 76, 76, 76, 76 |
---|
2474 | } ; |
---|
2475 | |
---|
2476 | static yyconst flex_int16_t yy_chk[217] = |
---|
2477 | { 0, |
---|
2478 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2479 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2480 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2481 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2482 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
2483 | 1, 1, 11, 12, 13, 16, 17, 18, 19, 78, |
---|
2484 | 20, 30, 31, 32, 16, 33, 34, 36, 37, 38, |
---|
2485 | 39, 67, 11, 12, 13, 41, 17, 18, 42, 19, |
---|
2486 | 20, 30, 31, 32, 16, 33, 34, 36, 37, 38, |
---|
2487 | 44, 39, 46, 47, 48, 41, 49, 50, 42, 51, |
---|
2488 | |
---|
2489 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, |
---|
2490 | 44, 62, 46, 47, 48, 63, 49, 50, 64, 51, |
---|
2491 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, |
---|
2492 | 65, 62, 68, 69, 71, 63, 72, 73, 64, 74, |
---|
2493 | 45, 43, 29, 23, 22, 21, 14, 9, 7, 5, |
---|
2494 | 65, 0, 68, 69, 71, 0, 72, 73, 0, 74, |
---|
2495 | 77, 0, 77, 76, 76, 76, 76, 76, 76, 76, |
---|
2496 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2497 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2498 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2499 | |
---|
2500 | 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
---|
2501 | 76, 76, 76, 76, 76, 76 |
---|
2502 | } ; |
---|
2503 | |
---|
2504 | static yy_state_type yy_last_accepting_state; |
---|
2505 | static char *yy_last_accepting_cpos; |
---|
2506 | |
---|
2507 | extern int yy_flex_debug; |
---|
2508 | int yy_flex_debug = 0; |
---|
2509 | |
---|
2510 | /* The intent behind this definition is that it'll catch |
---|
2511 | * any uses of REJECT which flex missed. |
---|
2512 | */ |
---|
2513 | #define REJECT reject_used_but_not_detected |
---|
2514 | #define yymore() yymore_used_but_not_detected |
---|
2515 | #define YY_MORE_ADJ 0 |
---|
2516 | #define YY_RESTORE_YY_MORE_OFFSET |
---|
2517 | char *yytext; |
---|
2518 | #line 1 "convert.lex" |
---|
2519 | /******************************************************************************/ |
---|
2520 | /* */ |
---|
2521 | /* CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran) */ |
---|
2522 | /* */ |
---|
2523 | /* Copyright or or Copr. Laurent Debreu (Laurent.Debreu@imag.fr) */ |
---|
2524 | /* Cyril Mazauric (Cyril_Mazauric@yahoo.fr) */ |
---|
2525 | /* This software is governed by the CeCILL-C license under French law and */ |
---|
2526 | /* abiding by the rules of distribution of free software. You can use, */ |
---|
2527 | /* modify and/ or redistribute the software under the terms of the CeCILL-C */ |
---|
2528 | /* license as circulated by CEA, CNRS and INRIA at the following URL */ |
---|
2529 | /* "http://www.cecill.info". */ |
---|
2530 | /* */ |
---|
2531 | /* As a counterpart to the access to the source code and rights to copy, */ |
---|
2532 | /* modify and redistribute granted by the license, users are provided only */ |
---|
2533 | /* with a limited warranty and the software's author, the holder of the */ |
---|
2534 | /* economic rights, and the successive licensors have only limited */ |
---|
2535 | /* liability. */ |
---|
2536 | /* */ |
---|
2537 | /* In this respect, the user's attention is drawn to the risks associated */ |
---|
2538 | /* with loading, using, modifying and/or developing or reproducing the */ |
---|
2539 | /* software by the user in light of its specific status of free software, */ |
---|
2540 | /* that may mean that it is complicated to manipulate, and that also */ |
---|
2541 | /* therefore means that it is reserved for developers and experienced */ |
---|
2542 | /* professionals having in-depth computer knowledge. Users are therefore */ |
---|
2543 | /* encouraged to load and test the software's suitability as regards their */ |
---|
2544 | /* requirements in conditions enabling the security of their systems and/or */ |
---|
2545 | /* data to be ensured and, more generally, to use and operate it in the */ |
---|
2546 | /* same conditions as regards security. */ |
---|
2547 | /* */ |
---|
2548 | /* The fact that you are presently reading this means that you have had */ |
---|
2549 | /* knowledge of the CeCILL-C license and that you accept its terms. */ |
---|
2550 | /******************************************************************************/ |
---|
2551 | /* version 1.7 */ |
---|
2552 | /******************************************************************************/ |
---|
2553 | |
---|
2554 | #line 37 "convert.lex" |
---|
2555 | #include <math.h> |
---|
2556 | #include <stdlib.h> |
---|
2557 | #include <string.h> |
---|
2558 | int line_num=1; |
---|
2559 | extern FILE * yyin; |
---|
2560 | #define MAX_INCLUDE_DEPTH 30 |
---|
2561 | YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; |
---|
2562 | #line 566 "convert.yy.c" |
---|
2563 | |
---|
2564 | #define INITIAL 0 |
---|
2565 | #define character 1 |
---|
2566 | |
---|
2567 | #ifndef YY_NO_UNISTD_H |
---|
2568 | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
---|
2569 | * down here because we want the user's section 1 to have been scanned first. |
---|
2570 | * The user has a chance to override it with an option. |
---|
2571 | */ |
---|
2572 | #include <unistd.h> |
---|
2573 | #endif |
---|
2574 | |
---|
2575 | #ifndef YY_EXTRA_TYPE |
---|
2576 | #define YY_EXTRA_TYPE void * |
---|
2577 | #endif |
---|
2578 | |
---|
2579 | static int yy_init_globals (void ); |
---|
2580 | |
---|
2581 | /* Accessor methods to globals. |
---|
2582 | These are made visible to non-reentrant scanners for convenience. */ |
---|
2583 | |
---|
2584 | int yylex_destroy (void ); |
---|
2585 | |
---|
2586 | int yyget_debug (void ); |
---|
2587 | |
---|
2588 | void yyset_debug (int debug_flag ); |
---|
2589 | |
---|
2590 | YY_EXTRA_TYPE yyget_extra (void ); |
---|
2591 | |
---|
2592 | void yyset_extra (YY_EXTRA_TYPE user_defined ); |
---|
2593 | |
---|
2594 | FILE *yyget_in (void ); |
---|
2595 | |
---|
2596 | void yyset_in (FILE * in_str ); |
---|
2597 | |
---|
2598 | FILE *yyget_out (void ); |
---|
2599 | |
---|
2600 | void yyset_out (FILE * out_str ); |
---|
2601 | |
---|
2602 | yy_size_t yyget_leng (void ); |
---|
2603 | |
---|
2604 | char *yyget_text (void ); |
---|
2605 | |
---|
2606 | int yyget_lineno (void ); |
---|
2607 | |
---|
2608 | void yyset_lineno (int line_number ); |
---|
2609 | |
---|
2610 | /* Macros after this point can all be overridden by user definitions in |
---|
2611 | * section 1. |
---|
2612 | */ |
---|
2613 | |
---|
2614 | #ifndef YY_SKIP_YYWRAP |
---|
2615 | #ifdef __cplusplus |
---|
2616 | extern "C" int yywrap (void ); |
---|
2617 | #else |
---|
2618 | extern int yywrap (void ); |
---|
2619 | #endif |
---|
2620 | #endif |
---|
2621 | |
---|
2622 | static void yyunput (int c,char *buf_ptr ); |
---|
2623 | |
---|
2624 | #ifndef yytext_ptr |
---|
2625 | static void yy_flex_strncpy (char *,yyconst char *,int ); |
---|
2626 | #endif |
---|
2627 | |
---|
2628 | #ifdef YY_NEED_STRLEN |
---|
2629 | static int yy_flex_strlen (yyconst char * ); |
---|
2630 | #endif |
---|
2631 | |
---|
2632 | #ifndef YY_NO_INPUT |
---|
2633 | |
---|
2634 | #ifdef __cplusplus |
---|
2635 | static int yyinput (void ); |
---|
2636 | #else |
---|
2637 | static int input (void ); |
---|
2638 | #endif |
---|
2639 | |
---|
2640 | #endif |
---|
2641 | |
---|
2642 | /* Amount of stuff to slurp up with each read. */ |
---|
2643 | #ifndef YY_READ_BUF_SIZE |
---|
2644 | #define YY_READ_BUF_SIZE 8192 |
---|
2645 | #endif |
---|
2646 | |
---|
2647 | /* Copy whatever the last rule matched to the standard output. */ |
---|
2648 | #ifndef ECHO |
---|
2649 | /* This used to be an fputs(), but since the string might contain NUL's, |
---|
2650 | * we now use fwrite(). |
---|
2651 | */ |
---|
2652 | #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) |
---|
2653 | #endif |
---|
2654 | |
---|
2655 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
---|
2656 | * is returned in "result". |
---|
2657 | */ |
---|
2658 | #ifndef YY_INPUT |
---|
2659 | #define YY_INPUT(buf,result,max_size) \ |
---|
2660 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
---|
2661 | { \ |
---|
2662 | int c = '*'; \ |
---|
2663 | size_t n; \ |
---|
2664 | for ( n = 0; n < max_size && \ |
---|
2665 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
---|
2666 | buf[n] = (char) c; \ |
---|
2667 | if ( c == '\n' ) \ |
---|
2668 | buf[n++] = (char) c; \ |
---|
2669 | if ( c == EOF && ferror( yyin ) ) \ |
---|
2670 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
---|
2671 | result = n; \ |
---|
2672 | } \ |
---|
2673 | else \ |
---|
2674 | { \ |
---|
2675 | errno=0; \ |
---|
2676 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ |
---|
2677 | { \ |
---|
2678 | if( errno != EINTR) \ |
---|
2679 | { \ |
---|
2680 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
---|
2681 | break; \ |
---|
2682 | } \ |
---|
2683 | errno=0; \ |
---|
2684 | clearerr(yyin); \ |
---|
2685 | } \ |
---|
2686 | }\ |
---|
2687 | \ |
---|
2688 | |
---|
2689 | #endif |
---|
2690 | |
---|
2691 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
---|
2692 | * we don't want an extra ';' after the "return" because that will cause |
---|
2693 | * some compilers to complain about unreachable statements. |
---|
2694 | */ |
---|
2695 | #ifndef yyterminate |
---|
2696 | #define yyterminate() return YY_NULL |
---|
2697 | #endif |
---|
2698 | |
---|
2699 | /* Number of entries by which start-condition stack grows. */ |
---|
2700 | #ifndef YY_START_STACK_INCR |
---|
2701 | #define YY_START_STACK_INCR 25 |
---|
2702 | #endif |
---|
2703 | |
---|
2704 | /* Report a fatal error. */ |
---|
2705 | #ifndef YY_FATAL_ERROR |
---|
2706 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
---|
2707 | #endif |
---|
2708 | |
---|
2709 | /* end tables serialization structures and prototypes */ |
---|
2710 | |
---|
2711 | /* Default declaration of generated scanner - a define so the user can |
---|
2712 | * easily add parameters. |
---|
2713 | */ |
---|
2714 | #ifndef YY_DECL |
---|
2715 | #define YY_DECL_IS_OURS 1 |
---|
2716 | |
---|
2717 | extern int yylex (void); |
---|
2718 | |
---|
2719 | #define YY_DECL int yylex (void) |
---|
2720 | #endif /* !YY_DECL */ |
---|
2721 | |
---|
2722 | /* Code executed at the beginning of each rule, after yytext and yyleng |
---|
2723 | * have been set up. |
---|
2724 | */ |
---|
2725 | #ifndef YY_USER_ACTION |
---|
2726 | #define YY_USER_ACTION |
---|
2727 | #endif |
---|
2728 | |
---|
2729 | /* Code executed at the end of each rule. */ |
---|
2730 | #ifndef YY_BREAK |
---|
2731 | #define YY_BREAK break; |
---|
2732 | #endif |
---|
2733 | |
---|
2734 | #define YY_RULE_SETUP \ |
---|
2735 | YY_USER_ACTION |
---|
2736 | |
---|
2737 | /** The main scanner function which does all the work. |
---|
2738 | */ |
---|
2739 | YY_DECL |
---|
2740 | { |
---|
2741 | register yy_state_type yy_current_state; |
---|
2742 | register char *yy_cp, *yy_bp; |
---|
2743 | register int yy_act; |
---|
2744 | |
---|
2745 | #line 55 "convert.lex" |
---|
2746 | |
---|
2747 | #line 751 "convert.yy.c" |
---|
2748 | |
---|
2749 | if ( !(yy_init) ) |
---|
2750 | { |
---|
2751 | (yy_init) = 1; |
---|
2752 | |
---|
2753 | #ifdef YY_USER_INIT |
---|
2754 | YY_USER_INIT; |
---|
2755 | #endif |
---|
2756 | |
---|
2757 | if ( ! (yy_start) ) |
---|
2758 | (yy_start) = 1; /* first start state */ |
---|
2759 | |
---|
2760 | if ( ! yyin ) |
---|
2761 | yyin = stdin; |
---|
2762 | |
---|
2763 | if ( ! yyout ) |
---|
2764 | yyout = stdout; |
---|
2765 | |
---|
2766 | if ( ! YY_CURRENT_BUFFER ) { |
---|
2767 | yyensure_buffer_stack (); |
---|
2768 | YY_CURRENT_BUFFER_LVALUE = |
---|
2769 | yy_create_buffer(yyin,YY_BUF_SIZE ); |
---|
2770 | } |
---|
2771 | |
---|
2772 | yy_load_buffer_state( ); |
---|
2773 | } |
---|
2774 | |
---|
2775 | while ( 1 ) /* loops until end-of-file is reached */ |
---|
2776 | { |
---|
2777 | yy_cp = (yy_c_buf_p); |
---|
2778 | |
---|
2779 | /* Support of yytext. */ |
---|
2780 | *yy_cp = (yy_hold_char); |
---|
2781 | |
---|
2782 | /* yy_bp points to the position in yy_ch_buf of the start of |
---|
2783 | * the current run. |
---|
2784 | */ |
---|
2785 | yy_bp = yy_cp; |
---|
2786 | |
---|
2787 | yy_current_state = (yy_start); |
---|
2788 | yy_match: |
---|
2789 | do |
---|
2790 | { |
---|
2791 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
---|
2792 | if ( yy_accept[yy_current_state] ) |
---|
2793 | { |
---|
2794 | (yy_last_accepting_state) = yy_current_state; |
---|
2795 | (yy_last_accepting_cpos) = yy_cp; |
---|
2796 | } |
---|
2797 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
---|
2798 | { |
---|
2799 | yy_current_state = (int) yy_def[yy_current_state]; |
---|
2800 | if ( yy_current_state >= 77 ) |
---|
2801 | yy_c = yy_meta[(unsigned int) yy_c]; |
---|
2802 | } |
---|
2803 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
---|
2804 | ++yy_cp; |
---|
2805 | } |
---|
2806 | while ( yy_base[yy_current_state] != 164 ); |
---|
2807 | |
---|
2808 | yy_find_action: |
---|
2809 | yy_act = yy_accept[yy_current_state]; |
---|
2810 | if ( yy_act == 0 ) |
---|
2811 | { /* have to back up */ |
---|
2812 | yy_cp = (yy_last_accepting_cpos); |
---|
2813 | yy_current_state = (yy_last_accepting_state); |
---|
2814 | yy_act = yy_accept[yy_current_state]; |
---|
2815 | } |
---|
2816 | |
---|
2817 | YY_DO_BEFORE_ACTION; |
---|
2818 | |
---|
2819 | do_action: /* This label is used only to access EOF actions. */ |
---|
2820 | |
---|
2821 | switch ( yy_act ) |
---|
2822 | { /* beginning of action switch */ |
---|
2823 | case 0: /* must back up */ |
---|
2824 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
---|
2825 | *yy_cp = (yy_hold_char); |
---|
2826 | yy_cp = (yy_last_accepting_cpos); |
---|
2827 | yy_current_state = (yy_last_accepting_state); |
---|
2828 | goto yy_find_action; |
---|
2829 | |
---|
2830 | case 1: |
---|
2831 | YY_RULE_SETUP |
---|
2832 | #line 56 "convert.lex" |
---|
2833 | return TOK_MODULEMAIN; /* name of the module */ |
---|
2834 | YY_BREAK |
---|
2835 | case 2: |
---|
2836 | YY_RULE_SETUP |
---|
2837 | #line 57 "convert.lex" |
---|
2838 | return TOK_NOTGRIDDEP; /* variable which are not grid dependent */ |
---|
2839 | YY_BREAK |
---|
2840 | case 3: |
---|
2841 | YY_RULE_SETUP |
---|
2842 | #line 58 "convert.lex" |
---|
2843 | return TOK_USE; |
---|
2844 | YY_BREAK |
---|
2845 | case 4: |
---|
2846 | YY_RULE_SETUP |
---|
2847 | #line 59 "convert.lex" |
---|
2848 | {} |
---|
2849 | YY_BREAK |
---|
2850 | case 5: |
---|
2851 | YY_RULE_SETUP |
---|
2852 | #line 60 "convert.lex" |
---|
2853 | return TOK_SEP; |
---|
2854 | YY_BREAK |
---|
2855 | case 6: |
---|
2856 | YY_RULE_SETUP |
---|
2857 | #line 61 "convert.lex" |
---|
2858 | {strcpy(yylval.na,yytext); return TOK_USEITEM;} |
---|
2859 | YY_BREAK |
---|
2860 | case 7: |
---|
2861 | YY_RULE_SETUP |
---|
2862 | #line 62 "convert.lex" |
---|
2863 | {strcpy(yylval.na,yytext); return TOK_PROBTYPE;} |
---|
2864 | YY_BREAK |
---|
2865 | /* dimension of the problem */ |
---|
2866 | case 8: |
---|
2867 | YY_RULE_SETUP |
---|
2868 | #line 64 "convert.lex" |
---|
2869 | {strcpy(yylval.na,yytext); return TOK_NAME;} |
---|
2870 | YY_BREAK |
---|
2871 | case 9: |
---|
2872 | YY_RULE_SETUP |
---|
2873 | #line 65 "convert.lex" |
---|
2874 | {return (int) *yytext;} |
---|
2875 | YY_BREAK |
---|
2876 | case 10: |
---|
2877 | /* rule 10 can match eol */ |
---|
2878 | YY_RULE_SETUP |
---|
2879 | #line 66 "convert.lex" |
---|
2880 | {line_num++;return (int) *yytext;} |
---|
2881 | YY_BREAK |
---|
2882 | case 11: |
---|
2883 | YY_RULE_SETUP |
---|
2884 | #line 67 "convert.lex" |
---|
2885 | ; |
---|
2886 | YY_BREAK |
---|
2887 | case 12: |
---|
2888 | YY_RULE_SETUP |
---|
2889 | #line 68 "convert.lex" |
---|
2890 | ECHO; |
---|
2891 | YY_BREAK |
---|
2892 | #line 896 "convert.yy.c" |
---|
2893 | case YY_STATE_EOF(INITIAL): |
---|
2894 | case YY_STATE_EOF(character): |
---|
2895 | yyterminate(); |
---|
2896 | |
---|
2897 | case YY_END_OF_BUFFER: |
---|
2898 | { |
---|
2899 | /* Amount of text matched not including the EOB char. */ |
---|
2900 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; |
---|
2901 | |
---|
2902 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
---|
2903 | *yy_cp = (yy_hold_char); |
---|
2904 | YY_RESTORE_YY_MORE_OFFSET |
---|
2905 | |
---|
2906 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
---|
2907 | { |
---|
2908 | /* We're scanning a new file or input source. It's |
---|
2909 | * possible that this happened because the user |
---|
2910 | * just pointed yyin at a new source and called |
---|
2911 | * yylex(). If so, then we have to assure |
---|
2912 | * consistency between YY_CURRENT_BUFFER and our |
---|
2913 | * globals. Here is the right place to do so, because |
---|
2914 | * this is the first action (other than possibly a |
---|
2915 | * back-up) that will match for the new input source. |
---|
2916 | */ |
---|
2917 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
---|
2918 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
---|
2919 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
---|
2920 | } |
---|
2921 | |
---|
2922 | /* Note that here we test for yy_c_buf_p "<=" to the position |
---|
2923 | * of the first EOB in the buffer, since yy_c_buf_p will |
---|
2924 | * already have been incremented past the NUL character |
---|
2925 | * (since all states make transitions on EOB to the |
---|
2926 | * end-of-buffer state). Contrast this with the test |
---|
2927 | * in input(). |
---|
2928 | */ |
---|
2929 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
---|
2930 | { /* This was really a NUL. */ |
---|
2931 | yy_state_type yy_next_state; |
---|
2932 | |
---|
2933 | (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; |
---|
2934 | |
---|
2935 | yy_current_state = yy_get_previous_state( ); |
---|
2936 | |
---|
2937 | /* Okay, we're now positioned to make the NUL |
---|
2938 | * transition. We couldn't have |
---|
2939 | * yy_get_previous_state() go ahead and do it |
---|
2940 | * for us because it doesn't know how to deal |
---|
2941 | * with the possibility of jamming (and we don't |
---|
2942 | * want to build jamming into it because then it |
---|
2943 | * will run more slowly). |
---|
2944 | */ |
---|
2945 | |
---|
2946 | yy_next_state = yy_try_NUL_trans( yy_current_state ); |
---|
2947 | |
---|
2948 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
---|
2949 | |
---|
2950 | if ( yy_next_state ) |
---|
2951 | { |
---|
2952 | /* Consume the NUL. */ |
---|
2953 | yy_cp = ++(yy_c_buf_p); |
---|
2954 | yy_current_state = yy_next_state; |
---|
2955 | goto yy_match; |
---|
2956 | } |
---|
2957 | |
---|
2958 | else |
---|
2959 | { |
---|
2960 | yy_cp = (yy_c_buf_p); |
---|
2961 | goto yy_find_action; |
---|
2962 | } |
---|
2963 | } |
---|
2964 | |
---|
2965 | else switch ( yy_get_next_buffer( ) ) |
---|
2966 | { |
---|
2967 | case EOB_ACT_END_OF_FILE: |
---|
2968 | { |
---|
2969 | (yy_did_buffer_switch_on_eof) = 0; |
---|
2970 | |
---|
2971 | if ( yywrap( ) ) |
---|
2972 | { |
---|
2973 | /* Note: because we've taken care in |
---|
2974 | * yy_get_next_buffer() to have set up |
---|
2975 | * yytext, we can now set up |
---|
2976 | * yy_c_buf_p so that if some total |
---|
2977 | * hoser (like flex itself) wants to |
---|
2978 | * call the scanner after we return the |
---|
2979 | * YY_NULL, it'll still work - another |
---|
2980 | * YY_NULL will get returned. |
---|
2981 | */ |
---|
2982 | (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; |
---|
2983 | |
---|
2984 | yy_act = YY_STATE_EOF(YY_START); |
---|
2985 | goto do_action; |
---|
2986 | } |
---|
2987 | |
---|
2988 | else |
---|
2989 | { |
---|
2990 | if ( ! (yy_did_buffer_switch_on_eof) ) |
---|
2991 | YY_NEW_FILE; |
---|
2992 | } |
---|
2993 | break; |
---|
2994 | } |
---|
2995 | |
---|
2996 | case EOB_ACT_CONTINUE_SCAN: |
---|
2997 | (yy_c_buf_p) = |
---|
2998 | (yytext_ptr) + yy_amount_of_matched_text; |
---|
2999 | |
---|
3000 | yy_current_state = yy_get_previous_state( ); |
---|
3001 | |
---|
3002 | yy_cp = (yy_c_buf_p); |
---|
3003 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
---|
3004 | goto yy_match; |
---|
3005 | |
---|
3006 | case EOB_ACT_LAST_MATCH: |
---|
3007 | (yy_c_buf_p) = |
---|
3008 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; |
---|
3009 | |
---|
3010 | yy_current_state = yy_get_previous_state( ); |
---|
3011 | |
---|
3012 | yy_cp = (yy_c_buf_p); |
---|
3013 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
---|
3014 | goto yy_find_action; |
---|
3015 | } |
---|
3016 | break; |
---|
3017 | } |
---|
3018 | |
---|
3019 | default: |
---|
3020 | YY_FATAL_ERROR( |
---|
3021 | "fatal flex scanner internal error--no action found" ); |
---|
3022 | } /* end of action switch */ |
---|
3023 | } /* end of scanning one token */ |
---|
3024 | } /* end of yylex */ |
---|
3025 | |
---|
3026 | /* yy_get_next_buffer - try to read in a new buffer |
---|
3027 | * |
---|
3028 | * Returns a code representing an action: |
---|
3029 | * EOB_ACT_LAST_MATCH - |
---|
3030 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
---|
3031 | * EOB_ACT_END_OF_FILE - end of file |
---|
3032 | */ |
---|
3033 | static int yy_get_next_buffer (void) |
---|
3034 | { |
---|
3035 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
---|
3036 | register char *source = (yytext_ptr); |
---|
3037 | register int number_to_move, i; |
---|
3038 | int ret_val; |
---|
3039 | |
---|
3040 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) |
---|
3041 | YY_FATAL_ERROR( |
---|
3042 | "fatal flex scanner internal error--end of buffer missed" ); |
---|
3043 | |
---|
3044 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
---|
3045 | { /* Don't try to fill the buffer, so this is an EOF. */ |
---|
3046 | if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) |
---|
3047 | { |
---|
3048 | /* We matched a single character, the EOB, so |
---|
3049 | * treat this as a final EOF. |
---|
3050 | */ |
---|
3051 | return EOB_ACT_END_OF_FILE; |
---|
3052 | } |
---|
3053 | |
---|
3054 | else |
---|
3055 | { |
---|
3056 | /* We matched some text prior to the EOB, first |
---|
3057 | * process it. |
---|
3058 | */ |
---|
3059 | return EOB_ACT_LAST_MATCH; |
---|
3060 | } |
---|
3061 | } |
---|
3062 | |
---|
3063 | /* Try to read more data. */ |
---|
3064 | |
---|
3065 | /* First move last chars to start of buffer. */ |
---|
3066 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; |
---|
3067 | |
---|
3068 | for ( i = 0; i < number_to_move; ++i ) |
---|
3069 | *(dest++) = *(source++); |
---|
3070 | |
---|
3071 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
---|
3072 | /* don't do the read, it's not guaranteed to return an EOF, |
---|
3073 | * just force an EOF |
---|
3074 | */ |
---|
3075 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; |
---|
3076 | |
---|
3077 | else |
---|
3078 | { |
---|
3079 | yy_size_t num_to_read = |
---|
3080 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
---|
3081 | |
---|
3082 | while ( num_to_read <= 0 ) |
---|
3083 | { /* Not enough room in the buffer - grow it. */ |
---|
3084 | |
---|
3085 | /* just a shorter name for the current buffer */ |
---|
3086 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
---|
3087 | |
---|
3088 | int yy_c_buf_p_offset = |
---|
3089 | (int) ((yy_c_buf_p) - b->yy_ch_buf); |
---|
3090 | |
---|
3091 | if ( b->yy_is_our_buffer ) |
---|
3092 | { |
---|
3093 | yy_size_t new_size = b->yy_buf_size * 2; |
---|
3094 | |
---|
3095 | if ( new_size <= 0 ) |
---|
3096 | b->yy_buf_size += b->yy_buf_size / 8; |
---|
3097 | else |
---|
3098 | b->yy_buf_size *= 2; |
---|
3099 | |
---|
3100 | b->yy_ch_buf = (char *) |
---|
3101 | /* Include room in for 2 EOB chars. */ |
---|
3102 | yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); |
---|
3103 | } |
---|
3104 | else |
---|
3105 | /* Can't grow it, we don't own it. */ |
---|
3106 | b->yy_ch_buf = 0; |
---|
3107 | |
---|
3108 | if ( ! b->yy_ch_buf ) |
---|
3109 | YY_FATAL_ERROR( |
---|
3110 | "fatal error - scanner input buffer overflow" ); |
---|
3111 | |
---|
3112 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
---|
3113 | |
---|
3114 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
---|
3115 | number_to_move - 1; |
---|
3116 | |
---|
3117 | } |
---|
3118 | |
---|
3119 | if ( num_to_read > YY_READ_BUF_SIZE ) |
---|
3120 | num_to_read = YY_READ_BUF_SIZE; |
---|
3121 | |
---|
3122 | /* Read in more data. */ |
---|
3123 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
---|
3124 | (yy_n_chars), num_to_read ); |
---|
3125 | |
---|
3126 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
---|
3127 | } |
---|
3128 | |
---|
3129 | if ( (yy_n_chars) == 0 ) |
---|
3130 | { |
---|
3131 | if ( number_to_move == YY_MORE_ADJ ) |
---|
3132 | { |
---|
3133 | ret_val = EOB_ACT_END_OF_FILE; |
---|
3134 | yyrestart(yyin ); |
---|
3135 | } |
---|
3136 | |
---|
3137 | else |
---|
3138 | { |
---|
3139 | ret_val = EOB_ACT_LAST_MATCH; |
---|
3140 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
---|
3141 | YY_BUFFER_EOF_PENDING; |
---|
3142 | } |
---|
3143 | } |
---|
3144 | |
---|
3145 | else |
---|
3146 | ret_val = EOB_ACT_CONTINUE_SCAN; |
---|
3147 | |
---|
3148 | if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
---|
3149 | /* Extend the array by 50%, plus the number we really need. */ |
---|
3150 | yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); |
---|
3151 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); |
---|
3152 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
---|
3153 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
---|
3154 | } |
---|
3155 | |
---|
3156 | (yy_n_chars) += number_to_move; |
---|
3157 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
---|
3158 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
---|
3159 | |
---|
3160 | (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
---|
3161 | |
---|
3162 | return ret_val; |
---|
3163 | } |
---|
3164 | |
---|
3165 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
---|
3166 | |
---|
3167 | static yy_state_type yy_get_previous_state (void) |
---|
3168 | { |
---|
3169 | register yy_state_type yy_current_state; |
---|
3170 | register char *yy_cp; |
---|
3171 | |
---|
3172 | yy_current_state = (yy_start); |
---|
3173 | |
---|
3174 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
---|
3175 | { |
---|
3176 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
---|
3177 | if ( yy_accept[yy_current_state] ) |
---|
3178 | { |
---|
3179 | (yy_last_accepting_state) = yy_current_state; |
---|
3180 | (yy_last_accepting_cpos) = yy_cp; |
---|
3181 | } |
---|
3182 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
---|
3183 | { |
---|
3184 | yy_current_state = (int) yy_def[yy_current_state]; |
---|
3185 | if ( yy_current_state >= 77 ) |
---|
3186 | yy_c = yy_meta[(unsigned int) yy_c]; |
---|
3187 | } |
---|
3188 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
---|
3189 | } |
---|
3190 | |
---|
3191 | return yy_current_state; |
---|
3192 | } |
---|
3193 | |
---|
3194 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
---|
3195 | * |
---|
3196 | * synopsis |
---|
3197 | * next_state = yy_try_NUL_trans( current_state ); |
---|
3198 | */ |
---|
3199 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
---|
3200 | { |
---|
3201 | register int yy_is_jam; |
---|
3202 | register char *yy_cp = (yy_c_buf_p); |
---|
3203 | |
---|
3204 | register YY_CHAR yy_c = 1; |
---|
3205 | if ( yy_accept[yy_current_state] ) |
---|
3206 | { |
---|
3207 | (yy_last_accepting_state) = yy_current_state; |
---|
3208 | (yy_last_accepting_cpos) = yy_cp; |
---|
3209 | } |
---|
3210 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
---|
3211 | { |
---|
3212 | yy_current_state = (int) yy_def[yy_current_state]; |
---|
3213 | if ( yy_current_state >= 77 ) |
---|
3214 | yy_c = yy_meta[(unsigned int) yy_c]; |
---|
3215 | } |
---|
3216 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
---|
3217 | yy_is_jam = (yy_current_state == 76); |
---|
3218 | |
---|
3219 | return yy_is_jam ? 0 : yy_current_state; |
---|
3220 | } |
---|
3221 | |
---|
3222 | static void yyunput (int c, register char * yy_bp ) |
---|
3223 | { |
---|
3224 | register char *yy_cp; |
---|
3225 | |
---|
3226 | yy_cp = (yy_c_buf_p); |
---|
3227 | |
---|
3228 | /* undo effects of setting up yytext */ |
---|
3229 | *yy_cp = (yy_hold_char); |
---|
3230 | |
---|
3231 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
---|
3232 | { /* need to shift things up to make room */ |
---|
3233 | /* +2 for EOB chars. */ |
---|
3234 | register yy_size_t number_to_move = (yy_n_chars) + 2; |
---|
3235 | register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
---|
3236 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
---|
3237 | register char *source = |
---|
3238 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
---|
3239 | |
---|
3240 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
---|
3241 | *--dest = *--source; |
---|
3242 | |
---|
3243 | yy_cp += (int) (dest - source); |
---|
3244 | yy_bp += (int) (dest - source); |
---|
3245 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
---|
3246 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
---|
3247 | |
---|
3248 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
---|
3249 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
---|
3250 | } |
---|
3251 | |
---|
3252 | *--yy_cp = (char) c; |
---|
3253 | |
---|
3254 | (yytext_ptr) = yy_bp; |
---|
3255 | (yy_hold_char) = *yy_cp; |
---|
3256 | (yy_c_buf_p) = yy_cp; |
---|
3257 | } |
---|
3258 | |
---|
3259 | #ifndef YY_NO_INPUT |
---|
3260 | #ifdef __cplusplus |
---|
3261 | static int yyinput (void) |
---|
3262 | #else |
---|
3263 | static int input (void) |
---|
3264 | #endif |
---|
3265 | |
---|
3266 | { |
---|
3267 | int c; |
---|
3268 | |
---|
3269 | *(yy_c_buf_p) = (yy_hold_char); |
---|
3270 | |
---|
3271 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
---|
3272 | { |
---|
3273 | /* yy_c_buf_p now points to the character we want to return. |
---|
3274 | * If this occurs *before* the EOB characters, then it's a |
---|
3275 | * valid NUL; if not, then we've hit the end of the buffer. |
---|
3276 | */ |
---|
3277 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
---|
3278 | /* This was really a NUL. */ |
---|
3279 | *(yy_c_buf_p) = '\0'; |
---|
3280 | |
---|
3281 | else |
---|
3282 | { /* need more input */ |
---|
3283 | yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); |
---|
3284 | ++(yy_c_buf_p); |
---|
3285 | |
---|
3286 | switch ( yy_get_next_buffer( ) ) |
---|
3287 | { |
---|
3288 | case EOB_ACT_LAST_MATCH: |
---|
3289 | /* This happens because yy_g_n_b() |
---|
3290 | * sees that we've accumulated a |
---|
3291 | * token and flags that we need to |
---|
3292 | * try matching the token before |
---|
3293 | * proceeding. But for input(), |
---|
3294 | * there's no matching to consider. |
---|
3295 | * So convert the EOB_ACT_LAST_MATCH |
---|
3296 | * to EOB_ACT_END_OF_FILE. |
---|
3297 | */ |
---|
3298 | |
---|
3299 | /* Reset buffer status. */ |
---|
3300 | yyrestart(yyin ); |
---|
3301 | |
---|
3302 | /*FALLTHROUGH*/ |
---|
3303 | |
---|
3304 | case EOB_ACT_END_OF_FILE: |
---|
3305 | { |
---|
3306 | if ( yywrap( ) ) |
---|
3307 | return EOF; |
---|
3308 | |
---|
3309 | if ( ! (yy_did_buffer_switch_on_eof) ) |
---|
3310 | YY_NEW_FILE; |
---|
3311 | #ifdef __cplusplus |
---|
3312 | return yyinput(); |
---|
3313 | #else |
---|
3314 | return input(); |
---|
3315 | #endif |
---|
3316 | } |
---|
3317 | |
---|
3318 | case EOB_ACT_CONTINUE_SCAN: |
---|
3319 | (yy_c_buf_p) = (yytext_ptr) + offset; |
---|
3320 | break; |
---|
3321 | } |
---|
3322 | } |
---|
3323 | } |
---|
3324 | |
---|
3325 | c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ |
---|
3326 | *(yy_c_buf_p) = '\0'; /* preserve yytext */ |
---|
3327 | (yy_hold_char) = *++(yy_c_buf_p); |
---|
3328 | |
---|
3329 | return c; |
---|
3330 | } |
---|
3331 | #endif /* ifndef YY_NO_INPUT */ |
---|
3332 | |
---|
3333 | /** Immediately switch to a different input stream. |
---|
3334 | * @param input_file A readable stream. |
---|
3335 | * |
---|
3336 | * @note This function does not reset the start condition to @c INITIAL . |
---|
3337 | */ |
---|
3338 | void yyrestart (FILE * input_file ) |
---|
3339 | { |
---|
3340 | |
---|
3341 | if ( ! YY_CURRENT_BUFFER ){ |
---|
3342 | yyensure_buffer_stack (); |
---|
3343 | YY_CURRENT_BUFFER_LVALUE = |
---|
3344 | yy_create_buffer(yyin,YY_BUF_SIZE ); |
---|
3345 | } |
---|
3346 | |
---|
3347 | yy_init_buffer(YY_CURRENT_BUFFER,input_file ); |
---|
3348 | yy_load_buffer_state( ); |
---|
3349 | } |
---|
3350 | |
---|
3351 | /** Switch to a different input buffer. |
---|
3352 | * @param new_buffer The new input buffer. |
---|
3353 | * |
---|
3354 | */ |
---|
3355 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) |
---|
3356 | { |
---|
3357 | |
---|
3358 | /* TODO. We should be able to replace this entire function body |
---|
3359 | * with |
---|
3360 | * yypop_buffer_state(); |
---|
3361 | * yypush_buffer_state(new_buffer); |
---|
3362 | */ |
---|
3363 | yyensure_buffer_stack (); |
---|
3364 | if ( YY_CURRENT_BUFFER == new_buffer ) |
---|
3365 | return; |
---|
3366 | |
---|
3367 | if ( YY_CURRENT_BUFFER ) |
---|
3368 | { |
---|
3369 | /* Flush out information for old buffer. */ |
---|
3370 | *(yy_c_buf_p) = (yy_hold_char); |
---|
3371 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
---|
3372 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
---|
3373 | } |
---|
3374 | |
---|
3375 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
---|
3376 | yy_load_buffer_state( ); |
---|
3377 | |
---|
3378 | /* We don't actually know whether we did this switch during |
---|
3379 | * EOF (yywrap()) processing, but the only time this flag |
---|
3380 | * is looked at is after yywrap() is called, so it's safe |
---|
3381 | * to go ahead and always set it. |
---|
3382 | */ |
---|
3383 | (yy_did_buffer_switch_on_eof) = 1; |
---|
3384 | } |
---|
3385 | |
---|
3386 | static void yy_load_buffer_state (void) |
---|
3387 | { |
---|
3388 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
---|
3389 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
---|
3390 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
---|
3391 | (yy_hold_char) = *(yy_c_buf_p); |
---|
3392 | } |
---|
3393 | |
---|
3394 | /** Allocate and initialize an input buffer state. |
---|
3395 | * @param file A readable stream. |
---|
3396 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
---|
3397 | * |
---|
3398 | * @return the allocated buffer state. |
---|
3399 | */ |
---|
3400 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) |
---|
3401 | { |
---|
3402 | YY_BUFFER_STATE b; |
---|
3403 | |
---|
3404 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); |
---|
3405 | if ( ! b ) |
---|
3406 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
---|
3407 | |
---|
3408 | b->yy_buf_size = size; |
---|
3409 | |
---|
3410 | /* yy_ch_buf has to be 2 characters longer than the size given because |
---|
3411 | * we need to put in 2 end-of-buffer characters. |
---|
3412 | */ |
---|
3413 | b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); |
---|
3414 | if ( ! b->yy_ch_buf ) |
---|
3415 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
---|
3416 | |
---|
3417 | b->yy_is_our_buffer = 1; |
---|
3418 | |
---|
3419 | yy_init_buffer(b,file ); |
---|
3420 | |
---|
3421 | return b; |
---|
3422 | } |
---|
3423 | |
---|
3424 | /** Destroy the buffer. |
---|
3425 | * @param b a buffer created with yy_create_buffer() |
---|
3426 | * |
---|
3427 | */ |
---|
3428 | void yy_delete_buffer (YY_BUFFER_STATE b ) |
---|
3429 | { |
---|
3430 | |
---|
3431 | if ( ! b ) |
---|
3432 | return; |
---|
3433 | |
---|
3434 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
---|
3435 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
---|
3436 | |
---|
3437 | if ( b->yy_is_our_buffer ) |
---|
3438 | yyfree((void *) b->yy_ch_buf ); |
---|
3439 | |
---|
3440 | yyfree((void *) b ); |
---|
3441 | } |
---|
3442 | |
---|
3443 | /* Initializes or reinitializes a buffer. |
---|
3444 | * This function is sometimes called more than once on the same buffer, |
---|
3445 | * such as during a yyrestart() or at EOF. |
---|
3446 | */ |
---|
3447 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
---|
3448 | |
---|
3449 | { |
---|
3450 | int oerrno = errno; |
---|
3451 | |
---|
3452 | yy_flush_buffer(b ); |
---|
3453 | |
---|
3454 | b->yy_input_file = file; |
---|
3455 | b->yy_fill_buffer = 1; |
---|
3456 | |
---|
3457 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
---|
3458 | * called from yyrestart() or through yy_get_next_buffer. |
---|
3459 | * In that case, we don't want to reset the lineno or column. |
---|
3460 | */ |
---|
3461 | if (b != YY_CURRENT_BUFFER){ |
---|
3462 | b->yy_bs_lineno = 1; |
---|
3463 | b->yy_bs_column = 0; |
---|
3464 | } |
---|
3465 | |
---|
3466 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
---|
3467 | |
---|
3468 | errno = oerrno; |
---|
3469 | } |
---|
3470 | |
---|
3471 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
---|
3472 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
---|
3473 | * |
---|
3474 | */ |
---|
3475 | void yy_flush_buffer (YY_BUFFER_STATE b ) |
---|
3476 | { |
---|
3477 | if ( ! b ) |
---|
3478 | return; |
---|
3479 | |
---|
3480 | b->yy_n_chars = 0; |
---|
3481 | |
---|
3482 | /* We always need two end-of-buffer characters. The first causes |
---|
3483 | * a transition to the end-of-buffer state. The second causes |
---|
3484 | * a jam in that state. |
---|
3485 | */ |
---|
3486 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
---|
3487 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
---|
3488 | |
---|
3489 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
---|
3490 | |
---|
3491 | b->yy_at_bol = 1; |
---|
3492 | b->yy_buffer_status = YY_BUFFER_NEW; |
---|
3493 | |
---|
3494 | if ( b == YY_CURRENT_BUFFER ) |
---|
3495 | yy_load_buffer_state( ); |
---|
3496 | } |
---|
3497 | |
---|
3498 | /** Pushes the new state onto the stack. The new state becomes |
---|
3499 | * the current state. This function will allocate the stack |
---|
3500 | * if necessary. |
---|
3501 | * @param new_buffer The new state. |
---|
3502 | * |
---|
3503 | */ |
---|
3504 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) |
---|
3505 | { |
---|
3506 | if (new_buffer == NULL) |
---|
3507 | return; |
---|
3508 | |
---|
3509 | yyensure_buffer_stack(); |
---|
3510 | |
---|
3511 | /* This block is copied from yy_switch_to_buffer. */ |
---|
3512 | if ( YY_CURRENT_BUFFER ) |
---|
3513 | { |
---|
3514 | /* Flush out information for old buffer. */ |
---|
3515 | *(yy_c_buf_p) = (yy_hold_char); |
---|
3516 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
---|
3517 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
---|
3518 | } |
---|
3519 | |
---|
3520 | /* Only push if top exists. Otherwise, replace top. */ |
---|
3521 | if (YY_CURRENT_BUFFER) |
---|
3522 | (yy_buffer_stack_top)++; |
---|
3523 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
---|
3524 | |
---|
3525 | /* copied from yy_switch_to_buffer. */ |
---|
3526 | yy_load_buffer_state( ); |
---|
3527 | (yy_did_buffer_switch_on_eof) = 1; |
---|
3528 | } |
---|
3529 | |
---|
3530 | /** Removes and deletes the top of the stack, if present. |
---|
3531 | * The next element becomes the new top. |
---|
3532 | * |
---|
3533 | */ |
---|
3534 | void yypop_buffer_state (void) |
---|
3535 | { |
---|
3536 | if (!YY_CURRENT_BUFFER) |
---|
3537 | return; |
---|
3538 | |
---|
3539 | yy_delete_buffer(YY_CURRENT_BUFFER ); |
---|
3540 | YY_CURRENT_BUFFER_LVALUE = NULL; |
---|
3541 | if ((yy_buffer_stack_top) > 0) |
---|
3542 | --(yy_buffer_stack_top); |
---|
3543 | |
---|
3544 | if (YY_CURRENT_BUFFER) { |
---|
3545 | yy_load_buffer_state( ); |
---|
3546 | (yy_did_buffer_switch_on_eof) = 1; |
---|
3547 | } |
---|
3548 | } |
---|
3549 | |
---|
3550 | /* Allocates the stack if it does not exist. |
---|
3551 | * Guarantees space for at least one push. |
---|
3552 | */ |
---|
3553 | static void yyensure_buffer_stack (void) |
---|
3554 | { |
---|
3555 | yy_size_t num_to_alloc; |
---|
3556 | |
---|
3557 | if (!(yy_buffer_stack)) { |
---|
3558 | |
---|
3559 | /* First allocation is just for 2 elements, since we don't know if this |
---|
3560 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
---|
3561 | * immediate realloc on the next call. |
---|
3562 | */ |
---|
3563 | num_to_alloc = 1; |
---|
3564 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc |
---|
3565 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
---|
3566 | ); |
---|
3567 | if ( ! (yy_buffer_stack) ) |
---|
3568 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
---|
3569 | |
---|
3570 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
---|
3571 | |
---|
3572 | (yy_buffer_stack_max) = num_to_alloc; |
---|
3573 | (yy_buffer_stack_top) = 0; |
---|
3574 | return; |
---|
3575 | } |
---|
3576 | |
---|
3577 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ |
---|
3578 | |
---|
3579 | /* Increase the buffer to prepare for a possible push. */ |
---|
3580 | int grow_size = 8 /* arbitrary grow size */; |
---|
3581 | |
---|
3582 | num_to_alloc = (yy_buffer_stack_max) + grow_size; |
---|
3583 | (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc |
---|
3584 | ((yy_buffer_stack), |
---|
3585 | num_to_alloc * sizeof(struct yy_buffer_state*) |
---|
3586 | ); |
---|
3587 | if ( ! (yy_buffer_stack) ) |
---|
3588 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
---|
3589 | |
---|
3590 | /* zero only the new slots.*/ |
---|
3591 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
---|
3592 | (yy_buffer_stack_max) = num_to_alloc; |
---|
3593 | } |
---|
3594 | } |
---|
3595 | |
---|
3596 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
---|
3597 | * @param base the character buffer |
---|
3598 | * @param size the size in bytes of the character buffer |
---|
3599 | * |
---|
3600 | * @return the newly allocated buffer state object. |
---|
3601 | */ |
---|
3602 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) |
---|
3603 | { |
---|
3604 | YY_BUFFER_STATE b; |
---|
3605 | |
---|
3606 | if ( size < 2 || |
---|
3607 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
---|
3608 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
---|
3609 | /* They forgot to leave room for the EOB's. */ |
---|
3610 | return 0; |
---|
3611 | |
---|
3612 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); |
---|
3613 | if ( ! b ) |
---|
3614 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
---|
3615 | |
---|
3616 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
---|
3617 | b->yy_buf_pos = b->yy_ch_buf = base; |
---|
3618 | b->yy_is_our_buffer = 0; |
---|
3619 | b->yy_input_file = 0; |
---|
3620 | b->yy_n_chars = b->yy_buf_size; |
---|
3621 | b->yy_is_interactive = 0; |
---|
3622 | b->yy_at_bol = 1; |
---|
3623 | b->yy_fill_buffer = 0; |
---|
3624 | b->yy_buffer_status = YY_BUFFER_NEW; |
---|
3625 | |
---|
3626 | yy_switch_to_buffer(b ); |
---|
3627 | |
---|
3628 | return b; |
---|
3629 | } |
---|
3630 | |
---|
3631 | /** Setup the input buffer state to scan a string. The next call to yylex() will |
---|
3632 | * scan from a @e copy of @a str. |
---|
3633 | * @param yystr a NUL-terminated string to scan |
---|
3634 | * |
---|
3635 | * @return the newly allocated buffer state object. |
---|
3636 | * @note If you want to scan bytes that may contain NUL values, then use |
---|
3637 | * yy_scan_bytes() instead. |
---|
3638 | */ |
---|
3639 | YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) |
---|
3640 | { |
---|
3641 | |
---|
3642 | return yy_scan_bytes(yystr,strlen(yystr) ); |
---|
3643 | } |
---|
3644 | |
---|
3645 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
---|
3646 | * scan from a @e copy of @a bytes. |
---|
3647 | * @param yybytes the byte buffer to scan |
---|
3648 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
---|
3649 | * |
---|
3650 | * @return the newly allocated buffer state object. |
---|
3651 | */ |
---|
3652 | YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) |
---|
3653 | { |
---|
3654 | YY_BUFFER_STATE b; |
---|
3655 | char *buf; |
---|
3656 | yy_size_t n; |
---|
3657 | int i; |
---|
3658 | |
---|
3659 | /* Get memory for full buffer, including space for trailing EOB's. */ |
---|
3660 | n = _yybytes_len + 2; |
---|
3661 | buf = (char *) yyalloc(n ); |
---|
3662 | if ( ! buf ) |
---|
3663 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
---|
3664 | |
---|
3665 | for ( i = 0; i < _yybytes_len; ++i ) |
---|
3666 | buf[i] = yybytes[i]; |
---|
3667 | |
---|
3668 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
---|
3669 | |
---|
3670 | b = yy_scan_buffer(buf,n ); |
---|
3671 | if ( ! b ) |
---|
3672 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
---|
3673 | |
---|
3674 | /* It's okay to grow etc. this buffer, and we should throw it |
---|
3675 | * away when we're done. |
---|
3676 | */ |
---|
3677 | b->yy_is_our_buffer = 1; |
---|
3678 | |
---|
3679 | return b; |
---|
3680 | } |
---|
3681 | |
---|
3682 | #ifndef YY_EXIT_FAILURE |
---|
3683 | #define YY_EXIT_FAILURE 2 |
---|
3684 | #endif |
---|
3685 | |
---|
3686 | static void yy_fatal_error (yyconst char* msg ) |
---|
3687 | { |
---|
3688 | (void) fprintf( stderr, "%s\n", msg ); |
---|
3689 | exit( YY_EXIT_FAILURE ); |
---|
3690 | } |
---|
3691 | |
---|
3692 | /* Redefine yyless() so it works in section 3 code. */ |
---|
3693 | |
---|
3694 | #undef yyless |
---|
3695 | #define yyless(n) \ |
---|
3696 | do \ |
---|
3697 | { \ |
---|
3698 | /* Undo effects of setting up yytext. */ \ |
---|
3699 | int yyless_macro_arg = (n); \ |
---|
3700 | YY_LESS_LINENO(yyless_macro_arg);\ |
---|
3701 | yytext[yyleng] = (yy_hold_char); \ |
---|
3702 | (yy_c_buf_p) = yytext + yyless_macro_arg; \ |
---|
3703 | (yy_hold_char) = *(yy_c_buf_p); \ |
---|
3704 | *(yy_c_buf_p) = '\0'; \ |
---|
3705 | yyleng = yyless_macro_arg; \ |
---|
3706 | } \ |
---|
3707 | while ( 0 ) |
---|
3708 | |
---|
3709 | /* Accessor methods (get/set functions) to struct members. */ |
---|
3710 | |
---|
3711 | /** Get the current line number. |
---|
3712 | * |
---|
3713 | */ |
---|
3714 | int yyget_lineno (void) |
---|
3715 | { |
---|
3716 | |
---|
3717 | return yylineno; |
---|
3718 | } |
---|
3719 | |
---|
3720 | /** Get the input stream. |
---|
3721 | * |
---|
3722 | */ |
---|
3723 | FILE *yyget_in (void) |
---|
3724 | { |
---|
3725 | return yyin; |
---|
3726 | } |
---|
3727 | |
---|
3728 | /** Get the output stream. |
---|
3729 | * |
---|
3730 | */ |
---|
3731 | FILE *yyget_out (void) |
---|
3732 | { |
---|
3733 | return yyout; |
---|
3734 | } |
---|
3735 | |
---|
3736 | /** Get the length of the current token. |
---|
3737 | * |
---|
3738 | */ |
---|
3739 | yy_size_t yyget_leng (void) |
---|
3740 | { |
---|
3741 | return yyleng; |
---|
3742 | } |
---|
3743 | |
---|
3744 | /** Get the current token. |
---|
3745 | * |
---|
3746 | */ |
---|
3747 | |
---|
3748 | char *yyget_text (void) |
---|
3749 | { |
---|
3750 | return yytext; |
---|
3751 | } |
---|
3752 | |
---|
3753 | /** Set the current line number. |
---|
3754 | * @param line_number |
---|
3755 | * |
---|
3756 | */ |
---|
3757 | void yyset_lineno (int line_number ) |
---|
3758 | { |
---|
3759 | |
---|
3760 | yylineno = line_number; |
---|
3761 | } |
---|
3762 | |
---|
3763 | /** Set the input stream. This does not discard the current |
---|
3764 | * input buffer. |
---|
3765 | * @param in_str A readable stream. |
---|
3766 | * |
---|
3767 | * @see yy_switch_to_buffer |
---|
3768 | */ |
---|
3769 | void yyset_in (FILE * in_str ) |
---|
3770 | { |
---|
3771 | yyin = in_str ; |
---|
3772 | } |
---|
3773 | |
---|
3774 | void yyset_out (FILE * out_str ) |
---|
3775 | { |
---|
3776 | yyout = out_str ; |
---|
3777 | } |
---|
3778 | |
---|
3779 | int yyget_debug (void) |
---|
3780 | { |
---|
3781 | return yy_flex_debug; |
---|
3782 | } |
---|
3783 | |
---|
3784 | void yyset_debug (int bdebug ) |
---|
3785 | { |
---|
3786 | yy_flex_debug = bdebug ; |
---|
3787 | } |
---|
3788 | |
---|
3789 | static int yy_init_globals (void) |
---|
3790 | { |
---|
3791 | /* Initialization is the same as for the non-reentrant scanner. |
---|
3792 | * This function is called from yylex_destroy(), so don't allocate here. |
---|
3793 | */ |
---|
3794 | |
---|
3795 | (yy_buffer_stack) = 0; |
---|
3796 | (yy_buffer_stack_top) = 0; |
---|
3797 | (yy_buffer_stack_max) = 0; |
---|
3798 | (yy_c_buf_p) = (char *) 0; |
---|
3799 | (yy_init) = 0; |
---|
3800 | (yy_start) = 0; |
---|
3801 | |
---|
3802 | /* Defined in main.c */ |
---|
3803 | #ifdef YY_STDINIT |
---|
3804 | yyin = stdin; |
---|
3805 | yyout = stdout; |
---|
3806 | #else |
---|
3807 | yyin = (FILE *) 0; |
---|
3808 | yyout = (FILE *) 0; |
---|
3809 | #endif |
---|
3810 | |
---|
3811 | /* For future reference: Set errno on error, since we are called by |
---|
3812 | * yylex_init() |
---|
3813 | */ |
---|
3814 | return 0; |
---|
3815 | } |
---|
3816 | |
---|
3817 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
---|
3818 | int yylex_destroy (void) |
---|
3819 | { |
---|
3820 | |
---|
3821 | /* Pop the buffer stack, destroying each element. */ |
---|
3822 | while(YY_CURRENT_BUFFER){ |
---|
3823 | yy_delete_buffer(YY_CURRENT_BUFFER ); |
---|
3824 | YY_CURRENT_BUFFER_LVALUE = NULL; |
---|
3825 | yypop_buffer_state(); |
---|
3826 | } |
---|
3827 | |
---|
3828 | /* Destroy the stack itself. */ |
---|
3829 | yyfree((yy_buffer_stack) ); |
---|
3830 | (yy_buffer_stack) = NULL; |
---|
3831 | |
---|
3832 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
---|
3833 | * yylex() is called, initialization will occur. */ |
---|
3834 | yy_init_globals( ); |
---|
3835 | |
---|
3836 | return 0; |
---|
3837 | } |
---|
3838 | |
---|
3839 | /* |
---|
3840 | * Internal utility routines. |
---|
3841 | */ |
---|
3842 | |
---|
3843 | #ifndef yytext_ptr |
---|
3844 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) |
---|
3845 | { |
---|
3846 | register int i; |
---|
3847 | for ( i = 0; i < n; ++i ) |
---|
3848 | s1[i] = s2[i]; |
---|
3849 | } |
---|
3850 | #endif |
---|
3851 | |
---|
3852 | #ifdef YY_NEED_STRLEN |
---|
3853 | static int yy_flex_strlen (yyconst char * s ) |
---|
3854 | { |
---|
3855 | register int n; |
---|
3856 | for ( n = 0; s[n]; ++n ) |
---|
3857 | ; |
---|
3858 | |
---|
3859 | return n; |
---|
3860 | } |
---|
3861 | #endif |
---|
3862 | |
---|
3863 | void *yyalloc (yy_size_t size ) |
---|
3864 | { |
---|
3865 | return (void *) malloc( size ); |
---|
3866 | } |
---|
3867 | |
---|
3868 | void *yyrealloc (void * ptr, yy_size_t size ) |
---|
3869 | { |
---|
3870 | /* The cast to (char *) in the following accommodates both |
---|
3871 | * implementations that use char* generic pointers, and those |
---|
3872 | * that use void* generic pointers. It works with the latter |
---|
3873 | * because both ANSI C and C++ allow castless assignment from |
---|
3874 | * any pointer type to void*, and deal with argument conversions |
---|
3875 | * as though doing an assignment. |
---|
3876 | */ |
---|
3877 | return (void *) realloc( (char *) ptr, size ); |
---|
3878 | } |
---|
3879 | |
---|
3880 | void yyfree (void * ptr ) |
---|
3881 | { |
---|
3882 | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
---|
3883 | } |
---|
3884 | |
---|
3885 | #define YYTABLES_NAME "yytables" |
---|
3886 | |
---|
3887 | #line 68 "convert.lex" |
---|
3888 | |
---|
3889 | |
---|
3890 | |
---|
3891 | |
---|
3892 | int yywrap() |
---|
3893 | { |
---|
3894 | } |
---|
3895 | |
---|
3896 | |
---|
3897 | yyerror(char *s) |
---|
3898 | { |
---|
3899 | if (!strcasecmp(curfile,mainfile)) |
---|
3900 | { |
---|
3901 | printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile); |
---|
3902 | } |
---|
3903 | else |
---|
3904 | { |
---|
3905 | printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile); |
---|
3906 | } |
---|
3907 | exit(0); |
---|
3908 | } |
---|
3909 | |
---|