- Timestamp:
- 2016-01-08T10:35:19+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4704_NOC5_MPP_BDY_UPDATE/NEMOGCM/EXTERNAL/AGRIF/LIB/main.c
r4147 r6225 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 1 /* A Bison parser, made by GNU Bison 2.3. */ 2 3 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 Free Software Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify 8 9 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation , either version 3 of the License, or10 (at your option)any later version.11 10 the Free Software Foundation; either version 2, or (at your option) 11 any later version. 12 12 13 This program is distributed in the hope that it will be useful, 13 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 16 GNU General Public License for more details. 16 17 17 18 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 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 19 22 20 23 /* As a special exception, you may create a larger work that contains … … 27 30 Bison output files to be licensed under the GNU General Public 28 31 License without this special exception. 29 32 30 33 This special exception was added by the Free Software Foundation in 31 34 version 2.2 of Bison. */ … … 45 48 46 49 /* Bison version. */ 47 #define YYBISON_VERSION "2. 7.12-4996"50 #define YYBISON_VERSION "2.3" 48 51 49 52 /* Skeleton name. */ … … 53 56 #define YYPURE 0 54 57 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 58 /* Using locations. */ 59 #define YYLSP_NEEDED 0 60 61 /* Substitute the variable and function names. */ 62 #define yyparse convert_parse 63 #define yylex convert_lex 64 #define yyerror convert_error 65 #define yylval convert_lval 66 #define yychar convert_char 67 #define yydebug convert_debug 68 #define yynerrs convert_nerrs 69 100 70 101 71 /* Tokens. */ … … 106 76 enum yytokentype { 107 77 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 78 TOK_KIND = 259, 79 TOK_EQUAL = 260, 80 TOK_USE = 261, 81 TOK_MODULEMAIN = 262, 82 TOK_NOTGRIDDEP = 263, 83 TOK_USEITEM = 264, 84 TOK_NAME = 265, 85 TOK_CSTINT = 266, 86 TOK_PROBTYPE = 267 114 87 }; 115 88 #endif 116 89 /* Tokens. */ 90 #define TOK_SEP 258 91 #define TOK_KIND 259 92 #define TOK_EQUAL 260 93 #define TOK_USE 261 94 #define TOK_MODULEMAIN 262 95 #define TOK_NOTGRIDDEP 263 96 #define TOK_USEITEM 264 97 #define TOK_NAME 265 98 #define TOK_CSTINT 266 99 #define TOK_PROBTYPE 267 100 101 102 103 104 /* Copy the first part of user declarations. */ 105 #line 35 "convert.y" 106 107 #include <stdlib.h> 108 #include <stdio.h> 109 #include <string.h> 110 #include "decl.h" 111 112 int line_num=1; 113 extern FILE * convert_in; 114 115 int convert_error(const char *s) 116 { 117 printf("##\n## ERROR in conv: '%s' (line %d, file: %s)\n##\n", s, line_num, config_file); 118 exit(0); 119 } 120 121 122 123 /* Enabling traces. */ 124 #ifndef YYDEBUG 125 # define YYDEBUG 1 126 #endif 127 128 /* Enabling verbose error messages. */ 129 #ifdef YYERROR_VERBOSE 130 # undef YYERROR_VERBOSE 131 # define YYERROR_VERBOSE 1 132 #else 133 # define YYERROR_VERBOSE 0 134 #endif 135 136 /* Enabling the token table. */ 137 #ifndef YYTOKEN_TABLE 138 # define YYTOKEN_TABLE 0 139 #endif 117 140 118 141 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 119 142 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 143 #line 52 "convert.y" 144 { 145 char na[LONG_M]; 146 } 147 /* Line 193 of yacc.c. */ 148 #line 149 "convert.tab.c" 149 YYSTYPE; 133 150 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 134 151 # 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 # define YYSTYPE_IS_TRIVIAL 1 153 #endif 152 154 153 155 … … 155 157 /* Copy the second part of user declarations. */ 156 158 157 /* Line 390 of yacc.c */ 158 #line 159 "convert.tab.c" 159 160 /* Line 216 of yacc.c. */ 161 #line 162 "convert.tab.c" 159 162 160 163 #ifdef short … … 209 212 # if ENABLE_NLS 210 213 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 211 # define YY_( Msgid) dgettext ("bison-runtime", Msgid)214 # define YY_(msgid) dgettext ("bison-runtime", msgid) 212 215 # endif 213 216 # endif 214 217 # 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 */ 218 # define YY_(msgid) msgid 224 219 # endif 225 220 #endif … … 227 222 /* Suppress unused-variable warnings by "using" E. */ 228 223 #if ! defined lint || defined __GNUC__ 229 # define YYUSE( E) ((void) (E))224 # define YYUSE(e) ((void) (e)) 230 225 #else 231 # define YYUSE(E) /* empty */ 232 #endif 233 226 # define YYUSE(e) /* empty */ 227 #endif 234 228 235 229 /* Identity function, used to suppress warnings about constant conditions. */ 236 230 #ifndef lint 237 # define YYID( N) (N)231 # define YYID(n) (n) 238 232 #else 239 233 #if (defined __STDC__ || defined __C99__FUNC__ \ 240 234 || defined __cplusplus || defined _MSC_VER) 241 235 static int 242 YYID (int yyi)236 YYID (int i) 243 237 #else 244 238 static int 245 YYID ( yyi)246 int yyi;247 #endif 248 { 249 return yyi;239 YYID (i) 240 int i; 241 #endif 242 { 243 return i; 250 244 } 251 245 #endif … … 268 262 # else 269 263 # define YYSTACK_ALLOC alloca 270 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS&& (defined __STDC__ || defined __C99__FUNC__ \264 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 271 265 || defined __cplusplus || defined _MSC_VER) 272 266 # 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 267 # ifndef _STDLIB_H 268 # define _STDLIB_H 1 276 269 # endif 277 270 # endif … … 296 289 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 297 290 # endif 298 # if (defined __cplusplus && ! defined EXIT_SUCCESS\291 # if (defined __cplusplus && ! defined _STDLIB_H \ 299 292 && ! ((defined YYMALLOC || defined malloc) \ 300 293 && (defined YYFREE || defined free))) 301 294 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 302 # ifndef EXIT_SUCCESS303 # define EXIT_SUCCESS 0295 # ifndef _STDLIB_H 296 # define _STDLIB_H 1 304 297 # endif 305 298 # endif 306 299 # ifndef YYMALLOC 307 300 # define YYMALLOC malloc 308 # if ! defined malloc && ! defined EXIT_SUCCESS&& (defined __STDC__ || defined __C99__FUNC__ \301 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 309 302 || defined __cplusplus || defined _MSC_VER) 310 303 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ … … 313 306 # ifndef YYFREE 314 307 # define YYFREE free 315 # if ! defined free && ! defined EXIT_SUCCESS&& (defined __STDC__ || defined __C99__FUNC__ \308 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 316 309 || defined __cplusplus || defined _MSC_VER) 317 310 void free (void *); /* INFRINGES ON USER NAME SPACE */ … … 329 322 union yyalloc 330 323 { 331 yytype_int16 yyss _alloc;332 YYSTYPE yyvs _alloc;333 };324 yytype_int16 yyss; 325 YYSTYPE yyvs; 326 }; 334 327 335 328 /* The size of the maximum gap between one aligned stack and the next. */ … … 342 335 + YYSTACK_GAP_MAXIMUM) 343 336 344 # define YYCOPY_NEEDED 1 337 /* Copy COUNT objects from FROM to TO. The source and destination do 338 not overlap. */ 339 # ifndef YYCOPY 340 # if defined __GNUC__ && 1 < __GNUC__ 341 # define YYCOPY(To, From, Count) \ 342 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 343 # else 344 # define YYCOPY(To, From, Count) \ 345 do \ 346 { \ 347 YYSIZE_T yyi; \ 348 for (yyi = 0; yyi < (Count); yyi++) \ 349 (To)[yyi] = (From)[yyi]; \ 350 } \ 351 while (YYID (0)) 352 # endif 353 # endif 345 354 346 355 /* Relocate STACK from its old location to the new one. The … … 349 358 stack. Advance YYPTR to a properly aligned location for the next 350 359 stack. */ 351 # define YYSTACK_RELOCATE(Stack _alloc, Stack)\360 # define YYSTACK_RELOCATE(Stack) \ 352 361 do \ 353 362 { \ 354 363 YYSIZE_T yynewbytes; \ 355 YYCOPY (&yyptr->Stack _alloc, Stack, yysize);\356 Stack = &yyptr->Stack _alloc;\364 YYCOPY (&yyptr->Stack, Stack, yysize); \ 365 Stack = &yyptr->Stack; \ 357 366 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 358 367 yyptr += yynewbytes / sizeof (*yyptr); \ … … 362 371 #endif 363 372 364 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED365 /* Copy COUNT objects from SRC to DST. The source and destination do366 not overlap. */367 # ifndef YYCOPY368 # if defined __GNUC__ && 1 < __GNUC__369 # define YYCOPY(Dst, Src, Count) \370 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))371 # else372 # 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 # endif381 # endif382 #endif /* !YYCOPY_NEEDED */383 384 373 /* YYFINAL -- State number of the termination state. */ 385 374 #define YYFINAL 2 386 375 /* YYLAST -- Last index in YYTABLE. */ 387 #define YYLAST 2 3376 #define YYLAST 29 388 377 389 378 /* YYNTOKENS -- Number of terminals. */ 390 #define YYNTOKENS 1 8379 #define YYNTOKENS 16 391 380 /* YYNNTS -- Number of nonterminals. */ 392 381 #define YYNNTS 3 393 382 /* YYNRULES -- Number of rules. */ 394 #define YYNRULES 1 0383 #define YYNRULES 11 395 384 /* YYNRULES -- Number of states. */ 396 #define YYNSTATES 2 4385 #define YYNSTATES 29 397 386 398 387 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 399 388 #define YYUNDEFTOK 2 400 #define YYMAXUTOK 26 4389 #define YYMAXUTOK 267 401 390 402 391 #define YYTRANSLATE(YYX) \ … … 407 396 { 408 397 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 409 1 7, 2, 2, 2, 2, 2, 2, 2, 2, 2,398 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 410 399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 411 400 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,401 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 402 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 414 403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 415 404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 416 405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 417 2, 15, 2, 16, 2, 2, 2, 2, 2, 2,406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 418 407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 419 408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, … … 432 421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 433 422 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 434 5, 6, 7, 8, 9 423 5, 6, 7, 8, 9, 10, 11, 12 435 424 }; 436 425 … … 441 430 { 442 431 0, 0, 3, 4, 7, 9, 13, 19, 27, 31, 443 3 6432 37, 42 444 433 }; 445 434 … … 447 436 static const yytype_int8 yyrhs[] = 448 437 { 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 438 17, 0, -1, -1, 17, 18, -1, 15, -1, 12, 439 10, 14, -1, 12, 10, 13, 10, 14, -1, 12, 440 10, 13, 10, 13, 10, 14, -1, 7, 10, 14, 441 -1, 4, 10, 5, 11, 14, -1, 8, 3, 10, 442 14, -1, 6, 9, 14, -1 453 443 }; 454 444 … … 456 446 static const yytype_uint8 yyrline[] = 457 447 { 458 0, 63, 63, 64, 66, 67, 68, 69, 71, 74,459 75448 0, 71, 71, 72, 75, 76, 77, 78, 79, 84, 449 100, 104 460 450 }; 461 451 #endif 462 452 463 #if YYDEBUG || YYERROR_VERBOSE || 0453 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 464 454 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 465 455 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 466 456 static const char *const yytname[] = 467 457 { 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_NULL458 "$end", "error", "$undefined", "TOK_SEP", "TOK_KIND", "TOK_EQUAL", 459 "TOK_USE", "TOK_MODULEMAIN", "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", 460 "TOK_CSTINT", "TOK_PROBTYPE", "','", "';'", "'\\n'", "$accept", "input", 461 "line", 0 472 462 }; 473 463 #endif … … 479 469 { 480 470 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 481 44, 59, 58, 40, 41, 91, 93, 10471 265, 266, 267, 44, 59, 10 482 472 }; 483 473 # endif … … 486 476 static const yytype_uint8 yyr1[] = 487 477 { 488 0, 1 8, 19, 19, 20, 20, 20, 20, 20, 20,489 20478 0, 16, 17, 17, 18, 18, 18, 18, 18, 18, 479 18, 18 490 480 }; 491 481 … … 493 483 static const yytype_uint8 yyr2[] = 494 484 { 495 0, 2, 0, 2, 1, 3, 5, 7, 3, 4,496 3485 0, 2, 0, 2, 1, 3, 5, 7, 3, 5, 486 4, 3 497 487 }; 498 488 499 /* YYDEFACT[STATE-NAME] -- Default r eduction number in state STATE-NUM.500 Performedwhen YYTABLE doesn't specify something else to do. Zero489 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 490 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 501 491 means the default is an error. */ 502 492 static const yytype_uint8 yydefact[] = 503 493 { 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, 7494 2, 0, 1, 0, 0, 0, 0, 0, 4, 3, 495 0, 0, 0, 0, 0, 0, 11, 8, 0, 0, 496 5, 0, 10, 0, 9, 0, 6, 0, 7 507 497 }; 508 498 … … 510 500 static const yytype_int8 yydefgoto[] = 511 501 { 512 -1, 1, 8502 -1, 1, 9 513 503 }; 514 504 515 505 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 516 506 STATE-NUM. */ 517 #define YYPACT_NINF -1 0507 #define YYPACT_NINF -13 518 508 static const yytype_int8 yypact[] = 519 509 { 520 -1 0, 0, -10, -4, 2, 8, 4, -10, -10,3,521 5, 7, -9, -10, -10, 9, 10, -10, -10, -3,522 11, -10, 12, -10510 -13, 0, -13, -7, 2, -5, 10, 4, -13, -13, 511 11, 3, 5, 8, -12, 9, -13, -13, 7, 12, 512 -13, 13, -13, -4, -13, 14, -13, 15, -13 523 513 }; 524 514 … … 526 516 static const yytype_int8 yypgoto[] = 527 517 { 528 -1 0, -10, -10518 -13, -13, -13 529 519 }; 530 520 531 521 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 532 522 positive, shift that token. If negative, reduce the rule which 533 number is the opposite. If YYTABLE_NINF, syntax error. */ 523 number is the opposite. If zero, do what YYDEFACT says. 524 If YYTABLE_NINF, syntax error. */ 534 525 #define YYTABLE_NINF -1 535 526 static const yytype_uint8 yytable[] = 536 527 { 537 2, 1 6, 17, 9, 3, 4, 5, 20, 21, 6,538 10, 11, 12, 0, 13, 15, 14, 7, 19, 22,539 18, 0, 0, 23528 2, 19, 20, 10, 3, 12, 4, 5, 6, 25, 529 26, 11, 7, 13, 14, 8, 15, 16, 18, 17, 530 21, 22, 23, 0, 27, 0, 0, 24, 0, 28 540 531 }; 541 532 542 #define yypact_value_is_default(Yystate) \543 (!!((Yystate) == (-10)))544 545 #define yytable_value_is_error(Yytable_value) \546 YYID (0)547 548 533 static const yytype_int8 yycheck[] = 549 534 { 550 0, 1 0, 11, 7, 4, 5, 6, 10, 11, 9,551 8, 3, 8, -1, 11, 8, 11, 17, 8, 8,552 11, -1, -1, 11535 0, 13, 14, 10, 4, 10, 6, 7, 8, 13, 536 14, 9, 12, 3, 10, 15, 5, 14, 10, 14, 537 11, 14, 10, -1, 10, -1, -1, 14, -1, 14 553 538 }; 554 539 … … 557 542 static const yytype_uint8 yystos[] = 558 543 { 559 0, 1 9, 0, 4, 5, 6, 9, 17, 20, 7,560 8, 3, 8, 11, 11, 8, 10, 11, 11, 8,561 1 0, 11, 8, 11544 0, 17, 0, 4, 6, 7, 8, 12, 15, 18, 545 10, 9, 10, 3, 10, 5, 14, 14, 10, 13, 546 14, 11, 14, 10, 14, 13, 14, 10, 14 562 547 }; 563 548 … … 574 559 /* Like YYERROR except do call yyerror. This remains here temporarily 575 560 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. */ 561 Once GCC version 2 has supplanted version 1, this can go. */ 580 562 581 563 #define YYFAIL goto yyerrlab 582 #if defined YYFAIL583 /* This is here to suppress warnings from the GCC cpp's584 -Wunused-macros. Normally we don't worry about that warning, but585 some users do, and we want to make it easy for users to remove586 YYFAIL uses, which will produce warnings from Bison 2.5. */587 #endif588 564 589 565 #define YYRECOVERING() (!!yyerrstatus) 590 566 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 { 567 #define YYBACKUP(Token, Value) \ 568 do \ 569 if (yychar == YYEMPTY && yylen == 1) \ 570 { \ 571 yychar = (Token); \ 572 yylval = (Value); \ 573 yytoken = YYTRANSLATE (yychar); \ 574 YYPOPSTACK (1); \ 575 goto yybackup; \ 576 } \ 577 else \ 578 { \ 603 579 yyerror (YY_("syntax error: cannot back up")); \ 604 580 YYERROR; \ … … 606 582 while (YYID (0)) 607 583 608 /* Error token number */ 584 609 585 #define YYTERROR 1 610 586 #define YYERRCODE 256 611 587 612 588 613 /* This macro is provided for backward compatibility. */ 589 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 590 If N is 0, then set CURRENT to the empty location which ends 591 the previous symbol: RHS[0] (always defined). */ 592 593 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 594 #ifndef YYLLOC_DEFAULT 595 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 596 do \ 597 if (YYID (N)) \ 598 { \ 599 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 600 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 601 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 602 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 603 } \ 604 else \ 605 { \ 606 (Current).first_line = (Current).last_line = \ 607 YYRHSLOC (Rhs, 0).last_line; \ 608 (Current).first_column = (Current).last_column = \ 609 YYRHSLOC (Rhs, 0).last_column; \ 610 } \ 611 while (YYID (0)) 612 #endif 613 614 615 /* YY_LOCATION_PRINT -- Print the location on the stream. 616 This macro was not mandated originally: define only if we know 617 we won't break user code: when these are the locations we know. */ 618 614 619 #ifndef YY_LOCATION_PRINT 615 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 620 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 621 # define YY_LOCATION_PRINT(File, Loc) \ 622 fprintf (File, "%d.%d-%d.%d", \ 623 (Loc).first_line, (Loc).first_column, \ 624 (Loc).last_line, (Loc).last_column) 625 # else 626 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 627 # endif 616 628 #endif 617 629 618 630 619 631 /* YYLEX -- calling `yylex' with the right arguments. */ 632 620 633 #ifdef YYLEX_PARAM 621 634 # define YYLEX yylex (YYLEX_PARAM) … … 667 680 #endif 668 681 { 669 FILE *yyo = yyoutput;670 YYUSE (yyo);671 682 if (!yyvaluep) 672 683 return; … … 677 688 YYUSE (yyoutput); 678 689 # endif 679 YYUSE (yytype); 690 switch (yytype) 691 { 692 default: 693 break; 694 } 680 695 } 681 696 … … 714 729 || defined __cplusplus || defined _MSC_VER) 715 730 static void 716 yy_stack_print (yytype_int16 * yybottom, yytype_int16 *yytop)731 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 717 732 #else 718 733 static void 719 yy_stack_print ( yybottom, yytop)720 yytype_int16 * yybottom;721 yytype_int16 * yytop;734 yy_stack_print (bottom, top) 735 yytype_int16 *bottom; 736 yytype_int16 *top; 722 737 #endif 723 738 { 724 739 YYFPRINTF (stderr, "Stack now"); 725 for (; yybottom <= yytop; yybottom++) 726 { 727 int yybot = *yybottom; 728 YYFPRINTF (stderr, " %d", yybot); 729 } 740 for (; bottom <= top; ++bottom) 741 YYFPRINTF (stderr, " %d", *bottom); 730 742 YYFPRINTF (stderr, "\n"); 731 743 } … … 761 773 for (yyi = 0; yyi < yynrhs; yyi++) 762 774 { 763 YYFPRINTF(stderr, " $%d = ", yyi + 1);775 fprintf (stderr, " $%d = ", yyi + 1); 764 776 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 765 777 &(yyvsp[(yyi + 1) - (yynrhs)]) 766 778 ); 767 YYFPRINTF(stderr, "\n");779 fprintf (stderr, "\n"); 768 780 } 769 781 } … … 801 813 # define YYMAXDEPTH 10000 802 814 #endif 815 816 803 817 804 818 … … 904 918 # endif 905 919 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) 920 /* Copy into YYRESULT an error message about the unexpected token 921 YYCHAR while in state YYSTATE. Return the number of bytes copied, 922 including the terminating null byte. If YYRESULT is null, do not 923 copy anything; just return the number of bytes that would be 924 copied. As a special case, return 0 if an ordinary "syntax error" 925 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 926 size calculation. */ 927 static YYSIZE_T 928 yysyntax_error (char *yyresult, int yystate, int yychar) 929 { 930 int yyn = yypact[yystate]; 931 932 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 933 return 0; 934 else 957 935 { 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 } 936 int yytype = YYTRANSLATE (yychar); 937 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 938 YYSIZE_T yysize = yysize0; 939 YYSIZE_T yysize1; 940 int yysize_overflow = 0; 941 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 942 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 943 int yyx; 944 945 # if 0 946 /* This is so xgettext sees the translatable formats that are 947 constructed on the fly. */ 948 YY_("syntax error, unexpected %s"); 949 YY_("syntax error, unexpected %s, expecting %s"); 950 YY_("syntax error, unexpected %s, expecting %s or %s"); 951 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 952 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 953 # endif 954 char *yyfmt; 955 char const *yyf; 956 static char const yyunexpected[] = "syntax error, unexpected %s"; 957 static char const yyexpecting[] = ", expecting %s"; 958 static char const yyor[] = " or %s"; 959 char yyformat[sizeof yyunexpected 960 + sizeof yyexpecting - 1 961 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 962 * (sizeof yyor - 1))]; 963 char const *yyprefix = yyexpecting; 964 965 /* Start YYX at -YYN if negative to avoid negative indexes in 966 YYCHECK. */ 967 int yyxbegin = yyn < 0 ? -yyn : 0; 968 969 /* Stay within bounds of both yycheck and yytname. */ 970 int yychecklim = YYLAST - yyn + 1; 971 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 972 int yycount = 1; 973 974 yyarg[0] = yytname[yytype]; 975 yyfmt = yystpcpy (yyformat, yyunexpected); 976 977 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 978 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 979 { 980 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 981 { 982 yycount = 1; 983 yysize = yysize0; 984 yyformat[sizeof yyunexpected - 1] = '\0'; 985 break; 986 } 987 yyarg[yycount++] = yytname[yyx]; 988 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 989 yysize_overflow |= (yysize1 < yysize); 990 yysize = yysize1; 991 yyfmt = yystpcpy (yyfmt, yyprefix); 992 yyprefix = yyor; 993 } 994 995 yyf = YY_(yyformat); 996 yysize1 = yysize + yystrlen (yyf); 997 yysize_overflow |= (yysize1 < yysize); 998 yysize = yysize1; 999 1000 if (yysize_overflow) 1001 return YYSIZE_MAXIMUM; 1002 1003 if (yyresult) 1004 { 1005 /* Avoid sprintf, as that infringes on the user's name space. 1006 Don't have undefined behavior even if the translation 1007 produced a string with the wrong number of "%s"s. */ 1008 char *yyp = yyresult; 1009 int yyi = 0; 1010 while ((*yyp = *yyf) != '\0') 1011 { 1012 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1013 { 1014 yyp += yytnamerr (yyp, yyarg[yyi++]); 1015 yyf += 2; 1016 } 1017 else 1018 { 1019 yyp++; 1020 yyf++; 1021 } 1022 } 1023 } 1024 return yysize; 991 1025 } 992 993 switch (yycount)994 {995 # define YYCASE_(N, S) \996 case N: \997 yyformat = S; \998 break999 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_alloc1019 && *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 translation1026 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 else1037 {1038 yyp++;1039 yyformat++;1040 }1041 }1042 return 0;1043 1026 } 1044 1027 #endif /* YYERROR_VERBOSE */ 1028 1029 1045 1030 1046 1031 /*-----------------------------------------------. … … 1067 1052 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1068 1053 1069 YYUSE (yytype); 1070 } 1071 1072 1073 1074 1075 /* The lookahead symbol. */ 1054 switch (yytype) 1055 { 1056 1057 default: 1058 break; 1059 } 1060 } 1061 1062 1063 1064 /* Prevent warnings from -Wmissing-prototypes. */ 1065 1066 #ifdef YYPARSE_PARAM 1067 #if defined __STDC__ || defined __cplusplus 1068 int yyparse (void *YYPARSE_PARAM); 1069 #else 1070 int yyparse (); 1071 #endif 1072 #else /* ! YYPARSE_PARAM */ 1073 #if defined __STDC__ || defined __cplusplus 1074 int yyparse (void); 1075 #else 1076 int yyparse (); 1077 #endif 1078 #endif /* ! YYPARSE_PARAM */ 1079 1080 1081 1082 /* The look-ahead symbol. */ 1076 1083 int yychar; 1077 1084 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); 1085 /* The semantic value of the look-ahead symbol. */ 1086 YYSTYPE yylval; 1089 1087 1090 1088 /* Number of syntax errors so far. */ 1091 1089 int yynerrs; 1090 1092 1091 1093 1092 … … 1118 1117 #endif 1119 1118 { 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 1119 1120 int yystate; 1143 1121 int yyn; 1144 1122 int yyresult; 1145 /* Lookahead token as an internal (translated) token number. */ 1123 /* Number of tokens to shift before error messages enabled. */ 1124 int yyerrstatus; 1125 /* Look-ahead token as an internal (translated) token number. */ 1146 1126 int yytoken = 0; 1147 /* The variables used to return semantic value and location from the1148 action routines. */1149 YYSTYPE yyval;1150 1151 1127 #if YYERROR_VERBOSE 1152 1128 /* Buffer for error messages, and its allocated size. */ … … 1156 1132 #endif 1157 1133 1134 /* Three stacks and their tools: 1135 `yyss': related to states, 1136 `yyvs': related to semantic values, 1137 `yyls': related to locations. 1138 1139 Refer to the stacks thru separate pointers, to allow yyoverflow 1140 to reallocate them elsewhere. */ 1141 1142 /* The state stack. */ 1143 yytype_int16 yyssa[YYINITDEPTH]; 1144 yytype_int16 *yyss = yyssa; 1145 yytype_int16 *yyssp; 1146 1147 /* The semantic value stack. */ 1148 YYSTYPE yyvsa[YYINITDEPTH]; 1149 YYSTYPE *yyvs = yyvsa; 1150 YYSTYPE *yyvsp; 1151 1152 1153 1158 1154 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1155 1156 YYSIZE_T yystacksize = YYINITDEPTH; 1157 1158 /* The variables used to return semantic value and location from the 1159 action routines. */ 1160 YYSTYPE yyval; 1161 1159 1162 1160 1163 /* The number of symbols on the RHS of the reduced rule. … … 1162 1165 int yylen = 0; 1163 1166 1164 yyssp = yyss = yyssa;1165 yyvsp = yyvs = yyvsa;1166 yystacksize = YYINITDEPTH;1167 1168 1167 YYDPRINTF ((stderr, "Starting parse\n")); 1169 1168 … … 1171 1170 yyerrstatus = 0; 1172 1171 yynerrs = 0; 1173 yychar = YYEMPTY; /* Cause a token to be read. */ 1172 yychar = YYEMPTY; /* Cause a token to be read. */ 1173 1174 /* Initialize stack pointers. 1175 Waste one element of value and location stack 1176 so that they stay on the same level as the state stack. 1177 The wasted elements are never initialized. */ 1178 1179 yyssp = yyss; 1180 yyvsp = yyvs; 1181 1174 1182 goto yysetstate; 1175 1183 … … 1198 1206 yytype_int16 *yyss1 = yyss; 1199 1207 1208 1200 1209 /* Each stack pointer address is followed by the size of the 1201 1210 data in use in that stack, in bytes. This used to be a … … 1205 1214 &yyss1, yysize * sizeof (*yyssp), 1206 1215 &yyvs1, yysize * sizeof (*yyvsp), 1216 1207 1217 &yystacksize); 1208 1218 … … 1227 1237 if (! yyptr) 1228 1238 goto yyexhaustedlab; 1229 YYSTACK_RELOCATE (yyss_alloc, yyss); 1230 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1239 YYSTACK_RELOCATE (yyss); 1240 YYSTACK_RELOCATE (yyvs); 1241 1231 1242 # undef YYSTACK_RELOCATE 1232 1243 if (yyss1 != yyssa) … … 1239 1250 yyvsp = yyvs + yysize - 1; 1240 1251 1252 1241 1253 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1242 1254 (unsigned long int) yystacksize)); … … 1247 1259 1248 1260 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1249 1250 if (yystate == YYFINAL)1251 YYACCEPT;1252 1261 1253 1262 goto yybackup; … … 1259 1268 1260 1269 /* Do appropriate processing given the current state. Read a 1261 look ahead token if we need one and don't already have one. */1262 1263 /* First try to decide what to do without reference to look ahead token. */1270 look-ahead token if we need one and don't already have one. */ 1271 1272 /* First try to decide what to do without reference to look-ahead token. */ 1264 1273 yyn = yypact[yystate]; 1265 if (yy pact_value_is_default (yyn))1274 if (yyn == YYPACT_NINF) 1266 1275 goto yydefault; 1267 1276 1268 /* Not known => get a look ahead token if don't already have one. */1269 1270 /* YYCHAR is either YYEMPTY or YYEOF or a valid look ahead symbol. */1277 /* Not known => get a look-ahead token if don't already have one. */ 1278 1279 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1271 1280 if (yychar == YYEMPTY) 1272 1281 { … … 1294 1303 if (yyn <= 0) 1295 1304 { 1296 if (yy table_value_is_error (yyn))1297 1305 if (yyn == 0 || yyn == YYTABLE_NINF) 1306 goto yyerrlab; 1298 1307 yyn = -yyn; 1299 1308 goto yyreduce; 1300 1309 } 1310 1311 if (yyn == YYFINAL) 1312 YYACCEPT; 1301 1313 1302 1314 /* Count tokens shifted since error; after three, turn off error … … 1305 1317 yyerrstatus--; 1306 1318 1307 /* Shift the look ahead token. */1319 /* Shift the look-ahead token. */ 1308 1320 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1309 1321 1310 /* Discard the shifted token. */ 1311 yychar = YYEMPTY; 1322 /* Discard the shifted token unless it is eof. */ 1323 if (yychar != YYEOF) 1324 yychar = YYEMPTY; 1312 1325 1313 1326 yystate = yyn; 1314 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN1315 1327 *++yyvsp = yylval; 1316 YY_IGNORE_MAYBE_UNINITIALIZED_END1317 1328 1318 1329 goto yynewstate; … … 1351 1362 { 1352 1363 case 5: 1353 /* Line 1787 of yacc.c */ 1354 #line 67 "convert.y" 1355 {initdimprob(1,(yyvsp[(2) - (3)].na),"0","0");} 1364 #line 76 "convert.y" 1365 { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); ;} 1356 1366 break; 1357 1367 1358 1368 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");} 1369 #line 77 "convert.y" 1370 { initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0"); ;} 1362 1371 break; 1363 1372 1364 1373 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));} 1374 #line 78 "convert.y" 1375 { initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na)); ;} 1368 1376 break; 1369 1377 1370 1378 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));} 1379 #line 80 "convert.y" 1380 { 1381 listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); 1382 Addmoduletothelist((yyvsp[(2) - (3)].na)); 1383 ;} 1375 1384 break; 1376 1385 1377 1386 case 9: 1378 /* Line 1787 of yacc.c */ 1379 #line 74 "convert.y" 1380 {Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na));} 1387 #line 85 "convert.y" 1388 { 1389 if (!strcasecmp((yyvsp[(4) - (5)].na),"4")) 1390 { 1391 listofkind = Addtolistnom((yyvsp[(2) - (5)].na),listofkind,4); 1392 } 1393 else if (!strcasecmp((yyvsp[(4) - (5)].na),"8")) 1394 { 1395 listofkind = Addtolistnom((yyvsp[(2) - (5)].na),listofkind,8); 1396 } 1397 else 1398 { 1399 printf("##\n## Unknown kind type : %s (must be 4 or 8)\n##",(yyvsp[(4) - (5)].na)); 1400 exit(0); 1401 } 1402 ;} 1381 1403 break; 1382 1404 1383 1405 case 10: 1384 /* Line 1787 of yacc.c */ 1385 #line 75 "convert.y" 1406 #line 101 "convert.y" 1386 1407 { 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 } 1408 Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na)); 1409 ;} 1392 1410 break; 1393 1411 1394 1395 /* Line 1787 of yacc.c */ 1396 #line 1397 "convert.tab.c" 1412 case 11: 1413 #line 105 "convert.y" 1414 { 1415 if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS")) fixedgrids = 1; 1416 if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) onlyfixedgrids = 1; 1417 ;} 1418 break; 1419 1420 1421 /* Line 1267 of yacc.c. */ 1422 #line 1420 "convert.tab.c" 1397 1423 default: break; 1398 1424 } 1399 /* User semantic actions sometimes alter yychar, and that requires1400 that yytoken be updated with the new translation. We take the1401 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 invokes1404 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or1405 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an1406 incorrect destructor might then be invoked immediately. In the1407 case of YYERROR or YYBACKUP, subsequent parser actions might lead1408 to an incorrect destructor call or verbose syntax error message1409 before the lookahead is translated. */1410 1425 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1411 1426 … … 1415 1430 1416 1431 *++yyvsp = yyval; 1432 1417 1433 1418 1434 /* Now `shift' the result of the reduction. Determine what state … … 1435 1451 `------------------------------------*/ 1436 1452 yyerrlab: 1437 /* Make sure we have latest lookahead translation. See comments at1438 user semantic actions for why this is necessary. */1439 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);1440 1441 1453 /* If not already recovering from an error, report this error. */ 1442 1454 if (!yyerrstatus) … … 1446 1458 yyerror (YY_("syntax error")); 1447 1459 #else 1448 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \1449 yyssp, yytoken)1450 1460 { 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; 1461 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1462 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1463 { 1464 YYSIZE_T yyalloc = 2 * yysize; 1465 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1466 yyalloc = YYSTACK_ALLOC_MAXIMUM; 1467 if (yymsg != yymsgbuf) 1468 YYSTACK_FREE (yymsg); 1469 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1470 if (yymsg) 1471 yymsg_alloc = yyalloc; 1472 else 1473 { 1474 yymsg = yymsgbuf; 1475 yymsg_alloc = sizeof yymsgbuf; 1476 } 1477 } 1478 1479 if (0 < yysize && yysize <= yymsg_alloc) 1480 { 1481 (void) yysyntax_error (yymsg, yystate, yychar); 1482 yyerror (yymsg); 1483 } 1484 else 1485 { 1486 yyerror (YY_("syntax error")); 1487 if (yysize != 0) 1488 goto yyexhaustedlab; 1489 } 1476 1490 } 1477 # undef YYSYNTAX_ERROR1478 1491 #endif 1479 1492 } … … 1483 1496 if (yyerrstatus == 3) 1484 1497 { 1485 /* If just tried and failed to reuse look ahead token after an1498 /* If just tried and failed to reuse look-ahead token after an 1486 1499 error, discard it. */ 1487 1500 … … 1500 1513 } 1501 1514 1502 /* Else will try to reuse look ahead token after shifting the error1515 /* Else will try to reuse look-ahead token after shifting the error 1503 1516 token. */ 1504 1517 goto yyerrlab1; … … 1534 1547 { 1535 1548 yyn = yypact[yystate]; 1536 if ( !yypact_value_is_default (yyn))1549 if (yyn != YYPACT_NINF) 1537 1550 { 1538 1551 yyn += YYTERROR; … … 1557 1570 } 1558 1571 1559 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1572 if (yyn == YYFINAL) 1573 YYACCEPT; 1574 1560 1575 *++yyvsp = yylval; 1561 YY_IGNORE_MAYBE_UNINITIALIZED_END1562 1576 1563 1577 … … 1583 1597 goto yyreturn; 1584 1598 1585 #if !defined yyoverflow || YYERROR_VERBOSE1599 #ifndef yyoverflow 1586 1600 /*-------------------------------------------------. 1587 1601 | yyexhaustedlab -- memory exhaustion comes here. | … … 1594 1608 1595 1609 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 } 1610 if (yychar != YYEOF && yychar != YYEMPTY) 1611 yydestruct ("Cleanup: discarding lookahead", 1612 yytoken, &yylval); 1604 1613 /* Do not reclaim the symbols of the rule which action triggered 1605 1614 this YYABORT or YYACCEPT. */ … … 1625 1634 1626 1635 1627 /* Line 2050 of yacc.c */ 1628 #line 82 "convert.y" 1629 1636 #line 110 "convert.y" 1637 1638 1639 void print_usage() 1640 { 1641 printf("usage : conv <config_file> -convfile <FILENAME>\n"); 1642 printf(" [-workdir <directory>] [-incdir <directory>]\n"); 1643 printf(" [-comdirin <directory>] [-comdirout <directory>]\n"); 1644 printf(" [-convfile <FILENAME>] [-SubloopScalar] [-SubloopScalar1] \n"); 1645 printf(" [-free|-fixed]\n"); 1646 exit(0); 1647 } 1630 1648 1631 1649 int main(int argc,char *argv[]) 1632 1650 { 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 extern FILE * convert_in ; 1652 FILE *dependglobaloutput; 1653 int i; 1654 listnom *parcours; 1655 listvar *newvar; 1656 int stylegiven = 0; 1657 int infreegiven ; 1658 int infixedgiven ; 1659 int lengthmainfile; 1660 1661 char filetoparse[LONG_FNAME]; 1662 1651 1663 /******************************************************************************/ 1652 1664 /* 1- Variables initialization */ 1653 1665 /******************************************************************************/ 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(); 1666 List_Global_Var = (listvar *) NULL; 1667 List_GlobalParameter_Var = (listvar *) NULL; 1668 List_Common_Var = (listvar *) NULL; 1669 List_Allocate_Var = (listallocate *) NULL; 1670 List_SubroutineWhereAgrifUsed = (listnom *) NULL; 1671 List_Subroutine_For_Alloc = (listnom *) NULL; 1672 List_Include = (listusemodule *) NULL; 1673 List_NameOfModuleUsed = (listusemodule *) NULL; 1674 listofmoduletmp = (listusemodule *) NULL; 1675 List_SubroutineDeclaration_Var = (listvar *) NULL; 1676 List_UsedInSubroutine_Var = (listvar *) NULL; 1677 List_NotGridDepend_Var = (listvar *) NULL; 1678 Listofavailableindices = (listindice *) NULL; 1679 Listofavailableindices_glob = (listindice **) calloc(NB_CAT_VARIABLES,sizeof(listindice *)); 1680 List_CouplePointed_Var = (listvarpointtovar *) NULL; 1681 List_ModuleUsed_Var = (listvar *) NULL; 1682 List_ModuleUsedInModuleUsed_Var = (listvar *) NULL; 1683 List_GlobParamModuleUsed_Var = (listparameter *) NULL; 1684 List_GlobParamModuleUsedInModuleUsed_Var = (listparameter *) NULL; 1685 List_SubroutineArgument_Var = (listvar *) NULL; 1686 List_FunctionType_Var = (listvar *) NULL; 1687 tmpuselocallist = (listusemodule *) NULL; 1688 List_ContainsSubroutine = (listnom *) NULL; 1689 oldfortran_out = (FILE *) NULL; 1690 1691 if (argc < 2) print_usage(); 1692 1693 strcpy(config_file, argv[1]); 1694 strcpy(work_dir, "."); 1695 strcpy(input_dir, "."); 1696 strcpy(output_dir, "AGRIF_MODELFILES"); 1697 strcpy(include_dir, "AGRIF_INC"); 1698 strcpy(filetoparse, ""); 1699 strcpy(subofagrifinitgrids, ""); 1700 strcpy(meetagrifinitgrids, ""); 1701 strcpy(mpiinitvar, ""); 1702 1703 length_last = 0 ; 1704 length_first = 0 ; 1705 length_v_vallengspec = 0 ; 1706 length_v_commoninfile = 0 ; 1707 length_v_precision = 0 ; 1708 length_v_IntentSpec = 0 ; 1709 length_v_initialvalue = 0 ; 1710 length_v_readedlistdimension = 0 ; 1711 length_a_nomvar = 0 ; 1712 length_toprintglob = 0 ; 1713 length_tmpvargridname = 0 ; 1714 length_ligne_Subloop = 0 ; 1715 length_toprint_utilagrif = 0 ; 1716 length_toprinttmp_utilchar = 0 ; 1717 length_ligne_writedecl = 0 ; 1718 length_newname_toamr = 0 ; 1719 length_newname_writedecl = 0 ; 1720 length_ligne_toamr = 0 ; 1721 length_tmpligne_writedecl = 0 ; 1722 value_char_size = 0 ; 1723 value_char_size1 = 0 ; 1724 value_char_size2 = 0 ; 1725 value_char_size3 = 0 ; 1726 inallocate = 0; 1727 infixed = 1; 1728 infree = 0; 1729 1730 onlyfixedgrids=0; 1731 fixedgrids=0; 1732 InAgrifParentDef = 0; 1733 IndicenbmaillesX=0; 1734 IndicenbmaillesY=0; 1735 IndicenbmaillesZ=0; 1736 created_dimensionlist = 1; 1737 /* current indice in the table tabvars */ 1738 for ( i=0 ; i<NB_CAT_VARIABLES ; i++) 1739 { 1740 indicemaxtabvars[i] = 0; 1741 } 1742 SubloopScalar = 0; 1743 todebug = 0; 1744 retour77 = 1 ; 1745 shouldincludempif = 0 ; 1746 1747 Read_val_max(); 1748 1761 1749 /******************************************************************************/ 1762 1750 /* 2- Program arguments */ 1763 1751 /******************************************************************************/ 1764 1752 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); 1753 if ( (convert_in=fopen(config_file,"r")) == NULL ) 1754 { 1755 printf("##\n## ERROR: the configuration file '%s' doesn't exist.\n##\n", config_file); 1756 print_usage(); 1757 } 1758 1759 i=2; 1760 while ( i < argc ) 1761 { 1762 if (!strcasecmp(argv[i], "-workdir")) 1763 { 1764 strcpy(work_dir,argv[i+1]); 1765 i++; 1766 } 1767 else if (!strcasecmp(argv[i], "-incdir")) 1768 { 1769 strcpy(include_dir,argv[i+1]); 1770 i++; 1771 } 1772 else if (!strcasecmp(argv[i], "-comdirin")) /* input directory */ 1773 { 1774 strcpy(input_dir,argv[i+1]); 1775 i++; 1776 } 1777 else if (!strcasecmp(argv[i], "-comdirout")) /* output directory */ 1778 { 1779 strcpy(output_dir,argv[i+1]); 1780 i++; 1781 } 1782 else if (!strcasecmp(argv[i], "-convfile")) /* file to parse */ 1783 { 1784 strcpy(filetoparse, argv[i+1]); 1785 i++; 1786 lengthmainfile = strlen(filetoparse); 1787 if (!strcasecmp(&filetoparse[lengthmainfile-4], ".f90")) 1788 { 1789 infixed = 0; 1790 infree = 1; 1791 } 1792 else 1793 { 1794 infixed = 1; 1795 infree = 0; 1796 } 1797 } 1798 else if (!strcasecmp(argv[i], "-free")) 1799 { 1800 stylegiven = 1; 1801 infreegiven = 1 ; 1802 infixedgiven = 0; 1803 } 1804 else if (!strcasecmp(argv[i], "-fixed")) 1805 { 1806 stylegiven = 1; 1807 infreegiven = 0; 1808 infixedgiven = 1; 1809 } 1810 else if (!strcasecmp(argv[i], "-SubloopScalar")) 1811 { 1812 SubloopScalar = 1 ; 1813 } 1814 else if (!strcasecmp(argv[i], "-SubloopScalar1")) 1815 { 1816 SubloopScalar = 2 ; 1817 } 1818 else if (!strcasecmp(argv[i], "-todebug")) 1819 { 1820 todebug = 1 ; 1821 } 1822 else if (!strcasecmp(argv[i],"-rm")) { } 1823 else 1824 { 1825 printf("##\n## Unkwon option : %s\n##\n", argv[i]); 1826 exit(0); 1827 } 1828 i++; 1829 } 1830 // Check input file 1831 if ( strlen(filetoparse) == 0 ) // -convfile has not been specified 1832 { 1833 printf("##\n## ERROR: please provide a file to parse with -convfile.\n##\n"); 1834 print_usage(); 1835 } 1836 // Setup input & output directories 1837 if ( strcasecmp(work_dir, ".") != 0 ) // -workdir has been changed... 1838 { 1839 if ( strcasecmp(input_dir, ".") == 0 ) // ...and -comdirin has NOT been changed 1840 { 1841 strcpy(input_dir, work_dir); 1842 } 1843 if ( strcasecmp(output_dir, "AGRIF_MODELFILES") == 0 ) // ...and -comdirout has NOT been changed 1844 { 1845 sprintf(output_dir, "%s/%s", work_dir, "AGRIF_MODELFILES"); 1846 } 1847 if ( strcasecmp(include_dir, "AGRIF_INC") == 0 ) // ...and -incdir has NOT been changed 1848 { 1849 sprintf(include_dir, "%s/%s", work_dir, "AGRIF_INC"); 1850 } 1851 } 1852 if (stylegiven == 1) 1853 { 1854 infree = infreegiven; 1855 infixed = infixedgiven; 1856 } 1858 1857 1859 1858 /******************************************************************************/ 1860 /* 3- Parsing of the conv file <name>.in*/1859 /* 3- Parsing of the conv file <name>.in */ 1861 1860 /******************************************************************************/ 1862 1861 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(); 1862 if ( strstr(filetoparse, ".f90") || strstr(filetoparse, ".F90") ) retour77 = 0; 1863 1864 convert_parse(); 1875 1865 1876 1866 /******************************************************************************/ 1877 1867 /* 4- Preparation of the file parsing */ 1878 1868 /******************************************************************************/ 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(); 1869 1870 sprintf(dependfilename, "%s/.dependglobal_agrif", work_dir); 1871 /* */ 1872 if ( (dependglobaloutput=fopen(dependfilename, "r")) != NULL ) 1873 { 1874 for (i=0;i<NB_CAT_VARIABLES;i++) 1875 { 1876 fscanf(dependglobaloutput,"%d\n",&indicemaxtabvars[i]); 1877 } 1878 fclose(dependglobaloutput); 1879 } 1880 Readthedependavailablefile(); 1881 /* Read the .dependnbxnby file which contains indices of nbmaillsX, nbmailleY and nbmailleZ */ 1882 Readthedependnbxnbyfile(); 1883 Read_Subroutine_For_Alloc(); 1884 1897 1885 /******************************************************************************/ 1898 1886 /* 5- Parsing of the input file (2 times) */ 1899 1887 /******************************************************************************/ 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 } 1888 1889 /* Record all variables in list */ 1890 firstpass = 1; 1891 process_fortran(filetoparse); 1892 1893 CompleteThelistvarindoloop(); 1894 /* Read list of module used */ 1895 RecordUseModulesVariables(); 1896 /* Read list of module used in module used */ 1897 RecordUseModulesUseModulesVariables(); 1898 /* Save variables are considered as globals ones */ 1899 Update_List_Global_Var_From_List_Save_Var(); 1900 /* Update all lists */ 1901 ListUpdate(); 1902 1903 Clean_List_Global_Var(); 1904 /* Indice tabvars identification */ 1905 IndiceTabvarsIdentification(); 1906 /* Update all lists */ 1907 ListUpdate(); 1908 /* The allocation subroutine is necessary ???? */ 1909 New_Allocate_Subroutine_Is_Necessary(); 1910 /* The allocation subroutine is necessary for common list */ 1911 New_Allocate_Subroutine_For_Common_Is_Necessary(); 1912 /* Sort List_SubroutineArgument_Var */ 1913 Sort_List_SubroutineArgument_Var(); 1914 /* Clean all lists */ 1915 ListClean(); 1916 /* Update Indice of List_UsedInSubroutine_Var from module used */ 1917 List_UsedInSubroutine_Var_Update_From_Module_Used(); 1918 /* Update List_SubroutineWhereAgrifUsed */ 1919 UpdateList_SubroutineWhereAgrifUsed(); 1920 /* Update List_UsedInSubroutine_Var with v_readedlistdimension */ 1921 UpdateList_UsedInSubroutine_With_dimension(); 1922 1923 ModifyThelistvarindoloop(); 1924 UpdateListDeclarationWithDimensionList(); 1925 GiveTypeOfVariables(); 1926 1927 /* Build new subroutines */ 1928 firstpass = 0; 1929 process_fortran(filetoparse); 1930 1931 newvar = (listvar *) NULL; 1932 1933 while ( newvar ) 1934 { 1935 printf("++++ %s %d %s %s %s\n", 1936 newvar->var->v_nomvar, 1937 newvar->var->v_nbdim, 1938 newvar->var->v_subroutinename, 1939 newvar->var->v_modulename, 1940 newvar->var->v_typevar); 1941 newvar = newvar->suiv; 1942 } 1943 1957 1944 /******************************************************************************/ 1958 1945 /* 6- Write informations in output files */ 1959 1946 /******************************************************************************/ 1960 1947 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(); 1948 /* Write the .dependglobal_agrif file which contain the max indice */ 1949 /* of the tabvars table */ 1950 sprintf(dependfilename, "%s/.dependglobal_agrif", work_dir); 1951 dependglobaloutput = fopen(dependfilename, "w"); 1952 for (i=0;i<NB_CAT_VARIABLES;i++) 1953 { 1954 fprintf(dependglobaloutput,"%d\n",indicemaxtabvars[i]); 1955 } 1956 fclose(dependglobaloutput); 1957 /* Write the list of available indice */ 1958 Writethedependavailablefile(); 1959 /* Write the .dependnbxnby file which contains indices of nbmaillsX, */ 1960 /* nbmailleY and nbmailleZ */ 1961 Writethedependnbxnbyfile(); 1962 /* Write the .depend<namefile> file which contain general informations */ 1963 /* about variable of this file */ 1964 parcours = List_NameOfModule; 1965 while( parcours ) 1966 { 1967 Writethedependlistofmoduleused(parcours->o_nom); 1968 WritedependParameterList(parcours->o_nom); 1969 Writethedependfile(parcours->o_nom,List_Global_Var); 1970 parcours=parcours->suiv; 1971 } 1972 parcours = List_NameOfCommon; 1973 while( parcours ) 1974 { 1975 Writethedependfile(parcours->o_nom,List_Common_Var); 1976 parcours=parcours->suiv; 1977 } 1978 Write_Subroutine_For_Alloc(); 1979 1988 1980 /******************************************************************************/ 1989 1981 /* 7- Create files in AGRIF_INC directory */ 1990 1982 /******************************************************************************/ 1991 creefichieramr(NameTamponfile); 1992 1993 Write_val_max(); 1994 1995 if ( todebug == 1 ) printf("Out of CONV \n"); 1996 return 0; 1997 } 1983 1984 creefichieramr(); 1985 1986 Write_val_max(); 1987 1988 if ( todebug == 1 ) printf("Out of CONV \n"); 1989 return 0; 1990 } 1991 1998 1992 #line 2 "convert.yy.c" 1999 1993 … … 2003 1997 2004 1998 /* A lexical scanner generated by flex */ 1999 2000 #define yy_create_buffer convert__create_buffer 2001 #define yy_delete_buffer convert__delete_buffer 2002 #define yy_flex_debug convert__flex_debug 2003 #define yy_init_buffer convert__init_buffer 2004 #define yy_flush_buffer convert__flush_buffer 2005 #define yy_load_buffer_state convert__load_buffer_state 2006 #define yy_switch_to_buffer convert__switch_to_buffer 2007 #define yyin convert_in 2008 #define yyleng convert_leng 2009 #define yylex convert_lex 2010 #define yylineno convert_lineno 2011 #define yyout convert_out 2012 #define yyrestart convert_restart 2013 #define yytext convert_text 2014 #define yywrap convert_wrap 2015 #define yyalloc convert_alloc 2016 #define yyrealloc convert_realloc 2017 #define yyfree convert_free 2005 2018 2006 2019 #define FLEX_SCANNER 2007 2020 #define YY_FLEX_MAJOR_VERSION 2 2008 2021 #define YY_FLEX_MINOR_VERSION 5 2009 #define YY_FLEX_SUBMINOR_VERSION 3 72022 #define YY_FLEX_SUBMINOR_VERSION 35 2010 2023 #if YY_FLEX_SUBMINOR_VERSION > 0 2011 2024 #define FLEX_BETA … … 2045 2058 typedef int32_t flex_int32_t; 2046 2059 typedef uint32_t flex_uint32_t; 2060 typedef uint64_t flex_uint64_t; 2047 2061 #else 2048 2062 typedef signed char flex_int8_t; … … 2052 2066 typedef unsigned short int flex_uint16_t; 2053 2067 typedef unsigned int flex_uint32_t; 2068 #endif /* ! C99 */ 2054 2069 2055 2070 /* Limits of integral types. */ … … 2081 2096 #define UINT32_MAX (4294967295U) 2082 2097 #endif 2083 2084 #endif /* ! C99 */2085 2098 2086 2099 #endif /* ! FLEXINT_H */ … … 2134 2147 2135 2148 /* Special action meaning "start processing a new file". */ 2136 #define YY_NEW_FILE yyrestart(yyin )2149 #define YY_NEW_FILE convert_restart(convert_in ) 2137 2150 2138 2151 #define YY_END_OF_BUFFER_CHAR 0 … … 2157 2170 #endif 2158 2171 2159 extern yy_size_t yyleng;2160 2161 extern FILE * yyin, *yyout;2172 extern yy_size_t convert_leng; 2173 2174 extern FILE *convert_in, *convert_out; 2162 2175 2163 2176 #define EOB_ACT_CONTINUE_SCAN 0 … … 2171 2184 do \ 2172 2185 { \ 2173 /* Undo effects of setting up yytext. */ \2186 /* Undo effects of setting up convert_text. */ \ 2174 2187 int yyless_macro_arg = (n); \ 2175 2188 YY_LESS_LINENO(yyless_macro_arg);\ … … 2177 2190 YY_RESTORE_YY_MORE_OFFSET \ 2178 2191 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 2179 YY_DO_BEFORE_ACTION; /* set up yytext again */ \2192 YY_DO_BEFORE_ACTION; /* set up convert_text again */ \ 2180 2193 } \ 2181 2194 while ( 0 ) … … 2240 2253 * 2241 2254 * When we actually see the EOF, we change the status to "new" 2242 * (via yyrestart()), so that the user can continue scanning by2243 * just pointing yyin at a new input file.2255 * (via convert_restart()), so that the user can continue scanning by 2256 * just pointing convert_in at a new input file. 2244 2257 */ 2245 2258 #define YY_BUFFER_EOF_PENDING 2 … … 2268 2281 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 2269 2282 2270 /* yy_hold_char holds the character lost when yytext is formed. */2283 /* yy_hold_char holds the character lost when convert_text is formed. */ 2271 2284 static char yy_hold_char; 2272 2285 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ 2273 yy_size_t yyleng;2286 yy_size_t convert_leng; 2274 2287 2275 2288 /* Points to current character in buffer. */ … … 2278 2291 static int yy_start = 0; /* start state number */ 2279 2292 2280 /* Flag which is used to allow yywrap()'s to do buffer switches2281 * instead of setting up a fresh yyin. A bit of a hack ...2293 /* Flag which is used to allow convert_wrap()'s to do buffer switches 2294 * instead of setting up a fresh convert_in. A bit of a hack ... 2282 2295 */ 2283 2296 static int yy_did_buffer_switch_on_eof; 2284 2297 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_buffer2298 void convert_restart (FILE *input_file ); 2299 void convert__switch_to_buffer (YY_BUFFER_STATE new_buffer ); 2300 YY_BUFFER_STATE convert__create_buffer (FILE *file,int size ); 2301 void convert__delete_buffer (YY_BUFFER_STATE b ); 2302 void convert__flush_buffer (YY_BUFFER_STATE b ); 2303 void convert_push_buffer_state (YY_BUFFER_STATE new_buffer ); 2304 void convert_pop_buffer_state (void ); 2305 2306 static void convert_ensure_buffer_stack (void ); 2307 static void convert__load_buffer_state (void ); 2308 static void convert__init_buffer (YY_BUFFER_STATE b,FILE *file ); 2309 2310 #define YY_FLUSH_BUFFER convert__flush_buffer(YY_CURRENT_BUFFER ) 2311 2312 YY_BUFFER_STATE convert__scan_buffer (char *base,yy_size_t size ); 2313 YY_BUFFER_STATE convert__scan_string (yyconst char *yy_str ); 2314 YY_BUFFER_STATE convert__scan_bytes (yyconst char *bytes,yy_size_t len ); 2315 2316 void *convert_alloc (yy_size_t ); 2317 void *convert_realloc (void *,yy_size_t ); 2318 void convert_free (void * ); 2319 2320 #define yy_new_buffer convert__create_buffer 2308 2321 2309 2322 #define yy_set_interactive(is_interactive) \ 2310 2323 { \ 2311 2324 if ( ! YY_CURRENT_BUFFER ){ \ 2312 yyensure_buffer_stack (); \2325 convert_ensure_buffer_stack (); \ 2313 2326 YY_CURRENT_BUFFER_LVALUE = \ 2314 yy_create_buffer(yyin,YY_BUF_SIZE ); \2327 convert__create_buffer(convert_in,YY_BUF_SIZE ); \ 2315 2328 } \ 2316 2329 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ … … 2320 2333 { \ 2321 2334 if ( ! YY_CURRENT_BUFFER ){\ 2322 yyensure_buffer_stack (); \2335 convert_ensure_buffer_stack (); \ 2323 2336 YY_CURRENT_BUFFER_LVALUE = \ 2324 yy_create_buffer(yyin,YY_BUF_SIZE ); \2337 convert__create_buffer(convert_in,YY_BUF_SIZE ); \ 2325 2338 } \ 2326 2339 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ … … 2331 2344 /* Begin user sect3 */ 2332 2345 2346 #define convert_wrap(n) 1 2347 #define YY_SKIP_YYWRAP 2348 2333 2349 typedef unsigned char YY_CHAR; 2334 2350 2335 FILE * yyin = (FILE *) 0, *yyout = (FILE *) 0;2351 FILE *convert_in = (FILE *) 0, *convert_out = (FILE *) 0; 2336 2352 2337 2353 typedef int yy_state_type; 2338 2354 2339 extern int yylineno;2340 2341 int yylineno = 1;2342 2343 extern char * yytext;2344 #define yytext_ptr yytext2355 extern int convert_lineno; 2356 2357 int convert_lineno = 1; 2358 2359 extern char *convert_text; 2360 #define yytext_ptr convert_text 2345 2361 2346 2362 static yy_state_type yy_get_previous_state (void ); … … 2350 2366 2351 2367 /* Done after the current pattern has been matched and before the 2352 * corresponding action - sets up yytext.2368 * corresponding action - sets up convert_text. 2353 2369 */ 2354 2370 #define YY_DO_BEFORE_ACTION \ 2355 2371 (yytext_ptr) = yy_bp; \ 2356 yyleng = (size_t) (yy_cp - yy_bp); \2372 convert_leng = (yy_size_t) (yy_cp - yy_bp); \ 2357 2373 (yy_hold_char) = *yy_cp; \ 2358 2374 *yy_cp = '\0'; \ 2359 2375 (yy_c_buf_p) = yy_cp; 2360 2376 2361 #define YY_NUM_RULES 1 22362 #define YY_END_OF_BUFFER 1 32377 #define YY_NUM_RULES 15 2378 #define YY_END_OF_BUFFER 16 2363 2379 /* This struct is not used in this scanner, 2364 2380 but its presence is necessary. */ … … 2368 2384 flex_int32_t yy_nxt; 2369 2385 }; 2370 static yyconst flex_int16_t yy_accept[ 77] =2386 static yyconst flex_int16_t yy_accept[84] = 2371 2387 { 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 2388 0, 0, 0, 0, 16, 15, 14, 13, 15, 12, 2389 11, 11, 11, 11, 12, 7, 10, 10, 10, 10, 2390 10, 10, 10, 14, 0, 4, 11, 9, 9, 9, 2391 5, 10, 10, 10, 10, 10, 10, 10, 10, 8, 2392 10, 10, 10, 10, 10, 3, 10, 6, 10, 10, 2393 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2394 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2395 10, 10, 2, 10, 10, 10, 1, 10, 10, 10, 2396 10, 8, 0 2380 2397 } ; 2381 2398 … … 2388 2405 6, 1, 1, 7, 1, 1, 1, 8, 9, 10, 2389 2406 11, 8, 8, 8, 12, 8, 8, 13, 14, 1, 2390 1, 1, 1, 1, 15, 16, 16, 17, 18, 19,2391 2 0, 16, 21, 16, 16, 22, 23, 24, 25, 26,2392 1 6, 27, 28, 29, 30, 16, 16, 31, 32, 16,2393 3 3, 1, 34, 1, 35, 1, 36, 16, 16, 37,2394 2395 38, 39, 40, 16, 41, 16, 16, 42, 43, 44,2396 4 5, 46, 16, 47, 48, 49, 50, 16, 16, 51,2397 5 2, 16, 1, 1, 1, 1, 1, 1, 1, 1,2407 15, 1, 1, 1, 16, 17, 17, 18, 19, 20, 2408 21, 17, 22, 17, 23, 24, 25, 26, 27, 28, 2409 17, 29, 30, 31, 32, 17, 17, 33, 34, 17, 2410 35, 1, 36, 1, 37, 1, 38, 17, 17, 39, 2411 2412 40, 41, 42, 17, 43, 17, 44, 45, 46, 47, 2413 48, 49, 17, 50, 51, 52, 53, 17, 17, 54, 2414 55, 17, 1, 1, 1, 1, 1, 1, 1, 1, 2398 2415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2399 2416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 2412 2429 } ; 2413 2430 2414 static yyconst flex_int32_t yy_meta[5 3] =2431 static yyconst flex_int32_t yy_meta[56] = 2415 2432 { 0, 2416 2433 1, 1, 2, 1, 1, 1, 1, 3, 3, 3, 2417 3, 3, 1, 1, 3, 3, 3, 3, 3, 3,2434 3, 3, 1, 1, 1, 3, 3, 3, 3, 3, 2418 2435 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2419 3, 3, 1, 1, 3, 3, 3, 3, 3, 3,2436 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 2420 2437 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2421 3, 3 2438 3, 3, 3, 3, 3 2422 2439 } ; 2423 2440 2424 static yyconst flex_int16_t yy_base[ 79] =2441 static yyconst flex_int16_t yy_base[86] = 2425 2442 { 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 2443 0, 0, 0, 0, 192, 194, 186, 194, 176, 194, 2444 48, 53, 58, 69, 164, 194, 0, 60, 51, 47, 2445 49, 67, 55, 173, 170, 169, 90, 194, 194, 194, 2446 194, 0, 160, 53, 62, 58, 66, 62, 74, 0, 2447 85, 95, 94, 82, 101, 0, 101, 0, 91, 134, 2448 96, 133, 100, 103, 99, 105, 109, 106, 102, 101, 2449 113, 99, 115, 113, 119, 127, 123, 139, 130, 142, 2450 137, 132, 0, 81, 144, 143, 0, 136, 144, 150, 2451 139, 0, 194, 190, 81 2434 2452 } ; 2435 2453 2436 static yyconst flex_int16_t yy_def[ 79] =2454 static yyconst flex_int16_t yy_def[86] = 2437 2455 { 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 2456 83, 1, 1, 1, 83, 83, 83, 83, 84, 83, 2457 83, 83, 83, 83, 83, 83, 85, 85, 85, 85, 2458 85, 85, 85, 83, 84, 84, 83, 83, 83, 83, 2459 83, 85, 85, 85, 85, 85, 85, 85, 85, 85, 2460 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 2461 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 2462 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 2463 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 2464 85, 85, 0, 83, 83 2446 2465 } ; 2447 2466 2448 static yyconst flex_int16_t yy_nxt[2 17] =2467 static yyconst flex_int16_t yy_nxt[250] = 2449 2468 { 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 2469 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 2470 14, 11, 15, 10, 16, 17, 17, 17, 17, 18, 2471 17, 17, 19, 17, 17, 20, 21, 22, 17, 17, 2472 17, 23, 17, 17, 10, 10, 17, 17, 17, 17, 2473 18, 17, 17, 19, 17, 17, 20, 21, 22, 17, 2474 17, 17, 23, 17, 17, 27, 27, 27, 27, 27, 2475 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 2476 28, 33, 35, 36, 37, 29, 27, 27, 27, 27, 2477 27, 34, 38, 32, 39, 41, 30, 42, 43, 44, 2478 45, 28, 46, 35, 36, 37, 29, 27, 27, 27, 2479 2480 27, 27, 34, 47, 38, 39, 41, 30, 42, 43, 2481 44, 45, 48, 46, 49, 50, 51, 76, 52, 53, 2482 55, 57, 58, 59, 47, 60, 61, 62, 63, 64, 2483 65, 66, 67, 48, 68, 49, 50, 69, 51, 52, 2484 53, 55, 57, 58, 59, 70, 60, 61, 62, 63, 2485 64, 65, 66, 67, 71, 68, 72, 73, 69, 74, 2486 75, 40, 77, 78, 79, 80, 70, 81, 82, 56, 2487 54, 40, 26, 26, 24, 71, 31, 72, 73, 26, 2488 74, 75, 40, 77, 78, 79, 80, 24, 81, 82, 2489 25, 83, 25, 5, 83, 83, 83, 83, 83, 83, 2490 2491 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2492 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2493 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2494 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2495 83, 83, 83, 83, 83, 83, 83, 83, 83 2474 2496 } ; 2475 2497 2476 static yyconst flex_int16_t yy_chk[2 17] =2498 static yyconst flex_int16_t yy_chk[250] = 2477 2499 { 0, 2478 2500 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 2481 2503 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2482 2504 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 2505 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 2506 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 2507 12, 18, 19, 20, 21, 13, 14, 14, 14, 14, 2508 14, 18, 22, 85, 23, 34, 14, 35, 36, 37, 2509 38, 12, 39, 19, 20, 21, 13, 27, 27, 27, 2510 2511 27, 27, 18, 41, 22, 23, 34, 14, 35, 36, 2512 37, 38, 42, 39, 43, 44, 45, 74, 47, 49, 2513 51, 53, 54, 55, 41, 56, 57, 58, 59, 60, 2514 61, 62, 63, 42, 64, 43, 44, 65, 45, 47, 2515 49, 51, 53, 54, 55, 66, 56, 57, 58, 59, 2516 60, 61, 62, 63, 67, 64, 68, 69, 65, 70, 2517 71, 72, 75, 76, 78, 79, 66, 80, 81, 52, 2518 50, 33, 26, 25, 24, 67, 15, 68, 69, 9, 2519 70, 71, 72, 75, 76, 78, 79, 7, 80, 81, 2520 84, 5, 84, 83, 83, 83, 83, 83, 83, 83, 2521 2522 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2523 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2524 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2525 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2526 83, 83, 83, 83, 83, 83, 83, 83, 83 2502 2527 } ; 2503 2528 … … 2505 2530 static char *yy_last_accepting_cpos; 2506 2531 2507 extern int yy_flex_debug;2508 int yy_flex_debug = 0;2532 extern int convert__flex_debug; 2533 int convert__flex_debug = 0; 2509 2534 2510 2535 /* The intent behind this definition is that it'll catch … … 2515 2540 #define YY_MORE_ADJ 0 2516 2541 #define YY_RESTORE_YY_MORE_OFFSET 2517 char * yytext;2542 char *convert_text; 2518 2543 #line 1 "convert.lex" 2519 2544 /******************************************************************************/ … … 2552 2577 /******************************************************************************/ 2553 2578 2554 #line 37"convert.lex"2579 #line 40 "convert.lex" 2555 2580 #include <math.h> 2556 2581 #include <stdlib.h> 2557 2582 #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" 2583 2584 #define YY_NO_INPUT 2585 #line 595 "convert.yy.c" 2563 2586 2564 2587 #define INITIAL 0 … … 2582 2605 These are made visible to non-reentrant scanners for convenience. */ 2583 2606 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 );2607 int convert_lex_destroy (void ); 2608 2609 int convert_get_debug (void ); 2610 2611 void convert_set_debug (int debug_flag ); 2612 2613 YY_EXTRA_TYPE convert_get_extra (void ); 2614 2615 void convert_set_extra (YY_EXTRA_TYPE user_defined ); 2616 2617 FILE *convert_get_in (void ); 2618 2619 void convert_set_in (FILE * in_str ); 2620 2621 FILE *convert_get_out (void ); 2622 2623 void convert_set_out (FILE * out_str ); 2624 2625 yy_size_t convert_get_leng (void ); 2626 2627 char *convert_get_text (void ); 2628 2629 int convert_get_lineno (void ); 2630 2631 void convert_set_lineno (int line_number ); 2609 2632 2610 2633 /* Macros after this point can all be overridden by user definitions in … … 2614 2637 #ifndef YY_SKIP_YYWRAP 2615 2638 #ifdef __cplusplus 2616 extern "C" int yywrap (void );2639 extern "C" int convert_wrap (void ); 2617 2640 #else 2618 extern int yywrap (void );2641 extern int convert_wrap (void ); 2619 2642 #endif 2620 2643 #endif … … 2650 2673 * we now use fwrite(). 2651 2674 */ 2652 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)2675 #define ECHO fwrite( convert_text, convert_leng, 1, convert_out ) 2653 2676 #endif 2654 2677 … … 2661 2684 { \ 2662 2685 int c = '*'; \ 2663 size_t n; \2686 yy_size_t n; \ 2664 2687 for ( n = 0; n < max_size && \ 2665 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \2688 (c = getc( convert_in )) != EOF && c != '\n'; ++n ) \ 2666 2689 buf[n] = (char) c; \ 2667 2690 if ( c == '\n' ) \ 2668 2691 buf[n++] = (char) c; \ 2669 if ( c == EOF && ferror( yyin ) ) \2692 if ( c == EOF && ferror( convert_in ) ) \ 2670 2693 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 2671 2694 result = n; \ … … 2674 2697 { \ 2675 2698 errno=0; \ 2676 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \2699 while ( (result = fread(buf, 1, max_size, convert_in))==0 && ferror(convert_in)) \ 2677 2700 { \ 2678 2701 if( errno != EINTR) \ … … 2682 2705 } \ 2683 2706 errno=0; \ 2684 clearerr( yyin); \2707 clearerr(convert_in); \ 2685 2708 } \ 2686 2709 }\ … … 2715 2738 #define YY_DECL_IS_OURS 1 2716 2739 2717 extern int yylex (void);2718 2719 #define YY_DECL int yylex (void)2740 extern int convert_lex (void); 2741 2742 #define YY_DECL int convert_lex (void) 2720 2743 #endif /* !YY_DECL */ 2721 2744 2722 /* Code executed at the beginning of each rule, after yytext and yyleng2745 /* Code executed at the beginning of each rule, after convert_text and convert_leng 2723 2746 * have been set up. 2724 2747 */ … … 2743 2766 register int yy_act; 2744 2767 2745 #line 5 5"convert.lex"2746 2747 #line 7 51"convert.yy.c"2768 #line 54 "convert.lex" 2769 2770 #line 780 "convert.yy.c" 2748 2771 2749 2772 if ( !(yy_init) ) … … 2758 2781 (yy_start) = 1; /* first start state */ 2759 2782 2760 if ( ! yyin )2761 yyin = stdin;2762 2763 if ( ! yyout )2764 yyout = stdout;2783 if ( ! convert_in ) 2784 convert_in = stdin; 2785 2786 if ( ! convert_out ) 2787 convert_out = stdout; 2765 2788 2766 2789 if ( ! YY_CURRENT_BUFFER ) { 2767 yyensure_buffer_stack ();2790 convert_ensure_buffer_stack (); 2768 2791 YY_CURRENT_BUFFER_LVALUE = 2769 yy_create_buffer(yyin,YY_BUF_SIZE );2792 convert__create_buffer(convert_in,YY_BUF_SIZE ); 2770 2793 } 2771 2794 2772 yy_load_buffer_state( );2795 convert__load_buffer_state( ); 2773 2796 } 2774 2797 … … 2777 2800 yy_cp = (yy_c_buf_p); 2778 2801 2779 /* Support of yytext. */2802 /* Support of convert_text. */ 2780 2803 *yy_cp = (yy_hold_char); 2781 2804 … … 2798 2821 { 2799 2822 yy_current_state = (int) yy_def[yy_current_state]; 2800 if ( yy_current_state >= 77)2823 if ( yy_current_state >= 84 ) 2801 2824 yy_c = yy_meta[(unsigned int) yy_c]; 2802 2825 } … … 2804 2827 ++yy_cp; 2805 2828 } 2806 while ( yy_base[yy_current_state] != 1 64 );2829 while ( yy_base[yy_current_state] != 194 ); 2807 2830 2808 2831 yy_find_action: … … 2830 2853 case 1: 2831 2854 YY_RULE_SETUP 2832 #line 5 6"convert.lex"2833 return TOK_MODULEMAIN;/* name of the module */2855 #line 55 "convert.lex" 2856 { return TOK_MODULEMAIN; } /* name of the module */ 2834 2857 YY_BREAK 2835 2858 case 2: 2836 2859 YY_RULE_SETUP 2837 #line 5 7"convert.lex"2838 return TOK_NOTGRIDDEP;/* variable which are not grid dependent */2860 #line 56 "convert.lex" 2861 { return TOK_NOTGRIDDEP; } /* variable which are not grid dependent */ 2839 2862 YY_BREAK 2840 2863 case 3: 2841 2864 YY_RULE_SETUP 2842 #line 5 8"convert.lex"2843 return TOK_USE; 2865 #line 57 "convert.lex" 2866 { return TOK_USE; } 2844 2867 YY_BREAK 2845 2868 case 4: 2846 2869 YY_RULE_SETUP 2847 #line 5 9"convert.lex"2848 { }2870 #line 58 "convert.lex" 2871 { } 2849 2872 YY_BREAK 2850 2873 case 5: 2851 2874 YY_RULE_SETUP 2852 #line 60"convert.lex"2853 return TOK_SEP; 2875 #line 59 "convert.lex" 2876 { return TOK_SEP; } 2854 2877 YY_BREAK 2855 2878 case 6: 2856 2879 YY_RULE_SETUP 2857 #line 6 1"convert.lex"2858 { strcpy(yylval.na,yytext); return TOK_USEITEM;}2880 #line 60 "convert.lex" 2881 { return TOK_KIND; } 2859 2882 YY_BREAK 2860 2883 case 7: 2861 2884 YY_RULE_SETUP 2862 #line 6 2"convert.lex"2863 { strcpy(yylval.na,yytext); return TOK_PROBTYPE;}2885 #line 61 "convert.lex" 2886 { return TOK_EQUAL; } 2864 2887 YY_BREAK 2865 /* dimension of the problem */2866 2888 case 8: 2867 2889 YY_RULE_SETUP 2868 #line 6 4"convert.lex"2869 { strcpy(yylval.na,yytext); return TOK_NAME;}2890 #line 62 "convert.lex" 2891 { strcpy(yylval.na,convert_text); return TOK_USEITEM; } 2870 2892 YY_BREAK 2871 2893 case 9: 2872 2894 YY_RULE_SETUP 2873 #line 6 5"convert.lex"2874 { return (int) *yytext;}2895 #line 63 "convert.lex" 2896 { strcpy(yylval.na,convert_text); return TOK_PROBTYPE; } /* dimension of the problem */ 2875 2897 YY_BREAK 2876 2898 case 10: 2877 /* rule 10 can match eol */2878 2899 YY_RULE_SETUP 2879 #line 6 6"convert.lex"2880 { line_num++;return (int) *yytext;}2900 #line 64 "convert.lex" 2901 { strcpy(yylval.na,convert_text); return TOK_NAME; } 2881 2902 YY_BREAK 2882 2903 case 11: 2883 2904 YY_RULE_SETUP 2884 #line 6 7"convert.lex"2885 ; 2905 #line 65 "convert.lex" 2906 { strcpy(yylval.na,convert_text); return TOK_CSTINT; } 2886 2907 YY_BREAK 2887 2908 case 12: 2888 2909 YY_RULE_SETUP 2910 #line 66 "convert.lex" 2911 { return (int) *convert_text; } 2912 YY_BREAK 2913 case 13: 2914 /* rule 13 can match eol */ 2915 YY_RULE_SETUP 2916 #line 67 "convert.lex" 2917 { line_num++; return (int) *convert_text; } 2918 YY_BREAK 2919 case 14: 2920 YY_RULE_SETUP 2889 2921 #line 68 "convert.lex" 2922 ; 2923 YY_BREAK 2924 case 15: 2925 YY_RULE_SETUP 2926 #line 69 "convert.lex" 2890 2927 ECHO; 2891 2928 YY_BREAK 2892 #line 896"convert.yy.c"2929 #line 939 "convert.yy.c" 2893 2930 case YY_STATE_EOF(INITIAL): 2894 2931 case YY_STATE_EOF(character): … … 2908 2945 /* We're scanning a new file or input source. It's 2909 2946 * possible that this happened because the user 2910 * just pointed yyin at a new source and called2911 * yylex(). If so, then we have to assure2947 * just pointed convert_in at a new source and called 2948 * convert_lex(). If so, then we have to assure 2912 2949 * consistency between YY_CURRENT_BUFFER and our 2913 2950 * globals. Here is the right place to do so, because … … 2916 2953 */ 2917 2954 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 2918 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;2955 YY_CURRENT_BUFFER_LVALUE->yy_input_file = convert_in; 2919 2956 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 2920 2957 } … … 2969 3006 (yy_did_buffer_switch_on_eof) = 0; 2970 3007 2971 if ( yywrap( ) )3008 if ( convert_wrap( ) ) 2972 3009 { 2973 3010 /* Note: because we've taken care in 2974 3011 * yy_get_next_buffer() to have set up 2975 * yytext, we can now set up3012 * convert_text, we can now set up 2976 3013 * yy_c_buf_p so that if some total 2977 3014 * hoser (like flex itself) wants to … … 3022 3059 } /* end of action switch */ 3023 3060 } /* end of scanning one token */ 3024 } /* end of yylex */3061 } /* end of convert_lex */ 3025 3062 3026 3063 /* yy_get_next_buffer - try to read in a new buffer … … 3084 3121 3085 3122 /* just a shorter name for the current buffer */ 3086 YY_BUFFER_STATE b = YY_CURRENT_BUFFER _LVALUE;3123 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 3087 3124 3088 3125 int yy_c_buf_p_offset = … … 3100 3137 b->yy_ch_buf = (char *) 3101 3138 /* Include room in for 2 EOB chars. */ 3102 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );3139 convert_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 3103 3140 } 3104 3141 else … … 3132 3169 { 3133 3170 ret_val = EOB_ACT_END_OF_FILE; 3134 yyrestart(yyin );3171 convert_restart(convert_in ); 3135 3172 } 3136 3173 … … 3149 3186 /* Extend the array by 50%, plus the number we really need. */ 3150 3187 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 );3188 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) convert_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); 3152 3189 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 3153 3190 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); … … 3183 3220 { 3184 3221 yy_current_state = (int) yy_def[yy_current_state]; 3185 if ( yy_current_state >= 77)3222 if ( yy_current_state >= 84 ) 3186 3223 yy_c = yy_meta[(unsigned int) yy_c]; 3187 3224 } … … 3211 3248 { 3212 3249 yy_current_state = (int) yy_def[yy_current_state]; 3213 if ( yy_current_state >= 77)3250 if ( yy_current_state >= 84 ) 3214 3251 yy_c = yy_meta[(unsigned int) yy_c]; 3215 3252 } 3216 3253 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 3217 yy_is_jam = (yy_current_state == 76);3218 3219 3254 yy_is_jam = (yy_current_state == 83); 3255 3256 return yy_is_jam ? 0 : yy_current_state; 3220 3257 } 3221 3258 … … 3226 3263 yy_cp = (yy_c_buf_p); 3227 3264 3228 /* undo effects of setting up yytext */3265 /* undo effects of setting up convert_text */ 3229 3266 *yy_cp = (yy_hold_char); 3230 3267 … … 3298 3335 3299 3336 /* Reset buffer status. */ 3300 yyrestart(yyin );3337 convert_restart(convert_in ); 3301 3338 3302 3339 /*FALLTHROUGH*/ … … 3304 3341 case EOB_ACT_END_OF_FILE: 3305 3342 { 3306 if ( yywrap( ) )3307 return EOF;3343 if ( convert_wrap( ) ) 3344 return 0; 3308 3345 3309 3346 if ( ! (yy_did_buffer_switch_on_eof) ) … … 3324 3361 3325 3362 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 3326 *(yy_c_buf_p) = '\0'; /* preserve yytext */3363 *(yy_c_buf_p) = '\0'; /* preserve convert_text */ 3327 3364 (yy_hold_char) = *++(yy_c_buf_p); 3328 3365 … … 3336 3373 * @note This function does not reset the start condition to @c INITIAL . 3337 3374 */ 3338 void yyrestart (FILE * input_file )3375 void convert_restart (FILE * input_file ) 3339 3376 { 3340 3377 3341 3378 if ( ! YY_CURRENT_BUFFER ){ 3342 yyensure_buffer_stack ();3379 convert_ensure_buffer_stack (); 3343 3380 YY_CURRENT_BUFFER_LVALUE = 3344 yy_create_buffer(yyin,YY_BUF_SIZE );3381 convert__create_buffer(convert_in,YY_BUF_SIZE ); 3345 3382 } 3346 3383 3347 yy_init_buffer(YY_CURRENT_BUFFER,input_file );3348 yy_load_buffer_state( );3384 convert__init_buffer(YY_CURRENT_BUFFER,input_file ); 3385 convert__load_buffer_state( ); 3349 3386 } 3350 3387 … … 3353 3390 * 3354 3391 */ 3355 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )3392 void convert__switch_to_buffer (YY_BUFFER_STATE new_buffer ) 3356 3393 { 3357 3394 3358 3395 /* TODO. We should be able to replace this entire function body 3359 3396 * with 3360 * yypop_buffer_state();3361 * yypush_buffer_state(new_buffer);3397 * convert_pop_buffer_state(); 3398 * convert_push_buffer_state(new_buffer); 3362 3399 */ 3363 yyensure_buffer_stack ();3400 convert_ensure_buffer_stack (); 3364 3401 if ( YY_CURRENT_BUFFER == new_buffer ) 3365 3402 return; … … 3374 3411 3375 3412 YY_CURRENT_BUFFER_LVALUE = new_buffer; 3376 yy_load_buffer_state( );3413 convert__load_buffer_state( ); 3377 3414 3378 3415 /* We don't actually know whether we did this switch during 3379 * EOF ( yywrap()) processing, but the only time this flag3380 * is looked at is after yywrap() is called, so it's safe3416 * EOF (convert_wrap()) processing, but the only time this flag 3417 * is looked at is after convert_wrap() is called, so it's safe 3381 3418 * to go ahead and always set it. 3382 3419 */ … … 3384 3421 } 3385 3422 3386 static void yy_load_buffer_state (void)3423 static void convert__load_buffer_state (void) 3387 3424 { 3388 3425 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 3389 3426 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 3390 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;3427 convert_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 3391 3428 (yy_hold_char) = *(yy_c_buf_p); 3392 3429 } … … 3398 3435 * @return the allocated buffer state. 3399 3436 */ 3400 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )3437 YY_BUFFER_STATE convert__create_buffer (FILE * file, int size ) 3401 3438 { 3402 3439 YY_BUFFER_STATE b; 3403 3440 3404 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );3441 b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state ) ); 3405 3442 if ( ! b ) 3406 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );3443 YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" ); 3407 3444 3408 3445 b->yy_buf_size = size; … … 3411 3448 * we need to put in 2 end-of-buffer characters. 3412 3449 */ 3413 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );3450 b->yy_ch_buf = (char *) convert_alloc(b->yy_buf_size + 2 ); 3414 3451 if ( ! b->yy_ch_buf ) 3415 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );3452 YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" ); 3416 3453 3417 3454 b->yy_is_our_buffer = 1; 3418 3455 3419 yy_init_buffer(b,file );3456 convert__init_buffer(b,file ); 3420 3457 3421 3458 return b; … … 3423 3460 3424 3461 /** Destroy the buffer. 3425 * @param b a buffer created with yy_create_buffer()3462 * @param b a buffer created with convert__create_buffer() 3426 3463 * 3427 3464 */ 3428 void yy_delete_buffer (YY_BUFFER_STATE b )3465 void convert__delete_buffer (YY_BUFFER_STATE b ) 3429 3466 { 3430 3467 … … 3436 3473 3437 3474 if ( b->yy_is_our_buffer ) 3438 yyfree((void *) b->yy_ch_buf ); 3439 3440 yyfree((void *) b ); 3441 } 3442 3475 convert_free((void *) b->yy_ch_buf ); 3476 3477 convert_free((void *) b ); 3478 } 3479 3480 #ifndef __cplusplus 3481 extern int isatty (int ); 3482 #endif /* __cplusplus */ 3483 3443 3484 /* Initializes or reinitializes a buffer. 3444 3485 * This function is sometimes called more than once on the same buffer, 3445 * such as during a yyrestart() or at EOF.3486 * such as during a convert_restart() or at EOF. 3446 3487 */ 3447 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )3488 static void convert__init_buffer (YY_BUFFER_STATE b, FILE * file ) 3448 3489 3449 3490 { 3450 3491 int oerrno = errno; 3451 3492 3452 yy_flush_buffer(b );3493 convert__flush_buffer(b ); 3453 3494 3454 3495 b->yy_input_file = file; 3455 3496 b->yy_fill_buffer = 1; 3456 3497 3457 /* If b is the current buffer, then yy_init_buffer was _probably_3458 * called from yyrestart() or through yy_get_next_buffer.3498 /* If b is the current buffer, then convert__init_buffer was _probably_ 3499 * called from convert_restart() or through yy_get_next_buffer. 3459 3500 * In that case, we don't want to reset the lineno or column. 3460 3501 */ … … 3473 3514 * 3474 3515 */ 3475 void yy_flush_buffer (YY_BUFFER_STATE b )3516 void convert__flush_buffer (YY_BUFFER_STATE b ) 3476 3517 { 3477 3518 if ( ! b ) … … 3493 3534 3494 3535 if ( b == YY_CURRENT_BUFFER ) 3495 yy_load_buffer_state( );3536 convert__load_buffer_state( ); 3496 3537 } 3497 3538 … … 3502 3543 * 3503 3544 */ 3504 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )3545 void convert_push_buffer_state (YY_BUFFER_STATE new_buffer ) 3505 3546 { 3506 3547 if (new_buffer == NULL) 3507 3548 return; 3508 3549 3509 yyensure_buffer_stack();3510 3511 /* This block is copied from yy_switch_to_buffer. */3550 convert_ensure_buffer_stack(); 3551 3552 /* This block is copied from convert__switch_to_buffer. */ 3512 3553 if ( YY_CURRENT_BUFFER ) 3513 3554 { … … 3523 3564 YY_CURRENT_BUFFER_LVALUE = new_buffer; 3524 3565 3525 /* copied from yy_switch_to_buffer. */3526 yy_load_buffer_state( );3566 /* copied from convert__switch_to_buffer. */ 3567 convert__load_buffer_state( ); 3527 3568 (yy_did_buffer_switch_on_eof) = 1; 3528 3569 } … … 3532 3573 * 3533 3574 */ 3534 void yypop_buffer_state (void)3575 void convert_pop_buffer_state (void) 3535 3576 { 3536 3577 if (!YY_CURRENT_BUFFER) 3537 3578 return; 3538 3579 3539 yy_delete_buffer(YY_CURRENT_BUFFER );3580 convert__delete_buffer(YY_CURRENT_BUFFER ); 3540 3581 YY_CURRENT_BUFFER_LVALUE = NULL; 3541 3582 if ((yy_buffer_stack_top) > 0) … … 3543 3584 3544 3585 if (YY_CURRENT_BUFFER) { 3545 yy_load_buffer_state( );3586 convert__load_buffer_state( ); 3546 3587 (yy_did_buffer_switch_on_eof) = 1; 3547 3588 } … … 3551 3592 * Guarantees space for at least one push. 3552 3593 */ 3553 static void yyensure_buffer_stack (void)3594 static void convert_ensure_buffer_stack (void) 3554 3595 { 3555 3596 yy_size_t num_to_alloc; … … 3562 3603 */ 3563 3604 num_to_alloc = 1; 3564 (yy_buffer_stack) = (struct yy_buffer_state**) yyalloc3605 (yy_buffer_stack) = (struct yy_buffer_state**)convert_alloc 3565 3606 (num_to_alloc * sizeof(struct yy_buffer_state*) 3566 3607 ); 3567 3608 if ( ! (yy_buffer_stack) ) 3568 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );3609 YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" ); 3569 3610 3570 3611 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); … … 3581 3622 3582 3623 num_to_alloc = (yy_buffer_stack_max) + grow_size; 3583 (yy_buffer_stack) = (struct yy_buffer_state**) yyrealloc3624 (yy_buffer_stack) = (struct yy_buffer_state**)convert_realloc 3584 3625 ((yy_buffer_stack), 3585 3626 num_to_alloc * sizeof(struct yy_buffer_state*) 3586 3627 ); 3587 3628 if ( ! (yy_buffer_stack) ) 3588 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );3629 YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" ); 3589 3630 3590 3631 /* zero only the new slots.*/ … … 3600 3641 * @return the newly allocated buffer state object. 3601 3642 */ 3602 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )3643 YY_BUFFER_STATE convert__scan_buffer (char * base, yy_size_t size ) 3603 3644 { 3604 3645 YY_BUFFER_STATE b; … … 3610 3651 return 0; 3611 3652 3612 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );3653 b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state ) ); 3613 3654 if ( ! b ) 3614 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );3655 YY_FATAL_ERROR( "out of dynamic memory in convert__scan_buffer()" ); 3615 3656 3616 3657 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ … … 3624 3665 b->yy_buffer_status = YY_BUFFER_NEW; 3625 3666 3626 yy_switch_to_buffer(b );3667 convert__switch_to_buffer(b ); 3627 3668 3628 3669 return b; 3629 3670 } 3630 3671 3631 /** Setup the input buffer state to scan a string. The next call to yylex() will3672 /** Setup the input buffer state to scan a string. The next call to convert_lex() will 3632 3673 * scan from a @e copy of @a str. 3633 3674 * @param yystr a NUL-terminated string to scan … … 3635 3676 * @return the newly allocated buffer state object. 3636 3677 * @note If you want to scan bytes that may contain NUL values, then use 3637 * yy_scan_bytes() instead.3678 * convert__scan_bytes() instead. 3638 3679 */ 3639 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )3680 YY_BUFFER_STATE convert__scan_string (yyconst char * yystr ) 3640 3681 { 3641 3682 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() will3683 return convert__scan_bytes(yystr,strlen(yystr) ); 3684 } 3685 3686 /** Setup the input buffer state to scan the given bytes. The next call to convert_lex() will 3646 3687 * scan from a @e copy of @a bytes. 3647 * @param yybytes the byte buffer to scan3648 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.3688 * @param bytes the byte buffer to scan 3689 * @param len the number of bytes in the buffer pointed to by @a bytes. 3649 3690 * 3650 3691 * @return the newly allocated buffer state object. 3651 3692 */ 3652 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )3693 YY_BUFFER_STATE convert__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) 3653 3694 { 3654 3695 YY_BUFFER_STATE b; 3655 3696 char *buf; 3656 yy_size_t n; 3657 int i; 3697 yy_size_t n, i; 3658 3698 3659 3699 /* Get memory for full buffer, including space for trailing EOB's. */ 3660 3700 n = _yybytes_len + 2; 3661 buf = (char *) yyalloc(n );3701 buf = (char *) convert_alloc(n ); 3662 3702 if ( ! buf ) 3663 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );3703 YY_FATAL_ERROR( "out of dynamic memory in convert__scan_bytes()" ); 3664 3704 3665 3705 for ( i = 0; i < _yybytes_len; ++i ) … … 3668 3708 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 3669 3709 3670 b = yy_scan_buffer(buf,n );3710 b = convert__scan_buffer(buf,n ); 3671 3711 if ( ! b ) 3672 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );3712 YY_FATAL_ERROR( "bad buffer in convert__scan_bytes()" ); 3673 3713 3674 3714 /* It's okay to grow etc. this buffer, and we should throw it … … 3696 3736 do \ 3697 3737 { \ 3698 /* Undo effects of setting up yytext. */ \3738 /* Undo effects of setting up convert_text. */ \ 3699 3739 int yyless_macro_arg = (n); \ 3700 3740 YY_LESS_LINENO(yyless_macro_arg);\ 3701 yytext[yyleng] = (yy_hold_char); \3702 (yy_c_buf_p) = yytext + yyless_macro_arg; \3741 convert_text[convert_leng] = (yy_hold_char); \ 3742 (yy_c_buf_p) = convert_text + yyless_macro_arg; \ 3703 3743 (yy_hold_char) = *(yy_c_buf_p); \ 3704 3744 *(yy_c_buf_p) = '\0'; \ 3705 yyleng = yyless_macro_arg; \3745 convert_leng = yyless_macro_arg; \ 3706 3746 } \ 3707 3747 while ( 0 ) … … 3712 3752 * 3713 3753 */ 3714 int yyget_lineno (void)3754 int convert_get_lineno (void) 3715 3755 { 3716 3756 3717 return yylineno;3757 return convert_lineno; 3718 3758 } 3719 3759 … … 3721 3761 * 3722 3762 */ 3723 FILE * yyget_in (void)3724 { 3725 return yyin;3763 FILE *convert_get_in (void) 3764 { 3765 return convert_in; 3726 3766 } 3727 3767 … … 3729 3769 * 3730 3770 */ 3731 FILE * yyget_out (void)3732 { 3733 return yyout;3771 FILE *convert_get_out (void) 3772 { 3773 return convert_out; 3734 3774 } 3735 3775 … … 3737 3777 * 3738 3778 */ 3739 yy_size_t yyget_leng (void)3740 { 3741 return yyleng;3779 yy_size_t convert_get_leng (void) 3780 { 3781 return convert_leng; 3742 3782 } 3743 3783 … … 3746 3786 */ 3747 3787 3748 char * yyget_text (void)3749 { 3750 return yytext;3788 char *convert_get_text (void) 3789 { 3790 return convert_text; 3751 3791 } 3752 3792 … … 3755 3795 * 3756 3796 */ 3757 void yyset_lineno (int line_number )3797 void convert_set_lineno (int line_number ) 3758 3798 { 3759 3799 3760 yylineno = line_number;3800 convert_lineno = line_number; 3761 3801 } 3762 3802 … … 3765 3805 * @param in_str A readable stream. 3766 3806 * 3767 * @see yy_switch_to_buffer3807 * @see convert__switch_to_buffer 3768 3808 */ 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 ;3809 void convert_set_in (FILE * in_str ) 3810 { 3811 convert_in = in_str ; 3812 } 3813 3814 void convert_set_out (FILE * out_str ) 3815 { 3816 convert_out = out_str ; 3817 } 3818 3819 int convert_get_debug (void) 3820 { 3821 return convert__flex_debug; 3822 } 3823 3824 void convert_set_debug (int bdebug ) 3825 { 3826 convert__flex_debug = bdebug ; 3787 3827 } 3788 3828 … … 3790 3830 { 3791 3831 /* Initialization is the same as for the non-reentrant scanner. 3792 * This function is called from yylex_destroy(), so don't allocate here.3832 * This function is called from convert_lex_destroy(), so don't allocate here. 3793 3833 */ 3794 3834 … … 3802 3842 /* Defined in main.c */ 3803 3843 #ifdef YY_STDINIT 3804 yyin = stdin;3805 yyout = stdout;3844 convert_in = stdin; 3845 convert_out = stdout; 3806 3846 #else 3807 yyin = (FILE *) 0;3808 yyout = (FILE *) 0;3847 convert_in = (FILE *) 0; 3848 convert_out = (FILE *) 0; 3809 3849 #endif 3810 3850 3811 3851 /* For future reference: Set errno on error, since we are called by 3812 * yylex_init()3852 * convert_lex_init() 3813 3853 */ 3814 3854 return 0; 3815 3855 } 3816 3856 3817 /* yylex_destroy is for both reentrant and non-reentrant scanners. */3818 int yylex_destroy (void)3857 /* convert_lex_destroy is for both reentrant and non-reentrant scanners. */ 3858 int convert_lex_destroy (void) 3819 3859 { 3820 3860 3821 3861 /* Pop the buffer stack, destroying each element. */ 3822 3862 while(YY_CURRENT_BUFFER){ 3823 yy_delete_buffer(YY_CURRENT_BUFFER );3863 convert__delete_buffer(YY_CURRENT_BUFFER ); 3824 3864 YY_CURRENT_BUFFER_LVALUE = NULL; 3825 yypop_buffer_state();3865 convert_pop_buffer_state(); 3826 3866 } 3827 3867 3828 3868 /* Destroy the stack itself. */ 3829 yyfree((yy_buffer_stack) );3869 convert_free((yy_buffer_stack) ); 3830 3870 (yy_buffer_stack) = NULL; 3831 3871 3832 3872 /* Reset the globals. This is important in a non-reentrant scanner so the next time 3833 * yylex() is called, initialization will occur. */3873 * convert_lex() is called, initialization will occur. */ 3834 3874 yy_init_globals( ); 3835 3875 … … 3861 3901 #endif 3862 3902 3863 void * yyalloc (yy_size_t size )3903 void *convert_alloc (yy_size_t size ) 3864 3904 { 3865 3905 return (void *) malloc( size ); 3866 3906 } 3867 3907 3868 void * yyrealloc (void * ptr, yy_size_t size )3908 void *convert_realloc (void * ptr, yy_size_t size ) 3869 3909 { 3870 3910 /* The cast to (char *) in the following accommodates both … … 3878 3918 } 3879 3919 3880 void yyfree (void * ptr )3881 { 3882 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */3920 void convert_free (void * ptr ) 3921 { 3922 free( (char *) ptr ); /* see convert_realloc() for (char *) cast */ 3883 3923 } 3884 3924 3885 3925 #define YYTABLES_NAME "yytables" 3886 3926 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 3927 #line 69 "convert.lex" 3928 3929 3930
Note: See TracChangeset
for help on using the changeset viewer.