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 |
Macros | |
#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 } |
Bison Grammar description of AEL2.
Definition in file ael.tab.c.
#define YY_LOCATION_PRINT | ( | File, | |
Loc | |||
) |
#define YYABORT goto yyabortlab |
#define YYCASE_ | ( | N, | |
S | |||
) |
Referenced by yysyntax_error().
#define YYEMPTY (-2) |
Definition at line 944 of file ael.tab.c.
Referenced by if(), and yysyntax_error().
#define yyerrok (yyerrstatus = 0) |
#define YYLAST 371 |
Definition at line 491 of file ael.tab.c.
Referenced by for(), and yysyntax_error().
#define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
#define YYNTOKENS 44 |
Definition at line 494 of file ael.tab.c.
Referenced by yysyntax_error().
Definition at line 859 of file ael.tab.c.
Referenced by for(), and yysyntax_error().
#define yyparse ael_yyparse |
#define YYRECOVERING | ( | ) | (!!yyerrstatus) |
#define YYSIZE_T unsigned int |
Definition at line 313 of file ael.tab.c.
Referenced by if(), yysyntax_error(), and yytnamerr().
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
Definition at line 398 of file ael.tab.c.
Referenced by yysyntax_error().
#define YYSTACK_BYTES | ( | N | ) |
Definition at line 444 of file ael.tab.c.
Referenced by if().
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack | |||
) |
#define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
#define YYSYNTAX_ERROR |
Referenced by if().
#define yytable_value_is_error | ( | yytable_value | ) | YYID (0) |
Definition at line 862 of file ael.tab.c.
Referenced by if(), and yysyntax_error().
#define YYTERROR 1 |
Definition at line 986 of file ael.tab.c.
Referenced by for(), and yysyntax_error().
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
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.
|
static |
Definition at line 3911 of file ael.tab.c.
References calloc, len(), and token_equivs1.
Referenced by yyerror().
for | ( | ;; | ) |
Definition at line 3728 of file ael.tab.c.
References YY_STACK_PRINT, YYABORT, yydestruct(), YYLAST, yylsp, yyn, yypact_value_is_default, YYPOPSTACK, yyssp, yystate, and YYTERROR.
if | ( | yyss+yystacksize-1<= | yyssp | ) |
Definition at line 2154 of file ael.tab.c.
References YY_, YYABORT, YYDPRINTF, yyls, yyalloc::yyls_alloc, YYMAXDEPTH, YYSIZE_T, yyss, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yyvs, and yyalloc::yyvs_alloc.
if | ( | yyn<= | 0 | ) |
if | ( | ! | yyerrstatus | ) |
Definition at line 3636 of file ael.tab.c.
References YY_, yyerror, yymsg, yymsgbuf, yynerrs, YYSTACK_ALLOC, YYSTACK_FREE, and YYSYNTAX_ERROR.
if | ( | yyerrstatus | = = 3 | ) |
Definition at line 3966 of file ael.tab.c.
References calloc, pval::endcol, pval::endline, pval::filename, first_column, first_line, S_OR, pval::startcol, pval::startline, strdup, pval::type, and type.
Referenced by npval2(), and switch().
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 switch().
void reset_argcount | ( | yyscan_t | yyscanner | ) |
Definition at line 3333 of file ael_lex.c.
References argg, BEGIN, c_prevword(), and pbcpush().
Referenced by switch().
void reset_parencount | ( | yyscan_t | yyscanner | ) |
Definition at line 3314 of file ael_lex.c.
References BEGIN, c_prevword(), paren, and pbcpush().
Referenced by switch().
void reset_semicount | ( | yyscan_t | yyscanner | ) |
Definition at line 4002 of file ael.tab.c.
References pval::dad, and pval::next.
Referenced by switch().
switch | ( | yytype | ) |
Definition at line 1496 of file ael.tab.c.
References destroy_pval(), free, prev_word, YYSTYPE::pval, and YYSTYPE::str.
switch | ( | yyn | ) |
Definition at line 2321 of file ael.tab.c.
References pval::arglist, asprintf(), ast_log(), calloc, destroy_pval(), first_column, first_line, pval::for_init, free, YYSTYPE::intval, 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(), and pval::val.
Definition at line 3985 of file ael.tab.c.
References pval::endcol, pval::endline, YYLTYPE::last_column, and YYLTYPE::last_line.
Referenced by switch().
while | ( | yyssp! | = yyss | ) |
Definition at line 3806 of file ael.tab.c.
References yydestruct(), and YYPOPSTACK.
yyexhaustedlab YY_ | ( | "memory exhausted" | ) |
YY_REDUCE_PRINT | ( | yyn | ) |
YY_SYMBOL_PRINT | ( | yymsg | , |
yytype | , | ||
yyvaluep | , | ||
yylocationp | |||
) |
YY_SYMBOL_PRINT | ( | "Next token is" | , |
yytoken | , | ||
& | yylval, | ||
& | yylloc | ||
) |
YY_SYMBOL_PRINT | ( | "Shifting" | , |
yytoken | , | ||
& | yylval, | ||
& | yylloc | ||
) |
YY_SYMBOL_PRINT | ( | ) |
YYDPRINTF | ( | (stderr,"Starting parse\n") | ) |
YYDPRINTF | ( | (stderr,"Entering state %d\n", yystate) | ) |
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.
return YYID | ( | yyresult | ) |
YYLLOC_DEFAULT | ( | yyloc | , |
yyerror_range | , | ||
2 | |||
) |
int yyparse | ( | ) |
YYPOPSTACK | ( | yylen | ) |
YYSTACK_FREE | ( | yyss | ) |
YYSTACK_FREE | ( | yymsg | ) |
|
static |
Definition at line 1341 of file ael.tab.c.
References YY_, YYCASE_, YYEMPTY, YYLAST, yymsg, yyn, YYNTOKENS, yypact_value_is_default, YYSIZE_T, yyssp, YYSTACK_ALLOC_MAXIMUM, yytable_value_is_error, YYTERROR, yytnamerr(), and yytoken.
|
static |
YYUSE | ( | yylocationp | ) |
YYUSE | ( | parseio | ) |
yynewstate __pad0__ |
yysetstate __pad1__ |
continue |
else |
|
static |
Definition at line 3830 of file ael.tab.c.
Referenced by ael_token_subst().
|
static |
|
static |
|
static |
YYLTYPE yylsa[YYINITDEPTH] |
YYSTYPE yylval |
|
static |
Definition at line 1481 of file ael.tab.c.
Referenced by if(), and yysyntax_error().
|
static |
|
static |
|
static |
|
static |
yytype_int16 yyssa[YYINITDEPTH] |
yystacksize = YYINITDEPTH |
|
static |
|
static |
Definition at line 1245 of file ael.tab.c.
Referenced by yytnamerr().
|
static |
|
static |
YYSTYPE yyvsa[YYINITDEPTH] |