Asterisk - The Open Source Telephony Project
18.5.0
|
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 | ASTMM_LIBC ASTMM_REDIRECT |
#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 ASTMM_LIBC ASTMM_REDIRECT |
#define YY_ | ( | msgid | ) | msgid |
Definition at line 326 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
#define YY_LOCATION_PRINT | ( | File, | |
Loc | |||
) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top | |||
) |
#define YY_SYMBOL_PRINT | ( | Title, | |
Type, | |||
Value, | |||
Location | |||
) |
Definition at line 1207 of file ael.tab.c.
Referenced by yydestruct(), and yyparse().
#define YYACCEPT goto yyacceptlab |
#define YYCASE_ | ( | N, | |
S | |||
) |
Referenced by yysyntax_error().
#define YYEMPTY (-2) |
Definition at line 943 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
#define YYLAST 371 |
Definition at line 490 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 493 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
#define yypact_value_is_default | ( | yystate | ) | ((yystate) == (-211)) |
Definition at line 858 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
#define yyparse ael_yyparse |
Definition at line 65 of file ael.tab.c.
Referenced by yydestruct().
#define YYPOPSTACK | ( | N | ) | (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
Referenced by yyparse().
#define YYSIZE_T unsigned int |
Definition at line 312 of file ael.tab.c.
Referenced by yyparse(), yystpcpy(), yystrlen(), yysyntax_error(), and yytnamerr().
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
Definition at line 397 of file ael.tab.c.
Referenced by yysyntax_error().
#define YYSTACK_BYTES | ( | N | ) |
Definition at line 443 of file ael.tab.c.
Referenced by yyparse().
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack | |||
) |
#define YYSYNTAX_ERROR |
Referenced by yyparse().
#define yytable_value_is_error | ( | yytable_value | ) | YYID (0) |
Definition at line 861 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
#define YYTERROR 1 |
Definition at line 985 of file ael.tab.c.
Referenced by yyparse(), and yysyntax_error().
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define YYUSE | ( | e | ) | ((void) (e)) |
Definition at line 332 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 161 of file ael.tab.c.
|
static |
Definition at line 3910 of file ael.tab.c.
References calloc, len(), and token_equivs1.
Referenced by yyerror().
Definition at line 5922 of file pval.c.
References pval::next, pval::prev, and pval::u1_last.
Referenced by pvalAppCallAddArg(), pvalCasePatDefAddStatement(), pvalContextAddStatement(), pvalESwitchesAddSwitch(), pvalGlobalsAddStatement(), pvalIncludesAddInclude(), pvalIncludesAddIncludeWithTimeConstraints(), pvalMacroAddArg(), pvalMacroAddStatement(), pvalMacroCallAddArg(), pvalStatementBlockAddStatement(), pvalSwitchAddCase(), pvalSwitchesAddSwitch(), pvalTopLevAddObject(), and yyparse().
Definition at line 3965 of file ael.tab.c.
References calloc, pval::endcol, pval::endline, pval::filename, my_file, S_OR, pval::startcol, pval::startline, strdup, pval::type, and type.
Referenced by npval2(), and yyparse().
Definition at line 3978 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().
void reset_argcount | ( | yyscan_t | yyscanner | ) |
Definition at line 3349 of file ael_lex.c.
References argg, BEGIN, c_prevword(), parencount, pbcpos, and pbcpush().
Referenced by reset_semicount(), and yyparse().
void reset_parencount | ( | yyscan_t | yyscanner | ) |
Definition at line 3330 of file ael_lex.c.
References BEGIN, c_prevword(), paren, parencount, pbcpos, pbcpush(), and reset_semicount().
Referenced by c_prevword(), and yyparse().
void reset_semicount | ( | yyscan_t | yyscanner | ) |
Definition at line 3341 of file ael_lex.c.
References BEGIN, pbcpos, reset_argcount(), and semic.
Referenced by reset_parencount(), and yyparse().
Definition at line 4001 of file ael.tab.c.
References pval::dad, and pval::next.
Referenced by yyparse().
Definition at line 3984 of file ael.tab.c.
References pval::endcol, pval::endline, YYLTYPE::last_column, and YYLTYPE::last_line.
Referenced by yyparse().
|
static |
Definition at line 1479 of file ael.tab.c.
References destroy_pval(), free(), prev_word, YYSTYPE::pval, YYSTYPE::str, YY_SYMBOL_PRINT, yyparse, YYPARSE_PARAM, and YYUSE.
Referenced by yyparse(), and yysyntax_error().
Definition at line 3953 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, my_file, and parse_io::syntax_error_count.
int yyparse | ( | ) |
int yyparse | ( | struct parse_io * | parseio | ) |
Definition at line 2042 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(), my_file, pval::next, npval(), npval2(), NULL, 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, parse_io::pval, YYSTYPE::pval, reset_argcount(), reset_parencount(), reset_semicount(), parse_io::scanner, set_dads(), pval::statements, pval::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.
|
static |
Definition at line 1267 of file ael.tab.c.
References YYSIZE_T.
Referenced by yystrlen(), and yytnamerr().
|
static |
Definition at line 1243 of file ael.tab.c.
References YYSIZE_T, and yystpcpy().
Referenced by yysyntax_error(), and yytnamerr().
|
static |
Definition at line 1340 of file ael.tab.c.
References YY_, YYCASE_, yydestruct(), YYEMPTY, YYLAST, YYNTOKENS, yypact_value_is_default, YYSIZE_T, YYSTACK_ALLOC_MAXIMUM, yystrlen(), yytable_value_is_error, YYTERROR, and yytnamerr().
|
static |
Definition at line 1292 of file ael.tab.c.
References YYSIZE_T, yystpcpy(), and yystrlen().
Referenced by yysyntax_error().
struct ast_flags ast_compat |
char* my_file |
Definition at line 888 of file ael_lex.c.
Referenced by ael2_parse(), npval(), setup_filestack(), while(), yyerror(), and yyparse().
|
static |
Definition at line 3829 of file ael.tab.c.
Referenced by ael_token_subst().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |