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 EXTENMARK 279
134 #define KW_RETURN 282
136 #define KW_CONTINUE 284
137 #define KW_REGEXTEN 285
142 #define KW_PATTERN 290
143 #define KW_DEFAULT 291
145 #define KW_SWITCHES 293
146 #define KW_ESWITCHES 294
147 #define KW_INCLUDES 295
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(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 275
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, 44, 49, 50, 53,
555 56, 57, 63, 64, 71, 72, 74, 78, 81, 82,
556 85, 88, 90, 92, 94, 96, 98, 100, 102, 105,
557 107, 112, 116, 121, 129, 138, 139, 142, 145, 151,
558 153, 161, 162, 167, 170, 173, 178, 180, 183, 185,
559 188, 192, 194, 197, 201, 203, 206, 210, 216, 220,
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, 36, -1, 49, 3, 47, 4, 58,
575 5, -1, 23, -1, -1, 15, 42, 6, 57, 7,
576 4, 91, 5, -1, 16, 4, 52, 5, -1, -1,
577 53, 52, -1, 52, 1, -1, -1, 42, 9, 54,
578 42, 8, -1, -1, 41, 42, 9, 56, 42, 8,
579 -1, -1, 42, -1, 57, 10, 42, -1, 57, 1,
580 -1, -1, 59, 58, -1, 58, 1, -1, 61, -1,
581 98, -1, 93, -1, 94, -1, 60, -1, 53, -1,
582 55, -1, 42, 1, -1, 8, -1, 17, 24, 42,
583 8, -1, 42, 24, 73, -1, 30, 42, 24, 73,
584 -1, 31, 6, 69, 7, 42, 24, 73, -1, 30,
585 31, 6, 69, 7, 42, 24, 73, -1, -1, 73,
586 62, -1, 62, 1, -1, 70, 11, 70, 11, 70,
587 -1, 42, -1, 63, 13, 70, 13, 70, 13, 70,
588 -1, -1, 6, 66, 68, 7, -1, 19, 65, -1,
589 22, 65, -1, 20, 6, 64, 7, -1, 42, -1,
590 42, 42, -1, 42, -1, 69, 42, -1, 69, 12,
591 42, -1, 42, -1, 42, 42, -1, 42, 42, 42,
592 -1, 42, -1, 42, 42, -1, 71, 11, 42, -1,
593 18, 65, 4, 89, 5, -1, 4, 62, 5, -1,
594 53, -1, 55, -1, 25, 79, 8, -1, 26, 81,
595 8, -1, 42, 11, -1, -1, -1, -1, 32, 6,
596 74, 42, 8, 75, 42, 8, 76, 42, 7, 73,
597 -1, 33, 65, 73, -1, 72, -1, 12, 82, 8,
598 -1, 86, 8, -1, 42, 8, -1, -1, 86, 9,
599 77, 42, 8, -1, 28, 8, -1, 27, 8, -1,
600 29, 8, -1, 67, 73, 78, -1, 8, -1, 21,
601 73, -1, -1, 71, -1, 71, 13, 71, -1, 71,
602 10, 71, -1, 71, 13, 71, 13, 71, -1, 71,
603 10, 71, 10, 71, -1, 36, 13, 71, 13, 71,
604 -1, 36, 10, 71, 10, 71, -1, -1, 10, 42,
605 -1, 71, 80, -1, 71, 80, 14, 47, -1, -1,
606 42, 6, 83, 88, 7, -1, 42, 6, 7, -1,
607 -1, 42, 6, 85, -1, 84, 88, 7, -1, 84,
608 7, -1, 42, -1, -1, 68, -1, -1, 88, 10,
609 87, -1, -1, 90, 89, -1, 34, 42, 11, 62,
610 -1, 36, 11, 62, -1, 35, 42, 11, 62, -1,
611 -1, 92, 91, -1, 73, -1, 98, -1, 37, 42,
612 4, 62, 5, -1, 38, 4, 95, 5, -1, 39,
613 4, 95, 5, -1, -1, 42, 8, 95, -1, 42,
614 14, 42, 8, 95, -1, 95, 1, -1, 47, -1,
615 47, 13, 64, -1, 96, 8, -1, 97, 96, 8,
616 -1, 97, 1, -1, 40, 4, 97, 5, -1, 40,
620 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
621 static const yytype_uint16 yyrline[] =
623 0, 186, 186, 189, 190, 191, 194, 195, 196, 197,
624 200, 201, 204, 219, 220, 223, 229, 235, 236, 237,
625 240, 240, 246, 246, 253, 254, 255, 256, 259, 260,
626 261, 264, 265, 266, 267, 268, 269, 270, 271, 272,
627 275, 280, 284, 289, 294, 304, 305, 306, 312, 317,
628 321, 329, 329, 333, 336, 339, 350, 351, 358, 359,
629 363, 369, 370, 375, 383, 384, 388, 394, 403, 406,
630 407, 408, 411, 414, 417, 418, 419, 417, 425, 429,
631 430, 431, 432, 435, 435, 468, 469, 470, 471, 475,
632 478, 479, 482, 483, 486, 489, 493, 497, 501, 507,
633 508, 512, 515, 521, 521, 526, 534, 534, 545, 552,
634 555, 556, 559, 560, 563, 566, 567, 570, 574, 578,
635 584, 585, 588, 589, 590, 596, 601, 606, 607, 608,
636 610, 613, 614, 621, 622, 623, 626, 629
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", "EXTENMARK", "KW_GOTO", "KW_JUMP",
649 "KW_RETURN", "KW_BREAK", "KW_CONTINUE", "KW_REGEXTEN", "KW_HINT",
650 "KW_FOR", "KW_WHILE", "KW_CASE", "KW_PATTERN", "KW_DEFAULT", "KW_CATCH",
651 "KW_SWITCHES", "KW_ESWITCHES", "KW_INCLUDES", "KW_LOCAL", "word",
652 "$accept", "file", "objects", "object", "context_name", "context",
653 "opt_abstract", "macro", "globals", "global_statements", "assignment",
654 "@1", "local_assignment", "@2", "arglist", "elements", "element",
655 "ignorepat", "extension", "statements", "timerange", "timespec",
656 "test_expr", "@3", "if_like_head", "word_list", "hint_word",
657 "word3_list", "goto_word", "switch_statement", "statement", "@4", "@5",
658 "@6", "@7", "opt_else", "target", "opt_pri", "jumptarget", "macro_call",
659 "@8", "application_call_head", "@9", "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, 50, 51, 52, 52, 52,
684 54, 53, 56, 55, 57, 57, 57, 57, 58, 58,
685 58, 59, 59, 59, 59, 59, 59, 59, 59, 59,
686 60, 61, 61, 61, 61, 62, 62, 62, 63, 63,
687 64, 66, 65, 67, 67, 67, 68, 68, 69, 69,
688 69, 70, 70, 70, 71, 71, 71, 72, 73, 73,
689 73, 73, 73, 73, 74, 75, 76, 73, 73, 73,
690 73, 73, 73, 77, 73, 73, 73, 73, 73, 73,
691 78, 78, 79, 79, 79, 79, 79, 79, 79, 80,
692 80, 81, 81, 83, 82, 82, 85, 84, 86, 86,
693 87, 87, 88, 88, 88, 89, 89, 90, 90, 90,
694 91, 91, 92, 92, 92, 93, 94, 95, 95, 95,
695 95, 96, 96, 97, 97, 97, 98, 98
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, 8, 4, 0, 2, 2,
703 0, 5, 0, 6, 0, 1, 3, 2, 0, 2,
704 2, 1, 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, 1, 2, 3, 1, 2, 3, 5, 3, 1,
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, 0, 0, 3, 6, 0,
723 7, 8, 0, 17, 1, 5, 4, 0, 24, 0,
724 0, 17, 11, 10, 0, 25, 0, 20, 19, 16,
725 0, 28, 27, 0, 0, 0, 39, 0, 0, 0,
726 0, 0, 0, 0, 0, 36, 37, 0, 28, 35,
727 31, 33, 34, 32, 120, 26, 0, 0, 0, 0,
728 0, 127, 127, 0, 0, 38, 0, 30, 12, 0,
729 45, 89, 0, 0, 0, 0, 0, 0, 0, 0,
730 0, 0, 0, 0, 0, 0, 69, 70, 0, 79,
731 122, 113, 0, 0, 120, 123, 21, 0, 0, 0,
732 58, 0, 0, 0, 0, 137, 131, 0, 0, 22,
733 41, 0, 45, 0, 0, 51, 0, 53, 0, 54,
734 0, 64, 92, 0, 99, 0, 86, 85, 87, 74,
735 0, 0, 106, 82, 73, 91, 109, 56, 112, 0,
736 81, 83, 15, 121, 40, 0, 42, 0, 0, 59,
737 127, 0, 130, 125, 126, 0, 133, 135, 136, 0,
738 0, 47, 68, 0, 103, 80, 0, 115, 49, 0,
739 0, 0, 0, 0, 65, 0, 0, 0, 71, 0,
740 101, 72, 0, 78, 45, 107, 0, 88, 57, 108,
741 111, 0, 0, 0, 60, 0, 0, 132, 134, 0,
742 105, 113, 0, 0, 0, 0, 0, 115, 62, 0,
743 55, 0, 0, 0, 94, 66, 93, 100, 0, 0,
744 0, 90, 110, 114, 0, 0, 0, 127, 23, 0,
745 52, 0, 0, 45, 67, 116, 63, 61, 0, 0,
746 0, 0, 0, 0, 102, 75, 124, 84, 0, 43,
747 0, 104, 45, 45, 0, 0, 0, 98, 97, 96,
748 95, 0, 44, 0, 0, 0, 48, 0, 0, 76,
752 /* YYDEFGOTO[NTERM-NUM]. */
753 static const yytype_int16 yydefgoto[] =
755 -1, 5, 6, 7, 106, 8, 9, 10, 11, 20,
756 86, 35, 87, 160, 26, 47, 48, 49, 50, 111,
757 169, 170, 116, 166, 88, 138, 101, 171, 122, 89,
758 112, 182, 261, 271, 191, 187, 123, 180, 125, 114,
759 201, 91, 185, 92, 223, 139, 206, 207, 93, 94,
760 51, 52, 103, 107, 108, 53
763 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
765 #define YYPACT_NINF -206
766 static const yytype_int16 yypact[] =
768 139, -206, -4, 42, -206, 56, 170, -206, -206, 66,
769 -206, -206, 137, 46, -206, -206, -206, -6, 60, 65,
770 17, 46, -206, -206, 107, -206, 14, -206, -206, -206,
771 34, 119, -206, 159, 127, 133, -206, 166, -14, 191,
772 197, 208, 209, 172, 111, -206, -206, 82, 119, -206,
773 -206, -206, -206, -206, 53, -206, 207, 174, 211, 194,
774 180, 181, 181, 5, 212, -206, 96, -206, -206, 102,
775 96, -206, 183, 214, 214, 218, 214, 28, 184, 219,
776 220, 221, 224, 214, 190, 168, -206, -206, 96, -206,
777 -206, 13, 173, 226, 53, -206, -206, 225, 180, 96,
778 -206, 20, 84, 104, 112, -206, 222, 228, 6, -206,
779 -206, 129, 96, 231, 230, -206, 235, -206, 192, -206,
780 143, 199, 178, 232, 196, 234, -206, -206, -206, -206,
781 96, 239, -206, -206, -206, 223, -206, 203, -206, 185,
782 -206, -206, -206, -206, -206, 77, -206, 204, 205, -206,
783 181, 206, -206, -206, -206, 192, -206, -206, -206, 241,
784 210, -206, -206, 18, 243, -206, 213, 169, 2, 238,
785 246, 245, 184, 184, -206, 184, 215, 184, -206, 216,
786 240, -206, 217, -206, 96, -206, 96, -206, -206, -206,
787 227, 229, 233, 236, -206, 147, 253, -206, -206, 254,
788 -206, 213, 256, 237, 242, 255, 259, 169, 244, 247,
789 -206, 247, 198, 120, 200, -206, 187, -206, -6, 257,
790 179, -206, -206, -206, 260, 248, 96, 181, -206, 189,
791 -206, 262, 263, 96, -206, -206, -206, 249, 264, 265,
792 184, 184, 184, 184, -206, -206, -206, -206, 96, -206,
793 182, -206, 96, 96, 24, 247, 247, 267, 267, 267,
794 267, 250, -206, 32, 105, 268, -206, 272, 247, -206,
795 -206, 251, 275, 96, -206
798 /* YYPGOTO[NTERM-NUM]. */
799 static const yytype_int16 yypgoto[] =
801 -206, -206, -206, 261, -16, -206, -206, -206, -206, 266,
802 -5, -206, -17, -206, -206, 252, -206, -206, -206, -107,
803 -206, 115, 68, -206, -206, 117, 201, -205, -76, -206,
804 -54, -206, -206, -206, -206, -206, -206, -206, -206, -206,
805 -206, -206, -206, -206, -206, 87, 78, -206, 202, -206,
806 -206, -206, -59, 186, -206, -45
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 -130
814 static const yytype_int16 yytable[] =
816 90, 24, 124, 104, 238, 163, 239, 157, 21, 95,
817 105, 158, 110, -61, 46, 32, 21, 58, 28, 161,
818 136, 33, 29, -46, 34, 161, 45, 147, 59, -118,
819 22, 46, 148, 161, 135, 28, 23, -117, 12, -18,
820 90, 22, 22, 45, 208, 146, 13, 23, 23, 95,
821 265, 266, -46, -46, -46, 137, 14, 70, -118, -118,
822 -118, 71, 149, 270, 120, 72, -117, -117, -117, 17,
823 121, 73, 74, 75, 27, 76, 183, 220, 77, 78,
824 79, 80, 81, 67, 192, 82, 83, 68, 19, 148,
825 84, 195, 150, 42, 43, 85, 212, 213, 151, 214,
826 70, 216, 25, 67, 71, 152, 161, -29, 72, 153,
827 -119, 31, 65, 152, 73, 74, 75, 154, 76, 149,
828 27, 77, 78, 79, 80, 81, 254, 36, 82, 83,
829 161, 176, 221, 241, 162, 66, 37, 43, 85, -119,
830 -119, -119, 117, 18, 119, 263, 264, 1, 152, 38,
831 39, 130, -128, 172, 2, 3, 173, 40, 41, 42,
832 43, 44, 4, 54, 257, 258, 259, 260, 250, 55,
833 -2, 15, 249, -14, 132, 56, 133, 27, 1, 134,
834 161, 140, 141, 152, 246, 2, 3, -129, 175, 176,
835 57, 177, 189, 4, 262, 190, 251, 60, 176, 190,
836 243, 61, 244, 203, 204, 205, 179, 176, 240, 176,
837 242, 176, 62, 63, 64, 96, 97, 98, 99, 274,
838 115, 109, 100, 102, 118, 113, 121, 126, 127, 128,
839 129, 142, 131, 144, 168, 155, 156, 164, 165, 167,
840 178, 174, 181, 184, 186, 188, 193, 194, 196, 198,
841 200, 209, 199, 210, 218, 137, 211, 215, 217, 219,
842 226, 227, 228, 230, 234, 245, 233, 16, 247, 222,
843 197, 224, 248, 252, 253, 225, 256, 255, 176, 231,
844 269, 268, 273, 202, 232, 235, 236, 30, 229, 237,
845 0, 208, 267, 272, 159, 0, 143, 0, 0, 145,
849 static const yytype_int16 yycheck[] =
851 54, 17, 78, 62, 209, 112, 211, 1, 13, 54,
852 5, 5, 66, 11, 31, 1, 21, 31, 1, 1,
853 7, 7, 5, 5, 10, 1, 31, 7, 42, 5,
854 36, 48, 12, 1, 88, 1, 42, 5, 42, 5,
855 94, 36, 36, 48, 42, 99, 4, 42, 42, 94,
856 255, 256, 34, 35, 36, 42, 0, 4, 34, 35,
857 36, 8, 42, 268, 36, 12, 34, 35, 36, 3,
858 42, 18, 19, 20, 9, 22, 130, 184, 25, 26,
859 27, 28, 29, 1, 7, 32, 33, 5, 42, 12,
860 37, 150, 8, 40, 41, 42, 172, 173, 14, 175,
861 4, 177, 42, 1, 8, 1, 1, 5, 12, 5,
862 5, 4, 1, 1, 18, 19, 20, 5, 22, 42,
863 9, 25, 26, 27, 28, 29, 233, 8, 32, 33,
864 1, 11, 186, 13, 5, 24, 17, 41, 42, 34,
865 35, 36, 74, 6, 76, 252, 253, 8, 1, 30,
866 31, 83, 5, 10, 15, 16, 13, 38, 39, 40,
867 41, 42, 23, 4, 240, 241, 242, 243, 227, 42,
868 0, 1, 226, 3, 6, 42, 8, 9, 8, 11,
869 1, 8, 9, 1, 5, 15, 16, 5, 10, 11,
870 24, 13, 7, 23, 248, 10, 7, 6, 11, 10,
871 13, 4, 218, 34, 35, 36, 10, 11, 10, 11,
872 10, 11, 4, 4, 42, 8, 42, 6, 24, 273,
873 6, 9, 42, 42, 6, 42, 42, 8, 8, 8,
874 6, 5, 42, 8, 42, 13, 8, 6, 8, 4,
875 8, 42, 8, 4, 21, 42, 42, 42, 42, 8,
876 7, 13, 42, 7, 14, 42, 11, 42, 42, 42,
877 24, 8, 8, 7, 5, 8, 11, 6, 8, 42,
878 155, 42, 24, 11, 11, 42, 11, 13, 11, 42,
879 8, 13, 7, 166, 42, 207, 42, 21, 201, 42,
880 -1, 42, 42, 42, 108, -1, 94, -1, -1, 98,
884 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
885 symbol of state STATE-NUM. */
886 static const yytype_uint8 yystos[] =
888 0, 8, 15, 16, 23, 44, 45, 46, 48, 49,
889 50, 51, 42, 4, 0, 1, 46, 3, 6, 42,
890 52, 53, 36, 42, 47, 42, 57, 9, 1, 5,
891 52, 4, 1, 7, 10, 54, 8, 17, 30, 31,
892 38, 39, 40, 41, 42, 53, 55, 58, 59, 60,
893 61, 93, 94, 98, 4, 42, 42, 24, 31, 42,
894 6, 4, 4, 4, 42, 1, 24, 1, 5, 58,
895 4, 8, 12, 18, 19, 20, 22, 25, 26, 27,
896 28, 29, 32, 33, 37, 42, 53, 55, 67, 72,
897 73, 84, 86, 91, 92, 98, 8, 42, 6, 24,
898 42, 69, 42, 95, 95, 5, 47, 96, 97, 9,
899 73, 62, 73, 42, 82, 6, 65, 65, 6, 65,
900 36, 42, 71, 79, 71, 81, 8, 8, 8, 6,
901 65, 42, 6, 8, 11, 73, 7, 42, 68, 88,
902 8, 9, 5, 91, 8, 69, 73, 7, 12, 42,
903 8, 14, 1, 5, 5, 13, 8, 1, 5, 96,
904 56, 1, 5, 62, 6, 8, 66, 4, 42, 63,
905 64, 70, 10, 13, 42, 10, 11, 13, 8, 10,
906 80, 8, 74, 73, 4, 85, 21, 78, 42, 7,
907 10, 77, 7, 42, 42, 95, 42, 64, 8, 42,
908 7, 83, 68, 34, 35, 36, 89, 90, 42, 13,
909 7, 11, 71, 71, 71, 42, 71, 42, 14, 42,
910 62, 73, 42, 87, 42, 42, 24, 8, 8, 88,
911 7, 42, 42, 11, 5, 89, 42, 42, 70, 70,
912 10, 13, 10, 13, 47, 8, 5, 8, 24, 73,
913 95, 7, 11, 11, 62, 13, 11, 71, 71, 71,
914 71, 75, 73, 62, 62, 70, 70, 42, 13, 8,
918 #define yyerrok (yyerrstatus = 0)
919 #define yyclearin (yychar = YYEMPTY)
923 #define YYACCEPT goto yyacceptlab
924 #define YYABORT goto yyabortlab
925 #define YYERROR goto yyerrorlab
928 /* Like YYERROR except do call yyerror. This remains here temporarily
929 to ease the transition to the new meaning of YYERROR, for GCC.
930 Once GCC version 2 has supplanted version 1, this can go. */
932 #define YYFAIL goto yyerrlab
934 #define YYRECOVERING() (!!yyerrstatus)
936 #define YYBACKUP(Token, Value) \
938 if (yychar == YYEMPTY && yylen == 1) \
942 yytoken = YYTRANSLATE (yychar); \
948 yyerror (&yylloc, parseio, YY_("syntax error: cannot back up")); \
955 #define YYERRCODE 256
958 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
959 If N is 0, then set CURRENT to the empty location which ends
960 the previous symbol: RHS[0] (always defined). */
962 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
963 #ifndef YYLLOC_DEFAULT
964 # define YYLLOC_DEFAULT(Current, Rhs, N) \
968 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
969 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
970 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
971 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
975 (Current).first_line = (Current).last_line = \
976 YYRHSLOC (Rhs, 0).last_line; \
977 (Current).first_column = (Current).last_column = \
978 YYRHSLOC (Rhs, 0).last_column; \
984 /* YY_LOCATION_PRINT -- Print the location on the stream.
985 This macro was not mandated originally: define only if we know
986 we won't break user code: when these are the locations we know. */
988 #ifndef YY_LOCATION_PRINT
989 # if YYLTYPE_IS_TRIVIAL
990 # define YY_LOCATION_PRINT(File, Loc) \
991 fprintf (File, "%d.%d-%d.%d", \
992 (Loc).first_line, (Loc).first_column, \
993 (Loc).last_line, (Loc).last_column)
995 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1000 /* YYLEX -- calling `yylex' with the right arguments. */
1003 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1005 # define YYLEX yylex (&yylval, &yylloc)
1008 /* Enable debugging if requested. */
1012 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1013 # define YYFPRINTF fprintf
1016 # define YYDPRINTF(Args) \
1022 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1026 YYFPRINTF (stderr, "%s ", Title); \
1027 yy_symbol_print (stderr, \
1028 Type, Value, Location, parseio); \
1029 YYFPRINTF (stderr, "\n"); \
1034 /*--------------------------------.
1035 | Print this symbol on YYOUTPUT. |
1036 `--------------------------------*/
1039 #if (defined __STDC__ || defined __C99__FUNC__ \
1040 || defined __cplusplus || defined _MSC_VER)
1042 yy_symbol_value_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, const YYLTYPE * const yylocationp, struct parse_io *parseio)
1045 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio)
1048 const YYSTYPE * const yyvaluep;
1049 const YYLTYPE * const yylocationp;
1050 struct parse_io *parseio;
1055 YYUSE (yylocationp);
1058 if (yytype < YYNTOKENS)
1059 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1071 /*--------------------------------.
1072 | Print this symbol on YYOUTPUT. |
1073 `--------------------------------*/
1075 #if (defined __STDC__ || defined __C99__FUNC__ \
1076 || defined __cplusplus || defined _MSC_VER)
1078 yy_symbol_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, const YYLTYPE * const yylocationp, struct parse_io *parseio)
1081 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parseio)
1084 const YYSTYPE * const yyvaluep;
1085 const YYLTYPE * const yylocationp;
1086 struct parse_io *parseio;
1089 if (yytype < YYNTOKENS)
1090 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1092 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1094 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1095 YYFPRINTF (yyoutput, ": ");
1096 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio);
1097 YYFPRINTF (yyoutput, ")");
1100 /*------------------------------------------------------------------.
1101 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1103 `------------------------------------------------------------------*/
1105 #if (defined __STDC__ || defined __C99__FUNC__ \
1106 || defined __cplusplus || defined _MSC_VER)
1108 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1111 yy_stack_print (bottom, top)
1112 yytype_int16 *bottom;
1116 YYFPRINTF (stderr, "Stack now");
1117 for (; bottom <= top; ++bottom)
1118 YYFPRINTF (stderr, " %d", *bottom);
1119 YYFPRINTF (stderr, "\n");
1122 # define YY_STACK_PRINT(Bottom, Top) \
1125 yy_stack_print ((Bottom), (Top)); \
1129 /*------------------------------------------------.
1130 | Report that the YYRULE is going to be reduced. |
1131 `------------------------------------------------*/
1133 #if (defined __STDC__ || defined __C99__FUNC__ \
1134 || defined __cplusplus || defined _MSC_VER)
1136 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parse_io *parseio)
1139 yy_reduce_print (yyvsp, yylsp, yyrule, parseio)
1143 struct parse_io *parseio;
1146 int yynrhs = yyr2[yyrule];
1148 unsigned long int yylno = yyrline[yyrule];
1149 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1151 /* The symbols being reduced. */
1152 for (yyi = 0; yyi < yynrhs; yyi++)
1154 fprintf (stderr, " $%d = ", yyi + 1);
1155 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1156 &(yyvsp[(yyi + 1) - (yynrhs)])
1157 , &(yylsp[(yyi + 1) - (yynrhs)]) , parseio);
1158 fprintf (stderr, "\n");
1162 # define YY_REDUCE_PRINT(Rule) \
1165 yy_reduce_print (yyvsp, yylsp, Rule, parseio); \
1168 /* Nonzero means print parse trace. It is left uninitialized so that
1169 multiple parsers can coexist. */
1171 #else /* !YYDEBUG */
1172 # define YYDPRINTF(Args)
1173 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1174 # define YY_STACK_PRINT(Bottom, Top)
1175 # define YY_REDUCE_PRINT(Rule)
1176 #endif /* !YYDEBUG */
1179 /* YYINITDEPTH -- initial size of the parser's stacks. */
1181 # define YYINITDEPTH 200
1184 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1185 if the built-in stack extension method is used).
1187 Do not make this value too large; the results are undefined if
1188 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1189 evaluated with infinite-precision integer arithmetic. */
1192 # define YYMAXDEPTH 10000
1200 # if defined __GLIBC__ && defined _STRING_H
1201 # define yystrlen strlen
1203 /* Return the length of YYSTR. */
1204 #if (defined __STDC__ || defined __C99__FUNC__ \
1205 || defined __cplusplus || defined _MSC_VER)
1207 yystrlen (const char *yystr)
1215 for (yylen = 0; yystr[yylen]; yylen++)
1223 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1224 # define yystpcpy stpcpy
1226 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1228 #if (defined __STDC__ || defined __C99__FUNC__ \
1229 || defined __cplusplus || defined _MSC_VER)
1231 yystpcpy (char *yydest, const char *yysrc)
1234 yystpcpy (yydest, yysrc)
1240 const char *yys = yysrc;
1242 while ((*yyd++ = *yys++) != '\0')
1251 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1252 quotes and backslashes, so that it's suitable for yyerror. The
1253 heuristic is that double-quoting is unnecessary unless the string
1254 contains an apostrophe, a comma, or backslash (other than
1255 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1256 null, do not copy; instead, return the length of what the result
1259 yytnamerr (char *yyres, const char *yystr)
1264 char const *yyp = yystr;
1271 goto do_not_strip_quotes;
1275 goto do_not_strip_quotes;
1288 do_not_strip_quotes: ;
1292 return yystrlen (yystr);
1294 return yystpcpy (yyres, yystr) - yyres;
1298 /* Copy into YYRESULT an error message about the unexpected token
1299 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1300 including the terminating null byte. If YYRESULT is null, do not
1301 copy anything; just return the number of bytes that would be
1302 copied. As a special case, return 0 if an ordinary "syntax error"
1303 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1304 size calculation. */
1306 yysyntax_error (char *yyresult, int yystate, int yychar)
1308 int yyn = yypact[yystate];
1310 if (! (YYPACT_NINF < yyn && yyn < YYLAST))
1314 int yytype = YYTRANSLATE (yychar);
1315 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1316 YYSIZE_T yysize = yysize0;
1318 int yysize_overflow = 0;
1319 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1320 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1324 /* This is so xgettext sees the translatable formats that are
1325 constructed on the fly. */
1326 YY_("syntax error, unexpected %s");
1327 YY_("syntax error, unexpected %s, expecting %s");
1328 YY_("syntax error, unexpected %s, expecting %s or %s");
1329 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1330 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1334 static char const yyunexpected[] = "syntax error, unexpected %s";
1335 static char const yyexpecting[] = ", expecting %s";
1336 static char const yyor[] = " or %s";
1337 char yyformat[sizeof yyunexpected
1338 + sizeof yyexpecting - 1
1339 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1340 * (sizeof yyor - 1))];
1341 char const *yyprefix = yyexpecting;
1343 /* Start YYX at -YYN if negative to avoid negative indexes in
1345 int yyxbegin = yyn < 0 ? -yyn : 0;
1347 /* Stay within bounds of both yycheck and yytname. */
1348 int yychecklim = YYLAST - yyn;
1349 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1352 yyarg[0] = yytname[yytype];
1353 yyfmt = yystpcpy (yyformat, yyunexpected);
1355 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1356 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1358 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1362 yyformat[sizeof yyunexpected - 1] = '\0';
1365 yyarg[yycount++] = yytname[yyx];
1366 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1367 yysize_overflow |= (yysize1 < yysize);
1369 yyfmt = yystpcpy (yyfmt, yyprefix);
1373 yyf = YY_(yyformat);
1374 yysize1 = yysize + yystrlen (yyf);
1375 yysize_overflow |= (yysize1 < yysize);
1378 if (yysize_overflow)
1379 return YYSIZE_MAXIMUM;
1383 /* Avoid sprintf, as that infringes on the user's name space.
1384 Don't have undefined behavior even if the translation
1385 produced a string with the wrong number of "%s"s. */
1386 char *yyp = yyresult;
1388 while ((*yyp = *yyf) != '\0')
1390 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1392 yyp += yytnamerr (yyp, yyarg[yyi++]);
1405 #endif /* YYERROR_VERBOSE */
1408 /*-----------------------------------------------.
1409 | Release the memory associated to this symbol. |
1410 `-----------------------------------------------*/
1413 #if (defined __STDC__ || defined __C99__FUNC__ \
1414 || defined __cplusplus || defined _MSC_VER)
1416 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parse_io *parseio)
1419 yydestruct (yymsg, yytype, yyvaluep, yylocationp, parseio)
1423 YYLTYPE *yylocationp;
1424 struct parse_io *parseio;
1428 YYUSE (yylocationp);
1433 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1437 case 42: /* "word" */
1439 { free((yyvaluep->str));};
1440 #line 1441 "ael.tab.c"
1442 case 45: /* "objects" */
1445 destroy_pval((yyvaluep->pval));
1448 #line 1449 "ael.tab.c"
1450 case 46: /* "object" */
1453 destroy_pval((yyvaluep->pval));
1456 #line 1457 "ael.tab.c"
1458 case 47: /* "context_name" */
1460 { free((yyvaluep->str));};
1461 #line 1462 "ael.tab.c"
1463 case 48: /* "context" */
1466 destroy_pval((yyvaluep->pval));
1469 #line 1470 "ael.tab.c"
1471 case 50: /* "macro" */
1474 destroy_pval((yyvaluep->pval));
1477 #line 1478 "ael.tab.c"
1479 case 51: /* "globals" */
1482 destroy_pval((yyvaluep->pval));
1485 #line 1486 "ael.tab.c"
1487 case 52: /* "global_statements" */
1490 destroy_pval((yyvaluep->pval));
1493 #line 1494 "ael.tab.c"
1495 case 53: /* "assignment" */
1498 destroy_pval((yyvaluep->pval));
1501 #line 1502 "ael.tab.c"
1503 case 55: /* "local_assignment" */
1506 destroy_pval((yyvaluep->pval));
1509 #line 1510 "ael.tab.c"
1511 case 57: /* "arglist" */
1514 destroy_pval((yyvaluep->pval));
1517 #line 1518 "ael.tab.c"
1519 case 58: /* "elements" */
1522 destroy_pval((yyvaluep->pval));
1525 #line 1526 "ael.tab.c"
1527 case 59: /* "element" */
1530 destroy_pval((yyvaluep->pval));
1533 #line 1534 "ael.tab.c"
1535 case 60: /* "ignorepat" */
1538 destroy_pval((yyvaluep->pval));
1541 #line 1542 "ael.tab.c"
1543 case 61: /* "extension" */
1546 destroy_pval((yyvaluep->pval));
1549 #line 1550 "ael.tab.c"
1551 case 62: /* "statements" */
1554 destroy_pval((yyvaluep->pval));
1557 #line 1558 "ael.tab.c"
1559 case 63: /* "timerange" */
1561 { free((yyvaluep->str));};
1562 #line 1563 "ael.tab.c"
1564 case 64: /* "timespec" */
1567 destroy_pval((yyvaluep->pval));
1570 #line 1571 "ael.tab.c"
1572 case 65: /* "test_expr" */
1574 { free((yyvaluep->str));};
1575 #line 1576 "ael.tab.c"
1577 case 67: /* "if_like_head" */
1580 destroy_pval((yyvaluep->pval));
1583 #line 1584 "ael.tab.c"
1585 case 68: /* "word_list" */
1587 { free((yyvaluep->str));};
1588 #line 1589 "ael.tab.c"
1590 case 70: /* "word3_list" */
1592 { free((yyvaluep->str));};
1593 #line 1594 "ael.tab.c"
1595 case 71: /* "goto_word" */
1597 { free((yyvaluep->str));};
1598 #line 1599 "ael.tab.c"
1600 case 72: /* "switch_statement" */
1603 destroy_pval((yyvaluep->pval));
1606 #line 1607 "ael.tab.c"
1608 case 73: /* "statement" */
1611 destroy_pval((yyvaluep->pval));
1614 #line 1615 "ael.tab.c"
1616 case 78: /* "opt_else" */
1619 destroy_pval((yyvaluep->pval));
1622 #line 1623 "ael.tab.c"
1624 case 79: /* "target" */
1627 destroy_pval((yyvaluep->pval));
1630 #line 1631 "ael.tab.c"
1632 case 80: /* "opt_pri" */
1634 { free((yyvaluep->str));};
1635 #line 1636 "ael.tab.c"
1637 case 81: /* "jumptarget" */
1640 destroy_pval((yyvaluep->pval));
1643 #line 1644 "ael.tab.c"
1645 case 82: /* "macro_call" */
1648 destroy_pval((yyvaluep->pval));
1651 #line 1652 "ael.tab.c"
1653 case 84: /* "application_call_head" */
1656 destroy_pval((yyvaluep->pval));
1659 #line 1660 "ael.tab.c"
1661 case 86: /* "application_call" */
1664 destroy_pval((yyvaluep->pval));
1667 #line 1668 "ael.tab.c"
1669 case 87: /* "opt_word" */
1671 { free((yyvaluep->str));};
1672 #line 1673 "ael.tab.c"
1674 case 88: /* "eval_arglist" */
1677 destroy_pval((yyvaluep->pval));
1680 #line 1681 "ael.tab.c"
1682 case 89: /* "case_statements" */
1685 destroy_pval((yyvaluep->pval));
1688 #line 1689 "ael.tab.c"
1690 case 90: /* "case_statement" */
1693 destroy_pval((yyvaluep->pval));
1696 #line 1697 "ael.tab.c"
1698 case 91: /* "macro_statements" */
1701 destroy_pval((yyvaluep->pval));
1704 #line 1705 "ael.tab.c"
1706 case 92: /* "macro_statement" */
1709 destroy_pval((yyvaluep->pval));
1712 #line 1713 "ael.tab.c"
1714 case 93: /* "switches" */
1717 destroy_pval((yyvaluep->pval));
1720 #line 1721 "ael.tab.c"
1722 case 94: /* "eswitches" */
1725 destroy_pval((yyvaluep->pval));
1728 #line 1729 "ael.tab.c"
1730 case 95: /* "switchlist" */
1733 destroy_pval((yyvaluep->pval));
1736 #line 1737 "ael.tab.c"
1738 case 96: /* "included_entry" */
1741 destroy_pval((yyvaluep->pval));
1744 #line 1745 "ael.tab.c"
1746 case 97: /* "includeslist" */
1749 destroy_pval((yyvaluep->pval));
1752 #line 1753 "ael.tab.c"
1754 case 98: /* "includes" */
1757 destroy_pval((yyvaluep->pval));
1760 #line 1761 "ael.tab.c"
1769 /* Prevent warnings from -Wmissing-prototypes. */
1771 #ifdef YYPARSE_PARAM
1772 #if defined __STDC__ || defined __cplusplus
1773 int yyparse (void *YYPARSE_PARAM);
1777 #else /* ! YYPARSE_PARAM */
1778 #if defined __STDC__ || defined __cplusplus
1779 int yyparse (struct parse_io *parseio);
1783 #endif /* ! YYPARSE_PARAM */
1794 #ifdef YYPARSE_PARAM
1795 #if (defined __STDC__ || defined __C99__FUNC__ \
1796 || defined __cplusplus || defined _MSC_VER)
1798 yyparse (void *YYPARSE_PARAM)
1801 yyparse (YYPARSE_PARAM)
1802 void *YYPARSE_PARAM;
1804 #else /* ! YYPARSE_PARAM */
1805 #if (defined __STDC__ || defined __C99__FUNC__ \
1806 || defined __cplusplus || defined _MSC_VER)
1808 yyparse (struct parse_io *parseio)
1812 struct parse_io *parseio;
1816 /* The look-ahead symbol. */
1819 /* The semantic value of the look-ahead symbol. */
1822 /* Number of syntax errors so far. */
1824 /* Location data for the look-ahead symbol. */
1830 /* Number of tokens to shift before error messages enabled. */
1832 /* Look-ahead token as an internal (translated) token number. */
1835 /* Buffer for error messages, and its allocated size. */
1837 char *yymsg = yymsgbuf;
1838 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1841 /* Three stacks and their tools:
1842 `yyss': related to states,
1843 `yyvs': related to semantic values,
1844 `yyls': related to locations.
1846 Refer to the stacks thru separate pointers, to allow yyoverflow
1847 to reallocate them elsewhere. */
1849 /* The state stack. */
1850 yytype_int16 yyssa[YYINITDEPTH];
1851 yytype_int16 *yyss = yyssa;
1852 yytype_int16 *yyssp;
1854 /* The semantic value stack. */
1855 YYSTYPE yyvsa[YYINITDEPTH];
1856 YYSTYPE *yyvs = yyvsa;
1859 /* The location stack. */
1860 YYLTYPE yylsa[YYINITDEPTH];
1861 YYLTYPE *yyls = yylsa;
1863 /* The locations where the error started and ended. */
1864 YYLTYPE yyerror_range[2];
1866 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1868 YYSIZE_T yystacksize = YYINITDEPTH;
1870 /* The variables used to return semantic value and location from the
1875 /* The number of symbols on the RHS of the reduced rule.
1876 Keep to zero when no symbol should be popped. */
1879 YYDPRINTF ((stderr, "Starting parse\n"));
1884 yychar = YYEMPTY; /* Cause a token to be read. */
1886 /* Initialize stack pointers.
1887 Waste one element of value and location stack
1888 so that they stay on the same level as the state stack.
1889 The wasted elements are never initialized. */
1894 #if YYLTYPE_IS_TRIVIAL
1895 /* Initialize the default location before parsing starts. */
1896 yylloc.first_line = yylloc.last_line = 1;
1897 yylloc.first_column = yylloc.last_column = 0;
1902 /*------------------------------------------------------------.
1903 | yynewstate -- Push a new state, which is found in yystate. |
1904 `------------------------------------------------------------*/
1906 /* In all cases, when you get here, the value and location stacks
1907 have just been pushed. So pushing a state here evens the stacks. */
1913 if (yyss + yystacksize - 1 <= yyssp)
1915 /* Get the current used size of the three stacks, in elements. */
1916 YYSIZE_T yysize = yyssp - yyss + 1;
1920 /* Give user a chance to reallocate the stack. Use copies of
1921 these so that the &'s don't force the real ones into
1923 YYSTYPE *yyvs1 = yyvs;
1924 yytype_int16 *yyss1 = yyss;
1925 YYLTYPE *yyls1 = yyls;
1927 /* Each stack pointer address is followed by the size of the
1928 data in use in that stack, in bytes. This used to be a
1929 conditional around just the two extra args, but that might
1930 be undefined if yyoverflow is a macro. */
1931 yyoverflow (YY_("memory exhausted"),
1932 &yyss1, yysize * sizeof (*yyssp),
1933 &yyvs1, yysize * sizeof (*yyvsp),
1934 &yyls1, yysize * sizeof (*yylsp),
1940 #else /* no yyoverflow */
1941 # ifndef YYSTACK_RELOCATE
1942 goto yyexhaustedlab;
1944 /* Extend the stack our own way. */
1945 if (YYMAXDEPTH <= yystacksize)
1946 goto yyexhaustedlab;
1948 if (YYMAXDEPTH < yystacksize)
1949 yystacksize = YYMAXDEPTH;
1952 yytype_int16 *yyss1 = yyss;
1953 union yyalloc *yyptr =
1954 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1956 goto yyexhaustedlab;
1957 YYSTACK_RELOCATE (yyss);
1958 YYSTACK_RELOCATE (yyvs);
1959 YYSTACK_RELOCATE (yyls);
1960 # undef YYSTACK_RELOCATE
1962 YYSTACK_FREE (yyss1);
1965 #endif /* no yyoverflow */
1967 yyssp = yyss + yysize - 1;
1968 yyvsp = yyvs + yysize - 1;
1969 yylsp = yyls + yysize - 1;
1971 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1972 (unsigned long int) yystacksize));
1974 if (yyss + yystacksize - 1 <= yyssp)
1978 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1987 /* Do appropriate processing given the current state. Read a
1988 look-ahead token if we need one and don't already have one. */
1990 /* First try to decide what to do without reference to look-ahead token. */
1991 yyn = yypact[yystate];
1992 if (yyn == YYPACT_NINF)
1995 /* Not known => get a look-ahead token if don't already have one. */
1997 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1998 if (yychar == YYEMPTY)
2000 YYDPRINTF ((stderr, "Reading a token: "));
2004 if (yychar <= YYEOF)
2006 yychar = yytoken = YYEOF;
2007 YYDPRINTF ((stderr, "Now at end of input.\n"));
2011 yytoken = YYTRANSLATE (yychar);
2012 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2015 /* If the proper action on seeing token YYTOKEN is to reduce or to
2016 detect an error, take that action. */
2018 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2023 if (yyn == 0 || yyn == YYTABLE_NINF)
2032 /* Count tokens shifted since error; after three, turn off error
2037 /* Shift the look-ahead token. */
2038 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2040 /* Discard the shifted token unless it is eof. */
2041 if (yychar != YYEOF)
2050 /*-----------------------------------------------------------.
2051 | yydefault -- do the default action for the current state. |
2052 `-----------------------------------------------------------*/
2054 yyn = yydefact[yystate];
2060 /*-----------------------------.
2061 | yyreduce -- Do a reduction. |
2062 `-----------------------------*/
2064 /* yyn is the number of a rule to reduce with. */
2067 /* If YYLEN is nonzero, implement the default value of the action:
2070 Otherwise, the following line sets YYVAL to garbage.
2071 This behavior is undocumented and Bison
2072 users should not rely upon it. Assigning to YYVAL
2073 unconditionally makes the parser a bit smaller, and it avoids a
2074 GCC warning that YYVAL may be used uninitialized. */
2075 yyval = yyvsp[1-yylen];
2077 /* Default location. */
2078 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2079 YY_REDUCE_PRINT (yyn);
2084 { (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); ;}
2089 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2094 { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
2099 {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
2104 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2109 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2114 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2119 {(yyval.pval)=0;/* allow older docs to be read */;}
2124 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
2129 { (yyval.str) = strdup("default"); ;}
2135 if (!(yyvsp[(5) - (6)].pval)) {
2136 ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Warning! The empty context %s will be IGNORED!\n",
2137 my_file, (yylsp[(4) - (6)]).first_line, (yylsp[(4) - (6)]).first_column, (yylsp[(4) - (6)]).last_column, (yyvsp[(3) - (6)].str) );
2138 free((yyvsp[(3) - (6)].str));
2141 (yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
2142 (yyval.pval)->u1.str = (yyvsp[(3) - (6)].str);
2143 (yyval.pval)->u2.statements = (yyvsp[(5) - (6)].pval);
2144 set_dads((yyval.pval),(yyvsp[(5) - (6)].pval));
2145 (yyval.pval)->u3.abstract = (yyvsp[(1) - (6)].intval);} ;}
2150 { (yyval.intval) = 1; ;}
2155 { (yyval.intval) = 0; ;}
2161 (yyval.pval) = npval2(PV_MACRO, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
2162 (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);
2163 set_dads((yyval.pval),(yyvsp[(7) - (8)].pval));;}
2169 (yyval.pval) = npval2(PV_GLOBALS, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2170 (yyval.pval)->u1.statements = (yyvsp[(3) - (4)].pval);
2171 set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
2176 { (yyval.pval) = NULL; ;}
2181 {(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
2186 {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
2191 { reset_semicount(parseio->scanner); ;}
2197 (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
2198 (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
2199 (yyval.pval)->u2.val = (yyvsp[(4) - (5)].str); ;}
2204 { reset_semicount(parseio->scanner); ;}
2210 (yyval.pval) = npval2(PV_LOCALVARDEC, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
2211 (yyval.pval)->u1.str = (yyvsp[(2) - (6)].str);
2212 (yyval.pval)->u2.val = (yyvsp[(5) - (6)].str); ;}
2217 { (yyval.pval) = NULL; ;}
2222 { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
2227 { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); ;}
2232 {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
2242 { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
2247 { (yyval.pval)=(yyvsp[(1) - (2)].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 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2277 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2282 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2287 {free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;;}
2292 {(yyval.pval)=0;/* allow older docs to be read */;}
2298 (yyval.pval) = npval2(PV_IGNOREPAT, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2299 (yyval.pval)->u1.str = (yyvsp[(3) - (4)].str);;}
2305 (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2306 (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
2307 (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
2313 (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2314 (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
2315 (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));
2316 (yyval.pval)->u4.regexten=1;;}
2322 (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (7)]), &(yylsp[(7) - (7)]));
2323 (yyval.pval)->u1.str = (yyvsp[(5) - (7)].str);
2324 (yyval.pval)->u2.statements = (yyvsp[(7) - (7)].pval); set_dads((yyval.pval),(yyvsp[(7) - (7)].pval));
2325 (yyval.pval)->u3.hints = (yyvsp[(3) - (7)].str);;}
2331 (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
2332 (yyval.pval)->u1.str = (yyvsp[(6) - (8)].str);
2333 (yyval.pval)->u2.statements = (yyvsp[(8) - (8)].pval); set_dads((yyval.pval),(yyvsp[(8) - (8)].pval));
2334 (yyval.pval)->u4.regexten=1;
2335 (yyval.pval)->u3.hints = (yyvsp[(4) - (8)].str);;}
2340 { (yyval.pval) = NULL; ;}
2345 { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
2350 {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
2356 asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str));
2357 free((yyvsp[(1) - (5)].str));
2358 free((yyvsp[(3) - (5)].str));
2359 free((yyvsp[(5) - (5)].str)); ;}
2364 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
2370 (yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)]));
2371 (yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)]));
2372 (yyval.pval)->next->next = nword((yyvsp[(5) - (7)].str), &(yylsp[(5) - (7)]));
2373 (yyval.pval)->next->next->next = nword((yyvsp[(7) - (7)].str), &(yylsp[(7) - (7)])); ;}
2378 { reset_parencount(parseio->scanner); ;}
2383 { (yyval.str) = (yyvsp[(3) - (4)].str); ;}
2389 (yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
2390 (yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); ;}
2396 (yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
2397 (yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);;}
2403 (yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2404 (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);
2410 { (yyval.str) = (yyvsp[(1) - (1)].str);;}
2416 asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
2417 free((yyvsp[(1) - (2)].str));
2418 free((yyvsp[(2) - (2)].str));
2419 prev_word = (yyval.str);;}
2424 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
2430 asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
2431 free((yyvsp[(1) - (2)].str));
2432 free((yyvsp[(2) - (2)].str)); ;}
2437 { /* there are often '&' in hints */
2438 asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str));
2439 free((yyvsp[(1) - (3)].str));
2440 free((yyvsp[(3) - (3)].str));;}
2445 { (yyval.str) = (yyvsp[(1) - (1)].str);;}
2451 asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
2452 free((yyvsp[(1) - (2)].str));
2453 free((yyvsp[(2) - (2)].str));
2454 prev_word = (yyval.str);;}
2460 asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str));
2461 free((yyvsp[(1) - (3)].str));
2462 free((yyvsp[(2) - (3)].str));
2463 free((yyvsp[(3) - (3)].str));
2464 prev_word=(yyval.str);;}
2469 { (yyval.str) = (yyvsp[(1) - (1)].str);;}
2475 asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
2476 free((yyvsp[(1) - (2)].str));
2477 free((yyvsp[(2) - (2)].str));;}
2483 asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str));
2484 free((yyvsp[(1) - (3)].str));
2485 free((yyvsp[(3) - (3)].str));;}
2491 (yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
2492 (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
2493 (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));;}
2499 (yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2500 (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));;}
2505 { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
2510 { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
2516 (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2517 (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;}
2523 (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2524 (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;}
2530 (yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
2531 (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); ;}
2536 {reset_semicount(parseio->scanner);;}
2541 {reset_semicount(parseio->scanner);;}
2546 {reset_parencount(parseio->scanner);;}
2551 { /* XXX word_list maybe ? */
2552 (yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)]));
2553 (yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str);
2554 (yyval.pval)->u2.for_test=(yyvsp[(7) - (12)].str);
2555 (yyval.pval)->u3.for_inc = (yyvsp[(10) - (12)].str);
2556 (yyval.pval)->u4.for_statements = (yyvsp[(12) - (12)].pval); set_dads((yyval.pval),(yyvsp[(12) - (12)].pval));;}
2562 (yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2563 (yyval.pval)->u1.str = (yyvsp[(2) - (3)].str);
2564 (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
2569 { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
2574 { (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); ;}
2579 { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
2585 (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
2586 (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);;}
2591 {reset_semicount(parseio->scanner);;}
2600 (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
2601 (yyval.pval)->u2.val=(yyvsp[(4) - (5)].str);
2602 /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
2603 /* string to big to fit in the buffer? */
2604 tot+=strlen((yyvsp[(1) - (5)].pval)->u1.str);
2605 for(pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
2606 tot+=strlen(pptr->u1.str);
2607 tot++; /* for a sep like a comma */
2609 tot+=4; /* for safety */
2610 bufx = calloc(1, tot);
2611 strcpy(bufx,(yyvsp[(1) - (5)].pval)->u1.str);
2613 /* XXX need to advance the pointer or the loop is very inefficient */
2614 for (pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
2615 if ( pptr != (yyvsp[(1) - (5)].pval)->u2.arglist )
2617 strcat(bufx,pptr->u1.str);
2621 if ( !ael_is_funcname((yyvsp[(1) - (5)].pval)->u1.str) )
2622 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",
2623 my_file, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column, (yylsp[(1) - (5)]).last_column, (yyvsp[(1) - (5)].pval)->u1.str);
2625 (yyval.pval)->u1.str = bufx;
2626 destroy_pval((yyvsp[(1) - (5)].pval)); /* the app call it is not, get rid of that chain */
2633 { (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
2638 { (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
2643 { (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
2649 (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)]));
2650 (yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));
2651 (yyval.pval)->u3.else_statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
2656 { (yyval.pval)=0; ;}
2661 { (yyval.pval) = (yyvsp[(2) - (2)].pval); ;}
2666 { (yyval.pval) = NULL ; ;}
2671 { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
2677 (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
2678 (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;}
2684 (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
2685 (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;}
2691 (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
2692 (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
2693 (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
2699 (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
2700 (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
2701 (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
2707 (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
2708 (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
2709 (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
2715 (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
2716 (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
2717 (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
2722 { (yyval.str) = strdup("1"); ;}
2727 { (yyval.str) = (yyvsp[(2) - (2)].str); ;}
2732 { /* ext[, pri] default 1 */
2733 (yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)]));
2734 (yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); ;}
2739 { /* context, ext, pri */
2740 (yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)]));
2741 (yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)]));
2742 (yyval.pval)->next->next = nword((yyvsp[(2) - (4)].str), &(yylsp[(2) - (4)])); ;}
2747 {reset_argcount(parseio->scanner);;}
2753 /* XXX original code had @2 but i think we need @5 */
2754 (yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
2755 (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
2756 (yyval.pval)->u2.arglist = (yyvsp[(4) - (5)].pval);;}
2762 (yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2763 (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); ;}
2768 {reset_argcount(parseio->scanner);;}
2774 if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) {
2775 (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
2776 free((yyvsp[(1) - (3)].str)); /* won't be using this */
2777 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 );
2779 (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
2780 (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
2787 (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)]));
2788 if( (yyval.pval)->type == PV_GOTO )
2789 (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);
2791 (yyval.pval)->u2.arglist = (yyvsp[(2) - (3)].pval);
2797 { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
2802 { (yyval.str) = (yyvsp[(1) - (1)].str) ;}
2807 { (yyval.str) = strdup(""); ;}
2812 { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
2818 (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
2819 (yyval.pval)->u1.str = strdup(""); ;}
2824 { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); ;}
2829 { (yyval.pval) = NULL; ;}
2834 { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
2840 (yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */
2841 (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
2842 (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));;}
2848 (yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2849 (yyval.pval)->u1.str = NULL;
2850 (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
2856 (yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */
2857 (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
2858 (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval);set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));;}
2863 { (yyval.pval) = NULL; ;}
2868 { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
2873 {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2878 { (yyval.pval)=(yyvsp[(1) - (1)].pval);;}
2884 (yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
2885 (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
2886 (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));;}
2892 (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
2893 (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
2899 (yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
2900 (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
2905 { (yyval.pval) = NULL; ;}
2910 { (yyval.pval) = linku1(nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)])), (yyvsp[(3) - (3)].pval)); ;}
2915 { char *x; asprintf(&x,"%s@%s", (yyvsp[(1) - (5)].str),(yyvsp[(3) - (5)].str)); free((yyvsp[(1) - (5)].str)); free((yyvsp[(3) - (5)].str));
2916 (yyval.pval) = linku1(nword(x, &(yylsp[(1) - (5)])), (yyvsp[(5) - (5)].pval));;}
2921 {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
2926 { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
2932 (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
2933 (yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval);
2934 prev_word=0; /* XXX sure ? */ ;}
2939 { (yyval.pval) = (yyvsp[(1) - (2)].pval); ;}
2944 { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); ;}
2949 {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
2955 (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2956 (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
2962 (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));;}
2966 /* Line 1270 of yacc.c. */
2967 #line 2968 "ael.tab.c"
2970 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2974 YY_STACK_PRINT (yyss, yyssp);
2979 /* Now `shift' the result of the reduction. Determine what state
2980 that goes to, based on the state we popped back to and the rule
2981 number reduced by. */
2985 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2986 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2987 yystate = yytable[yystate];
2989 yystate = yydefgoto[yyn - YYNTOKENS];
2994 /*------------------------------------.
2995 | yyerrlab -- here on detecting error |
2996 `------------------------------------*/
2998 /* If not already recovering from an error, report this error. */
3002 #if ! YYERROR_VERBOSE
3003 yyerror (&yylloc, parseio, YY_("syntax error"));
3006 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3007 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3009 YYSIZE_T yyalloc = 2 * yysize;
3010 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3011 yyalloc = YYSTACK_ALLOC_MAXIMUM;
3012 if (yymsg != yymsgbuf)
3013 YYSTACK_FREE (yymsg);
3014 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3016 yymsg_alloc = yyalloc;
3020 yymsg_alloc = sizeof yymsgbuf;
3024 if (0 < yysize && yysize <= yymsg_alloc)
3026 (void) yysyntax_error (yymsg, yystate, yychar);
3027 yyerror (&yylloc, parseio, yymsg);
3031 yyerror (&yylloc, parseio, YY_("syntax error"));
3033 goto yyexhaustedlab;
3039 yyerror_range[0] = yylloc;
3041 if (yyerrstatus == 3)
3043 /* If just tried and failed to reuse look-ahead token after an
3044 error, discard it. */
3046 if (yychar <= YYEOF)
3048 /* Return failure if at end of input. */
3049 if (yychar == YYEOF)
3054 yydestruct ("Error: discarding",
3055 yytoken, &yylval, &yylloc, parseio);
3060 /* Else will try to reuse look-ahead token after shifting the error
3065 /*---------------------------------------------------.
3066 | yyerrorlab -- error raised explicitly by YYERROR. |
3067 `---------------------------------------------------*/
3070 /* Pacify compilers like GCC when the user code never invokes
3071 YYERROR and the label yyerrorlab therefore never appears in user
3073 if (/*CONSTCOND*/ 0)
3076 yyerror_range[0] = yylsp[1-yylen];
3077 /* Do not reclaim the symbols of the rule which action triggered
3081 YY_STACK_PRINT (yyss, yyssp);
3086 /*-------------------------------------------------------------.
3087 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3088 `-------------------------------------------------------------*/
3090 yyerrstatus = 3; /* Each real token shifted decrements this. */
3094 yyn = yypact[yystate];
3095 if (yyn != YYPACT_NINF)
3098 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3106 /* Pop the current state because it cannot handle the error token. */
3110 yyerror_range[0] = *yylsp;
3111 yydestruct ("Error: popping",
3112 yystos[yystate], yyvsp, yylsp, parseio);
3115 YY_STACK_PRINT (yyss, yyssp);
3123 yyerror_range[1] = yylloc;
3124 /* Using YYLLOC is tempting, but would change the location of
3125 the look-ahead. YYLOC is available though. */
3126 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
3129 /* Shift the error token. */
3130 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3136 /*-------------------------------------.
3137 | yyacceptlab -- YYACCEPT comes here. |
3138 `-------------------------------------*/
3143 /*-----------------------------------.
3144 | yyabortlab -- YYABORT comes here. |
3145 `-----------------------------------*/
3151 /*-------------------------------------------------.
3152 | yyexhaustedlab -- memory exhaustion comes here. |
3153 `-------------------------------------------------*/
3155 yyerror (&yylloc, parseio, YY_("memory exhausted"));
3161 if (yychar != YYEOF && yychar != YYEMPTY)
3162 yydestruct ("Cleanup: discarding lookahead",
3163 yytoken, &yylval, &yylloc, parseio);
3164 /* Do not reclaim the symbols of the rule which action triggered
3165 this YYABORT or YYACCEPT. */
3167 YY_STACK_PRINT (yyss, yyssp);
3168 while (yyssp != yyss)
3170 yydestruct ("Cleanup: popping",
3171 yystos[*yyssp], yyvsp, yylsp, parseio);
3176 YYSTACK_FREE (yyss);
3179 if (yymsg != yymsgbuf)
3180 YYSTACK_FREE (yymsg);
3189 static char *token_equivs1[] =
3229 static char *token_equivs2[] =
3270 static char *ael_token_subst(char *mess)
3272 /* calc a length, malloc, fill, and return; yyerror had better free it! */
3276 int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*);
3278 for (p=mess; *p; p++) {
3279 for (i=0; i<token_equivs_entries; i++) {
3280 if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 )
3282 len+=strlen(token_equivs2[i])+2;
3283 p += strlen(token_equivs1[i])-1;
3289 res = calloc(1, len+1);
3294 for (i=0; i<token_equivs_entries; i++) {
3295 if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) {
3297 for (t=token_equivs2[i]; *t;) {
3301 p += strlen(token_equivs1[i]);
3313 void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s)
3315 char *s2 = ael_token_subst((char *)s);
3316 if (locp->first_line == locp->last_line) {
3317 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);
3319 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);
3322 parseio->syntax_error_count++;
3325 static struct pval *npval(pvaltype type, int first_line, int last_line,
3326 int first_column, int last_column)
3328 pval *z = calloc(1, sizeof(struct pval));
3330 z->startline = first_line;
3331 z->endline = last_line;
3332 z->startcol = first_column;
3333 z->endcol = last_column;
3334 z->filename = strdup(my_file);
3338 static struct pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last)
3340 return npval(type, first->first_line, last->last_line,
3341 first->first_column, last->last_column);
3344 static struct pval *update_last(pval *obj, YYLTYPE *last)
3346 obj->endline = last->last_line;
3347 obj->endcol = last->last_column;
3351 /* frontend for npval to create a PV_WORD string from the given token */
3352 static pval *nword(char *string, YYLTYPE *pos)
3354 pval *p = npval2(PV_WORD, pos, pos);
3360 /* append second element to the list in the first one */
3361 static pval * linku1(pval *head, pval *tail)
3369 head->u1_last->next = tail;
3371 head->u1_last = tail;
3372 tail->prev = head; /* the dad link only points to containers */
3377 /* this routine adds a dad ptr to each element in the list */
3378 static void set_dads(struct pval *dad, struct pval *child_list)
3382 for(t=child_list;t;t=t->next) /* simple stuff */