Bison Grammar description of AEL2. More...
#include "asterisk.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include "asterisk/logger.h"#include "asterisk/lock.h"#include "asterisk/hashtab.h"#include "asterisk/ael_structs.h"#include "asterisk/utils.h"
Go to the source code of this file.
Data Structures | |
| union | yyalloc |
| struct | YYLTYPE |
| union | YYSTYPE |
Defines | |
| #define | YY_(msgid) msgid |
| #define | YY_LOCATION_PRINT(File, Loc) |
| #define | YY_REDUCE_PRINT(Rule) |
| #define | YY_STACK_PRINT(Bottom, Top) |
| #define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| #define | YYABORT goto yyabortlab |
| #define | YYACCEPT goto yyacceptlab |
| #define | YYBACKUP(Token, Value) |
| #define | YYBISON 1 |
| #define | YYBISON_VERSION "2.5" |
| #define | YYCASE_(N, S) |
| #define | yychar ael_yychar |
| #define | yyclearin (yychar = YYEMPTY) |
| #define | YYCOPY(To, From, Count) |
| #define | YYCOPY_NEEDED 1 |
| #define | yydebug ael_yydebug |
| #define | YYDEBUG 0 |
| #define | YYDPRINTF(Args) |
| #define | YYEMPTY (-2) |
| #define | YYEOF 0 |
| #define | YYERRCODE 256 |
| #define | yyerrok (yyerrstatus = 0) |
| #define | yyerror ael_yyerror |
| #define | YYERROR goto yyerrorlab |
| #define | YYERROR_VERBOSE 1 |
| #define | YYERROR_VERBOSE 1 |
| #define | YYFAIL goto yyerrlab |
| #define | YYFINAL 17 |
| #define | YYFREE free |
| #define | YYID(n) (n) |
| #define | YYINITDEPTH 200 |
| #define | YYLAST 371 |
| #define | yylex ael_yylex |
| #define | YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
| #define | YYLEX_PARAM ((struct parse_io *)parseio)->scanner |
| #define | yylloc ael_yylloc |
| #define | YYLLOC_DEFAULT(Current, Rhs, N) |
| #define | YYLSP_NEEDED 1 |
| #define | yyltype YYLTYPE /* obsolescent; will be withdrawn */ |
| #define | YYLTYPE_IS_DECLARED 1 |
| #define | YYLTYPE_IS_TRIVIAL 1 |
| #define | yylval ael_yylval |
| #define | YYMALLOC malloc |
| #define | YYMAXDEPTH 10000 |
| #define | YYMAXUTOK 298 |
| #define | yynerrs ael_yynerrs |
| #define | YYNNTS 56 |
| #define | YYNRULES 143 |
| #define | YYNSTATES 283 |
| #define | YYNTOKENS 44 |
| #define | YYPACT_NINF -211 |
| #define | yypact_value_is_default(yystate) ((yystate) == (-211)) |
| #define | yyparse ael_yyparse |
| #define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
| #define | YYPULL 1 |
| #define | YYPURE 1 |
| #define | YYPUSH 0 |
| #define | YYRECOVERING() (!!yyerrstatus) |
| #define | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| #define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| #define | YYSIZE_T unsigned int |
| #define | YYSKELETON_NAME "yacc.c" |
| #define | YYSTACK_ALLOC YYMALLOC |
| #define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| #define | YYSTACK_BYTES(N) |
| #define | YYSTACK_FREE YYFREE |
| #define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| #define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
| #define | yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| #define | YYSTYPE_IS_DECLARED 1 |
| #define | YYSTYPE_IS_TRIVIAL 1 |
| #define | YYSYNTAX_ERROR |
| #define | YYTABLE_NINF -134 |
| #define | yytable_value_is_error(yytable_value) YYID (0) |
| #define | YYTERROR 1 |
| #define | YYTOKEN_TABLE 0 |
| #define | YYTOKENTYPE |
| #define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| #define | YYUNDEFTOK 2 |
| #define | YYUSE(e) ((void) (e)) |
Typedefs | |
| typedef struct YYLTYPE | YYLTYPE |
| typedef union YYSTYPE | YYSTYPE |
| typedef short int | yytype_int16 |
| typedef short int | yytype_int8 |
| typedef unsigned short int | yytype_uint16 |
| typedef unsigned char | yytype_uint8 |
Enumerations | |
| enum | yytokentype { TOK_COMMA = 258, TOK_COLONCOLON = 259, TOK_COND = 260, TOK_OR = 261, TOK_AND = 262, TOK_NE = 263, TOK_LE = 264, TOK_GE = 265, TOK_LT = 266, TOK_GT = 267, TOK_EQ = 268, TOK_MINUS = 269, TOK_PLUS = 270, TOK_MOD = 271, TOK_DIV = 272, TOK_MULT = 273, TOK_COMPL = 274, TOK_TILDETILDE = 275, TOK_EQTILDE = 276, TOK_COLON = 277, TOK_LP = 278, TOK_RP = 279, TOKEN = 280, TOK_COMMA = 258, TOK_COLONCOLON = 259, TOK_COND = 260, TOK_OR = 261, TOK_AND = 262, TOK_NE = 263, TOK_LE = 264, TOK_GE = 265, TOK_LT = 266, TOK_GT = 267, TOK_EQ = 268, TOK_MINUS = 269, TOK_PLUS = 270, TOK_MOD = 271, TOK_DIV = 272, TOK_MULT = 273, TOK_COMPL = 274, TOK_TILDETILDE = 275, TOK_EQTILDE = 276, TOK_COLON = 277, TOK_LP = 278, TOK_RP = 279, TOKEN = 280, KW_CONTEXT = 258, LC = 259, RC = 260, LP = 261, RP = 262, SEMI = 263, EQ = 264, COMMA = 265, COLON = 266, AMPER = 267, BAR = 268, AT = 269, KW_MACRO = 270, KW_GLOBALS = 271, KW_IGNOREPAT = 272, KW_SWITCH = 273, KW_IF = 274, KW_IFTIME = 275, KW_ELSE = 276, KW_RANDOM = 277, KW_ABSTRACT = 278, KW_EXTEND = 279, EXTENMARK = 280, KW_GOTO = 281, KW_JUMP = 282, KW_RETURN = 283, KW_BREAK = 284, KW_CONTINUE = 285, KW_REGEXTEN = 286, KW_HINT = 287, KW_FOR = 288, KW_WHILE = 289, KW_CASE = 290, KW_PATTERN = 291, KW_DEFAULT = 292, KW_CATCH = 293, KW_SWITCHES = 294, KW_ESWITCHES = 295, KW_INCLUDES = 296, KW_LOCAL = 297, word = 298, KW_CONTEXT = 258, LC = 259, RC = 260, LP = 261, RP = 262, SEMI = 263, EQ = 264, COMMA = 265, COLON = 266, AMPER = 267, BAR = 268, AT = 269, KW_MACRO = 270, KW_GLOBALS = 271, KW_IGNOREPAT = 272, KW_SWITCH = 273, KW_IF = 274, KW_IFTIME = 275, KW_ELSE = 276, KW_RANDOM = 277, KW_ABSTRACT = 278, KW_EXTEND = 279, EXTENMARK = 280, KW_GOTO = 281, KW_JUMP = 282, KW_RETURN = 283, KW_BREAK = 284, KW_CONTINUE = 285, KW_REGEXTEN = 286, KW_HINT = 287, KW_FOR = 288, KW_WHILE = 289, KW_CASE = 290, KW_PATTERN = 291, KW_DEFAULT = 292, KW_CATCH = 293, KW_SWITCHES = 294, KW_ESWITCHES = 295, KW_INCLUDES = 296, KW_LOCAL = 297, word = 298 } |
Functions | |
| static char * | ael_token_subst (const char *mess) |
| int | ael_yylex (YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner) |
| pval * | linku1 (pval *head, pval *tail) |
| pval * | npval (pvaltype type, int first_line, int last_line, int first_column, int last_column) |
| static pval * | npval2 (pvaltype type, YYLTYPE *first, YYLTYPE *last) |
| static pval * | nword (char *string, YYLTYPE *pos) |
| void | reset_argcount (yyscan_t yyscanner) |
| void | reset_parencount (yyscan_t yyscanner) |
| void | reset_semicount (yyscan_t yyscanner) |
| static void | set_dads (pval *dad, pval *child_list) |
| static pval * | update_last (pval *, YYLTYPE *) |
| static void | yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parse_io *parseio) const |
| void | yyerror (YYLTYPE *locp, struct parse_io *parseio, char const *s) |
| int | yyparse () |
| int | yyparse (struct parse_io *parseio) |
| static char * | yystpcpy (char *yydest, const char *yysrc) |
| static YYSIZE_T | yystrlen (char *yystr) const |
| static int | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) |
| static YYSIZE_T | yytnamerr (char *yyres, const char *yystr) |
Variables | |
| struct ast_flags | ast_compat |
| char * | my_file |
| static char * | token_equivs1 [] |
| static char * | token_equivs2 [] |
| static const yytype_uint16 | yycheck [] |
| static const yytype_uint8 | yydefact [] |
| static const yytype_int16 | yydefgoto [] |
| static const yytype_int16 | yypact [] |
| static const yytype_int16 | yypgoto [] |
| static const yytype_uint8 | yyr1 [] |
| static const yytype_uint8 | yyr2 [] |
| static const yytype_uint8 | yystos [] |
| static const yytype_int16 | yytable [] |
| static const char *const | yytname [] |
| static const yytype_uint8 | yytranslate [] |
Bison Grammar description of AEL2.
Definition in file ael.tab.c.
| #define YY_ | ( | msgid | ) | msgid |
Definition at line 327 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YY_LOCATION_PRINT | ( | File, | |
| Loc | |||
| ) |
| #define YY_REDUCE_PRINT | ( | Rule | ) |
| #define YY_STACK_PRINT | ( | Bottom, | |
| Top | |||
| ) |
| #define YY_SYMBOL_PRINT | ( | Title, | |
| Type, | |||
| Value, | |||
| Location | |||
| ) |
Definition at line 1208 of file ael.tab.c.
Referenced by yydestruct(), and yyparse().
| #define YYACCEPT goto yyacceptlab |
| #define YYBISON_VERSION "2.5" |
case N: \ yyformat = S; \ break
Referenced by yysyntax_error().
| #define YYCOPY_NEEDED 1 |
| #define YYEMPTY (-2) |
Definition at line 944 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYERROR_VERBOSE 1 |
| #define YYERROR_VERBOSE 1 |
| #define YYINITDEPTH 200 |
| #define YYLAST 371 |
Definition at line 491 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
| #define YYLEX_PARAM ((struct parse_io *)parseio)->scanner |
| #define YYLLOC_DEFAULT | ( | Current, | |
| Rhs, | |||
| N | |||
| ) |
| #define YYLSP_NEEDED 1 |
| #define YYLTYPE_IS_DECLARED 1 |
| #define YYLTYPE_IS_TRIVIAL 1 |
| #define YYMAXDEPTH 10000 |
| #define YYNTOKENS 44 |
Definition at line 494 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYPACT_NINF -211 |
| #define yypact_value_is_default | ( | yystate | ) | ((yystate) == (-211)) |
Definition at line 859 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define yyparse ael_yyparse |
| #define YYPOPSTACK | ( | N | ) | (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
| #define YYRECOVERING | ( | ) | (!!yyerrstatus) |
| #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| #define YYSIZE_T unsigned int |
Definition at line 313 of file ael.tab.c.
Referenced by yyparse(), yystrlen(), yysyntax_error(), and yytnamerr().
| #define YYSKELETON_NAME "yacc.c" |
| #define YYSTACK_ALLOC YYMALLOC |
| #define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
Definition at line 398 of file ael.tab.c.
Referenced by yysyntax_error().
| #define YYSTACK_BYTES | ( | N | ) |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM)
Definition at line 444 of file ael.tab.c.
Referenced by yyparse().
| #define YYSTACK_FREE YYFREE |
| #define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| #define YYSTACK_RELOCATE | ( | Stack_alloc, | |
| Stack | |||
| ) |
| #define YYSTYPE_IS_DECLARED 1 |
| #define YYSTYPE_IS_TRIVIAL 1 |
| #define YYSYNTAX_ERROR |
yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken)
Referenced by yyparse().
| #define YYTABLE_NINF -134 |
| #define yytable_value_is_error | ( | yytable_value | ) | YYID (0) |
Definition at line 862 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYTERROR 1 |
Definition at line 986 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYTOKEN_TABLE 0 |
| #define YYTOKENTYPE |
| #define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| #define YYUNDEFTOK 2 |
| #define YYUSE | ( | e | ) | ((void) (e)) |
Definition at line 333 of file ael.tab.c.
Referenced by yydestruct().
| typedef short int yytype_int16 |
| typedef short int yytype_int8 |
| typedef unsigned short int yytype_uint16 |
| typedef unsigned char yytype_uint8 |
| enum yytokentype |
Definition at line 162 of file ael.tab.c.
{
KW_CONTEXT = 258,
LC = 259,
RC = 260,
LP = 261,
RP = 262,
SEMI = 263,
EQ = 264,
COMMA = 265,
COLON = 266,
AMPER = 267,
BAR = 268,
AT = 269,
KW_MACRO = 270,
KW_GLOBALS = 271,
KW_IGNOREPAT = 272,
KW_SWITCH = 273,
KW_IF = 274,
KW_IFTIME = 275,
KW_ELSE = 276,
KW_RANDOM = 277,
KW_ABSTRACT = 278,
KW_EXTEND = 279,
EXTENMARK = 280,
KW_GOTO = 281,
KW_JUMP = 282,
KW_RETURN = 283,
KW_BREAK = 284,
KW_CONTINUE = 285,
KW_REGEXTEN = 286,
KW_HINT = 287,
KW_FOR = 288,
KW_WHILE = 289,
KW_CASE = 290,
KW_PATTERN = 291,
KW_DEFAULT = 292,
KW_CATCH = 293,
KW_SWITCHES = 294,
KW_ESWITCHES = 295,
KW_INCLUDES = 296,
KW_LOCAL = 297,
word = 298
};
| static char * ael_token_subst | ( | const char * | mess | ) | [static] |
Definition at line 3911 of file ael.tab.c.
References calloc, len(), and token_equivs1.
Referenced by yyerror().
{
/* calc a length, malloc, fill, and return; yyerror had better free it! */
int len=0,i;
const char *p;
char *res, *s,*t;
int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*);
for (p=mess; *p; p++) {
for (i=0; i<token_equivs_entries; i++) {
if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 )
{
len+=strlen(token_equivs2[i])+2;
p += strlen(token_equivs1[i])-1;
break;
}
}
len++;
}
res = calloc(1, len+1);
res[0] = 0;
s = res;
for (p=mess; *p;) {
int found = 0;
for (i=0; i<token_equivs_entries; i++) {
if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) {
*s++ = '\'';
for (t=token_equivs2[i]; *t;) {
*s++ = *t++;
}
*s++ = '\'';
p += strlen(token_equivs1[i]);
found = 1;
break;
}
}
if( !found )
*s++ = *p++;
}
*s++ = 0;
return res;
}
Definition at line 5926 of file pval.c.
References pval::next, pval::prev, and pval::u1_last.
| pval* npval | ( | pvaltype | type, |
| int | first_line, | ||
| int | last_line, | ||
| int | first_column, | ||
| int | last_column | ||
| ) | [read] |
Definition at line 3966 of file ael.tab.c.
References calloc, pval::endcol, pval::endline, pval::filename, S_OR, pval::startcol, pval::startline, strdup, pval::type, and type.
Definition at line 3979 of file ael.tab.c.
References YYLTYPE::first_column, YYLTYPE::first_line, YYLTYPE::last_column, YYLTYPE::last_line, and npval().
Referenced by nword(), and yyparse().
{
return npval(type, first->first_line, last->last_line,
first->first_column, last->last_column);
}
| void reset_argcount | ( | yyscan_t | yyscanner | ) |
Referenced by yyparse().
| void reset_parencount | ( | yyscan_t | yyscanner | ) |
Referenced by yyparse().
| void reset_semicount | ( | yyscan_t | yyscanner | ) |
Referenced by yyparse().
| static struct pval * update_last | ( | pval * | obj, |
| YYLTYPE * | last | ||
| ) | [static, read] |
Definition at line 3985 of file ael.tab.c.
References pval::endcol, pval::endline, YYLTYPE::last_column, and YYLTYPE::last_line.
Referenced by yyparse().
{
obj->endline = last->last_line;
obj->endcol = last->last_column;
return obj;
}
| static void yydestruct | ( | char * | yymsg, |
| int | yytype, | ||
| YYSTYPE * | yyvaluep, | ||
| YYLTYPE * | yylocationp, | ||
| struct parse_io * | parseio | ||
| ) | const [static] |
Definition at line 1480 of file ael.tab.c.
References destroy_pval(), free, prev_word, YYSTYPE::pval, YYSTYPE::str, YY_SYMBOL_PRINT, and YYUSE.
Referenced by yyparse().
{
YYUSE (yyvaluep);
YYUSE (yylocationp);
YYUSE (parseio);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
case 43: /* "word" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1506 "ael.tab.c"
break;
case 46: /* "objects" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1518 "ael.tab.c"
break;
case 47: /* "object" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1530 "ael.tab.c"
break;
case 48: /* "context_name" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1539 "ael.tab.c"
break;
case 49: /* "context" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1551 "ael.tab.c"
break;
case 51: /* "macro" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1563 "ael.tab.c"
break;
case 52: /* "globals" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1575 "ael.tab.c"
break;
case 53: /* "global_statements" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1587 "ael.tab.c"
break;
case 54: /* "assignment" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1599 "ael.tab.c"
break;
case 56: /* "local_assignment" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1611 "ael.tab.c"
break;
case 58: /* "arglist" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1623 "ael.tab.c"
break;
case 59: /* "elements" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1635 "ael.tab.c"
break;
case 60: /* "element" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1647 "ael.tab.c"
break;
case 61: /* "ignorepat" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1659 "ael.tab.c"
break;
case 62: /* "extension" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1671 "ael.tab.c"
break;
case 63: /* "statements" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1683 "ael.tab.c"
break;
case 64: /* "timerange" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1692 "ael.tab.c"
break;
case 65: /* "timespec" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1704 "ael.tab.c"
break;
case 66: /* "test_expr" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1713 "ael.tab.c"
break;
case 68: /* "if_like_head" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1725 "ael.tab.c"
break;
case 69: /* "word_list" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1734 "ael.tab.c"
break;
case 71: /* "word3_list" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1743 "ael.tab.c"
break;
case 72: /* "goto_word" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1752 "ael.tab.c"
break;
case 73: /* "switch_statement" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1764 "ael.tab.c"
break;
case 74: /* "statement" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1776 "ael.tab.c"
break;
case 79: /* "opt_else" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1788 "ael.tab.c"
break;
case 80: /* "target" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1800 "ael.tab.c"
break;
case 81: /* "opt_pri" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1809 "ael.tab.c"
break;
case 82: /* "jumptarget" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1821 "ael.tab.c"
break;
case 83: /* "macro_call" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1833 "ael.tab.c"
break;
case 85: /* "application_call_head" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1845 "ael.tab.c"
break;
case 87: /* "application_call" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1857 "ael.tab.c"
break;
case 88: /* "opt_word" */
/* Line 1391 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1391 of yacc.c */
#line 1866 "ael.tab.c"
break;
case 89: /* "eval_arglist" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1878 "ael.tab.c"
break;
case 90: /* "case_statements" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1890 "ael.tab.c"
break;
case 91: /* "case_statement" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1902 "ael.tab.c"
break;
case 92: /* "macro_statements" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1914 "ael.tab.c"
break;
case 93: /* "macro_statement" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1926 "ael.tab.c"
break;
case 94: /* "switches" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1938 "ael.tab.c"
break;
case 95: /* "eswitches" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1950 "ael.tab.c"
break;
case 96: /* "switchlist" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1962 "ael.tab.c"
break;
case 97: /* "included_entry" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1974 "ael.tab.c"
break;
case 98: /* "includeslist" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1986 "ael.tab.c"
break;
case 99: /* "includes" */
/* Line 1391 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1391 of yacc.c */
#line 1998 "ael.tab.c"
break;
default:
break;
}
}
Definition at line 3954 of file ael.tab.c.
References ael_token_subst(), ast_log(), YYLTYPE::first_column, YYLTYPE::first_line, free, YYLTYPE::last_column, YYLTYPE::last_line, LOG_ERROR, and parse_io::syntax_error_count.
{
char *s2 = ael_token_subst((char *)s);
if (locp->first_line == locp->last_line) {
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);
} else {
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);
}
free(s2);
parseio->syntax_error_count++;
}
| int yyparse | ( | ) |
Definition at line 2043 of file ael.tab.c.
References pval::arglist, asprintf, ast_log(), calloc, destroy_pval(), YYLTYPE::first_column, YYLTYPE::first_line, pval::for_init, free, YYSTYPE::intval, YYLTYPE::last_column, YYLTYPE::last_line, linku1(), pval::list, LOG_WARNING, malloc, pval::next, npval(), npval2(), nword(), prev_word, PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTEXT, PV_CONTINUE, PV_DEFAULT, PV_ESWITCHES, PV_EXTENSION, PV_FOR, PV_GLOBALS, PV_GOTO, PV_IF, PV_IFTIME, PV_IGNOREPAT, PV_INCLUDES, PV_LABEL, PV_LOCALVARDEC, PV_MACRO, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_SWITCHES, PV_VARDEC, PV_WHILE, PV_WORD, YYSTYPE::pval, reset_argcount(), reset_parencount(), reset_semicount(), set_dads(), pval::statements, pval::str, str, YYSTYPE::str, strdup, pval::u1, pval::u2, update_last(), pval::val, YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, yylloc, YYLLOC_DEFAULT, yyalloc::yyls_alloc, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact_value_is_default, YYPOPSTACK, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYSYNTAX_ERROR, yytable_value_is_error, YYTERROR, YYTRANSLATE, and yyalloc::yyvs_alloc.
{
/* The lookahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
/* Number of syntax errors so far. */
int yynerrs;
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
`yyss': related to states.
`yyvs': related to semantic values.
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs;
YYSTYPE *yyvsp;
/* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls;
YYLTYPE *yylsp;
/* The locations where the error started and ended. */
YYLTYPE yyerror_range[3];
YYSIZE_T yystacksize;
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
yytoken = 0;
yyss = yyssa;
yyvs = yyvsa;
yyls = yylsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
yylloc.first_column = yylloc.last_column = 1;
#endif
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
YYLTYPE *yyls1 = yyls;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
if (yychar <= YYEOF)
{
yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yytoken = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
{
if (yytable_value_is_error (yyn))
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token. */
yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
*++yylsp = yylloc;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
/* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 2:
/* Line 1806 of yacc.c */
#line 191 "ael.y"
{ (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); }
break;
case 3:
/* Line 1806 of yacc.c */
#line 194 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 4:
/* Line 1806 of yacc.c */
#line 195 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
break;
case 5:
/* Line 1806 of yacc.c */
#line 196 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (2)].pval);}
break;
case 6:
/* Line 1806 of yacc.c */
#line 199 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 7:
/* Line 1806 of yacc.c */
#line 200 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 8:
/* Line 1806 of yacc.c */
#line 201 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 9:
/* Line 1806 of yacc.c */
#line 202 "ael.y"
{(yyval.pval)=0;/* allow older docs to be read */}
break;
case 10:
/* Line 1806 of yacc.c */
#line 205 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); }
break;
case 11:
/* Line 1806 of yacc.c */
#line 206 "ael.y"
{ (yyval.str) = strdup("default"); }
break;
case 12:
/* Line 1806 of yacc.c */
#line 209 "ael.y"
{
(yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
(yyval.pval)->u1.str = (yyvsp[(3) - (6)].str);
(yyval.pval)->u2.statements = (yyvsp[(5) - (6)].pval);
set_dads((yyval.pval),(yyvsp[(5) - (6)].pval));
(yyval.pval)->u3.abstract = (yyvsp[(1) - (6)].intval);}
break;
case 13:
/* Line 1806 of yacc.c */
#line 218 "ael.y"
{ (yyval.intval) = 1; }
break;
case 14:
/* Line 1806 of yacc.c */
#line 219 "ael.y"
{ (yyval.intval) = 0; }
break;
case 15:
/* Line 1806 of yacc.c */
#line 220 "ael.y"
{ (yyval.intval) = 2; }
break;
case 16:
/* Line 1806 of yacc.c */
#line 221 "ael.y"
{ (yyval.intval)=3; }
break;
case 17:
/* Line 1806 of yacc.c */
#line 222 "ael.y"
{ (yyval.intval)=3; }
break;
case 18:
/* Line 1806 of yacc.c */
#line 225 "ael.y"
{
(yyval.pval) = npval2(PV_MACRO, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
(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);
set_dads((yyval.pval),(yyvsp[(7) - (8)].pval));}
break;
case 19:
/* Line 1806 of yacc.c */
#line 231 "ael.y"
{
(yyval.pval) = npval2(PV_GLOBALS, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
(yyval.pval)->u1.statements = (yyvsp[(3) - (4)].pval);
set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
break;
case 20:
/* Line 1806 of yacc.c */
#line 237 "ael.y"
{ (yyval.pval) = NULL; }
break;
case 21:
/* Line 1806 of yacc.c */
#line 238 "ael.y"
{(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
break;
case 22:
/* Line 1806 of yacc.c */
#line 239 "ael.y"
{(yyval.pval)=(yyvsp[(2) - (2)].pval);}
break;
case 23:
/* Line 1806 of yacc.c */
#line 242 "ael.y"
{ reset_semicount(parseio->scanner); }
break;
case 24:
/* Line 1806 of yacc.c */
#line 242 "ael.y"
{
(yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
(yyval.pval)->u2.val = (yyvsp[(4) - (5)].str); }
break;
case 25:
/* Line 1806 of yacc.c */
#line 248 "ael.y"
{ reset_semicount(parseio->scanner); }
break;
case 26:
/* Line 1806 of yacc.c */
#line 248 "ael.y"
{
(yyval.pval) = npval2(PV_LOCALVARDEC, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (6)].str);
(yyval.pval)->u2.val = (yyvsp[(5) - (6)].str); }
break;
case 27:
/* Line 1806 of yacc.c */
#line 255 "ael.y"
{ (yyval.pval) = NULL; }
break;
case 28:
/* Line 1806 of yacc.c */
#line 256 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
break;
case 29:
/* Line 1806 of yacc.c */
#line 257 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
break;
case 30:
/* Line 1806 of yacc.c */
#line 258 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (2)].pval);}
break;
case 31:
/* Line 1806 of yacc.c */
#line 261 "ael.y"
{(yyval.pval)=0;}
break;
case 32:
/* Line 1806 of yacc.c */
#line 262 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
break;
case 33:
/* Line 1806 of yacc.c */
#line 263 "ael.y"
{ (yyval.pval)=(yyvsp[(2) - (2)].pval);}
break;
case 34:
/* Line 1806 of yacc.c */
#line 266 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 35:
/* Line 1806 of yacc.c */
#line 267 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 36:
/* Line 1806 of yacc.c */
#line 268 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 37:
/* Line 1806 of yacc.c */
#line 269 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 38:
/* Line 1806 of yacc.c */
#line 270 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 39:
/* Line 1806 of yacc.c */
#line 271 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 40:
/* Line 1806 of yacc.c */
#line 272 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 41:
/* Line 1806 of yacc.c */
#line 273 "ael.y"
{free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;}
break;
case 42:
/* Line 1806 of yacc.c */
#line 274 "ael.y"
{(yyval.pval)=0;/* allow older docs to be read */}
break;
case 43:
/* Line 1806 of yacc.c */
#line 277 "ael.y"
{
(yyval.pval) = npval2(PV_IGNOREPAT, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
(yyval.pval)->u1.str = (yyvsp[(3) - (4)].str);}
break;
case 44:
/* Line 1806 of yacc.c */
#line 282 "ael.y"
{
(yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
(yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
break;
case 45:
/* Line 1806 of yacc.c */
#line 286 "ael.y"
{
(yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (5)]), &(yylsp[(3) - (5)]));
(yyval.pval)->u1.str = malloc(strlen((yyvsp[(1) - (5)].str))+strlen((yyvsp[(3) - (5)].str))+2);
strcpy((yyval.pval)->u1.str,(yyvsp[(1) - (5)].str));
strcat((yyval.pval)->u1.str,"@");
strcat((yyval.pval)->u1.str,(yyvsp[(3) - (5)].str));
free((yyvsp[(1) - (5)].str));
(yyval.pval)->u2.statements = (yyvsp[(5) - (5)].pval); set_dads((yyval.pval),(yyvsp[(5) - (5)].pval));}
break;
case 46:
/* Line 1806 of yacc.c */
#line 294 "ael.y"
{
(yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
(yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));
(yyval.pval)->u4.regexten=1;}
break;
case 47:
/* Line 1806 of yacc.c */
#line 299 "ael.y"
{
(yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (7)]), &(yylsp[(7) - (7)]));
(yyval.pval)->u1.str = (yyvsp[(5) - (7)].str);
(yyval.pval)->u2.statements = (yyvsp[(7) - (7)].pval); set_dads((yyval.pval),(yyvsp[(7) - (7)].pval));
(yyval.pval)->u3.hints = (yyvsp[(3) - (7)].str);}
break;
case 48:
/* Line 1806 of yacc.c */
#line 304 "ael.y"
{
(yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
(yyval.pval)->u1.str = (yyvsp[(6) - (8)].str);
(yyval.pval)->u2.statements = (yyvsp[(8) - (8)].pval); set_dads((yyval.pval),(yyvsp[(8) - (8)].pval));
(yyval.pval)->u4.regexten=1;
(yyval.pval)->u3.hints = (yyvsp[(4) - (8)].str);}
break;
case 49:
/* Line 1806 of yacc.c */
#line 313 "ael.y"
{ (yyval.pval) = NULL; }
break;
case 50:
/* Line 1806 of yacc.c */
#line 314 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
break;
case 51:
/* Line 1806 of yacc.c */
#line 315 "ael.y"
{(yyval.pval)=(yyvsp[(2) - (2)].pval);}
break;
case 52:
/* Line 1806 of yacc.c */
#line 321 "ael.y"
{
if (asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (5)].str));
free((yyvsp[(3) - (5)].str));
free((yyvsp[(5) - (5)].str));
}
}
break;
case 53:
/* Line 1806 of yacc.c */
#line 331 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); }
break;
case 54:
/* Line 1806 of yacc.c */
#line 335 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)]));
(yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)]));
(yyval.pval)->next->next = nword((yyvsp[(5) - (7)].str), &(yylsp[(5) - (7)]));
(yyval.pval)->next->next->next = nword((yyvsp[(7) - (7)].str), &(yylsp[(7) - (7)])); }
break;
case 55:
/* Line 1806 of yacc.c */
#line 343 "ael.y"
{ reset_parencount(parseio->scanner); }
break;
case 56:
/* Line 1806 of yacc.c */
#line 343 "ael.y"
{ (yyval.str) = (yyvsp[(3) - (4)].str); }
break;
case 57:
/* Line 1806 of yacc.c */
#line 347 "ael.y"
{
(yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); }
break;
case 58:
/* Line 1806 of yacc.c */
#line 350 "ael.y"
{
(yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);}
break;
case 59:
/* Line 1806 of yacc.c */
#line 353 "ael.y"
{
(yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);
prev_word = 0; }
break;
case 60:
/* Line 1806 of yacc.c */
#line 364 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);}
break;
case 61:
/* Line 1806 of yacc.c */
#line 365 "ael.y"
{
if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (2)].str));
free((yyvsp[(2) - (2)].str));
prev_word = (yyval.str);
}
}
break;
case 62:
/* Line 1806 of yacc.c */
#line 377 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); }
break;
case 63:
/* Line 1806 of yacc.c */
#line 378 "ael.y"
{
if (asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (2)].str));
free((yyvsp[(2) - (2)].str));
}
}
break;
case 64:
/* Line 1806 of yacc.c */
#line 387 "ael.y"
{
if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (3)].str));
free((yyvsp[(3) - (3)].str));
}
}
break;
case 65:
/* Line 1806 of yacc.c */
#line 396 "ael.y"
{ /* there are often '&' in hints */
if (asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (3)].str));
free((yyvsp[(3) - (3)].str));
}
}
break;
case 66:
/* Line 1806 of yacc.c */
#line 405 "ael.y"
{
if (asprintf(&((yyval.str)), "%s@%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (3)].str));
free((yyvsp[(3) - (3)].str));
}
}
break;
case 67:
/* Line 1806 of yacc.c */
#line 416 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);}
break;
case 68:
/* Line 1806 of yacc.c */
#line 417 "ael.y"
{
if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (2)].str));
free((yyvsp[(2) - (2)].str));
prev_word = (yyval.str);
}
}
break;
case 69:
/* Line 1806 of yacc.c */
#line 427 "ael.y"
{
if (asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (3)].str));
free((yyvsp[(2) - (3)].str));
free((yyvsp[(3) - (3)].str));
prev_word=(yyval.str);
}
}
break;
case 70:
/* Line 1806 of yacc.c */
#line 440 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);}
break;
case 71:
/* Line 1806 of yacc.c */
#line 441 "ael.y"
{
if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (2)].str));
free((yyvsp[(2) - (2)].str));
}
}
break;
case 72:
/* Line 1806 of yacc.c */
#line 450 "ael.y"
{
if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.str) = NULL;
} else {
free((yyvsp[(1) - (3)].str));
free((yyvsp[(3) - (3)].str));
}
}
break;
case 73:
/* Line 1806 of yacc.c */
#line 461 "ael.y"
{
(yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
(yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
break;
case 74:
/* Line 1806 of yacc.c */
#line 470 "ael.y"
{
(yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));}
break;
case 75:
/* Line 1806 of yacc.c */
#line 473 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); }
break;
case 76:
/* Line 1806 of yacc.c */
#line 474 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); }
break;
case 77:
/* Line 1806 of yacc.c */
#line 475 "ael.y"
{
(yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
break;
case 78:
/* Line 1806 of yacc.c */
#line 478 "ael.y"
{
(yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
break;
case 79:
/* Line 1806 of yacc.c */
#line 481 "ael.y"
{
(yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); }
break;
case 80:
/* Line 1806 of yacc.c */
#line 484 "ael.y"
{reset_semicount(parseio->scanner);}
break;
case 81:
/* Line 1806 of yacc.c */
#line 485 "ael.y"
{reset_semicount(parseio->scanner);}
break;
case 82:
/* Line 1806 of yacc.c */
#line 486 "ael.y"
{reset_parencount(parseio->scanner);}
break;
case 83:
/* Line 1806 of yacc.c */
#line 486 "ael.y"
{ /* XXX word_list maybe ? */
(yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)]));
(yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str);
(yyval.pval)->u2.for_test=(yyvsp[(7) - (12)].str);
(yyval.pval)->u3.for_inc = (yyvsp[(10) - (12)].str);
(yyval.pval)->u4.for_statements = (yyvsp[(12) - (12)].pval); set_dads((yyval.pval),(yyvsp[(12) - (12)].pval));}
break;
case 84:
/* Line 1806 of yacc.c */
#line 492 "ael.y"
{
(yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (3)].str);
(yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
break;
case 85:
/* Line 1806 of yacc.c */
#line 496 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); }
break;
case 86:
/* Line 1806 of yacc.c */
#line 497 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); }
break;
case 87:
/* Line 1806 of yacc.c */
#line 498 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
break;
case 88:
/* Line 1806 of yacc.c */
#line 499 "ael.y"
{
(yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);}
break;
case 89:
/* Line 1806 of yacc.c */
#line 502 "ael.y"
{reset_semicount(parseio->scanner);}
break;
case 90:
/* Line 1806 of yacc.c */
#line 502 "ael.y"
{
char *bufx;
int tot=0;
pval *pptr;
(yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
(yyval.pval)->u2.val=(yyvsp[(4) - (5)].str);
/* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
/* string to big to fit in the buffer? */
tot+=strlen((yyvsp[(1) - (5)].pval)->u1.str);
for(pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
tot+=strlen(pptr->u1.str);
tot++; /* for a sep like a comma */
}
tot+=4; /* for safety */
bufx = calloc(1, tot);
strcpy(bufx,(yyvsp[(1) - (5)].pval)->u1.str);
strcat(bufx,"(");
/* XXX need to advance the pointer or the loop is very inefficient */
for (pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
if ( pptr != (yyvsp[(1) - (5)].pval)->u2.arglist )
strcat(bufx,",");
strcat(bufx,pptr->u1.str);
}
strcat(bufx,")");
#ifdef AAL_ARGCHECK
if ( !ael_is_funcname((yyvsp[(1) - (5)].pval)->u1.str) )
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",
my_file, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column, (yylsp[(1) - (5)]).last_column, (yyvsp[(1) - (5)].pval)->u1.str);
#endif
(yyval.pval)->u1.str = bufx;
destroy_pval((yyvsp[(1) - (5)].pval)); /* the app call it is not, get rid of that chain */
prev_word = 0;
}
break;
case 91:
/* Line 1806 of yacc.c */
#line 535 "ael.y"
{ (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
break;
case 92:
/* Line 1806 of yacc.c */
#line 536 "ael.y"
{ (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
break;
case 93:
/* Line 1806 of yacc.c */
#line 537 "ael.y"
{ (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
break;
case 94:
/* Line 1806 of yacc.c */
#line 538 "ael.y"
{
(yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)]));
(yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));
(yyval.pval)->u3.else_statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
break;
case 95:
/* Line 1806 of yacc.c */
#line 542 "ael.y"
{ (yyval.pval)=0; }
break;
case 96:
/* Line 1806 of yacc.c */
#line 545 "ael.y"
{ (yyval.pval) = (yyvsp[(2) - (2)].pval); }
break;
case 97:
/* Line 1806 of yacc.c */
#line 546 "ael.y"
{ (yyval.pval) = NULL ; }
break;
case 98:
/* Line 1806 of yacc.c */
#line 549 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
break;
case 99:
/* Line 1806 of yacc.c */
#line 550 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
(yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
break;
case 100:
/* Line 1806 of yacc.c */
#line 553 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
(yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
break;
case 101:
/* Line 1806 of yacc.c */
#line 556 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
(yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
break;
case 102:
/* Line 1806 of yacc.c */
#line 560 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
(yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
break;
case 103:
/* Line 1806 of yacc.c */
#line 564 "ael.y"
{
(yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
(yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
break;
case 104:
/* Line 1806 of yacc.c */
#line 568 "ael.y"
{
(yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
(yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
break;
case 105:
/* Line 1806 of yacc.c */
#line 574 "ael.y"
{ (yyval.str) = strdup("1"); }
break;
case 106:
/* Line 1806 of yacc.c */
#line 575 "ael.y"
{ (yyval.str) = (yyvsp[(2) - (2)].str); }
break;
case 107:
/* Line 1806 of yacc.c */
#line 579 "ael.y"
{ /* ext[, pri] default 1 */
(yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)]));
(yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); }
break;
case 108:
/* Line 1806 of yacc.c */
#line 582 "ael.y"
{ /* context, ext, pri */
(yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)]));
(yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)]));
(yyval.pval)->next->next = nword((yyvsp[(2) - (4)].str), &(yylsp[(2) - (4)])); }
break;
case 109:
/* Line 1806 of yacc.c */
#line 588 "ael.y"
{reset_argcount(parseio->scanner);}
break;
case 110:
/* Line 1806 of yacc.c */
#line 588 "ael.y"
{
/* XXX original code had @2 but i think we need @5 */
(yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
(yyval.pval)->u2.arglist = (yyvsp[(4) - (5)].pval);}
break;
case 111:
/* Line 1806 of yacc.c */
#line 593 "ael.y"
{
(yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); }
break;
case 112:
/* Line 1806 of yacc.c */
#line 601 "ael.y"
{reset_argcount(parseio->scanner);}
break;
case 113:
/* Line 1806 of yacc.c */
#line 601 "ael.y"
{
if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) {
(yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
free((yyvsp[(1) - (3)].str)); /* won't be using this */
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 );
} else {
(yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
} }
break;
case 114:
/* Line 1806 of yacc.c */
#line 612 "ael.y"
{
(yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)]));
if( (yyval.pval)->type == PV_GOTO )
(yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);
else
(yyval.pval)->u2.arglist = (yyvsp[(2) - (3)].pval);
}
break;
case 115:
/* Line 1806 of yacc.c */
#line 619 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
break;
case 116:
/* Line 1806 of yacc.c */
#line 622 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str) ;}
break;
case 117:
/* Line 1806 of yacc.c */
#line 623 "ael.y"
{ (yyval.str) = strdup(""); }
break;
case 118:
/* Line 1806 of yacc.c */
#line 626 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
break;
case 119:
/* Line 1806 of yacc.c */
#line 627 "ael.y"
{
(yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
(yyval.pval)->u1.str = strdup(""); }
break;
case 120:
/* Line 1806 of yacc.c */
#line 630 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
break;
case 121:
/* Line 1806 of yacc.c */
#line 633 "ael.y"
{ (yyval.pval) = NULL; }
break;
case 122:
/* Line 1806 of yacc.c */
#line 634 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
break;
case 123:
/* Line 1806 of yacc.c */
#line 637 "ael.y"
{
(yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */
(yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
(yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
break;
case 124:
/* Line 1806 of yacc.c */
#line 641 "ael.y"
{
(yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.str = NULL;
(yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
break;
case 125:
/* Line 1806 of yacc.c */
#line 645 "ael.y"
{
(yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */
(yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
(yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval);set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
break;
case 126:
/* Line 1806 of yacc.c */
#line 651 "ael.y"
{ (yyval.pval) = NULL; }
break;
case 127:
/* Line 1806 of yacc.c */
#line 652 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
break;
case 128:
/* Line 1806 of yacc.c */
#line 655 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 129:
/* Line 1806 of yacc.c */
#line 656 "ael.y"
{ (yyval.pval)=(yyvsp[(1) - (1)].pval);}
break;
case 130:
/* Line 1806 of yacc.c */
#line 657 "ael.y"
{
(yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
(yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
break;
case 131:
/* Line 1806 of yacc.c */
#line 663 "ael.y"
{
(yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
break;
case 132:
/* Line 1806 of yacc.c */
#line 668 "ael.y"
{
(yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
break;
case 133:
/* Line 1806 of yacc.c */
#line 673 "ael.y"
{ (yyval.pval) = NULL; }
break;
case 134:
/* Line 1806 of yacc.c */
#line 674 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (3)].pval),nword((yyvsp[(2) - (3)].str), &(yylsp[(2) - (3)]))); }
break;
case 135:
/* Line 1806 of yacc.c */
#line 675 "ael.y"
{
char *x;
if (asprintf(&x,"%s@%s", (yyvsp[(2) - (5)].str), (yyvsp[(4) - (5)].str)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed\n");
(yyval.pval) = NULL;
} else {
free((yyvsp[(2) - (5)].str));
free((yyvsp[(4) - (5)].str));
(yyval.pval) = linku1((yyvsp[(1) - (5)].pval),nword(x, &(yylsp[(2) - (5)])));
}
}
break;
case 136:
/* Line 1806 of yacc.c */
#line 686 "ael.y"
{(yyval.pval)=(yyvsp[(2) - (2)].pval);}
break;
case 137:
/* Line 1806 of yacc.c */
#line 689 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
break;
case 138:
/* Line 1806 of yacc.c */
#line 690 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
(yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval);
prev_word=0; /* XXX sure ? */ }
break;
case 139:
/* Line 1806 of yacc.c */
#line 697 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (2)].pval); }
break;
case 140:
/* Line 1806 of yacc.c */
#line 698 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); }
break;
case 141:
/* Line 1806 of yacc.c */
#line 699 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (2)].pval);}
break;
case 142:
/* Line 1806 of yacc.c */
#line 702 "ael.y"
{
(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
break;
case 143:
/* Line 1806 of yacc.c */
#line 705 "ael.y"
{
(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));}
break;
/* Line 1806 of yacc.c */
#line 3590 "ael.tab.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
*++yylsp = yyloc;
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if ! YYERROR_VERBOSE
yyerror (&yylloc, parseio, YY_("syntax error"));
#else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{
char const *yymsgp = YY_("syntax error");
int yysyntax_error_status;
yysyntax_error_status = YYSYNTAX_ERROR;
if (yysyntax_error_status == 0)
yymsgp = yymsg;
else if (yysyntax_error_status == 1)
{
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
if (!yymsg)
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
yysyntax_error_status = 2;
}
else
{
yysyntax_error_status = YYSYNTAX_ERROR;
yymsgp = yymsg;
}
}
yyerror (&yylloc, parseio, yymsgp);
if (yysyntax_error_status == 2)
goto yyexhaustedlab;
}
# undef YYSYNTAX_ERROR
#endif
}
yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
}
else
{
yydestruct ("Error: discarding",
yytoken, &yylval, &yylloc, parseio);
yychar = YYEMPTY;
}
}
/* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
/* Pacify compilers like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
yystate = *yyssp;
goto yyerrlab1;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, parseio);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
*++yyvsp = yylval;
yyerror_range[2] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the lookahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
*++yylsp = yyloc;
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (&yylloc, parseio, YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc, parseio);
}
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
yystos[*yyssp], yyvsp, yylsp, parseio);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
/* Make sure YYID is used. */
return YYID (yyresult);
}
| static char* yystpcpy | ( | char * | yydest, |
| const char * | yysrc | ||
| ) | [static] |
Definition at line 1268 of file ael.tab.c.
Referenced by yytnamerr().
{
char *yyd = yydest;
const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
Definition at line 1244 of file ael.tab.c.
References YYSIZE_T.
Referenced by yysyntax_error(), and yytnamerr().
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
continue;
return yylen;
}
| static int yysyntax_error | ( | YYSIZE_T * | yymsg_alloc, |
| char ** | yymsg, | ||
| yytype_int16 * | yyssp, | ||
| int | yytoken | ||
| ) | [static] |
Definition at line 1341 of file ael.tab.c.
References YY_, YYCASE_, YYEMPTY, YYLAST, YYNTOKENS, yypact_value_is_default, YYSIZE_T, YYSTACK_ALLOC_MAXIMUM, yystrlen(), yytable_value_is_error, YYTERROR, and yytnamerr().
{
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = 0;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
"expected"). */
int yycount = 0;
/* There are many possibilities here to consider:
- Assume YYFAIL is not used. It's too flawed to consider. See
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
for details. YYERROR is fine as it does not invoke this
function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
tokens because there are none.
- The only way there can be no lookahead present (in yychar) is if
this state is a consistent state with a default action. Thus,
detecting the absence of a lookahead is sufficient to determine
that there is no unexpected or expected token to report. In that
case, just report a simple "syntax error".
- Don't assume there isn't a lookahead just because this state is a
consistent state with a default action. There might have been a
previous inconsistent state, consistent state with a non-default
action, or user semantic action that manipulated yychar.
- Of course, the expected token list depends on states to have
correct lookahead information, and it depends on the parser not
to perform extra reductions after fetching a lookahead from the
scanner and before detecting a syntax error. Thus, state merging
(from LALR or IELR) and default reductions corrupt the expected
token list. However, the list is correct for canonical LR with
one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
*/
if (yytoken != YYEMPTY)
{
int yyn = yypact[*yyssp];
yyarg[yycount++] = yytname[yytoken];
if (!yypact_value_is_default (yyn))
{
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. In other words, skip the first -YYN actions for
this state because they are default actions. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yyx;
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
&& !yytable_value_is_error (yytable[yyx + yyn]))
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
break;
}
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
}
}
switch (yycount)
{
# define YYCASE_(N, S) \
case N: \
yyformat = S; \
break
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
# undef YYCASE_
}
yysize1 = yysize + yystrlen (yyformat);
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
if (*yymsg_alloc < yysize)
{
*yymsg_alloc = 2 * yysize;
if (! (yysize <= *yymsg_alloc
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
return 1;
}
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
{
char *yyp = *yymsg;
int yyi = 0;
while ((*yyp = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyformat += 2;
}
else
{
yyp++;
yyformat++;
}
}
return 0;
}
Definition at line 1293 of file ael.tab.c.
References YYSIZE_T, yystpcpy(), and yystrlen().
Referenced by yysyntax_error().
{
if (*yystr == '"')
{
YYSIZE_T yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
yyn++;
break;
case '"':
if (yyres)
yyres[yyn] = '\0';
return yyn;
}
do_not_strip_quotes: ;
}
if (! yyres)
return yystrlen (yystr);
return yystpcpy (yyres, yystr) - yyres;
}
char* token_equivs1[] [static] |
Definition at line 3830 of file ael.tab.c.
Referenced by ael_token_subst().
char* token_equivs2[] [static] |
const yytype_uint16 yycheck[] [static] |
const yytype_uint8 yydefact[] [static] |
const yytype_int16 yydefgoto[] [static] |
const yytype_int16 yypact[] [static] |
const yytype_int16 yypgoto[] [static] |
const yytype_uint8 yyr1[] [static] |
const yytype_uint8 yyr2[] [static] |
const yytype_uint8 yystos[] [static] |
const yytype_int16 yytable[] [static] |
const yytype_uint8 yytranslate[] [static] |