1 /* A Bison parser, made by GNU Bison 2.1a. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* C LALR(1) parser skeleton written by Richard Stallman, by
27 simplifying the original so-called "semantic" parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1a"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 1
51 /* Substitute the variable and function names. */
52 #define yyparse ael_yyparse
53 #define yylex ael_yylex
54 #define yyerror ael_yyerror
55 #define yylval ael_yylval
56 #define yychar ael_yychar
57 #define yydebug ael_yydebug
58 #define yynerrs ael_yynerrs
59 #define yylloc ael_yylloc
64 /* Put the tokens into the symbol table, so that GDB and other debuggers
110 #define KW_CONTEXT 258
123 #define KW_GLOBALS 271
124 #define KW_IGNOREPAT 272
125 #define KW_SWITCH 273
127 #define KW_IFTIME 275
129 #define KW_RANDOM 277
130 #define KW_ABSTRACT 278
131 #define KW_EXTEND 279
132 #define EXTENMARK 280
135 #define KW_RETURN 283
137 #define KW_CONTINUE 285
138 #define KW_REGEXTEN 286
143 #define KW_PATTERN 291
144 #define KW_DEFAULT 292
146 #define KW_SWITCHES 294
147 #define KW_ESWITCHES 295
148 #define KW_INCLUDES 296
154 /* Copy the first part of user declarations. */
158 * Asterisk -- An open source telephony toolkit.
160 * Copyright (C) 2006, Digium, Inc.
162 * Steve Murphy <murf@parsetree.com>
164 * See http://www.asterisk.org for more information about
165 * the Asterisk project. Please do not directly contact
166 * any of the maintainers of this project for assistance;
167 * the project provides a web site, mailing lists and IRC
168 * channels for your use.
170 * This program is free software, distributed under the terms of
171 * the GNU General Public License Version 2. See the LICENSE file
172 * at the top of the source tree.
176 * \brief Bison Grammar description of AEL2.
180 #include "asterisk.h"
182 ASTERISK_FILE_VERSION(__FILE__
, "$Revision$")
188 #include "asterisk/logger.h"
189 #include "asterisk/ael_structs.h"
191 static pval
* linku1(pval
*head
, pval
*tail
);
192 static void set_dads(pval
*dad
, pval
*child_list
);
193 void reset_parencount(yyscan_t yyscanner
);
194 void reset_semicount(yyscan_t yyscanner
);
195 void reset_argcount(yyscan_t yyscanner
);
197 #define YYLEX_PARAM ((struct parse_io *)parseio)->scanner
198 #define YYERROR_VERBOSE 1
200 extern char *my_file
;
202 int ael_is_funcname(char *name
);
204 static char *ael_token_subst(const char *mess
);
208 /* Enabling traces. */
213 /* Enabling verbose error messages. */
214 #ifdef YYERROR_VERBOSE
215 # undef YYERROR_VERBOSE
216 # define YYERROR_VERBOSE 1
218 # define YYERROR_VERBOSE 1
221 /* Enabling the token table. */
222 #ifndef YYTOKEN_TABLE
223 # define YYTOKEN_TABLE 0
226 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
227 typedef union YYSTYPE
230 int intval
; /* integer value, typically flags */
231 char *str
; /* strings */
232 struct pval
*pval
; /* full objects */
234 /* Line 198 of yacc.c. */
235 #line 236 "ael.tab.c"
237 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
238 # define YYSTYPE_IS_DECLARED 1
239 # define YYSTYPE_IS_TRIVIAL 1
242 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
243 typedef struct YYLTYPE
250 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
251 # define YYLTYPE_IS_DECLARED 1
252 # define YYLTYPE_IS_TRIVIAL 1
256 /* Copy the second part of user declarations. */
259 /* declaring these AFTER the union makes things a lot simpler! */
260 void yyerror(YYLTYPE
*locp
, struct parse_io
*parseio
, char const *s
);
261 int ael_yylex (YYSTYPE
* yylval_param
, YYLTYPE
* yylloc_param
, void * yyscanner
);
263 /* create a new object with start-end marker */
264 static pval
*npval(pvaltype type
, int first_line
, int last_line
,
265 int first_column
, int last_column
);
267 /* create a new object with start-end marker, simplified interface.
268 * Must be declared here because YYLTYPE is not known before
270 static pval
*npval2(pvaltype type
, YYLTYPE
*first
, YYLTYPE
*last
);
272 /* another frontend for npval, this time for a string */
273 static pval
*nword(char *string
, YYLTYPE
*pos
);
275 /* update end position of an object, return the object */
276 static pval
*update_last(pval
*, YYLTYPE
*);
279 /* Line 221 of yacc.c. */
280 #line 281 "ael.tab.c"
287 typedef YYTYPE_UINT8 yytype_uint8
;
289 typedef unsigned char yytype_uint8
;
293 typedef YYTYPE_INT8 yytype_int8
;
294 #elif (defined __STDC__ || defined __C99__FUNC__ \
295 || defined __cplusplus || defined _MSC_VER)
296 typedef signed char yytype_int8
;
298 typedef short int yytype_int8
;
302 typedef YYTYPE_UINT16 yytype_uint16
;
304 typedef unsigned short int yytype_uint16
;
308 typedef YYTYPE_INT16 yytype_int16
;
310 typedef short int yytype_int16
;
314 # ifdef __SIZE_TYPE__
315 # define YYSIZE_T __SIZE_TYPE__
316 # elif defined size_t
317 # define YYSIZE_T size_t
318 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
319 || defined __cplusplus || defined _MSC_VER)
320 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
321 # define YYSIZE_T size_t
323 # define YYSIZE_T unsigned int
327 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
332 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
333 # define YY_(msgid) dgettext ("bison-runtime", msgid)
337 # define YY_(msgid) msgid
341 /* Suppress unused-variable warnings by "using" E. */
342 #if ! defined lint || defined __GNUC__
343 # define YYUSE(e) ((void) (e))
345 # define YYUSE(e) /* empty */
348 /* Identity function, used to suppress warnings about constant conditions. */
352 #if (defined __STDC__ || defined __C99__FUNC__ \
353 || defined __cplusplus || defined _MSC_VER)
366 #if ! defined yyoverflow || YYERROR_VERBOSE
368 /* The parser invokes alloca or malloc; define the necessary symbols. */
370 # ifdef YYSTACK_USE_ALLOCA
371 # if YYSTACK_USE_ALLOCA
373 # define YYSTACK_ALLOC __builtin_alloca
374 # elif defined __BUILTIN_VA_ARG_INCR
375 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
377 # define YYSTACK_ALLOC __alloca
378 # elif defined _MSC_VER
379 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
380 # define alloca _alloca
382 # define YYSTACK_ALLOC alloca
383 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
384 || defined __cplusplus || defined _MSC_VER)
385 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
394 # ifdef YYSTACK_ALLOC
395 /* Pacify GCC's `empty if-body' warning. */
396 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
397 # ifndef YYSTACK_ALLOC_MAXIMUM
398 /* The OS might guarantee only one guard page at the bottom of the stack,
399 and a page size can be as small as 4096 bytes. So we cannot safely
400 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
401 to allow for a few compiler-allocated temporary stack slots. */
402 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
405 # define YYSTACK_ALLOC YYMALLOC
406 # define YYSTACK_FREE YYFREE
407 # ifndef YYSTACK_ALLOC_MAXIMUM
408 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
414 # define YYMALLOC malloc
415 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
416 || defined __cplusplus || defined _MSC_VER)
417 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
422 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
423 || defined __cplusplus || defined _MSC_VER)
424 void free (void *); /* INFRINGES ON USER NAME SPACE */
431 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
434 #if (! defined yyoverflow \
435 && (! defined __cplusplus \
436 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
437 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
439 /* A type that is properly aligned for any stack member. */
447 /* The size of the maximum gap between one aligned stack and the next. */
448 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
450 /* The size of an array large to enough to hold all stacks, each with
452 # define YYSTACK_BYTES(N) \
453 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
454 + 2 * YYSTACK_GAP_MAXIMUM)
456 /* Copy COUNT objects from FROM to TO. The source and destination do
459 # if defined __GNUC__ && 1 < __GNUC__
460 # define YYCOPY(To, From, Count) \
461 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
463 # define YYCOPY(To, From, Count) \
467 for (yyi = 0; yyi < (Count); yyi++) \
468 (To)[yyi] = (From)[yyi]; \
474 /* Relocate STACK from its old location to the new one. The
475 local variables YYSIZE and YYSTACKSIZE give the old and new number of
476 elements in the stack, and YYPTR gives the new location of the
477 stack. Advance YYPTR to a properly aligned location for the next
479 # define YYSTACK_RELOCATE(Stack) \
482 YYSIZE_T yynewbytes; \
483 YYCOPY (&yyptr->Stack, Stack, yysize); \
484 Stack = &yyptr->Stack; \
485 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
486 yyptr += yynewbytes / sizeof (*yyptr); \
492 /* YYFINAL -- State number of the termination state. */
494 /* YYLAST -- Last index in YYTABLE. */
497 /* YYNTOKENS -- Number of terminals. */
499 /* YYNNTS -- Number of nonterminals. */
501 /* YYNRULES -- Number of rules. */
503 /* YYNRULES -- Number of states. */
504 #define YYNSTATES 276
506 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
508 #define YYMAXUTOK 297
510 #define YYTRANSLATE(YYX) \
511 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
513 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
514 static const yytype_uint8 yytranslate
[] =
516 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
518 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
542 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
543 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
544 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
545 35, 36, 37, 38, 39, 40, 41, 42
549 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
551 static const yytype_uint16 yyprhs
[] =
553 0, 0, 3, 5, 7, 10, 13, 15, 17, 19,
554 21, 23, 25, 32, 34, 35, 37, 40, 43, 52,
555 57, 58, 61, 64, 65, 71, 72, 74, 78, 81,
556 82, 85, 88, 90, 92, 94, 96, 98, 100, 103,
557 105, 110, 114, 119, 127, 136, 137, 140, 143, 149,
558 151, 159, 160, 165, 168, 171, 176, 178, 181, 183,
559 186, 190, 194, 196, 199, 203, 205, 208, 212, 218,
560 222, 224, 228, 232, 235, 236, 237, 238, 251, 255,
561 257, 261, 264, 267, 268, 274, 277, 280, 283, 287,
562 289, 292, 293, 295, 299, 303, 309, 315, 321, 327,
563 328, 331, 334, 339, 340, 346, 350, 351, 355, 359,
564 362, 364, 365, 367, 368, 372, 373, 376, 381, 385,
565 390, 391, 394, 396, 398, 404, 409, 414, 415, 419,
566 425, 428, 430, 434, 437, 441, 444, 449
569 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
570 static const yytype_int8 yyrhs
[] =
572 44, 0, -1, 45, -1, 46, -1, 45, 46, -1,
573 45, 1, -1, 48, -1, 50, -1, 51, -1, 8,
574 -1, 42, -1, 37, -1, 49, 3, 47, 4, 56,
575 5, -1, 23, -1, -1, 24, -1, 24, 23, -1,
576 23, 24, -1, 15, 42, 6, 55, 7, 4, 89,
577 5, -1, 16, 4, 52, 5, -1, -1, 53, 52,
578 -1, 1, 52, -1, -1, 42, 9, 54, 42, 8,
579 -1, -1, 42, -1, 55, 10, 42, -1, 55, 1,
580 -1, -1, 57, 56, -1, 1, 56, -1, 59, -1,
581 96, -1, 91, -1, 92, -1, 58, -1, 53, -1,
582 42, 1, -1, 8, -1, 17, 25, 42, 8, -1,
583 42, 25, 71, -1, 31, 42, 25, 71, -1, 32,
584 6, 67, 7, 42, 25, 71, -1, 31, 32, 6,
585 67, 7, 42, 25, 71, -1, -1, 71, 60, -1,
586 1, 60, -1, 68, 11, 68, 11, 68, -1, 42,
587 -1, 61, 13, 68, 13, 68, 13, 68, -1, -1,
588 6, 64, 66, 7, -1, 19, 63, -1, 22, 63,
589 -1, 20, 6, 62, 7, -1, 42, -1, 42, 42,
590 -1, 42, -1, 67, 42, -1, 67, 11, 42, -1,
591 67, 12, 42, -1, 42, -1, 42, 42, -1, 42,
592 42, 42, -1, 42, -1, 42, 42, -1, 69, 11,
593 42, -1, 18, 63, 4, 87, 5, -1, 4, 60,
594 5, -1, 53, -1, 26, 77, 8, -1, 27, 79,
595 8, -1, 42, 11, -1, -1, -1, -1, 33, 6,
596 72, 42, 8, 73, 42, 8, 74, 42, 7, 71,
597 -1, 34, 63, 71, -1, 70, -1, 12, 80, 8,
598 -1, 84, 8, -1, 42, 8, -1, -1, 84, 9,
599 75, 42, 8, -1, 29, 8, -1, 28, 8, -1,
600 30, 8, -1, 65, 71, 76, -1, 8, -1, 21,
601 71, -1, -1, 69, -1, 69, 13, 69, -1, 69,
602 10, 69, -1, 69, 13, 69, 13, 69, -1, 69,
603 10, 69, 10, 69, -1, 37, 13, 69, 13, 69,
604 -1, 37, 10, 69, 10, 69, -1, -1, 10, 42,
605 -1, 69, 78, -1, 69, 78, 14, 47, -1, -1,
606 42, 6, 81, 86, 7, -1, 42, 6, 7, -1,
607 -1, 42, 6, 83, -1, 82, 86, 7, -1, 82,
608 7, -1, 42, -1, -1, 66, -1, -1, 86, 10,
609 85, -1, -1, 88, 87, -1, 35, 42, 11, 60,
610 -1, 37, 11, 60, -1, 36, 42, 11, 60, -1,
611 -1, 90, 89, -1, 71, -1, 96, -1, 38, 42,
612 4, 60, 5, -1, 39, 4, 93, 5, -1, 40,
613 4, 93, 5, -1, -1, 42, 8, 93, -1, 42,
614 14, 42, 8, 93, -1, 1, 93, -1, 47, -1,
615 47, 13, 62, -1, 94, 8, -1, 95, 94, 8,
616 -1, 95, 1, -1, 41, 4, 95, 5, -1, 41,
620 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
621 static const yytype_uint16 yyrline
[] =
623 0, 185, 185, 188, 189, 190, 193, 194, 195, 196,
624 199, 200, 203, 212, 213, 214, 215, 216, 219, 225,
625 231, 232, 233, 236, 236, 243, 244, 245, 246, 249,
626 250, 251, 254, 255, 256, 257, 258, 259, 260, 261,
627 264, 269, 273, 278, 283, 293, 294, 295, 301, 306,
628 310, 318, 318, 322, 325, 328, 339, 340, 347, 348,
629 352, 356, 362, 363, 368, 376, 377, 381, 387, 396,
630 399, 400, 403, 406, 409, 410, 411, 409, 417, 421,
631 422, 423, 424, 427, 427, 460, 461, 462, 463, 467,
632 470, 471, 474, 475, 478, 481, 485, 489, 493, 499,
633 500, 504, 507, 513, 513, 518, 526, 526, 537, 544,
634 547, 548, 551, 552, 555, 558, 559, 562, 566, 570,
635 576, 577, 580, 581, 582, 588, 593, 598, 599, 600,
636 602, 605, 606, 613, 614, 615, 618, 621
640 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
641 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
642 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
643 static const char *const yytname
[] =
645 "$end", "error", "$undefined", "KW_CONTEXT", "LC", "RC", "LP", "RP",
646 "SEMI", "EQ", "COMMA", "COLON", "AMPER", "BAR", "AT", "KW_MACRO",
647 "KW_GLOBALS", "KW_IGNOREPAT", "KW_SWITCH", "KW_IF", "KW_IFTIME",
648 "KW_ELSE", "KW_RANDOM", "KW_ABSTRACT", "KW_EXTEND", "EXTENMARK",
649 "KW_GOTO", "KW_JUMP", "KW_RETURN", "KW_BREAK", "KW_CONTINUE",
650 "KW_REGEXTEN", "KW_HINT", "KW_FOR", "KW_WHILE", "KW_CASE", "KW_PATTERN",
651 "KW_DEFAULT", "KW_CATCH", "KW_SWITCHES", "KW_ESWITCHES", "KW_INCLUDES",
652 "word", "$accept", "file", "objects", "object", "context_name",
653 "context", "opt_abstract", "macro", "globals", "global_statements",
654 "assignment", "@1", "arglist", "elements", "element", "ignorepat",
655 "extension", "statements", "timerange", "timespec", "test_expr", "@2",
656 "if_like_head", "word_list", "hint_word", "word3_list", "goto_word",
657 "switch_statement", "statement", "@3", "@4", "@5", "@6", "opt_else",
658 "target", "opt_pri", "jumptarget", "macro_call", "@7",
659 "application_call_head", "@8", "application_call", "opt_word",
660 "eval_arglist", "case_statements", "case_statement", "macro_statements",
661 "macro_statement", "switches", "eswitches", "switchlist",
662 "included_entry", "includeslist", "includes", 0
667 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
669 static const yytype_uint16 yytoknum
[] =
671 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
672 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
673 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
674 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
679 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
680 static const yytype_uint8 yyr1
[] =
682 0, 43, 44, 45, 45, 45, 46, 46, 46, 46,
683 47, 47, 48, 49, 49, 49, 49, 49, 50, 51,
684 52, 52, 52, 54, 53, 55, 55, 55, 55, 56,
685 56, 56, 57, 57, 57, 57, 57, 57, 57, 57,
686 58, 59, 59, 59, 59, 60, 60, 60, 61, 61,
687 62, 64, 63, 65, 65, 65, 66, 66, 67, 67,
688 67, 67, 68, 68, 68, 69, 69, 69, 70, 71,
689 71, 71, 71, 71, 72, 73, 74, 71, 71, 71,
690 71, 71, 71, 75, 71, 71, 71, 71, 71, 71,
691 76, 76, 77, 77, 77, 77, 77, 77, 77, 78,
692 78, 79, 79, 81, 80, 80, 83, 82, 84, 84,
693 85, 85, 86, 86, 86, 87, 87, 88, 88, 88,
694 89, 89, 90, 90, 90, 91, 92, 93, 93, 93,
695 93, 94, 94, 95, 95, 95, 96, 96
698 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
699 static const yytype_uint8 yyr2
[] =
701 0, 2, 1, 1, 2, 2, 1, 1, 1, 1,
702 1, 1, 6, 1, 0, 1, 2, 2, 8, 4,
703 0, 2, 2, 0, 5, 0, 1, 3, 2, 0,
704 2, 2, 1, 1, 1, 1, 1, 1, 2, 1,
705 4, 3, 4, 7, 8, 0, 2, 2, 5, 1,
706 7, 0, 4, 2, 2, 4, 1, 2, 1, 2,
707 3, 3, 1, 2, 3, 1, 2, 3, 5, 3,
708 1, 3, 3, 2, 0, 0, 0, 12, 3, 1,
709 3, 2, 2, 0, 5, 2, 2, 2, 3, 1,
710 2, 0, 1, 3, 3, 5, 5, 5, 5, 0,
711 2, 2, 4, 0, 5, 3, 0, 3, 3, 2,
712 1, 0, 1, 0, 3, 0, 2, 4, 3, 4,
713 0, 2, 1, 1, 5, 4, 4, 0, 3, 5,
714 2, 1, 3, 2, 3, 2, 4, 3
717 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
718 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
719 means the default is an error. */
720 static const yytype_uint8 yydefact
[] =
722 14, 9, 0, 0, 13, 15, 0, 0, 3, 6,
723 0, 7, 8, 0, 0, 17, 16, 1, 5, 4,
724 0, 25, 0, 0, 0, 0, 11, 10, 0, 26,
725 0, 22, 23, 19, 21, 0, 28, 0, 0, 0,
726 0, 39, 0, 0, 0, 0, 0, 0, 0, 37,
727 0, 0, 36, 32, 34, 35, 33, 120, 27, 0,
728 31, 0, 0, 0, 0, 0, 0, 0, 38, 0,
729 12, 30, 0, 89, 0, 0, 0, 0, 0, 0,
730 0, 0, 0, 0, 0, 0, 0, 0, 70, 0,
731 79, 122, 113, 0, 0, 120, 123, 24, 0, 0,
732 0, 58, 0, 0, 0, 0, 0, 137, 131, 0,
733 0, 41, 0, 0, 0, 0, 0, 51, 0, 53,
734 0, 54, 0, 65, 92, 0, 99, 0, 86, 85,
735 87, 74, 0, 0, 106, 82, 73, 91, 109, 56,
736 112, 0, 81, 83, 18, 121, 40, 0, 42, 0,
737 0, 0, 59, 130, 0, 0, 125, 126, 0, 133,
738 135, 136, 0, 47, 69, 46, 103, 80, 0, 115,
739 49, 0, 0, 0, 0, 0, 66, 0, 0, 0,
740 71, 0, 101, 72, 0, 78, 0, 107, 0, 88,
741 57, 108, 111, 0, 0, 0, 60, 61, 128, 0,
742 132, 134, 105, 113, 0, 0, 0, 0, 0, 115,
743 63, 0, 55, 0, 0, 0, 94, 67, 93, 100,
744 0, 0, 0, 90, 110, 114, 0, 0, 0, 0,
745 0, 52, 0, 0, 0, 68, 116, 64, 62, 0,
746 0, 0, 0, 0, 0, 102, 75, 124, 84, 0,
747 43, 129, 104, 0, 0, 118, 0, 0, 98, 97,
748 96, 95, 0, 44, 117, 119, 0, 48, 0, 0,
752 /* YYDEFGOTO[NTERM-NUM]. */
753 static const yytype_int16 yydefgoto
[] =
755 -1, 6, 7, 8, 108, 9, 10, 11, 12, 24,
756 88, 39, 30, 50, 51, 52, 53, 113, 171, 172,
757 118, 168, 89, 140, 102, 173, 124, 90, 114, 184,
758 262, 272, 193, 189, 125, 182, 127, 116, 203, 92,
759 187, 93, 225, 141, 208, 209, 94, 95, 54, 55,
763 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
765 #define YYPACT_NINF -206
766 static const yytype_int16 yypact
[] =
768 65, -206, 2, 64, -1, 70, 84, 231, -206, -206,
769 108, -206, -206, 120, 13, -206, -206, -206, -206, -206,
770 29, 88, 13, 130, 163, 13, -206, -206, 165, -206,
771 75, -206, -206, -206, -206, 8, -206, 171, 134, 136,
772 8, -206, 154, -22, 178, 182, 186, 189, 61, -206,
773 200, 8, -206, -206, -206, -206, -206, 169, -206, 198,
774 -206, 152, 203, 187, 177, 14, 14, 23, -206, 196,
775 -206, -206, 128, -206, 179, 207, 207, 214, 207, 58,
776 185, 220, 225, 227, 230, 207, 195, 174, -206, 196,
777 -206, -206, 17, 94, 235, 169, -206, -206, 233, 177,
778 196, -206, 19, 14, 55, 237, 238, -206, 232, 236,
779 16, -206, 86, 243, 86, 244, 241, -206, 247, -206,
780 210, -206, 97, 211, 24, 248, 107, 249, -206, -206,
781 -206, -206, 196, 254, -206, -206, -206, 239, -206, 217,
782 -206, 117, -206, -206, -206, -206, -206, 67, -206, 219,
783 221, 222, -206, -206, 14, 223, -206, -206, 210, -206,
784 -206, -206, 258, -206, -206, -206, 255, -206, 226, 106,
785 0, 256, 260, 259, 185, 185, -206, 185, 229, 185,
786 -206, 234, 261, -206, 240, -206, 128, -206, 196, -206,
787 -206, -206, 242, 245, 246, 252, -206, -206, -206, 264,
788 -206, -206, -206, 226, 266, 250, 251, 263, 273, 106,
789 253, 257, -206, 257, 142, 138, 149, -206, 161, -206,
790 29, 271, 275, -206, -206, -206, 277, 265, 196, 14,
791 127, -206, 270, 272, 86, -206, -206, -206, 262, 276,
792 280, 185, 185, 185, 185, -206, -206, -206, -206, 196,
793 -206, -206, -206, 86, 86, -206, 257, 257, 283, 283,
794 283, 283, 267, -206, -206, -206, 284, -206, 278, 257,
795 -206, -206, 268, 289, 196, -206
798 /* YYPGOTO[NTERM-NUM]. */
799 static const yytype_int16 yypgoto
[] =
801 -206, -206, -206, 291, -19, -206, -206, -206, -206, 113,
802 32, -206, -206, -18, -206, -206, -206, -109, -206, 143,
803 -49, -206, -206, 132, 204, -205, -78, -206, -57, -206,
804 -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
805 -206, -206, -206, 99, 96, -206, 212, -206, -206, -206,
809 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
810 positive, shift that token. If negative, reduce the rule which
811 number is the opposite. If zero, do what YYDEFACT says.
812 If YYTABLE_NINF, syntax error. */
813 #define YYTABLE_NINF -128
814 static const yytype_int16 yytable
[] =
816 91, 28, 126, 163, 106, 165, 239, 96, 240, 40,
817 62, -62, 111, -29, 22, 103, 41, 160, -20, -127,
818 63, 161, 60, 15, 138, 42, 149, 119, 107, 121,
819 150, 151, 137, 71, 177, 178, 132, 179, 91, 43,
820 44, 153, 210, 148, 13, 96, 25, 45, 46, 47,
821 48, 266, 267, 26, 25, 23, 104, 25, 27, 139,
822 26, 152, 68, 154, 271, 27, 26, 49, 14, 155,
823 32, 27, 49, 1, 194, 185, 36, 222, 150, 151,
824 2, 3, 37, 49, 17, 38, 69, 112, 4, 5,
825 72, -45, 198, 16, 73, 122, 214, 215, 74, 216,
826 123, 218, 142, 143, 75, 76, 77, 174, 78, 152,
827 175, 20, 79, 80, 81, 82, 83, 181, 178, 84,
828 85, -45, -45, -45, 191, 255, 21, 192, 87, 112,
829 29, 223, 72, -45, 252, 31, 73, 192, 34, 32,
830 74, 205, 206, 207, 264, 265, 75, 76, 77, 178,
831 78, 242, 241, 178, 79, 80, 81, 82, 83, 243,
832 178, 84, 85, 258, 259, 260, 261, 251, 33, 35,
833 87, 250, 178, 72, 244, 57, 58, 73, 59, 61,
834 134, 74, 135, 32, 64, 136, 65, 75, 76, 77,
835 66, 78, 263, 67, 98, 79, 80, 81, 82, 83,
836 72, 245, 84, 85, 73, 70, 97, 86, 74, 99,
837 47, 87, 100, 117, 75, 76, 77, 275, 78, 101,
838 120, 115, 79, 80, 81, 82, 83, 123, 128, 84,
839 85, -2, 18, 129, -14, 130, 131, 133, 87, 1,
840 144, 146, 156, 157, 159, 158, 2, 3, 164, 167,
841 166, 169, 170, 176, 4, 5, 180, 183, 186, 190,
842 188, 195, 202, 196, 197, 199, 201, 212, 139, 211,
843 213, 217, 229, 231, 234, 220, 219, 228, 235, 246,
844 247, 253, 221, 254, 224, 248, 270, 226, 227, 256,
845 249, 257, 232, 233, 178, 237, 274, 269, 19, 238,
846 204, 200, 230, 147, 210, 236, 0, 145, 0, 268,
850 static const yytype_int16 yycheck
[] =
852 57, 20, 80, 112, 66, 114, 211, 57, 213, 1,
853 32, 11, 69, 5, 1, 1, 8, 1, 5, 5,
854 42, 5, 40, 24, 7, 17, 7, 76, 5, 78,
855 11, 12, 89, 51, 10, 11, 85, 13, 95, 31,
856 32, 103, 42, 100, 42, 95, 14, 39, 40, 41,
857 42, 256, 257, 37, 22, 42, 42, 25, 42, 42,
858 37, 42, 1, 8, 269, 42, 37, 35, 4, 14,
859 9, 42, 40, 8, 7, 132, 1, 186, 11, 12,
860 15, 16, 7, 51, 0, 10, 25, 1, 23, 24,
861 4, 5, 154, 23, 8, 37, 174, 175, 12, 177,
862 42, 179, 8, 9, 18, 19, 20, 10, 22, 42,
863 13, 3, 26, 27, 28, 29, 30, 10, 11, 33,
864 34, 35, 36, 37, 7, 234, 6, 10, 42, 1,
865 42, 188, 4, 5, 7, 22, 8, 10, 25, 9,
866 12, 35, 36, 37, 253, 254, 18, 19, 20, 11,
867 22, 13, 10, 11, 26, 27, 28, 29, 30, 10,
868 11, 33, 34, 241, 242, 243, 244, 229, 5, 4,
869 42, 228, 11, 4, 13, 4, 42, 8, 42, 25,
870 6, 12, 8, 9, 6, 11, 4, 18, 19, 20,
871 4, 22, 249, 4, 42, 26, 27, 28, 29, 30,
872 4, 220, 33, 34, 8, 5, 8, 38, 12, 6,
873 41, 42, 25, 6, 18, 19, 20, 274, 22, 42,
874 6, 42, 26, 27, 28, 29, 30, 42, 8, 33,
875 34, 0, 1, 8, 3, 8, 6, 42, 42, 8,
876 5, 8, 5, 5, 8, 13, 15, 16, 5, 8,
877 6, 4, 42, 42, 23, 24, 8, 8, 4, 42,
878 21, 42, 7, 42, 42, 42, 8, 7, 42, 13,
879 11, 42, 8, 7, 11, 14, 42, 25, 5, 8,
880 5, 11, 42, 11, 42, 8, 8, 42, 42, 13,
881 25, 11, 42, 42, 11, 42, 7, 13, 7, 42,
882 168, 158, 203, 99, 42, 209, -1, 95, -1, 42,
886 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
887 symbol of state STATE-NUM. */
888 static const yytype_uint8 yystos
[] =
890 0, 8, 15, 16, 23, 24, 44, 45, 46, 48,
891 49, 50, 51, 42, 4, 24, 23, 0, 1, 46,
892 3, 6, 1, 42, 52, 53, 37, 42, 47, 42,
893 55, 52, 9, 5, 52, 4, 1, 7, 10, 54,
894 1, 8, 17, 31, 32, 39, 40, 41, 42, 53,
895 56, 57, 58, 59, 91, 92, 96, 4, 42, 42,
896 56, 25, 32, 42, 6, 4, 4, 4, 1, 25,
897 5, 56, 4, 8, 12, 18, 19, 20, 22, 26,
898 27, 28, 29, 30, 33, 34, 38, 42, 53, 65,
899 70, 71, 82, 84, 89, 90, 96, 8, 42, 6,
900 25, 42, 67, 1, 42, 93, 93, 5, 47, 94,
901 95, 71, 1, 60, 71, 42, 80, 6, 63, 63,
902 6, 63, 37, 42, 69, 77, 69, 79, 8, 8,
903 8, 6, 63, 42, 6, 8, 11, 71, 7, 42,
904 66, 86, 8, 9, 5, 89, 8, 67, 71, 7,
905 11, 12, 42, 93, 8, 14, 5, 5, 13, 8,
906 1, 5, 94, 60, 5, 60, 6, 8, 64, 4,
907 42, 61, 62, 68, 10, 13, 42, 10, 11, 13,
908 8, 10, 78, 8, 72, 71, 4, 83, 21, 76,
909 42, 7, 10, 75, 7, 42, 42, 42, 93, 42,
910 62, 8, 7, 81, 66, 35, 36, 37, 87, 88,
911 42, 13, 7, 11, 69, 69, 69, 42, 69, 42,
912 14, 42, 60, 71, 42, 85, 42, 42, 25, 8,
913 86, 7, 42, 42, 11, 5, 87, 42, 42, 68,
914 68, 10, 13, 10, 13, 47, 8, 5, 8, 25,
915 71, 93, 7, 11, 11, 60, 13, 11, 69, 69,
916 69, 69, 73, 71, 60, 60, 68, 68, 42, 13,
920 #define yyerrok (yyerrstatus = 0)
921 #define yyclearin (yychar = YYEMPTY)
925 #define YYACCEPT goto yyacceptlab
926 #define YYABORT goto yyabortlab
927 #define YYERROR goto yyerrorlab
930 /* Like YYERROR except do call yyerror. This remains here temporarily
931 to ease the transition to the new meaning of YYERROR, for GCC.
932 Once GCC version 2 has supplanted version 1, this can go. */
934 #define YYFAIL goto yyerrlab
936 #define YYRECOVERING() (!!yyerrstatus)
938 #define YYBACKUP(Token, Value) \
940 if (yychar == YYEMPTY && yylen == 1) \
944 yytoken = YYTRANSLATE (yychar); \
950 yyerror (&yylloc, parseio, YY_("syntax error: cannot back up")); \
957 #define YYERRCODE 256
960 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
961 If N is 0, then set CURRENT to the empty location which ends
962 the previous symbol: RHS[0] (always defined). */
964 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
965 #ifndef YYLLOC_DEFAULT
966 # define YYLLOC_DEFAULT(Current, Rhs, N) \
970 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
971 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
972 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
973 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
977 (Current).first_line = (Current).last_line = \
978 YYRHSLOC (Rhs, 0).last_line; \
979 (Current).first_column = (Current).last_column = \
980 YYRHSLOC (Rhs, 0).last_column; \
986 /* YY_LOCATION_PRINT -- Print the location on the stream.
987 This macro was not mandated originally: define only if we know
988 we won't break user code: when these are the locations we know. */
990 #ifndef YY_LOCATION_PRINT
991 # if YYLTYPE_IS_TRIVIAL
992 # define YY_LOCATION_PRINT(File, Loc) \
993 fprintf (File, "%d.%d-%d.%d", \
994 (Loc).first_line, (Loc).first_column, \
995 (Loc).last_line, (Loc).last_column)
997 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1002 /* YYLEX -- calling `yylex' with the right arguments. */
1005 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1007 # define YYLEX yylex (&yylval, &yylloc)
1010 /* Enable debugging if requested. */
1014 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1015 # define YYFPRINTF fprintf
1018 # define YYDPRINTF(Args) \
1024 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1028 YYFPRINTF (stderr, "%s ", Title); \
1029 yy_symbol_print (stderr, \
1030 Type, Value, Location, parseio); \
1031 YYFPRINTF (stderr, "\n"); \
1036 /*--------------------------------.
1037 | Print this symbol on YYOUTPUT. |
1038 `--------------------------------*/
1041 #if (defined __STDC__ || defined __C99__FUNC__ \
1042 || defined __cplusplus || defined _MSC_VER)
1044 yy_symbol_value_print (FILE *yyoutput
, int yytype
, const YYSTYPE
* const yyvaluep
, const YYLTYPE
* const yylocationp
, struct parse_io
*parseio
)
1047 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
, parseio
)
1050 const YYSTYPE
* const yyvaluep
;
1051 const YYLTYPE
* const yylocationp
;
1052 struct parse_io
*parseio
;
1057 YYUSE (yylocationp
);
1060 if (yytype
< YYNTOKENS
)
1061 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1073 /*--------------------------------.
1074 | Print this symbol on YYOUTPUT. |
1075 `--------------------------------*/
1077 #if (defined __STDC__ || defined __C99__FUNC__ \
1078 || defined __cplusplus || defined _MSC_VER)
1080 yy_symbol_print (FILE *yyoutput
, int yytype
, const YYSTYPE
* const yyvaluep
, const YYLTYPE
* const yylocationp
, struct parse_io
*parseio
)
1083 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, yylocationp
, parseio
)
1086 const YYSTYPE
* const yyvaluep
;
1087 const YYLTYPE
* const yylocationp
;
1088 struct parse_io
*parseio
;
1091 if (yytype
< YYNTOKENS
)
1092 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1094 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1096 YY_LOCATION_PRINT (yyoutput
, *yylocationp
);
1097 YYFPRINTF (yyoutput
, ": ");
1098 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
, parseio
);
1099 YYFPRINTF (yyoutput
, ")");
1102 /*------------------------------------------------------------------.
1103 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1105 `------------------------------------------------------------------*/
1107 #if (defined __STDC__ || defined __C99__FUNC__ \
1108 || defined __cplusplus || defined _MSC_VER)
1110 yy_stack_print (yytype_int16
*bottom
, yytype_int16
*top
)
1113 yy_stack_print (bottom
, top
)
1114 yytype_int16
*bottom
;
1118 YYFPRINTF (stderr
, "Stack now");
1119 for (; bottom
<= top
; ++bottom
)
1120 YYFPRINTF (stderr
, " %d", *bottom
);
1121 YYFPRINTF (stderr
, "\n");
1124 # define YY_STACK_PRINT(Bottom, Top) \
1127 yy_stack_print ((Bottom), (Top)); \
1131 /*------------------------------------------------.
1132 | Report that the YYRULE is going to be reduced. |
1133 `------------------------------------------------*/
1135 #if (defined __STDC__ || defined __C99__FUNC__ \
1136 || defined __cplusplus || defined _MSC_VER)
1138 yy_reduce_print (YYSTYPE
*yyvsp
, YYLTYPE
*yylsp
, int yyrule
, struct parse_io
*parseio
)
1141 yy_reduce_print (yyvsp
, yylsp
, yyrule
, parseio
)
1145 struct parse_io
*parseio
;
1148 int yynrhs
= yyr2
[yyrule
];
1150 unsigned long int yylno
= yyrline
[yyrule
];
1151 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1153 /* The symbols being reduced. */
1154 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1156 fprintf (stderr
, " $%d = ", yyi
+ 1);
1157 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1158 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1159 , &(yylsp
[(yyi
+ 1) - (yynrhs
)]) , parseio
);
1160 fprintf (stderr
, "\n");
1164 # define YY_REDUCE_PRINT(Rule) \
1167 yy_reduce_print (yyvsp, yylsp, Rule, parseio); \
1170 /* Nonzero means print parse trace. It is left uninitialized so that
1171 multiple parsers can coexist. */
1173 #else /* !YYDEBUG */
1174 # define YYDPRINTF(Args)
1175 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1176 # define YY_STACK_PRINT(Bottom, Top)
1177 # define YY_REDUCE_PRINT(Rule)
1178 #endif /* !YYDEBUG */
1181 /* YYINITDEPTH -- initial size of the parser's stacks. */
1183 # define YYINITDEPTH 200
1186 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1187 if the built-in stack extension method is used).
1189 Do not make this value too large; the results are undefined if
1190 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1191 evaluated with infinite-precision integer arithmetic. */
1194 # define YYMAXDEPTH 10000
1202 # if defined __GLIBC__ && defined _STRING_H
1203 # define yystrlen strlen
1205 /* Return the length of YYSTR. */
1206 #if (defined __STDC__ || defined __C99__FUNC__ \
1207 || defined __cplusplus || defined _MSC_VER)
1209 yystrlen (const char *yystr
)
1217 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1225 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1226 # define yystpcpy stpcpy
1228 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1230 #if (defined __STDC__ || defined __C99__FUNC__ \
1231 || defined __cplusplus || defined _MSC_VER)
1233 yystpcpy (char *yydest
, const char *yysrc
)
1236 yystpcpy (yydest
, yysrc
)
1242 const char *yys
= yysrc
;
1244 while ((*yyd
++ = *yys
++) != '\0')
1253 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1254 quotes and backslashes, so that it's suitable for yyerror. The
1255 heuristic is that double-quoting is unnecessary unless the string
1256 contains an apostrophe, a comma, or backslash (other than
1257 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1258 null, do not copy; instead, return the length of what the result
1261 yytnamerr (char *yyres
, const char *yystr
)
1266 char const *yyp
= yystr
;
1273 goto do_not_strip_quotes
;
1277 goto do_not_strip_quotes
;
1290 do_not_strip_quotes
: ;
1294 return yystrlen (yystr
);
1296 return yystpcpy (yyres
, yystr
) - yyres
;
1300 /* Copy into YYRESULT an error message about the unexpected token
1301 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1302 including the terminating null byte. If YYRESULT is null, do not
1303 copy anything; just return the number of bytes that would be
1304 copied. As a special case, return 0 if an ordinary "syntax error"
1305 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1306 size calculation. */
1308 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1310 int yyn
= yypact
[yystate
];
1312 if (! (YYPACT_NINF
< yyn
&& yyn
< YYLAST
))
1316 int yytype
= YYTRANSLATE (yychar
);
1317 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1318 YYSIZE_T yysize
= yysize0
;
1320 int yysize_overflow
= 0;
1321 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1322 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1326 /* This is so xgettext sees the translatable formats that are
1327 constructed on the fly. */
1328 YY_("syntax error, unexpected %s");
1329 YY_("syntax error, unexpected %s, expecting %s");
1330 YY_("syntax error, unexpected %s, expecting %s or %s");
1331 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1332 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1336 static char const yyunexpected
[] = "syntax error, unexpected %s";
1337 static char const yyexpecting
[] = ", expecting %s";
1338 static char const yyor
[] = " or %s";
1339 char yyformat
[sizeof yyunexpected
1340 + sizeof yyexpecting
- 1
1341 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1342 * (sizeof yyor
- 1))];
1343 char const *yyprefix
= yyexpecting
;
1345 /* Start YYX at -YYN if negative to avoid negative indexes in
1347 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1349 /* Stay within bounds of both yycheck and yytname. */
1350 int yychecklim
= YYLAST
- yyn
;
1351 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1354 yyarg
[0] = yytname
[yytype
];
1355 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1357 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1358 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1360 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1364 yyformat
[sizeof yyunexpected
- 1] = '\0';
1367 yyarg
[yycount
++] = yytname
[yyx
];
1368 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1369 yysize_overflow
|= (yysize1
< yysize
);
1371 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1375 yyf
= YY_(yyformat
);
1376 yysize1
= yysize
+ yystrlen (yyf
);
1377 yysize_overflow
|= (yysize1
< yysize
);
1380 if (yysize_overflow
)
1381 return YYSIZE_MAXIMUM
;
1385 /* Avoid sprintf, as that infringes on the user's name space.
1386 Don't have undefined behavior even if the translation
1387 produced a string with the wrong number of "%s"s. */
1388 char *yyp
= yyresult
;
1390 while ((*yyp
= *yyf
) != '\0')
1392 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1394 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1407 #endif /* YYERROR_VERBOSE */
1410 /*-----------------------------------------------.
1411 | Release the memory associated to this symbol. |
1412 `-----------------------------------------------*/
1415 #if (defined __STDC__ || defined __C99__FUNC__ \
1416 || defined __cplusplus || defined _MSC_VER)
1418 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
, struct parse_io
*parseio
)
1421 yydestruct (yymsg
, yytype
, yyvaluep
, yylocationp
, parseio
)
1425 YYLTYPE
*yylocationp
;
1426 struct parse_io
*parseio
;
1430 YYUSE (yylocationp
);
1435 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1439 case 42: /* "word" */
1441 { free((yyvaluep
->str
));};
1442 #line 1443 "ael.tab.c"
1444 case 45: /* "objects" */
1447 destroy_pval((yyvaluep
->pval
));
1450 #line 1451 "ael.tab.c"
1452 case 46: /* "object" */
1455 destroy_pval((yyvaluep
->pval
));
1458 #line 1459 "ael.tab.c"
1460 case 47: /* "context_name" */
1462 { free((yyvaluep
->str
));};
1463 #line 1464 "ael.tab.c"
1465 case 48: /* "context" */
1468 destroy_pval((yyvaluep
->pval
));
1471 #line 1472 "ael.tab.c"
1473 case 50: /* "macro" */
1476 destroy_pval((yyvaluep
->pval
));
1479 #line 1480 "ael.tab.c"
1481 case 51: /* "globals" */
1484 destroy_pval((yyvaluep
->pval
));
1487 #line 1488 "ael.tab.c"
1489 case 52: /* "global_statements" */
1492 destroy_pval((yyvaluep
->pval
));
1495 #line 1496 "ael.tab.c"
1497 case 53: /* "assignment" */
1500 destroy_pval((yyvaluep
->pval
));
1503 #line 1504 "ael.tab.c"
1505 case 55: /* "arglist" */
1508 destroy_pval((yyvaluep
->pval
));
1511 #line 1512 "ael.tab.c"
1513 case 56: /* "elements" */
1516 destroy_pval((yyvaluep
->pval
));
1519 #line 1520 "ael.tab.c"
1521 case 57: /* "element" */
1524 destroy_pval((yyvaluep
->pval
));
1527 #line 1528 "ael.tab.c"
1529 case 58: /* "ignorepat" */
1532 destroy_pval((yyvaluep
->pval
));
1535 #line 1536 "ael.tab.c"
1537 case 59: /* "extension" */
1540 destroy_pval((yyvaluep
->pval
));
1543 #line 1544 "ael.tab.c"
1545 case 60: /* "statements" */
1548 destroy_pval((yyvaluep
->pval
));
1551 #line 1552 "ael.tab.c"
1553 case 61: /* "timerange" */
1555 { free((yyvaluep
->str
));};
1556 #line 1557 "ael.tab.c"
1558 case 62: /* "timespec" */
1561 destroy_pval((yyvaluep
->pval
));
1564 #line 1565 "ael.tab.c"
1566 case 63: /* "test_expr" */
1568 { free((yyvaluep
->str
));};
1569 #line 1570 "ael.tab.c"
1571 case 65: /* "if_like_head" */
1574 destroy_pval((yyvaluep
->pval
));
1577 #line 1578 "ael.tab.c"
1579 case 66: /* "word_list" */
1581 { free((yyvaluep
->str
));};
1582 #line 1583 "ael.tab.c"
1584 case 68: /* "word3_list" */
1586 { free((yyvaluep
->str
));};
1587 #line 1588 "ael.tab.c"
1589 case 69: /* "goto_word" */
1591 { free((yyvaluep
->str
));};
1592 #line 1593 "ael.tab.c"
1594 case 70: /* "switch_statement" */
1597 destroy_pval((yyvaluep
->pval
));
1600 #line 1601 "ael.tab.c"
1602 case 71: /* "statement" */
1605 destroy_pval((yyvaluep
->pval
));
1608 #line 1609 "ael.tab.c"
1610 case 76: /* "opt_else" */
1613 destroy_pval((yyvaluep
->pval
));
1616 #line 1617 "ael.tab.c"
1618 case 77: /* "target" */
1621 destroy_pval((yyvaluep
->pval
));
1624 #line 1625 "ael.tab.c"
1626 case 78: /* "opt_pri" */
1628 { free((yyvaluep
->str
));};
1629 #line 1630 "ael.tab.c"
1631 case 79: /* "jumptarget" */
1634 destroy_pval((yyvaluep
->pval
));
1637 #line 1638 "ael.tab.c"
1639 case 80: /* "macro_call" */
1642 destroy_pval((yyvaluep
->pval
));
1645 #line 1646 "ael.tab.c"
1647 case 82: /* "application_call_head" */
1650 destroy_pval((yyvaluep
->pval
));
1653 #line 1654 "ael.tab.c"
1655 case 84: /* "application_call" */
1658 destroy_pval((yyvaluep
->pval
));
1661 #line 1662 "ael.tab.c"
1663 case 85: /* "opt_word" */
1665 { free((yyvaluep
->str
));};
1666 #line 1667 "ael.tab.c"
1668 case 86: /* "eval_arglist" */
1671 destroy_pval((yyvaluep
->pval
));
1674 #line 1675 "ael.tab.c"
1676 case 87: /* "case_statements" */
1679 destroy_pval((yyvaluep
->pval
));
1682 #line 1683 "ael.tab.c"
1684 case 88: /* "case_statement" */
1687 destroy_pval((yyvaluep
->pval
));
1690 #line 1691 "ael.tab.c"
1692 case 89: /* "macro_statements" */
1695 destroy_pval((yyvaluep
->pval
));
1698 #line 1699 "ael.tab.c"
1700 case 90: /* "macro_statement" */
1703 destroy_pval((yyvaluep
->pval
));
1706 #line 1707 "ael.tab.c"
1708 case 91: /* "switches" */
1711 destroy_pval((yyvaluep
->pval
));
1714 #line 1715 "ael.tab.c"
1716 case 92: /* "eswitches" */
1719 destroy_pval((yyvaluep
->pval
));
1722 #line 1723 "ael.tab.c"
1724 case 93: /* "switchlist" */
1727 destroy_pval((yyvaluep
->pval
));
1730 #line 1731 "ael.tab.c"
1732 case 94: /* "included_entry" */
1735 destroy_pval((yyvaluep
->pval
));
1738 #line 1739 "ael.tab.c"
1740 case 95: /* "includeslist" */
1743 destroy_pval((yyvaluep
->pval
));
1746 #line 1747 "ael.tab.c"
1748 case 96: /* "includes" */
1751 destroy_pval((yyvaluep
->pval
));
1754 #line 1755 "ael.tab.c"
1763 /* Prevent warnings from -Wmissing-prototypes. */
1765 #ifdef YYPARSE_PARAM
1766 #if defined __STDC__ || defined __cplusplus
1767 int yyparse (void *YYPARSE_PARAM
);
1771 #else /* ! YYPARSE_PARAM */
1772 #if defined __STDC__ || defined __cplusplus
1773 int yyparse (struct parse_io
*parseio
);
1777 #endif /* ! YYPARSE_PARAM */
1788 #ifdef YYPARSE_PARAM
1789 #if (defined __STDC__ || defined __C99__FUNC__ \
1790 || defined __cplusplus || defined _MSC_VER)
1792 yyparse (void *YYPARSE_PARAM
)
1795 yyparse (YYPARSE_PARAM
)
1796 void *YYPARSE_PARAM
;
1798 #else /* ! YYPARSE_PARAM */
1799 #if (defined __STDC__ || defined __C99__FUNC__ \
1800 || defined __cplusplus || defined _MSC_VER)
1802 yyparse (struct parse_io
*parseio
)
1806 struct parse_io
*parseio
;
1810 /* The look-ahead symbol. */
1813 /* The semantic value of the look-ahead symbol. */
1816 /* Number of syntax errors so far. */
1818 /* Location data for the look-ahead symbol. */
1824 /* Number of tokens to shift before error messages enabled. */
1826 /* Look-ahead token as an internal (translated) token number. */
1829 /* Buffer for error messages, and its allocated size. */
1831 char *yymsg
= yymsgbuf
;
1832 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1835 /* Three stacks and their tools:
1836 `yyss': related to states,
1837 `yyvs': related to semantic values,
1838 `yyls': related to locations.
1840 Refer to the stacks thru separate pointers, to allow yyoverflow
1841 to reallocate them elsewhere. */
1843 /* The state stack. */
1844 yytype_int16 yyssa
[YYINITDEPTH
];
1845 yytype_int16
*yyss
= yyssa
;
1846 yytype_int16
*yyssp
;
1848 /* The semantic value stack. */
1849 YYSTYPE yyvsa
[YYINITDEPTH
];
1850 YYSTYPE
*yyvs
= yyvsa
;
1853 /* The location stack. */
1854 YYLTYPE yylsa
[YYINITDEPTH
];
1855 YYLTYPE
*yyls
= yylsa
;
1857 /* The locations where the error started and ended. */
1858 YYLTYPE yyerror_range
[2];
1860 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1862 YYSIZE_T yystacksize
= YYINITDEPTH
;
1864 /* The variables used to return semantic value and location from the
1869 /* The number of symbols on the RHS of the reduced rule.
1870 Keep to zero when no symbol should be popped. */
1873 YYDPRINTF ((stderr
, "Starting parse\n"));
1878 yychar
= YYEMPTY
; /* Cause a token to be read. */
1880 /* Initialize stack pointers.
1881 Waste one element of value and location stack
1882 so that they stay on the same level as the state stack.
1883 The wasted elements are never initialized. */
1888 #if YYLTYPE_IS_TRIVIAL
1889 /* Initialize the default location before parsing starts. */
1890 yylloc
.first_line
= yylloc
.last_line
= 1;
1891 yylloc
.first_column
= yylloc
.last_column
= 0;
1896 /*------------------------------------------------------------.
1897 | yynewstate -- Push a new state, which is found in yystate. |
1898 `------------------------------------------------------------*/
1900 /* In all cases, when you get here, the value and location stacks
1901 have just been pushed. So pushing a state here evens the stacks. */
1907 if (yyss
+ yystacksize
- 1 <= yyssp
)
1909 /* Get the current used size of the three stacks, in elements. */
1910 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1914 /* Give user a chance to reallocate the stack. Use copies of
1915 these so that the &'s don't force the real ones into
1917 YYSTYPE
*yyvs1
= yyvs
;
1918 yytype_int16
*yyss1
= yyss
;
1919 YYLTYPE
*yyls1
= yyls
;
1921 /* Each stack pointer address is followed by the size of the
1922 data in use in that stack, in bytes. This used to be a
1923 conditional around just the two extra args, but that might
1924 be undefined if yyoverflow is a macro. */
1925 yyoverflow (YY_("memory exhausted"),
1926 &yyss1
, yysize
* sizeof (*yyssp
),
1927 &yyvs1
, yysize
* sizeof (*yyvsp
),
1928 &yyls1
, yysize
* sizeof (*yylsp
),
1934 #else /* no yyoverflow */
1935 # ifndef YYSTACK_RELOCATE
1936 goto yyexhaustedlab
;
1938 /* Extend the stack our own way. */
1939 if (YYMAXDEPTH
<= yystacksize
)
1940 goto yyexhaustedlab
;
1942 if (YYMAXDEPTH
< yystacksize
)
1943 yystacksize
= YYMAXDEPTH
;
1946 yytype_int16
*yyss1
= yyss
;
1947 union yyalloc
*yyptr
=
1948 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1950 goto yyexhaustedlab
;
1951 YYSTACK_RELOCATE (yyss
);
1952 YYSTACK_RELOCATE (yyvs
);
1953 YYSTACK_RELOCATE (yyls
);
1954 # undef YYSTACK_RELOCATE
1956 YYSTACK_FREE (yyss1
);
1959 #endif /* no yyoverflow */
1961 yyssp
= yyss
+ yysize
- 1;
1962 yyvsp
= yyvs
+ yysize
- 1;
1963 yylsp
= yyls
+ yysize
- 1;
1965 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1966 (unsigned long int) yystacksize
));
1968 if (yyss
+ yystacksize
- 1 <= yyssp
)
1972 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1981 /* Do appropriate processing given the current state. Read a
1982 look-ahead token if we need one and don't already have one. */
1984 /* First try to decide what to do without reference to look-ahead token. */
1985 yyn
= yypact
[yystate
];
1986 if (yyn
== YYPACT_NINF
)
1989 /* Not known => get a look-ahead token if don't already have one. */
1991 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1992 if (yychar
== YYEMPTY
)
1994 YYDPRINTF ((stderr
, "Reading a token: "));
1998 if (yychar
<= YYEOF
)
2000 yychar
= yytoken
= YYEOF
;
2001 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2005 yytoken
= YYTRANSLATE (yychar
);
2006 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2009 /* If the proper action on seeing token YYTOKEN is to reduce or to
2010 detect an error, take that action. */
2012 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2017 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
2026 /* Count tokens shifted since error; after three, turn off error
2031 /* Shift the look-ahead token. */
2032 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2034 /* Discard the shifted token unless it is eof. */
2035 if (yychar
!= YYEOF
)
2044 /*-----------------------------------------------------------.
2045 | yydefault -- do the default action for the current state. |
2046 `-----------------------------------------------------------*/
2048 yyn
= yydefact
[yystate
];
2054 /*-----------------------------.
2055 | yyreduce -- Do a reduction. |
2056 `-----------------------------*/
2058 /* yyn is the number of a rule to reduce with. */
2061 /* If YYLEN is nonzero, implement the default value of the action:
2064 Otherwise, the following line sets YYVAL to garbage.
2065 This behavior is undocumented and Bison
2066 users should not rely upon it. Assigning to YYVAL
2067 unconditionally makes the parser a bit smaller, and it avoids a
2068 GCC warning that YYVAL may be used uninitialized. */
2069 yyval
= yyvsp
[1-yylen
];
2071 /* Default location. */
2072 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
2073 YY_REDUCE_PRINT (yyn
);
2078 { (yyval
.pval
) = parseio
->pval
= (yyvsp
[(1) - (1)].pval
); ;}
2083 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2088 { (yyval
.pval
) = linku1((yyvsp
[(1) - (2)].pval
), (yyvsp
[(2) - (2)].pval
)); ;}
2093 {(yyval
.pval
)=(yyvsp
[(1) - (2)].pval
);;}
2098 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2103 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2108 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2113 {(yyval
.pval
)=0;/* allow older docs to be read */;}
2118 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
2123 { (yyval
.str
) = strdup("default"); ;}
2129 (yyval
.pval
) = npval2(PV_CONTEXT
, &(yylsp
[(1) - (6)]), &(yylsp
[(6) - (6)]));
2130 (yyval
.pval
)->u1
.str
= (yyvsp
[(3) - (6)].str
);
2131 (yyval
.pval
)->u2
.statements
= (yyvsp
[(5) - (6)].pval
);
2132 set_dads((yyval
.pval
),(yyvsp
[(5) - (6)].pval
));
2133 (yyval
.pval
)->u3
.abstract
= (yyvsp
[(1) - (6)].intval
);;}
2138 { (yyval
.intval
) = 1; ;}
2143 { (yyval
.intval
) = 0; ;}
2148 { (yyval
.intval
) = 2; ;}
2153 { (yyval
.intval
)=3; ;}
2158 { (yyval
.intval
)=3; ;}
2164 (yyval
.pval
) = npval2(PV_MACRO
, &(yylsp
[(1) - (8)]), &(yylsp
[(8) - (8)]));
2165 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (8)].str
); (yyval
.pval
)->u2
.arglist
= (yyvsp
[(4) - (8)].pval
); (yyval
.pval
)->u3
.macro_statements
= (yyvsp
[(7) - (8)].pval
);
2166 set_dads((yyval
.pval
),(yyvsp
[(7) - (8)].pval
));;}
2172 (yyval
.pval
) = npval2(PV_GLOBALS
, &(yylsp
[(1) - (4)]), &(yylsp
[(4) - (4)]));
2173 (yyval
.pval
)->u1
.statements
= (yyvsp
[(3) - (4)].pval
);
2174 set_dads((yyval
.pval
),(yyvsp
[(3) - (4)].pval
));;}
2179 { (yyval
.pval
) = NULL
; ;}
2184 {(yyval
.pval
) = linku1((yyvsp
[(1) - (2)].pval
), (yyvsp
[(2) - (2)].pval
)); ;}
2189 {(yyval
.pval
)=(yyvsp
[(2) - (2)].pval
);;}
2194 { reset_semicount(parseio
->scanner
); ;}
2200 (yyval
.pval
) = npval2(PV_VARDEC
, &(yylsp
[(1) - (5)]), &(yylsp
[(5) - (5)]));
2201 (yyval
.pval
)->u1
.str
= (yyvsp
[(1) - (5)].str
);
2202 (yyval
.pval
)->u2
.val
= (yyvsp
[(4) - (5)].str
); ;}
2207 { (yyval
.pval
) = NULL
; ;}
2212 { (yyval
.pval
) = nword((yyvsp
[(1) - (1)].str
), &(yylsp
[(1) - (1)])); ;}
2217 { (yyval
.pval
) = linku1((yyvsp
[(1) - (3)].pval
), nword((yyvsp
[(3) - (3)].str
), &(yylsp
[(3) - (3)]))); ;}
2222 {(yyval
.pval
)=(yyvsp
[(1) - (2)].pval
);;}
2232 { (yyval
.pval
) = linku1((yyvsp
[(1) - (2)].pval
), (yyvsp
[(2) - (2)].pval
)); ;}
2237 { (yyval
.pval
)=(yyvsp
[(2) - (2)].pval
);;}
2242 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2247 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2252 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2257 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2262 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2267 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2272 {free((yyvsp
[(1) - (2)].str
)); (yyval
.pval
)=0;;}
2277 {(yyval
.pval
)=0;/* allow older docs to be read */;}
2283 (yyval
.pval
) = npval2(PV_IGNOREPAT
, &(yylsp
[(1) - (4)]), &(yylsp
[(4) - (4)]));
2284 (yyval
.pval
)->u1
.str
= (yyvsp
[(3) - (4)].str
);;}
2290 (yyval
.pval
) = npval2(PV_EXTENSION
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));
2291 (yyval
.pval
)->u1
.str
= (yyvsp
[(1) - (3)].str
);
2292 (yyval
.pval
)->u2
.statements
= (yyvsp
[(3) - (3)].pval
); set_dads((yyval
.pval
),(yyvsp
[(3) - (3)].pval
));;}
2298 (yyval
.pval
) = npval2(PV_EXTENSION
, &(yylsp
[(1) - (4)]), &(yylsp
[(4) - (4)]));
2299 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (4)].str
);
2300 (yyval
.pval
)->u2
.statements
= (yyvsp
[(4) - (4)].pval
); set_dads((yyval
.pval
),(yyvsp
[(4) - (4)].pval
));
2301 (yyval
.pval
)->u4
.regexten
=1;;}
2307 (yyval
.pval
) = npval2(PV_EXTENSION
, &(yylsp
[(1) - (7)]), &(yylsp
[(7) - (7)]));
2308 (yyval
.pval
)->u1
.str
= (yyvsp
[(5) - (7)].str
);
2309 (yyval
.pval
)->u2
.statements
= (yyvsp
[(7) - (7)].pval
); set_dads((yyval
.pval
),(yyvsp
[(7) - (7)].pval
));
2310 (yyval
.pval
)->u3
.hints
= (yyvsp
[(3) - (7)].str
);;}
2316 (yyval
.pval
) = npval2(PV_EXTENSION
, &(yylsp
[(1) - (8)]), &(yylsp
[(8) - (8)]));
2317 (yyval
.pval
)->u1
.str
= (yyvsp
[(6) - (8)].str
);
2318 (yyval
.pval
)->u2
.statements
= (yyvsp
[(8) - (8)].pval
); set_dads((yyval
.pval
),(yyvsp
[(8) - (8)].pval
));
2319 (yyval
.pval
)->u4
.regexten
=1;
2320 (yyval
.pval
)->u3
.hints
= (yyvsp
[(4) - (8)].str
);;}
2325 { (yyval
.pval
) = NULL
; ;}
2330 { (yyval
.pval
) = linku1((yyvsp
[(1) - (2)].pval
), (yyvsp
[(2) - (2)].pval
)); ;}
2335 {(yyval
.pval
)=(yyvsp
[(2) - (2)].pval
);;}
2341 asprintf(&(yyval
.str
), "%s:%s:%s", (yyvsp
[(1) - (5)].str
), (yyvsp
[(3) - (5)].str
), (yyvsp
[(5) - (5)].str
));
2342 free((yyvsp
[(1) - (5)].str
));
2343 free((yyvsp
[(3) - (5)].str
));
2344 free((yyvsp
[(5) - (5)].str
)); ;}
2349 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
2355 (yyval
.pval
) = nword((yyvsp
[(1) - (7)].str
), &(yylsp
[(1) - (7)]));
2356 (yyval
.pval
)->next
= nword((yyvsp
[(3) - (7)].str
), &(yylsp
[(3) - (7)]));
2357 (yyval
.pval
)->next
->next
= nword((yyvsp
[(5) - (7)].str
), &(yylsp
[(5) - (7)]));
2358 (yyval
.pval
)->next
->next
->next
= nword((yyvsp
[(7) - (7)].str
), &(yylsp
[(7) - (7)])); ;}
2363 { reset_parencount(parseio
->scanner
); ;}
2368 { (yyval
.str
) = (yyvsp
[(3) - (4)].str
); ;}
2374 (yyval
.pval
)= npval2(PV_IF
, &(yylsp
[(1) - (2)]), &(yylsp
[(2) - (2)]));
2375 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (2)].str
); ;}
2381 (yyval
.pval
) = npval2(PV_RANDOM
, &(yylsp
[(1) - (2)]), &(yylsp
[(2) - (2)]));
2382 (yyval
.pval
)->u1
.str
=(yyvsp
[(2) - (2)].str
);;}
2388 (yyval
.pval
) = npval2(PV_IFTIME
, &(yylsp
[(1) - (4)]), &(yylsp
[(4) - (4)]));
2389 (yyval
.pval
)->u1
.list
= (yyvsp
[(3) - (4)].pval
);
2395 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
);;}
2401 asprintf(&((yyval
.str
)), "%s%s", (yyvsp
[(1) - (2)].str
), (yyvsp
[(2) - (2)].str
));
2402 free((yyvsp
[(1) - (2)].str
));
2403 free((yyvsp
[(2) - (2)].str
));
2404 prev_word
= (yyval
.str
);;}
2409 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
2415 asprintf(&((yyval
.str
)), "%s %s", (yyvsp
[(1) - (2)].str
), (yyvsp
[(2) - (2)].str
));
2416 free((yyvsp
[(1) - (2)].str
));
2417 free((yyvsp
[(2) - (2)].str
)); ;}
2423 asprintf(&((yyval
.str
)), "%s:%s", (yyvsp
[(1) - (3)].str
), (yyvsp
[(3) - (3)].str
));
2424 free((yyvsp
[(1) - (3)].str
));
2425 free((yyvsp
[(3) - (3)].str
)); ;}
2430 { /* there are often '&' in hints */
2431 asprintf(&((yyval
.str
)), "%s&%s", (yyvsp
[(1) - (3)].str
), (yyvsp
[(3) - (3)].str
));
2432 free((yyvsp
[(1) - (3)].str
));
2433 free((yyvsp
[(3) - (3)].str
));;}
2438 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
);;}
2444 asprintf(&((yyval
.str
)), "%s%s", (yyvsp
[(1) - (2)].str
), (yyvsp
[(2) - (2)].str
));
2445 free((yyvsp
[(1) - (2)].str
));
2446 free((yyvsp
[(2) - (2)].str
));
2447 prev_word
= (yyval
.str
);;}
2453 asprintf(&((yyval
.str
)), "%s%s%s", (yyvsp
[(1) - (3)].str
), (yyvsp
[(2) - (3)].str
), (yyvsp
[(3) - (3)].str
));
2454 free((yyvsp
[(1) - (3)].str
));
2455 free((yyvsp
[(2) - (3)].str
));
2456 free((yyvsp
[(3) - (3)].str
));
2457 prev_word
=(yyval
.str
);;}
2462 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
);;}
2468 asprintf(&((yyval
.str
)), "%s%s", (yyvsp
[(1) - (2)].str
), (yyvsp
[(2) - (2)].str
));
2469 free((yyvsp
[(1) - (2)].str
));
2470 free((yyvsp
[(2) - (2)].str
));;}
2476 asprintf(&((yyval
.str
)), "%s:%s", (yyvsp
[(1) - (3)].str
), (yyvsp
[(3) - (3)].str
));
2477 free((yyvsp
[(1) - (3)].str
));
2478 free((yyvsp
[(3) - (3)].str
));;}
2484 (yyval
.pval
) = npval2(PV_SWITCH
, &(yylsp
[(1) - (5)]), &(yylsp
[(5) - (5)]));
2485 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (5)].str
);
2486 (yyval
.pval
)->u2
.statements
= (yyvsp
[(4) - (5)].pval
); set_dads((yyval
.pval
),(yyvsp
[(4) - (5)].pval
));;}
2492 (yyval
.pval
) = npval2(PV_STATEMENTBLOCK
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));
2493 (yyval
.pval
)->u1
.list
= (yyvsp
[(2) - (3)].pval
); set_dads((yyval
.pval
),(yyvsp
[(2) - (3)].pval
));;}
2498 { (yyval
.pval
) = (yyvsp
[(1) - (1)].pval
); ;}
2504 (yyval
.pval
) = npval2(PV_GOTO
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));
2505 (yyval
.pval
)->u1
.list
= (yyvsp
[(2) - (3)].pval
);;}
2511 (yyval
.pval
) = npval2(PV_GOTO
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));
2512 (yyval
.pval
)->u1
.list
= (yyvsp
[(2) - (3)].pval
);;}
2518 (yyval
.pval
) = npval2(PV_LABEL
, &(yylsp
[(1) - (2)]), &(yylsp
[(2) - (2)]));
2519 (yyval
.pval
)->u1
.str
= (yyvsp
[(1) - (2)].str
); ;}
2524 {reset_semicount(parseio
->scanner
);;}
2529 {reset_semicount(parseio
->scanner
);;}
2534 {reset_parencount(parseio
->scanner
);;}
2539 { /* XXX word_list maybe ? */
2540 (yyval
.pval
) = npval2(PV_FOR
, &(yylsp
[(1) - (12)]), &(yylsp
[(12) - (12)]));
2541 (yyval
.pval
)->u1
.for_init
= (yyvsp
[(4) - (12)].str
);
2542 (yyval
.pval
)->u2
.for_test
=(yyvsp
[(7) - (12)].str
);
2543 (yyval
.pval
)->u3
.for_inc
= (yyvsp
[(10) - (12)].str
);
2544 (yyval
.pval
)->u4
.for_statements
= (yyvsp
[(12) - (12)].pval
); set_dads((yyval
.pval
),(yyvsp
[(12) - (12)].pval
));;}
2550 (yyval
.pval
) = npval2(PV_WHILE
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));
2551 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (3)].str
);
2552 (yyval
.pval
)->u2
.statements
= (yyvsp
[(3) - (3)].pval
); set_dads((yyval
.pval
),(yyvsp
[(3) - (3)].pval
));;}
2557 { (yyval
.pval
) = (yyvsp
[(1) - (1)].pval
); ;}
2562 { (yyval
.pval
) = update_last((yyvsp
[(2) - (3)].pval
), &(yylsp
[(2) - (3)])); ;}
2567 { (yyval
.pval
) = update_last((yyvsp
[(1) - (2)].pval
), &(yylsp
[(2) - (2)])); ;}
2573 (yyval
.pval
)= npval2(PV_APPLICATION_CALL
, &(yylsp
[(1) - (2)]), &(yylsp
[(2) - (2)]));
2574 (yyval
.pval
)->u1
.str
= (yyvsp
[(1) - (2)].str
);;}
2579 {reset_semicount(parseio
->scanner
);;}
2588 (yyval
.pval
) = npval2(PV_VARDEC
, &(yylsp
[(1) - (5)]), &(yylsp
[(5) - (5)]));
2589 (yyval
.pval
)->u2
.val
=(yyvsp
[(4) - (5)].str
);
2590 /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
2591 /* string to big to fit in the buffer? */
2592 tot
+=strlen((yyvsp
[(1) - (5)].pval
)->u1
.str
);
2593 for(pptr
=(yyvsp
[(1) - (5)].pval
)->u2
.arglist
;pptr
;pptr
=pptr
->next
) {
2594 tot
+=strlen(pptr
->u1
.str
);
2595 tot
++; /* for a sep like a comma */
2597 tot
+=4; /* for safety */
2598 bufx
= calloc(1, tot
);
2599 strcpy(bufx
,(yyvsp
[(1) - (5)].pval
)->u1
.str
);
2601 /* XXX need to advance the pointer or the loop is very inefficient */
2602 for (pptr
=(yyvsp
[(1) - (5)].pval
)->u2
.arglist
;pptr
;pptr
=pptr
->next
) {
2603 if ( pptr
!= (yyvsp
[(1) - (5)].pval
)->u2
.arglist
)
2605 strcat(bufx
,pptr
->u1
.str
);
2609 if ( !ael_is_funcname((yyvsp
[(1) - (5)].pval
)->u1
.str
) )
2610 ast_log(LOG_WARNING
, "==== File: %s, Line %d, Cols: %d-%d: Function call? The name %s is not in my internal list of function names\n",
2611 my_file
, (yylsp
[(1) - (5)]).first_line
, (yylsp
[(1) - (5)]).first_column
, (yylsp
[(1) - (5)]).last_column
, (yyvsp
[(1) - (5)].pval
)->u1
.str
);
2613 (yyval
.pval
)->u1
.str
= bufx
;
2614 destroy_pval((yyvsp
[(1) - (5)].pval
)); /* the app call it is not, get rid of that chain */
2621 { (yyval
.pval
) = npval2(PV_BREAK
, &(yylsp
[(1) - (2)]), &(yylsp
[(2) - (2)])); ;}
2626 { (yyval
.pval
) = npval2(PV_RETURN
, &(yylsp
[(1) - (2)]), &(yylsp
[(2) - (2)])); ;}
2631 { (yyval
.pval
) = npval2(PV_CONTINUE
, &(yylsp
[(1) - (2)]), &(yylsp
[(2) - (2)])); ;}
2637 (yyval
.pval
) = update_last((yyvsp
[(1) - (3)].pval
), &(yylsp
[(2) - (3)]));
2638 (yyval
.pval
)->u2
.statements
= (yyvsp
[(2) - (3)].pval
); set_dads((yyval
.pval
),(yyvsp
[(2) - (3)].pval
));
2639 (yyval
.pval
)->u3
.else_statements
= (yyvsp
[(3) - (3)].pval
);set_dads((yyval
.pval
),(yyvsp
[(3) - (3)].pval
));;}
2644 { (yyval
.pval
)=0; ;}
2649 { (yyval
.pval
) = (yyvsp
[(2) - (2)].pval
); ;}
2654 { (yyval
.pval
) = NULL
; ;}
2659 { (yyval
.pval
) = nword((yyvsp
[(1) - (1)].str
), &(yylsp
[(1) - (1)])); ;}
2665 (yyval
.pval
) = nword((yyvsp
[(1) - (3)].str
), &(yylsp
[(1) - (3)]));
2666 (yyval
.pval
)->next
= nword((yyvsp
[(3) - (3)].str
), &(yylsp
[(3) - (3)])); ;}
2672 (yyval
.pval
) = nword((yyvsp
[(1) - (3)].str
), &(yylsp
[(1) - (3)]));
2673 (yyval
.pval
)->next
= nword((yyvsp
[(3) - (3)].str
), &(yylsp
[(3) - (3)])); ;}
2679 (yyval
.pval
) = nword((yyvsp
[(1) - (5)].str
), &(yylsp
[(1) - (5)]));
2680 (yyval
.pval
)->next
= nword((yyvsp
[(3) - (5)].str
), &(yylsp
[(3) - (5)]));
2681 (yyval
.pval
)->next
->next
= nword((yyvsp
[(5) - (5)].str
), &(yylsp
[(5) - (5)])); ;}
2687 (yyval
.pval
) = nword((yyvsp
[(1) - (5)].str
), &(yylsp
[(1) - (5)]));
2688 (yyval
.pval
)->next
= nword((yyvsp
[(3) - (5)].str
), &(yylsp
[(3) - (5)]));
2689 (yyval
.pval
)->next
->next
= nword((yyvsp
[(5) - (5)].str
), &(yylsp
[(5) - (5)])); ;}
2695 (yyval
.pval
) = nword(strdup("default"), &(yylsp
[(1) - (5)]));
2696 (yyval
.pval
)->next
= nword((yyvsp
[(3) - (5)].str
), &(yylsp
[(3) - (5)]));
2697 (yyval
.pval
)->next
->next
= nword((yyvsp
[(5) - (5)].str
), &(yylsp
[(5) - (5)])); ;}
2703 (yyval
.pval
) = nword(strdup("default"), &(yylsp
[(1) - (5)]));
2704 (yyval
.pval
)->next
= nword((yyvsp
[(3) - (5)].str
), &(yylsp
[(3) - (5)]));
2705 (yyval
.pval
)->next
->next
= nword((yyvsp
[(5) - (5)].str
), &(yylsp
[(5) - (5)])); ;}
2710 { (yyval
.str
) = strdup("1"); ;}
2715 { (yyval
.str
) = (yyvsp
[(2) - (2)].str
); ;}
2720 { /* ext[, pri] default 1 */
2721 (yyval
.pval
) = nword((yyvsp
[(1) - (2)].str
), &(yylsp
[(1) - (2)]));
2722 (yyval
.pval
)->next
= nword((yyvsp
[(2) - (2)].str
), &(yylsp
[(2) - (2)])); ;}
2727 { /* context, ext, pri */
2728 (yyval
.pval
) = nword((yyvsp
[(4) - (4)].str
), &(yylsp
[(4) - (4)]));
2729 (yyval
.pval
)->next
= nword((yyvsp
[(1) - (4)].str
), &(yylsp
[(1) - (4)]));
2730 (yyval
.pval
)->next
->next
= nword((yyvsp
[(2) - (4)].str
), &(yylsp
[(2) - (4)])); ;}
2735 {reset_argcount(parseio
->scanner
);;}
2741 /* XXX original code had @2 but i think we need @5 */
2742 (yyval
.pval
) = npval2(PV_MACRO_CALL
, &(yylsp
[(1) - (5)]), &(yylsp
[(5) - (5)]));
2743 (yyval
.pval
)->u1
.str
= (yyvsp
[(1) - (5)].str
);
2744 (yyval
.pval
)->u2
.arglist
= (yyvsp
[(4) - (5)].pval
);;}
2750 (yyval
.pval
)= npval2(PV_MACRO_CALL
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));
2751 (yyval
.pval
)->u1
.str
= (yyvsp
[(1) - (3)].str
); ;}
2756 {reset_argcount(parseio
->scanner
);;}
2762 if (strcasecmp((yyvsp
[(1) - (3)].str
),"goto") == 0) {
2763 (yyval
.pval
) = npval2(PV_GOTO
, &(yylsp
[(1) - (3)]), &(yylsp
[(2) - (3)]));
2764 free((yyvsp
[(1) - (3)].str
)); /* won't be using this */
2765 ast_log(LOG_WARNING
, "==== File: %s, Line %d, Cols: %d-%d: Suggestion: Use the goto statement instead of the Goto() application call in AEL.\n", my_file
, (yylsp
[(1) - (3)]).first_line
, (yylsp
[(1) - (3)]).first_column
, (yylsp
[(1) - (3)]).last_column
);
2767 (yyval
.pval
)= npval2(PV_APPLICATION_CALL
, &(yylsp
[(1) - (3)]), &(yylsp
[(2) - (3)]));
2768 (yyval
.pval
)->u1
.str
= (yyvsp
[(1) - (3)].str
);
2775 (yyval
.pval
) = update_last((yyvsp
[(1) - (3)].pval
), &(yylsp
[(3) - (3)]));
2776 if( (yyval
.pval
)->type
== PV_GOTO
)
2777 (yyval
.pval
)->u1
.list
= (yyvsp
[(2) - (3)].pval
);
2779 (yyval
.pval
)->u2
.arglist
= (yyvsp
[(2) - (3)].pval
);
2785 { (yyval
.pval
) = update_last((yyvsp
[(1) - (2)].pval
), &(yylsp
[(2) - (2)])); ;}
2790 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
) ;}
2795 { (yyval
.str
) = strdup(""); ;}
2800 { (yyval
.pval
) = nword((yyvsp
[(1) - (1)].str
), &(yylsp
[(1) - (1)])); ;}
2806 (yyval
.pval
)= npval(PV_WORD
,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
2807 (yyval
.pval
)->u1
.str
= strdup(""); ;}
2812 { (yyval
.pval
) = linku1((yyvsp
[(1) - (3)].pval
), nword((yyvsp
[(3) - (3)].str
), &(yylsp
[(3) - (3)]))); ;}
2817 { (yyval
.pval
) = NULL
; ;}
2822 { (yyval
.pval
) = linku1((yyvsp
[(1) - (2)].pval
), (yyvsp
[(2) - (2)].pval
)); ;}
2828 (yyval
.pval
) = npval2(PV_CASE
, &(yylsp
[(1) - (4)]), &(yylsp
[(3) - (4)])); /* XXX 3 or 4 ? */
2829 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (4)].str
);
2830 (yyval
.pval
)->u2
.statements
= (yyvsp
[(4) - (4)].pval
); set_dads((yyval
.pval
),(yyvsp
[(4) - (4)].pval
));;}
2836 (yyval
.pval
) = npval2(PV_DEFAULT
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));
2837 (yyval
.pval
)->u1
.str
= NULL
;
2838 (yyval
.pval
)->u2
.statements
= (yyvsp
[(3) - (3)].pval
);set_dads((yyval
.pval
),(yyvsp
[(3) - (3)].pval
));;}
2844 (yyval
.pval
) = npval2(PV_PATTERN
, &(yylsp
[(1) - (4)]), &(yylsp
[(4) - (4)])); /* XXX@3 or @4 ? */
2845 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (4)].str
);
2846 (yyval
.pval
)->u2
.statements
= (yyvsp
[(4) - (4)].pval
);set_dads((yyval
.pval
),(yyvsp
[(4) - (4)].pval
));;}
2851 { (yyval
.pval
) = NULL
; ;}
2856 { (yyval
.pval
) = linku1((yyvsp
[(1) - (2)].pval
), (yyvsp
[(2) - (2)].pval
)); ;}
2861 {(yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2866 { (yyval
.pval
)=(yyvsp
[(1) - (1)].pval
);;}
2872 (yyval
.pval
) = npval2(PV_CATCH
, &(yylsp
[(1) - (5)]), &(yylsp
[(5) - (5)]));
2873 (yyval
.pval
)->u1
.str
= (yyvsp
[(2) - (5)].str
);
2874 (yyval
.pval
)->u2
.statements
= (yyvsp
[(4) - (5)].pval
); set_dads((yyval
.pval
),(yyvsp
[(4) - (5)].pval
));;}
2880 (yyval
.pval
) = npval2(PV_SWITCHES
, &(yylsp
[(1) - (4)]), &(yylsp
[(2) - (4)]));
2881 (yyval
.pval
)->u1
.list
= (yyvsp
[(3) - (4)].pval
); set_dads((yyval
.pval
),(yyvsp
[(3) - (4)].pval
));;}
2887 (yyval
.pval
) = npval2(PV_ESWITCHES
, &(yylsp
[(1) - (4)]), &(yylsp
[(2) - (4)]));
2888 (yyval
.pval
)->u1
.list
= (yyvsp
[(3) - (4)].pval
); set_dads((yyval
.pval
),(yyvsp
[(3) - (4)].pval
));;}
2893 { (yyval
.pval
) = NULL
; ;}
2898 { (yyval
.pval
) = linku1(nword((yyvsp
[(1) - (3)].str
), &(yylsp
[(1) - (3)])), (yyvsp
[(3) - (3)].pval
)); ;}
2903 { char *x
; asprintf(&x
,"%s@%s", (yyvsp
[(1) - (5)].str
),(yyvsp
[(3) - (5)].str
)); free((yyvsp
[(1) - (5)].str
)); free((yyvsp
[(3) - (5)].str
));
2904 (yyval
.pval
) = linku1(nword(x
, &(yylsp
[(1) - (5)])), (yyvsp
[(5) - (5)].pval
));;}
2909 {(yyval
.pval
)=(yyvsp
[(2) - (2)].pval
);;}
2914 { (yyval
.pval
) = nword((yyvsp
[(1) - (1)].str
), &(yylsp
[(1) - (1)])); ;}
2920 (yyval
.pval
) = nword((yyvsp
[(1) - (3)].str
), &(yylsp
[(1) - (3)]));
2921 (yyval
.pval
)->u2
.arglist
= (yyvsp
[(3) - (3)].pval
);
2922 prev_word
=0; /* XXX sure ? */ ;}
2927 { (yyval
.pval
) = (yyvsp
[(1) - (2)].pval
); ;}
2932 { (yyval
.pval
) = linku1((yyvsp
[(1) - (3)].pval
), (yyvsp
[(2) - (3)].pval
)); ;}
2937 {(yyval
.pval
)=(yyvsp
[(1) - (2)].pval
);;}
2943 (yyval
.pval
) = npval2(PV_INCLUDES
, &(yylsp
[(1) - (4)]), &(yylsp
[(4) - (4)]));
2944 (yyval
.pval
)->u1
.list
= (yyvsp
[(3) - (4)].pval
);set_dads((yyval
.pval
),(yyvsp
[(3) - (4)].pval
));;}
2950 (yyval
.pval
) = npval2(PV_INCLUDES
, &(yylsp
[(1) - (3)]), &(yylsp
[(3) - (3)]));;}
2954 /* Line 1270 of yacc.c. */
2955 #line 2956 "ael.tab.c"
2958 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2962 YY_STACK_PRINT (yyss
, yyssp
);
2967 /* Now `shift' the result of the reduction. Determine what state
2968 that goes to, based on the state we popped back to and the rule
2969 number reduced by. */
2973 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2974 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2975 yystate
= yytable
[yystate
];
2977 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2982 /*------------------------------------.
2983 | yyerrlab -- here on detecting error |
2984 `------------------------------------*/
2986 /* If not already recovering from an error, report this error. */
2990 #if ! YYERROR_VERBOSE
2991 yyerror (&yylloc
, parseio
, YY_("syntax error"));
2994 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
2995 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
2997 YYSIZE_T yyalloc
= 2 * yysize
;
2998 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
2999 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
3000 if (yymsg
!= yymsgbuf
)
3001 YYSTACK_FREE (yymsg
);
3002 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
3004 yymsg_alloc
= yyalloc
;
3008 yymsg_alloc
= sizeof yymsgbuf
;
3012 if (0 < yysize
&& yysize
<= yymsg_alloc
)
3014 (void) yysyntax_error (yymsg
, yystate
, yychar
);
3015 yyerror (&yylloc
, parseio
, yymsg
);
3019 yyerror (&yylloc
, parseio
, YY_("syntax error"));
3021 goto yyexhaustedlab
;
3027 yyerror_range
[0] = yylloc
;
3029 if (yyerrstatus
== 3)
3031 /* If just tried and failed to reuse look-ahead token after an
3032 error, discard it. */
3034 if (yychar
<= YYEOF
)
3036 /* Return failure if at end of input. */
3037 if (yychar
== YYEOF
)
3042 yydestruct ("Error: discarding",
3043 yytoken
, &yylval
, &yylloc
, parseio
);
3048 /* Else will try to reuse look-ahead token after shifting the error
3053 /*---------------------------------------------------.
3054 | yyerrorlab -- error raised explicitly by YYERROR. |
3055 `---------------------------------------------------*/
3058 /* Pacify compilers like GCC when the user code never invokes
3059 YYERROR and the label yyerrorlab therefore never appears in user
3061 if (/*CONSTCOND*/ 0)
3064 yyerror_range
[0] = yylsp
[1-yylen
];
3065 /* Do not reclaim the symbols of the rule which action triggered
3069 YY_STACK_PRINT (yyss
, yyssp
);
3074 /*-------------------------------------------------------------.
3075 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3076 `-------------------------------------------------------------*/
3078 yyerrstatus
= 3; /* Each real token shifted decrements this. */
3082 yyn
= yypact
[yystate
];
3083 if (yyn
!= YYPACT_NINF
)
3086 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
3094 /* Pop the current state because it cannot handle the error token. */
3098 yyerror_range
[0] = *yylsp
;
3099 yydestruct ("Error: popping",
3100 yystos
[yystate
], yyvsp
, yylsp
, parseio
);
3103 YY_STACK_PRINT (yyss
, yyssp
);
3111 yyerror_range
[1] = yylloc
;
3112 /* Using YYLLOC is tempting, but would change the location of
3113 the look-ahead. YYLOC is available though. */
3114 YYLLOC_DEFAULT (yyloc
, (yyerror_range
- 1), 2);
3117 /* Shift the error token. */
3118 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
3124 /*-------------------------------------.
3125 | yyacceptlab -- YYACCEPT comes here. |
3126 `-------------------------------------*/
3131 /*-----------------------------------.
3132 | yyabortlab -- YYABORT comes here. |
3133 `-----------------------------------*/
3139 /*-------------------------------------------------.
3140 | yyexhaustedlab -- memory exhaustion comes here. |
3141 `-------------------------------------------------*/
3143 yyerror (&yylloc
, parseio
, YY_("memory exhausted"));
3149 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
3150 yydestruct ("Cleanup: discarding lookahead",
3151 yytoken
, &yylval
, &yylloc
, parseio
);
3152 /* Do not reclaim the symbols of the rule which action triggered
3153 this YYABORT or YYACCEPT. */
3155 YY_STACK_PRINT (yyss
, yyssp
);
3156 while (yyssp
!= yyss
)
3158 yydestruct ("Cleanup: popping",
3159 yystos
[*yyssp
], yyvsp
, yylsp
, parseio
);
3164 YYSTACK_FREE (yyss
);
3167 if (yymsg
!= yymsgbuf
)
3168 YYSTACK_FREE (yymsg
);
3177 static char *token_equivs1
[] =
3217 static char *token_equivs2
[] =
3258 static char *ael_token_subst(const char *mess
)
3260 /* calc a length, malloc, fill, and return; yyerror had better free it! */
3264 int token_equivs_entries
= sizeof(token_equivs1
)/sizeof(char*);
3266 for (p
=mess
; *p
; p
++) {
3267 for (i
=0; i
<token_equivs_entries
; i
++) {
3268 if ( strncmp(p
,token_equivs1
[i
],strlen(token_equivs1
[i
])) == 0 )
3270 len
+=strlen(token_equivs2
[i
])+2;
3271 p
+= strlen(token_equivs1
[i
])-1;
3277 res
= calloc(1, len
+1);
3282 for (i
=0; i
<token_equivs_entries
; i
++) {
3283 if ( strncmp(p
,token_equivs1
[i
],strlen(token_equivs1
[i
])) == 0 ) {
3285 for (t
=token_equivs2
[i
]; *t
;) {
3289 p
+= strlen(token_equivs1
[i
]);
3301 void yyerror(YYLTYPE
*locp
, struct parse_io
*parseio
, char const *s
)
3303 char *s2
= ael_token_subst(s
);
3304 if (locp
->first_line
== locp
->last_line
) {
3305 ast_log(LOG_ERROR
, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file
, locp
->first_line
, locp
->first_column
, locp
->last_column
, s2
);
3307 ast_log(LOG_ERROR
, "==== File: %s, Line %d Col %d to Line %d Col %d: Error: %s\n", my_file
, locp
->first_line
, locp
->first_column
, locp
->last_line
, locp
->last_column
, s2
);
3310 parseio
->syntax_error_count
++;
3313 static struct pval
*npval(pvaltype type
, int first_line
, int last_line
,
3314 int first_column
, int last_column
)
3316 pval
*z
= calloc(1, sizeof(struct pval
));
3318 z
->startline
= first_line
;
3319 z
->endline
= last_line
;
3320 z
->startcol
= first_column
;
3321 z
->endcol
= last_column
;
3322 z
->filename
= strdup(my_file
);
3326 static struct pval
*npval2(pvaltype type
, YYLTYPE
*first
, YYLTYPE
*last
)
3328 return npval(type
, first
->first_line
, last
->last_line
,
3329 first
->first_column
, last
->last_column
);
3332 static struct pval
*update_last(pval
*obj
, YYLTYPE
*last
)
3334 obj
->endline
= last
->last_line
;
3335 obj
->endcol
= last
->last_column
;
3339 /* frontend for npval to create a PV_WORD string from the given token */
3340 static pval
*nword(char *string
, YYLTYPE
*pos
)
3342 pval
*p
= npval2(PV_WORD
, pos
, pos
);
3348 /* append second element to the list in the first one */
3349 static pval
* linku1(pval
*head
, pval
*tail
)
3357 head
->u1_last
->next
= tail
;
3359 head
->u1_last
= tail
;
3360 tail
->prev
= head
; /* the dad link only points to containers */
3365 /* this routine adds a dad ptr to each element in the list */
3366 static void set_dads(struct pval
*dad
, struct pval
*child_list
)
3370 for(t
=child_list
;t
;t
=t
->next
) /* simple stuff */