Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
aelbison.c File Reference

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,
  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, 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
}
 

Functions

static char * ael_token_subst (const char *mess)
 
int ael_yylex (YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner)
 
pvallinku1 (pval *head, pval *tail)
 
pvalnpval (pvaltype type, int first_line, int last_line, int first_column, int last_column)
 
static pvalnpval2 (pvaltype type, YYLTYPE *first, YYLTYPE *last)
 
static pvalnword (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 pvalupdate_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 []
 

Detailed Description

Bison Grammar description of AEL2.

Definition in file aelbison.c.

Macro Definition Documentation

#define YY_LOCATION_PRINT (   File,
  Loc 
)
Value:
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)

Definition at line 1021 of file aelbison.c.

#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break
#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)

Definition at line 443 of file aelbison.c.

#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)