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) ((void) 0) |
| #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.4.1" |
| #define | yychar ael_yychar |
| #define | yyclearin (yychar = YYEMPTY) |
| #define | YYCOPY(To, From, Count) |
| #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 |
| #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 | 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 |
| #define | YYSTYPE_IS_DECLARED 1 |
| #define | YYSTYPE_IS_TRIVIAL 1 |
| #define | YYTABLE_NINF -134 |
| #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 YYSIZE_T | yysyntax_error (char *yyresult, int yystate, int yychar) |
| 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 329 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YY_STACK_PRINT | ( | Bottom, | |
| Top | |||
| ) |
| #define YY_SYMBOL_PRINT | ( | Title, | |
| Type, | |||
| Value, | |||
| Location | |||
| ) |
Definition at line 1193 of file ael.tab.c.
Referenced by yydestruct(), and yyparse().
| #define YYACCEPT goto yyacceptlab |
| #define YYLAST 371 |
Definition at line 489 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
| #define YYLLOC_DEFAULT | ( | Current, | |
| Rhs, | |||
| N | |||
| ) |
| #define YYNTOKENS 44 |
Definition at line 492 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYPACT_NINF -211 |
Definition at line 766 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYPOPSTACK | ( | N | ) | (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
| #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
Definition at line 319 of file ael.tab.c.
Referenced by yysyntax_error().
| #define YYSIZE_T unsigned int |
Definition at line 315 of file ael.tab.c.
Referenced by yyparse(), yystrlen(), yysyntax_error(), and yytnamerr().
| #define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| #define YYSTACK_BYTES | ( | N | ) |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM)
Definition at line 446 of file ael.tab.c.
Referenced by yyparse().
| #define YYSTACK_RELOCATE | ( | Stack_alloc, | |
| Stack | |||
| ) |
| #define YYTERROR 1 |
Definition at line 971 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Definition at line 504 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
| #define YYUSE | ( | e | ) | ((void) (e)) |
Definition at line 335 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 164 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 3853 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 5837 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 3908 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 3921 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);
}
Definition at line 3927 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 1439 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 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1465 "ael.tab.c"
break;
case 46: /* "objects" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1477 "ael.tab.c"
break;
case 47: /* "object" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1489 "ael.tab.c"
break;
case 48: /* "context_name" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1498 "ael.tab.c"
break;
case 49: /* "context" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1510 "ael.tab.c"
break;
case 51: /* "macro" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1522 "ael.tab.c"
break;
case 52: /* "globals" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1534 "ael.tab.c"
break;
case 53: /* "global_statements" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1546 "ael.tab.c"
break;
case 54: /* "assignment" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1558 "ael.tab.c"
break;
case 56: /* "local_assignment" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1570 "ael.tab.c"
break;
case 58: /* "arglist" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1582 "ael.tab.c"
break;
case 59: /* "elements" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1594 "ael.tab.c"
break;
case 60: /* "element" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1606 "ael.tab.c"
break;
case 61: /* "ignorepat" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1618 "ael.tab.c"
break;
case 62: /* "extension" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1630 "ael.tab.c"
break;
case 63: /* "statements" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1642 "ael.tab.c"
break;
case 64: /* "timerange" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1651 "ael.tab.c"
break;
case 65: /* "timespec" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1663 "ael.tab.c"
break;
case 66: /* "test_expr" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1672 "ael.tab.c"
break;
case 68: /* "if_like_head" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1684 "ael.tab.c"
break;
case 69: /* "word_list" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1693 "ael.tab.c"
break;
case 71: /* "word3_list" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1702 "ael.tab.c"
break;
case 72: /* "goto_word" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1711 "ael.tab.c"
break;
case 73: /* "switch_statement" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1723 "ael.tab.c"
break;
case 74: /* "statement" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1735 "ael.tab.c"
break;
case 79: /* "opt_else" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1747 "ael.tab.c"
break;
case 80: /* "target" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1759 "ael.tab.c"
break;
case 81: /* "opt_pri" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1768 "ael.tab.c"
break;
case 82: /* "jumptarget" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1780 "ael.tab.c"
break;
case 83: /* "macro_call" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1792 "ael.tab.c"
break;
case 85: /* "application_call_head" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1804 "ael.tab.c"
break;
case 87: /* "application_call" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1816 "ael.tab.c"
break;
case 88: /* "opt_word" */
/* Line 1000 of yacc.c */
#line 183 "ael.y"
{ free((yyvaluep->str));};
/* Line 1000 of yacc.c */
#line 1825 "ael.tab.c"
break;
case 89: /* "eval_arglist" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1837 "ael.tab.c"
break;
case 90: /* "case_statements" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1849 "ael.tab.c"
break;
case 91: /* "case_statement" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1861 "ael.tab.c"
break;
case 92: /* "macro_statements" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1873 "ael.tab.c"
break;
case 93: /* "macro_statement" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1885 "ael.tab.c"
break;
case 94: /* "switches" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1897 "ael.tab.c"
break;
case 95: /* "eswitches" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1909 "ael.tab.c"
break;
case 96: /* "switchlist" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1921 "ael.tab.c"
break;
case 97: /* "included_entry" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1933 "ael.tab.c"
break;
case 98: /* "includeslist" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1945 "ael.tab.c"
break;
case 99: /* "includes" */
/* Line 1000 of yacc.c */
#line 170 "ael.y"
{
destroy_pval((yyvaluep->pval));
prev_word=0;
};
/* Line 1000 of yacc.c */
#line 1957 "ael.tab.c"
break;
default:
break;
}
}
Definition at line 3896 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 | ( | ) |
| int yyparse | ( | struct parse_io * | parseio | ) |
Definition at line 2004 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_NINF, YYPOPSTACK, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yysyntax_error(), YYTABLE_NINF, 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[2];
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 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 (yyn == YYPACT_NINF)
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 (yyn == 0 || yyn == YYTABLE_NINF)
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 1455 of yacc.c */
#line 191 "ael.y"
{ (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); ;}
break;
case 3:
/* Line 1455 of yacc.c */
#line 194 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 4:
/* Line 1455 of yacc.c */
#line 195 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 5:
/* Line 1455 of yacc.c */
#line 196 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
break;
case 6:
/* Line 1455 of yacc.c */
#line 199 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 7:
/* Line 1455 of yacc.c */
#line 200 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 8:
/* Line 1455 of yacc.c */
#line 201 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 9:
/* Line 1455 of yacc.c */
#line 202 "ael.y"
{(yyval.pval)=0;/* allow older docs to be read */;}
break;
case 10:
/* Line 1455 of yacc.c */
#line 205 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
break;
case 11:
/* Line 1455 of yacc.c */
#line 206 "ael.y"
{ (yyval.str) = strdup("default"); ;}
break;
case 12:
/* Line 1455 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 1455 of yacc.c */
#line 218 "ael.y"
{ (yyval.intval) = 1; ;}
break;
case 14:
/* Line 1455 of yacc.c */
#line 219 "ael.y"
{ (yyval.intval) = 0; ;}
break;
case 15:
/* Line 1455 of yacc.c */
#line 220 "ael.y"
{ (yyval.intval) = 2; ;}
break;
case 16:
/* Line 1455 of yacc.c */
#line 221 "ael.y"
{ (yyval.intval)=3; ;}
break;
case 17:
/* Line 1455 of yacc.c */
#line 222 "ael.y"
{ (yyval.intval)=3; ;}
break;
case 18:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 237 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 21:
/* Line 1455 of yacc.c */
#line 238 "ael.y"
{(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 22:
/* Line 1455 of yacc.c */
#line 239 "ael.y"
{(yyval.pval)=(yyvsp[(2) - (2)].pval);;}
break;
case 23:
/* Line 1455 of yacc.c */
#line 242 "ael.y"
{ reset_semicount(parseio->scanner); ;}
break;
case 24:
/* Line 1455 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 1455 of yacc.c */
#line 248 "ael.y"
{ reset_semicount(parseio->scanner); ;}
break;
case 26:
/* Line 1455 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 1455 of yacc.c */
#line 255 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 28:
/* Line 1455 of yacc.c */
#line 256 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
break;
case 29:
/* Line 1455 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 1455 of yacc.c */
#line 258 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
break;
case 31:
/* Line 1455 of yacc.c */
#line 261 "ael.y"
{(yyval.pval)=0;;}
break;
case 32:
/* Line 1455 of yacc.c */
#line 262 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 33:
/* Line 1455 of yacc.c */
#line 263 "ael.y"
{ (yyval.pval)=(yyvsp[(2) - (2)].pval);;}
break;
case 34:
/* Line 1455 of yacc.c */
#line 266 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 35:
/* Line 1455 of yacc.c */
#line 267 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 36:
/* Line 1455 of yacc.c */
#line 268 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 37:
/* Line 1455 of yacc.c */
#line 269 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 38:
/* Line 1455 of yacc.c */
#line 270 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 39:
/* Line 1455 of yacc.c */
#line 271 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 40:
/* Line 1455 of yacc.c */
#line 272 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 41:
/* Line 1455 of yacc.c */
#line 273 "ael.y"
{free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;;}
break;
case 42:
/* Line 1455 of yacc.c */
#line 274 "ael.y"
{(yyval.pval)=0;/* allow older docs to be read */;}
break;
case 43:
/* Line 1455 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 1455 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 1455 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 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 313 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 50:
/* Line 1455 of yacc.c */
#line 314 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 51:
/* Line 1455 of yacc.c */
#line 315 "ael.y"
{(yyval.pval)=(yyvsp[(2) - (2)].pval);;}
break;
case 52:
/* Line 1455 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 1455 of yacc.c */
#line 331 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
break;
case 54:
/* Line 1455 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 1455 of yacc.c */
#line 343 "ael.y"
{ reset_parencount(parseio->scanner); ;}
break;
case 56:
/* Line 1455 of yacc.c */
#line 343 "ael.y"
{ (yyval.str) = (yyvsp[(3) - (4)].str); ;}
break;
case 57:
/* Line 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 364 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);;}
break;
case 61:
/* Line 1455 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 1455 of yacc.c */
#line 377 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
break;
case 63:
/* Line 1455 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 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 416 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);;}
break;
case 68:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 440 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);;}
break;
case 71:
/* Line 1455 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 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 473 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
break;
case 76:
/* Line 1455 of yacc.c */
#line 474 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
break;
case 77:
/* Line 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 484 "ael.y"
{reset_semicount(parseio->scanner);;}
break;
case 81:
/* Line 1455 of yacc.c */
#line 485 "ael.y"
{reset_semicount(parseio->scanner);;}
break;
case 82:
/* Line 1455 of yacc.c */
#line 486 "ael.y"
{reset_parencount(parseio->scanner);;}
break;
case 83:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 496 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
break;
case 86:
/* Line 1455 of yacc.c */
#line 497 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); ;}
break;
case 87:
/* Line 1455 of yacc.c */
#line 498 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
break;
case 88:
/* Line 1455 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 1455 of yacc.c */
#line 502 "ael.y"
{reset_semicount(parseio->scanner);;}
break;
case 90:
/* Line 1455 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 1455 of yacc.c */
#line 535 "ael.y"
{ (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
break;
case 92:
/* Line 1455 of yacc.c */
#line 536 "ael.y"
{ (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
break;
case 93:
/* Line 1455 of yacc.c */
#line 537 "ael.y"
{ (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
break;
case 94:
/* Line 1455 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 1455 of yacc.c */
#line 542 "ael.y"
{ (yyval.pval)=0; ;}
break;
case 96:
/* Line 1455 of yacc.c */
#line 545 "ael.y"
{ (yyval.pval) = (yyvsp[(2) - (2)].pval); ;}
break;
case 97:
/* Line 1455 of yacc.c */
#line 546 "ael.y"
{ (yyval.pval) = NULL ; ;}
break;
case 98:
/* Line 1455 of yacc.c */
#line 549 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
break;
case 99:
/* Line 1455 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 1455 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 1455 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 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 574 "ael.y"
{ (yyval.str) = strdup("1"); ;}
break;
case 106:
/* Line 1455 of yacc.c */
#line 575 "ael.y"
{ (yyval.str) = (yyvsp[(2) - (2)].str); ;}
break;
case 107:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 588 "ael.y"
{reset_argcount(parseio->scanner);;}
break;
case 110:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 601 "ael.y"
{reset_argcount(parseio->scanner);;}
break;
case 113:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 619 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
break;
case 116:
/* Line 1455 of yacc.c */
#line 622 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str) ;}
break;
case 117:
/* Line 1455 of yacc.c */
#line 623 "ael.y"
{ (yyval.str) = strdup(""); ;}
break;
case 118:
/* Line 1455 of yacc.c */
#line 626 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
break;
case 119:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 633 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 122:
/* Line 1455 of yacc.c */
#line 634 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 123:
/* Line 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 651 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 127:
/* Line 1455 of yacc.c */
#line 652 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 128:
/* Line 1455 of yacc.c */
#line 655 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 129:
/* Line 1455 of yacc.c */
#line 656 "ael.y"
{ (yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 130:
/* Line 1455 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 1455 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 1455 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 1455 of yacc.c */
#line 673 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 134:
/* Line 1455 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 1455 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 1455 of yacc.c */
#line 686 "ael.y"
{(yyval.pval)=(yyvsp[(2) - (2)].pval);;}
break;
case 137:
/* Line 1455 of yacc.c */
#line 689 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
break;
case 138:
/* Line 1455 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 1455 of yacc.c */
#line 697 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (2)].pval); ;}
break;
case 140:
/* Line 1455 of yacc.c */
#line 698 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); ;}
break;
case 141:
/* Line 1455 of yacc.c */
#line 699 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
break;
case 142:
/* Line 1455 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 1455 of yacc.c */
#line 705 "ael.y"
{
(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));;}
break;
/* Line 1455 of yacc.c */
#line 3551 "ael.tab.c"
default: break;
}
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:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if ! YYERROR_VERBOSE
yyerror (&yylloc, parseio, YY_("syntax error"));
#else
{
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
{
YYSIZE_T yyalloc = 2 * yysize;
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
yyalloc = YYSTACK_ALLOC_MAXIMUM;
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
if (yymsg)
yymsg_alloc = yyalloc;
else
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
}
}
if (0 < yysize && yysize <= yymsg_alloc)
{
(void) yysyntax_error (yymsg, yystate, yychar);
yyerror (&yylloc, parseio, yymsg);
}
else
{
yyerror (&yylloc, parseio, YY_("syntax error"));
if (yysize != 0)
goto yyexhaustedlab;
}
}
#endif
}
yyerror_range[0] = 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[0] = 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 (yyn != YYPACT_NINF)
{
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[0] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, parseio);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
*++yyvsp = yylval;
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the lookahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 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)
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 1254 of file ael.tab.c.
Referenced by yysyntax_error(), and yytnamerr().
{
char *yyd = yydest;
const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
| static YYSIZE_T yystrlen | ( | char * | yystr | ) | const [static] |
Definition at line 1230 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 YYSIZE_T yysyntax_error | ( | char * | yyresult, |
| int | yystate, | ||
| int | yychar | ||
| ) | [static] |
Definition at line 1326 of file ael.tab.c.
References YY_, YYLAST, YYNTOKENS, YYPACT_NINF, YYSIZE_MAXIMUM, YYSIZE_T, yystpcpy(), yystrlen(), YYTERROR, yytnamerr(), and YYTRANSLATE.
Referenced by yyparse().
{
int yyn = yypact[yystate];
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
return 0;
else
{
int yytype = YYTRANSLATE (yychar);
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
int yysize_overflow = 0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx;
# if 0
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */
YY_("syntax error, unexpected %s");
YY_("syntax error, unexpected %s, expecting %s");
YY_("syntax error, unexpected %s, expecting %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
char *yyfmt;
char const *yyf;
static char const yyunexpected[] = "syntax error, unexpected %s";
static char const yyexpecting[] = ", expecting %s";
static char const yyor[] = " or %s";
char yyformat[sizeof yyunexpected
+ sizeof yyexpecting - 1
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
* (sizeof yyor - 1))];
char const *yyprefix = yyexpecting;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
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 yycount = 1;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break;
}
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix);
yyprefix = yyor;
}
yyf = YY_(yyformat);
yysize1 = yysize + yystrlen (yyf);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
if (yysize_overflow)
return YYSIZE_MAXIMUM;
if (yyresult)
{
/* 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 = yyresult;
int yyi = 0;
while ((*yyp = *yyf) != '\0')
{
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
{
yyp++;
yyf++;
}
}
}
return yysize;
}
}
| static YYSIZE_T yytnamerr | ( | char * | yyres, |
| const char * | yystr | ||
| ) | [static] |
Definition at line 1279 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 3772 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] |