Asterisk - The Open Source Telephony Project  18.5.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ael.tab.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"
Include dependency graph for ael.tab.c:

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)
 
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 ael.tab.c.

Macro Definition Documentation

◆ ASTMM_LIBC

#define ASTMM_LIBC   ASTMM_REDIRECT

Definition at line 102 of file ael.tab.c.

◆ YY_

#define YY_ (   msgid)    msgid

Definition at line 326 of file ael.tab.c.

Referenced by yyparse(), and yysyntax_error().

◆ YY_LOCATION_PRINT

#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 ael.tab.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1209 of file ael.tab.c.

Referenced by yyparse().

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1208 of file ael.tab.c.

Referenced by yyparse().

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 1207 of file ael.tab.c.

Referenced by yydestruct(), and yyparse().

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 947 of file ael.tab.c.

Referenced by yyparse().

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 946 of file ael.tab.c.

Referenced by yyparse().

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)

Definition at line 968 of file ael.tab.c.

◆ YYBISON

#define YYBISON   1

Definition at line 44 of file ael.tab.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "2.5"

Definition at line 47 of file ael.tab.c.

◆ YYCASE_

#define YYCASE_ (   N,
  S 
)
Value:
case N: \
yyformat = S; \
break
#define S(e)

Referenced by yysyntax_error().

◆ yychar

#define yychar   ael_yychar

Definition at line 69 of file ael.tab.c.

Referenced by yyparse().

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 942 of file ael.tab.c.

◆ YYCOPY

#define YYCOPY (   To,
  From,
  Count 
)

Definition at line 475 of file ael.tab.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 447 of file ael.tab.c.

◆ yydebug

#define yydebug   ael_yydebug

Definition at line 70 of file ael.tab.c.

◆ YYDEBUG

#define YYDEBUG   0

Definition at line 139 of file ael.tab.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 1206 of file ael.tab.c.

Referenced by yyparse().

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 943 of file ael.tab.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYEOF

#define YYEOF   0

Definition at line 944 of file ael.tab.c.

Referenced by yyparse().

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 986 of file ael.tab.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 941 of file ael.tab.c.

◆ yyerror

#define yyerror   ael_yyerror

Definition at line 67 of file ael.tab.c.

Referenced by yyparse().

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 948 of file ael.tab.c.

◆ YYERROR_VERBOSE [1/2]

#define YYERROR_VERBOSE   1

Definition at line 145 of file ael.tab.c.

◆ YYERROR_VERBOSE [2/2]

#define YYERROR_VERBOSE   1

Definition at line 145 of file ael.tab.c.

◆ YYFAIL

#define YYFAIL   goto yyerrlab

Definition at line 958 of file ael.tab.c.

◆ YYFINAL

#define YYFINAL   17

Definition at line 488 of file ael.tab.c.

Referenced by yyparse().

◆ YYFREE

#define YYFREE   free

Definition at line 415 of file ael.tab.c.

◆ YYID

#define YYID (   n)    (n)

Definition at line 339 of file ael.tab.c.

Referenced by yyparse().

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1215 of file ael.tab.c.

Referenced by yyparse().

◆ YYLAST

#define YYLAST   371

Definition at line 490 of file ael.tab.c.

Referenced by yyparse(), and yysyntax_error().

◆ yylex

#define yylex   ael_yylex

Definition at line 66 of file ael.tab.c.

◆ YYLEX

#define YYLEX   yylex (&yylval, &yylloc, YYLEX_PARAM)

Definition at line 1034 of file ael.tab.c.

Referenced by yyparse().

◆ YYLEX_PARAM

#define YYLEX_PARAM   ((struct parse_io *)parseio)->scanner

Definition at line 123 of file ael.tab.c.

◆ yylloc

#define yylloc   ael_yylloc

Definition at line 72 of file ael.tab.c.

Referenced by yyparse().

◆ YYLLOC_DEFAULT

#define YYLLOC_DEFAULT (   Current,
  Rhs,
 
)

Definition at line 995 of file ael.tab.c.

Referenced by yyparse().

◆ YYLSP_NEEDED

#define YYLSP_NEEDED   1

Definition at line 62 of file ael.tab.c.

◆ yyltype

#define yyltype   YYLTYPE /* obsolescent; will be withdrawn */

Definition at line 237 of file ael.tab.c.

◆ YYLTYPE_IS_DECLARED

#define YYLTYPE_IS_DECLARED   1

Definition at line 238 of file ael.tab.c.

◆ YYLTYPE_IS_TRIVIAL

#define YYLTYPE_IS_TRIVIAL   1

Definition at line 239 of file ael.tab.c.

◆ yylval

#define yylval   ael_yylval

Definition at line 68 of file ael.tab.c.

Referenced by yyparse().

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 408 of file ael.tab.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1226 of file ael.tab.c.

Referenced by yyparse().

◆ YYMAXUTOK

#define YYMAXUTOK   298

Definition at line 503 of file ael.tab.c.

◆ yynerrs

#define yynerrs   ael_yynerrs

Definition at line 71 of file ael.tab.c.

Referenced by yyparse().

◆ YYNNTS

#define YYNNTS   56

Definition at line 495 of file ael.tab.c.

◆ YYNRULES

#define YYNRULES   143

Definition at line 497 of file ael.tab.c.

◆ YYNSTATES

#define YYNSTATES   283

Definition at line 499 of file ael.tab.c.

◆ YYNTOKENS

#define YYNTOKENS   44

Definition at line 493 of file ael.tab.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYPACT_NINF

#define YYPACT_NINF   -211

Definition at line 767 of file ael.tab.c.

◆ yypact_value_is_default

#define yypact_value_is_default (   yystate)    ((yystate) == (-211))

Definition at line 858 of file ael.tab.c.

Referenced by yyparse(), and yysyntax_error().

◆ yyparse

#define yyparse   ael_yyparse

Definition at line 65 of file ael.tab.c.

Referenced by yydestruct().

◆ YYPOPSTACK

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N), yylsp -= (N))

Referenced by yyparse().

◆ YYPULL

#define YYPULL   1

Definition at line 59 of file ael.tab.c.

◆ YYPURE

#define YYPURE   1

Definition at line 53 of file ael.tab.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 56 of file ael.tab.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 966 of file ael.tab.c.

◆ YYRHSLOC

#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K])

Definition at line 993 of file ael.tab.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 316 of file ael.tab.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned int

Definition at line 312 of file ael.tab.c.

Referenced by yyparse(), yystpcpy(), yystrlen(), yysyntax_error(), and yytnamerr().

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file ael.tab.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 394 of file ael.tab.c.

Referenced by yyparse().

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 397 of file ael.tab.c.

Referenced by yysyntax_error().

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
#define YYSTACK_GAP_MAXIMUM
Definition: ael.tab.c:439
short int yytype_int16
Definition: ast_expr2.c:544
union YYSTYPE YYSTYPE

Definition at line 443 of file ael.tab.c.

Referenced by yyparse().

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 395 of file ael.tab.c.

Referenced by yyparse().

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 439 of file ael.tab.c.

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)

Definition at line 454 of file ael.tab.c.

Referenced by yyparse().

◆ yystype

#define yystype   YYSTYPE /* obsolescent; will be withdrawn */

Definition at line 225 of file ael.tab.c.

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

Definition at line 226 of file ael.tab.c.

◆ YYSTYPE_IS_TRIVIAL

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 224 of file ael.tab.c.

◆ YYSYNTAX_ERROR

#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: ael.tab.c:1340

Referenced by yyparse().

◆ YYTABLE_NINF

#define YYTABLE_NINF   -134

Definition at line 815 of file ael.tab.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   yytable_value)    YYID (0)

Definition at line 861 of file ael.tab.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYTERROR

#define YYTERROR   1

Definition at line 985 of file ael.tab.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYTOKEN_TABLE

#define YYTOKEN_TABLE   0

Definition at line 152 of file ael.tab.c.

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 158 of file ael.tab.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 505 of file ael.tab.c.

Referenced by yyparse().

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 502 of file ael.tab.c.

◆ YYUSE

#define YYUSE (   e)    ((void) (e))

Definition at line 332 of file ael.tab.c.

Referenced by yydestruct().

Typedef Documentation

◆ YYLTYPE

typedef struct YYLTYPE YYLTYPE

◆ YYSTYPE

typedef union YYSTYPE YYSTYPE

◆ yytype_int16

typedef short int yytype_int16

Definition at line 299 of file ael.tab.c.

◆ yytype_int8

typedef short int yytype_int8

Definition at line 287 of file ael.tab.c.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 293 of file ael.tab.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 278 of file ael.tab.c.

Enumeration Type Documentation

◆ yytokentype

Enumerator
TOK_COMMA 
TOK_COLONCOLON 
TOK_COND 
TOK_OR 
TOK_AND 
TOK_NE 
TOK_LE 
TOK_GE 
TOK_LT 
TOK_GT 
TOK_EQ 
TOK_MINUS 
TOK_PLUS 
TOK_MOD 
TOK_DIV 
TOK_MULT 
TOK_COMPL 
TOK_TILDETILDE 
TOK_EQTILDE 
TOK_COLON 
TOK_LP 
TOK_RP 
TOKEN 
TOK_COMMA 
TOK_COLONCOLON 
TOK_COND 
TOK_OR 
TOK_AND 
TOK_NE 
TOK_LE 
TOK_GE 
TOK_LT 
TOK_GT 
TOK_EQ 
TOK_MINUS 
TOK_PLUS 
TOK_MOD 
TOK_DIV 
TOK_MULT 
TOK_COMPL 
TOK_TILDETILDE 
TOK_EQTILDE 
TOK_COLON 
TOK_LP 
TOK_RP 
TOKEN 
KW_CONTEXT 
LC 
RC 
LP 
RP 
SEMI 
EQ 
COMMA 
COLON 
AMPER 
BAR 
AT 
KW_MACRO 
KW_GLOBALS 
KW_IGNOREPAT 
KW_SWITCH 
KW_IF 
KW_IFTIME 
KW_ELSE 
KW_RANDOM 
KW_ABSTRACT 
KW_EXTEND 
EXTENMARK 
KW_GOTO 
KW_JUMP 
KW_RETURN 
KW_BREAK 
KW_CONTINUE 
KW_REGEXTEN 
KW_HINT 
KW_FOR 
KW_WHILE 
KW_CASE 
KW_PATTERN 
KW_DEFAULT 
KW_CATCH 
KW_SWITCHES 
KW_ESWITCHES 
KW_INCLUDES 
KW_LOCAL 
word 
KW_CONTEXT 
LC 
RC 
LP 
RP 
SEMI 
EQ 
COMMA 
COLON 
AMPER 
BAR 
AT 
KW_MACRO 
KW_GLOBALS 
KW_IGNOREPAT 
KW_SWITCH 
KW_IF 
KW_IFTIME 
KW_ELSE 
KW_RANDOM 
KW_ABSTRACT 
KW_EXTEND 
EXTENMARK 
KW_GOTO 
KW_JUMP 
KW_RETURN 
KW_BREAK 
KW_CONTINUE 
KW_REGEXTEN 
KW_HINT 
KW_FOR 
KW_WHILE 
KW_CASE 
KW_PATTERN 
KW_DEFAULT 
KW_CATCH 
KW_SWITCHES 
KW_ESWITCHES 
KW_INCLUDES 
KW_LOCAL 
word 

Definition at line 161 of file ael.tab.c.

161  {
162  KW_CONTEXT = 258,
163  LC = 259,
164  RC = 260,
165  LP = 261,
166  RP = 262,
167  SEMI = 263,
168  EQ = 264,
169  COMMA = 265,
170  COLON = 266,
171  AMPER = 267,
172  BAR = 268,
173  AT = 269,
174  KW_MACRO = 270,
175  KW_GLOBALS = 271,
176  KW_IGNOREPAT = 272,
177  KW_SWITCH = 273,
178  KW_IF = 274,
179  KW_IFTIME = 275,
180  KW_ELSE = 276,
181  KW_RANDOM = 277,
182  KW_ABSTRACT = 278,
183  KW_EXTEND = 279,
184  EXTENMARK = 280,
185  KW_GOTO = 281,
186  KW_JUMP = 282,
187  KW_RETURN = 283,
188  KW_BREAK = 284,
189  KW_CONTINUE = 285,
190  KW_REGEXTEN = 286,
191  KW_HINT = 287,
192  KW_FOR = 288,
193  KW_WHILE = 289,
194  KW_CASE = 290,
195  KW_PATTERN = 291,
196  KW_DEFAULT = 292,
197  KW_CATCH = 293,
198  KW_SWITCHES = 294,
199  KW_ESWITCHES = 295,
200  KW_INCLUDES = 296,
201  KW_LOCAL = 297,
202  word = 298
203  };
Definition: ael.tab.c:167
Definition: ael.tab.c:165
Definition: ael.tab.c:168
Definition: ael.tab.c:170
Definition: ael.tab.c:166
Definition: ael.tab.c:173
Definition: ael.tab.c:171
Definition: ael.tab.c:172
Definition: ael.tab.c:169
Definition: ael.tab.c:164
Definition: ael.tab.c:178
Definition: ael.tab.c:163
short word

Function Documentation

◆ ael_token_subst()

static char * ael_token_subst ( const char *  mess)
static

Definition at line 3910 of file ael.tab.c.

References calloc, len(), and token_equivs1.

Referenced by yyerror().

3911 {
3912  /* calc a length, malloc, fill, and return; yyerror had better free it! */
3913  int len=0,i;
3914  const char *p;
3915  char *res, *s,*t;
3916  int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*);
3917 
3918  for (p=mess; *p; p++) {
3919  for (i=0; i<token_equivs_entries; i++) {
3920  if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 )
3921  {
3922  len+=strlen(token_equivs2[i])+2;
3923  p += strlen(token_equivs1[i])-1;
3924  break;
3925  }
3926  }
3927  len++;
3928  }
3929  res = calloc(1, len+1);
3930  res[0] = 0;
3931  s = res;
3932  for (p=mess; *p;) {
3933  int found = 0;
3934  for (i=0; i<token_equivs_entries; i++) {
3935  if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) {
3936  *s++ = '\'';
3937  for (t=token_equivs2[i]; *t;) {
3938  *s++ = *t++;
3939  }
3940  *s++ = '\'';
3941  p += strlen(token_equivs1[i]);
3942  found = 1;
3943  break;
3944  }
3945  }
3946  if( !found )
3947  *s++ = *p++;
3948  }
3949  *s++ = 0;
3950  return res;
3951 }
#define calloc(a, b)
Definition: astmm.h:157
static char * token_equivs1[]
Definition: ael.tab.c:3829
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
static char * token_equivs2[]
Definition: ael.tab.c:3869

◆ ael_yylex()

int ael_yylex ( YYSTYPE yylval_param,
YYLTYPE yylloc_param,
void *  yyscanner 
)

◆ linku1()

pval* linku1 ( pval head,
pval tail 
)

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().

5923 {
5924  if (!head)
5925  return tail;
5926  if (tail) {
5927  if (!head->next) {
5928  head->next = tail;
5929  } else {
5930  head->u1_last->next = tail;
5931  }
5932  head->u1_last = tail;
5933  tail->prev = head; /* the dad link only points to containers */
5934  }
5935  return head;
5936 }
struct pval * u1_last
Definition: pval.h:64
struct pval * prev
Definition: pval.h:97
struct pval * next
Definition: pval.h:93

◆ npval()

pval* npval ( pvaltype  type,
int  first_line,
int  last_line,
int  first_column,
int  last_column 
)

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().

3967 {
3968  pval *z = calloc(1, sizeof(struct pval));
3969  z->type = type;
3970  z->startline = first_line;
3971  z->endline = last_line;
3972  z->startcol = first_column;
3973  z->endcol = last_column;
3974  z->filename = strdup(S_OR(my_file, "<none>"));
3975  return z;
3976 }
static const char type[]
Definition: chan_ooh323.c:109
int startline
Definition: pval.h:51
#define calloc(a, b)
Definition: astmm.h:157
char * filename
Definition: pval.h:55
char * my_file
Definition: ael_lex.c:888
Definition: pval.h:48
int endcol
Definition: pval.h:54
pvaltype type
Definition: pval.h:50
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
Definition: strings.h:79
#define strdup(a)
Definition: astmm.h:165
int endline
Definition: pval.h:52
int startcol
Definition: pval.h:53

◆ npval2()

static struct pval * npval2 ( pvaltype  type,
YYLTYPE first,
YYLTYPE last 
)
static

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().

3979 {
3980  return npval(type, first->first_line, last->last_line,
3981  first->first_column, last->last_column);
3982 }
static const char type[]
Definition: chan_ooh323.c:109
int last_line
Definition: ast_expr2.h:97
int last_column
Definition: ast_expr2.h:98
int first_line
Definition: ast_expr2.h:95
int first_column
Definition: ast_expr2.h:96
pval * npval(pvaltype type, int first_line, int last_line, int first_column, int last_column)
Definition: ael.tab.c:3965

◆ nword()

static pval * nword ( char *  string,
YYLTYPE pos 
)
static

Definition at line 3992 of file ael.tab.c.

References npval2(), PV_WORD, pval::str, string, and pval::u1.

Referenced by yyparse().

3993 {
3994  pval *p = npval2(PV_WORD, pos, pos);
3995  if (p)
3996  p->u1.str = string;
3997  return p;
3998 }
union pval::@285 u1
const char * string
Definition: presencestate.c:71
Definition: pval.h:8
char * str
Definition: pval.h:59
Definition: pval.h:48
static pval * npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last)
Definition: ael.tab.c:3978

◆ reset_argcount()

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().

3350 {
3351  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3352  parencount = 0;
3353  pbcpos = 0;
3354  pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
3355  c_prevword();
3356  BEGIN(argg);
3357 }
static int parencount
Definition: ael_lex.c:862
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define argg
Definition: ael_lex.c:975
static void pbcpush(char x)
Definition: ael_lex.c:3237
static int pbcpos
Definition: ael_lex.c:859
static int c_prevword(void)
Definition: ael_lex.c:3291

◆ reset_parencount()

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().

3331 {
3332  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3333  parencount = 0;
3334  pbcpos = 0;
3335  pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
3336  c_prevword();
3337  BEGIN(paren);
3338 }
static int parencount
Definition: ael_lex.c:862
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static void pbcpush(char x)
Definition: ael_lex.c:3237
static int pbcpos
Definition: ael_lex.c:859
static int c_prevword(void)
Definition: ael_lex.c:3291
#define paren
Definition: ael_lex.c:973

◆ reset_semicount()

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().

3342 {
3343  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3344  pbcpos = 0;
3345  BEGIN(semic);
3346 }
#define semic
Definition: ael_lex.c:974
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static int pbcpos
Definition: ael_lex.c:859

◆ set_dads()

static void set_dads ( pval dad,
pval child_list 
)
static

Definition at line 4001 of file ael.tab.c.

References pval::dad, and pval::next.

Referenced by yyparse().

4002 {
4003  struct pval *t;
4004 
4005  for(t=child_list;t;t=t->next) /* simple stuff */
4006  t->dad = dad;
4007 }
struct pval * dad
Definition: pval.h:96
Definition: pval.h:48
struct pval * next
Definition: pval.h:93

◆ update_last()

static struct pval * update_last ( pval obj,
YYLTYPE last 
)
static

Definition at line 3984 of file ael.tab.c.

References pval::endcol, pval::endline, YYLTYPE::last_column, and YYLTYPE::last_line.

Referenced by yyparse().

3985 {
3986  obj->endline = last->last_line;
3987  obj->endcol = last->last_column;
3988  return obj;
3989 }
int last_line
Definition: ast_expr2.h:97
int last_column
Definition: ast_expr2.h:98
int endcol
Definition: pval.h:54
int endline
Definition: pval.h:52

◆ yydestruct()

static void yydestruct ( char *  yymsg,
int  yytype,
YYSTYPE yyvaluep,
YYLTYPE yylocationp,
struct parse_io parseio 
) const
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().

1486 {
1487  YYUSE (yyvaluep);
1488  YYUSE (yylocationp);
1489  YYUSE (parseio);
1490 
1491  if (!yymsg)
1492  yymsg = "Deleting";
1493  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1494 
1495  switch (yytype)
1496  {
1497  case 43: /* "word" */
1498 
1499 /* Line 1391 of yacc.c */
1500 #line 183 "ael.y"
1501  { free((yyvaluep->str));};
1502 
1503 /* Line 1391 of yacc.c */
1504 #line 1506 "ael.tab.c"
1505  break;
1506  case 46: /* "objects" */
1507 
1508 /* Line 1391 of yacc.c */
1509 #line 170 "ael.y"
1510  {
1511  destroy_pval((yyvaluep->pval));
1512  prev_word=0;
1513  };
1514 
1515 /* Line 1391 of yacc.c */
1516 #line 1518 "ael.tab.c"
1517  break;
1518  case 47: /* "object" */
1519 
1520 /* Line 1391 of yacc.c */
1521 #line 170 "ael.y"
1522  {
1523  destroy_pval((yyvaluep->pval));
1524  prev_word=0;
1525  };
1526 
1527 /* Line 1391 of yacc.c */
1528 #line 1530 "ael.tab.c"
1529  break;
1530  case 48: /* "context_name" */
1531 
1532 /* Line 1391 of yacc.c */
1533 #line 183 "ael.y"
1534  { free((yyvaluep->str));};
1535 
1536 /* Line 1391 of yacc.c */
1537 #line 1539 "ael.tab.c"
1538  break;
1539  case 49: /* "context" */
1540 
1541 /* Line 1391 of yacc.c */
1542 #line 170 "ael.y"
1543  {
1544  destroy_pval((yyvaluep->pval));
1545  prev_word=0;
1546  };
1547 
1548 /* Line 1391 of yacc.c */
1549 #line 1551 "ael.tab.c"
1550  break;
1551  case 51: /* "macro" */
1552 
1553 /* Line 1391 of yacc.c */
1554 #line 170 "ael.y"
1555  {
1556  destroy_pval((yyvaluep->pval));
1557  prev_word=0;
1558  };
1559 
1560 /* Line 1391 of yacc.c */
1561 #line 1563 "ael.tab.c"
1562  break;
1563  case 52: /* "globals" */
1564 
1565 /* Line 1391 of yacc.c */
1566 #line 170 "ael.y"
1567  {
1568  destroy_pval((yyvaluep->pval));
1569  prev_word=0;
1570  };
1571 
1572 /* Line 1391 of yacc.c */
1573 #line 1575 "ael.tab.c"
1574  break;
1575  case 53: /* "global_statements" */
1576 
1577 /* Line 1391 of yacc.c */
1578 #line 170 "ael.y"
1579  {
1580  destroy_pval((yyvaluep->pval));
1581  prev_word=0;
1582  };
1583 
1584 /* Line 1391 of yacc.c */
1585 #line 1587 "ael.tab.c"
1586  break;
1587  case 54: /* "assignment" */
1588 
1589 /* Line 1391 of yacc.c */
1590 #line 170 "ael.y"
1591  {
1592  destroy_pval((yyvaluep->pval));
1593  prev_word=0;
1594  };
1595 
1596 /* Line 1391 of yacc.c */
1597 #line 1599 "ael.tab.c"
1598  break;
1599  case 56: /* "local_assignment" */
1600 
1601 /* Line 1391 of yacc.c */
1602 #line 170 "ael.y"
1603  {
1604  destroy_pval((yyvaluep->pval));
1605  prev_word=0;
1606  };
1607 
1608 /* Line 1391 of yacc.c */
1609 #line 1611 "ael.tab.c"
1610  break;
1611  case 58: /* "arglist" */
1612 
1613 /* Line 1391 of yacc.c */
1614 #line 170 "ael.y"
1615  {
1616  destroy_pval((yyvaluep->pval));
1617  prev_word=0;
1618  };
1619 
1620 /* Line 1391 of yacc.c */
1621 #line 1623 "ael.tab.c"
1622  break;
1623  case 59: /* "elements" */
1624 
1625 /* Line 1391 of yacc.c */
1626 #line 170 "ael.y"
1627  {
1628  destroy_pval((yyvaluep->pval));
1629  prev_word=0;
1630  };
1631 
1632 /* Line 1391 of yacc.c */
1633 #line 1635 "ael.tab.c"
1634  break;
1635  case 60: /* "element" */
1636 
1637 /* Line 1391 of yacc.c */
1638 #line 170 "ael.y"
1639  {
1640  destroy_pval((yyvaluep->pval));
1641  prev_word=0;
1642  };
1643 
1644 /* Line 1391 of yacc.c */
1645 #line 1647 "ael.tab.c"
1646  break;
1647  case 61: /* "ignorepat" */
1648 
1649 /* Line 1391 of yacc.c */
1650 #line 170 "ael.y"
1651  {
1652  destroy_pval((yyvaluep->pval));
1653  prev_word=0;
1654  };
1655 
1656 /* Line 1391 of yacc.c */
1657 #line 1659 "ael.tab.c"
1658  break;
1659  case 62: /* "extension" */
1660 
1661 /* Line 1391 of yacc.c */
1662 #line 170 "ael.y"
1663  {
1664  destroy_pval((yyvaluep->pval));
1665  prev_word=0;
1666  };
1667 
1668 /* Line 1391 of yacc.c */
1669 #line 1671 "ael.tab.c"
1670  break;
1671  case 63: /* "statements" */
1672 
1673 /* Line 1391 of yacc.c */
1674 #line 170 "ael.y"
1675  {
1676  destroy_pval((yyvaluep->pval));
1677  prev_word=0;
1678  };
1679 
1680 /* Line 1391 of yacc.c */
1681 #line 1683 "ael.tab.c"
1682  break;
1683  case 64: /* "timerange" */
1684 
1685 /* Line 1391 of yacc.c */
1686 #line 183 "ael.y"
1687  { free((yyvaluep->str));};
1688 
1689 /* Line 1391 of yacc.c */
1690 #line 1692 "ael.tab.c"
1691  break;
1692  case 65: /* "timespec" */
1693 
1694 /* Line 1391 of yacc.c */
1695 #line 170 "ael.y"
1696  {
1697  destroy_pval((yyvaluep->pval));
1698  prev_word=0;
1699  };
1700 
1701 /* Line 1391 of yacc.c */
1702 #line 1704 "ael.tab.c"
1703  break;
1704  case 66: /* "test_expr" */
1705 
1706 /* Line 1391 of yacc.c */
1707 #line 183 "ael.y"
1708  { free((yyvaluep->str));};
1709 
1710 /* Line 1391 of yacc.c */
1711 #line 1713 "ael.tab.c"
1712  break;
1713  case 68: /* "if_like_head" */
1714 
1715 /* Line 1391 of yacc.c */
1716 #line 170 "ael.y"
1717  {
1718  destroy_pval((yyvaluep->pval));
1719  prev_word=0;
1720  };
1721 
1722 /* Line 1391 of yacc.c */
1723 #line 1725 "ael.tab.c"
1724  break;
1725  case 69: /* "word_list" */
1726 
1727 /* Line 1391 of yacc.c */
1728 #line 183 "ael.y"
1729  { free((yyvaluep->str));};
1730 
1731 /* Line 1391 of yacc.c */
1732 #line 1734 "ael.tab.c"
1733  break;
1734  case 71: /* "word3_list" */
1735 
1736 /* Line 1391 of yacc.c */
1737 #line 183 "ael.y"
1738  { free((yyvaluep->str));};
1739 
1740 /* Line 1391 of yacc.c */
1741 #line 1743 "ael.tab.c"
1742  break;
1743  case 72: /* "goto_word" */
1744 
1745 /* Line 1391 of yacc.c */
1746 #line 183 "ael.y"
1747  { free((yyvaluep->str));};
1748 
1749 /* Line 1391 of yacc.c */
1750 #line 1752 "ael.tab.c"
1751  break;
1752  case 73: /* "switch_statement" */
1753 
1754 /* Line 1391 of yacc.c */
1755 #line 170 "ael.y"
1756  {
1757  destroy_pval((yyvaluep->pval));
1758  prev_word=0;
1759  };
1760 
1761 /* Line 1391 of yacc.c */
1762 #line 1764 "ael.tab.c"
1763  break;
1764  case 74: /* "statement" */
1765 
1766 /* Line 1391 of yacc.c */
1767 #line 170 "ael.y"
1768  {
1769  destroy_pval((yyvaluep->pval));
1770  prev_word=0;
1771  };
1772 
1773 /* Line 1391 of yacc.c */
1774 #line 1776 "ael.tab.c"
1775  break;
1776  case 79: /* "opt_else" */
1777 
1778 /* Line 1391 of yacc.c */
1779 #line 170 "ael.y"
1780  {
1781  destroy_pval((yyvaluep->pval));
1782  prev_word=0;
1783  };
1784 
1785 /* Line 1391 of yacc.c */
1786 #line 1788 "ael.tab.c"
1787  break;
1788  case 80: /* "target" */
1789 
1790 /* Line 1391 of yacc.c */
1791 #line 170 "ael.y"
1792  {
1793  destroy_pval((yyvaluep->pval));
1794  prev_word=0;
1795  };
1796 
1797 /* Line 1391 of yacc.c */
1798 #line 1800 "ael.tab.c"
1799  break;
1800  case 81: /* "opt_pri" */
1801 
1802 /* Line 1391 of yacc.c */
1803 #line 183 "ael.y"
1804  { free((yyvaluep->str));};
1805 
1806 /* Line 1391 of yacc.c */
1807 #line 1809 "ael.tab.c"
1808  break;
1809  case 82: /* "jumptarget" */
1810 
1811 /* Line 1391 of yacc.c */
1812 #line 170 "ael.y"
1813  {
1814  destroy_pval((yyvaluep->pval));
1815  prev_word=0;
1816  };
1817 
1818 /* Line 1391 of yacc.c */
1819 #line 1821 "ael.tab.c"
1820  break;
1821  case 83: /* "macro_call" */
1822 
1823 /* Line 1391 of yacc.c */
1824 #line 170 "ael.y"
1825  {
1826  destroy_pval((yyvaluep->pval));
1827  prev_word=0;
1828  };
1829 
1830 /* Line 1391 of yacc.c */
1831 #line 1833 "ael.tab.c"
1832  break;
1833  case 85: /* "application_call_head" */
1834 
1835 /* Line 1391 of yacc.c */
1836 #line 170 "ael.y"
1837  {
1838  destroy_pval((yyvaluep->pval));
1839  prev_word=0;
1840  };
1841 
1842 /* Line 1391 of yacc.c */
1843 #line 1845 "ael.tab.c"
1844  break;
1845  case 87: /* "application_call" */
1846 
1847 /* Line 1391 of yacc.c */
1848 #line 170 "ael.y"
1849  {
1850  destroy_pval((yyvaluep->pval));
1851  prev_word=0;
1852  };
1853 
1854 /* Line 1391 of yacc.c */
1855 #line 1857 "ael.tab.c"
1856  break;
1857  case 88: /* "opt_word" */
1858 
1859 /* Line 1391 of yacc.c */
1860 #line 183 "ael.y"
1861  { free((yyvaluep->str));};
1862 
1863 /* Line 1391 of yacc.c */
1864 #line 1866 "ael.tab.c"
1865  break;
1866  case 89: /* "eval_arglist" */
1867 
1868 /* Line 1391 of yacc.c */
1869 #line 170 "ael.y"
1870  {
1871  destroy_pval((yyvaluep->pval));
1872  prev_word=0;
1873  };
1874 
1875 /* Line 1391 of yacc.c */
1876 #line 1878 "ael.tab.c"
1877  break;
1878  case 90: /* "case_statements" */
1879 
1880 /* Line 1391 of yacc.c */
1881 #line 170 "ael.y"
1882  {
1883  destroy_pval((yyvaluep->pval));
1884  prev_word=0;
1885  };
1886 
1887 /* Line 1391 of yacc.c */
1888 #line 1890 "ael.tab.c"
1889  break;
1890  case 91: /* "case_statement" */
1891 
1892 /* Line 1391 of yacc.c */
1893 #line 170 "ael.y"
1894  {
1895  destroy_pval((yyvaluep->pval));
1896  prev_word=0;
1897  };
1898 
1899 /* Line 1391 of yacc.c */
1900 #line 1902 "ael.tab.c"
1901  break;
1902  case 92: /* "macro_statements" */
1903 
1904 /* Line 1391 of yacc.c */
1905 #line 170 "ael.y"
1906  {
1907  destroy_pval((yyvaluep->pval));
1908  prev_word=0;
1909  };
1910 
1911 /* Line 1391 of yacc.c */
1912 #line 1914 "ael.tab.c"
1913  break;
1914  case 93: /* "macro_statement" */
1915 
1916 /* Line 1391 of yacc.c */
1917 #line 170 "ael.y"
1918  {
1919  destroy_pval((yyvaluep->pval));
1920  prev_word=0;
1921  };
1922 
1923 /* Line 1391 of yacc.c */
1924 #line 1926 "ael.tab.c"
1925  break;
1926  case 94: /* "switches" */
1927 
1928 /* Line 1391 of yacc.c */
1929 #line 170 "ael.y"
1930  {
1931  destroy_pval((yyvaluep->pval));
1932  prev_word=0;
1933  };
1934 
1935 /* Line 1391 of yacc.c */
1936 #line 1938 "ael.tab.c"
1937  break;
1938  case 95: /* "eswitches" */
1939 
1940 /* Line 1391 of yacc.c */
1941 #line 170 "ael.y"
1942  {
1943  destroy_pval((yyvaluep->pval));
1944  prev_word=0;
1945  };
1946 
1947 /* Line 1391 of yacc.c */
1948 #line 1950 "ael.tab.c"
1949  break;
1950  case 96: /* "switchlist" */
1951 
1952 /* Line 1391 of yacc.c */
1953 #line 170 "ael.y"
1954  {
1955  destroy_pval((yyvaluep->pval));
1956  prev_word=0;
1957  };
1958 
1959 /* Line 1391 of yacc.c */
1960 #line 1962 "ael.tab.c"
1961  break;
1962  case 97: /* "included_entry" */
1963 
1964 /* Line 1391 of yacc.c */
1965 #line 170 "ael.y"
1966  {
1967  destroy_pval((yyvaluep->pval));
1968  prev_word=0;
1969  };
1970 
1971 /* Line 1391 of yacc.c */
1972 #line 1974 "ael.tab.c"
1973  break;
1974  case 98: /* "includeslist" */
1975 
1976 /* Line 1391 of yacc.c */
1977 #line 170 "ael.y"
1978  {
1979  destroy_pval((yyvaluep->pval));
1980  prev_word=0;
1981  };
1982 
1983 /* Line 1391 of yacc.c */
1984 #line 1986 "ael.tab.c"
1985  break;
1986  case 99: /* "includes" */
1987 
1988 /* Line 1391 of yacc.c */
1989 #line 170 "ael.y"
1990  {
1991  destroy_pval((yyvaluep->pval));
1992  prev_word=0;
1993  };
1994 
1995 /* Line 1391 of yacc.c */
1996 #line 1998 "ael.tab.c"
1997  break;
1998 
1999  default:
2000  break;
2001  }
2002 }
struct pval * pval
Definition: ael.tab.c:217
void free()
void destroy_pval(pval *item)
Definition: pval.c:4940
char * str
Definition: ael.tab.c:216
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: ael.tab.c:1207
char * prev_word
Definition: ael_lex.c:889
#define YYUSE(e)
Definition: ael.tab.c:332

◆ yyerror()

void yyerror ( YYLTYPE locp,
struct parse_io parseio,
char const *  s 
)

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.

3954 {
3955  char *s2 = ael_token_subst((char *)s);
3956  if (locp->first_line == locp->last_line) {
3957  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);
3958  } else {
3959  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);
3960  }
3961  free(s2);
3962  parseio->syntax_error_count++;
3963 }
static char * ael_token_subst(const char *mess)
Definition: ael.tab.c:3910
int last_line
Definition: ast_expr2.h:97
#define ast_log
Definition: astobj2.c:42
void free()
char * my_file
Definition: ael_lex.c:888
int last_column
Definition: ast_expr2.h:98
int first_line
Definition: ast_expr2.h:95
int syntax_error_count
Definition: ael_structs.h:79
#define LOG_ERROR
Definition: logger.h:285
int first_column
Definition: ast_expr2.h:96

◆ yyparse() [1/2]

int yyparse ( )

◆ yyparse() [2/2]

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.

2046 {
2047 /* The lookahead symbol. */
2048 int yychar;
2049 
2050 /* The semantic value of the lookahead symbol. */
2051 YYSTYPE yylval;
2052 
2053 /* Location data for the lookahead symbol. */
2054 YYLTYPE yylloc;
2055 
2056  /* Number of syntax errors so far. */
2057  int yynerrs;
2058 
2059  int yystate;
2060  /* Number of tokens to shift before error messages enabled. */
2061  int yyerrstatus;
2062 
2063  /* The stacks and their tools:
2064  `yyss': related to states.
2065  `yyvs': related to semantic values.
2066  `yyls': related to locations.
2067 
2068  Refer to the stacks thru separate pointers, to allow yyoverflow
2069  to reallocate them elsewhere. */
2070 
2071  /* The state stack. */
2072  yytype_int16 yyssa[YYINITDEPTH];
2073  yytype_int16 *yyss;
2074  yytype_int16 *yyssp;
2075 
2076  /* The semantic value stack. */
2077  YYSTYPE yyvsa[YYINITDEPTH];
2078  YYSTYPE *yyvs;
2079  YYSTYPE *yyvsp;
2080 
2081  /* The location stack. */
2082  YYLTYPE yylsa[YYINITDEPTH];
2083  YYLTYPE *yyls;
2084  YYLTYPE *yylsp;
2085 
2086  /* The locations where the error started and ended. */
2087  YYLTYPE yyerror_range[3];
2088 
2089  YYSIZE_T yystacksize;
2090 
2091  int yyn;
2092  int yyresult;
2093  /* Lookahead token as an internal (translated) token number. */
2094  int yytoken;
2095  /* The variables used to return semantic value and location from the
2096  action routines. */
2097  YYSTYPE yyval;
2098  YYLTYPE yyloc;
2099 
2100 #if YYERROR_VERBOSE
2101  /* Buffer for error messages, and its allocated size. */
2102  char yymsgbuf[128];
2103  char *yymsg = yymsgbuf;
2104  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2105 #endif
2106 
2107 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
2108 
2109  /* The number of symbols on the RHS of the reduced rule.
2110  Keep to zero when no symbol should be popped. */
2111  int yylen = 0;
2112 
2113  yytoken = 0;
2114  yyss = yyssa;
2115  yyvs = yyvsa;
2116  yyls = yylsa;
2117  yystacksize = YYINITDEPTH;
2118 
2119  YYDPRINTF ((stderr, "Starting parse\n"));
2120 
2121  yystate = 0;
2122  yyerrstatus = 0;
2123  yynerrs = 0;
2124  yychar = YYEMPTY; /* Cause a token to be read. */
2125 
2126  /* Initialize stack pointers.
2127  Waste one element of value and location stack
2128  so that they stay on the same level as the state stack.
2129  The wasted elements are never initialized. */
2130  yyssp = yyss;
2131  yyvsp = yyvs;
2132  yylsp = yyls;
2133 
2134 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2135  /* Initialize the default location before parsing starts. */
2136  yylloc.first_line = yylloc.last_line = 1;
2137  yylloc.first_column = yylloc.last_column = 1;
2138 #endif
2139 
2140  goto yysetstate;
2141 
2142 /*------------------------------------------------------------.
2143 | yynewstate -- Push a new state, which is found in yystate. |
2144 `------------------------------------------------------------*/
2145  yynewstate:
2146  /* In all cases, when you get here, the value and location stacks
2147  have just been pushed. So pushing a state here evens the stacks. */
2148  yyssp++;
2149 
2150  yysetstate:
2151  *yyssp = yystate;
2152 
2153  if (yyss + yystacksize - 1 <= yyssp)
2154  {
2155  /* Get the current used size of the three stacks, in elements. */
2156  YYSIZE_T yysize = yyssp - yyss + 1;
2157 
2158 #ifdef yyoverflow
2159  {
2160  /* Give user a chance to reallocate the stack. Use copies of
2161  these so that the &'s don't force the real ones into
2162  memory. */
2163  YYSTYPE *yyvs1 = yyvs;
2164  yytype_int16 *yyss1 = yyss;
2165  YYLTYPE *yyls1 = yyls;
2166 
2167  /* Each stack pointer address is followed by the size of the
2168  data in use in that stack, in bytes. This used to be a
2169  conditional around just the two extra args, but that might
2170  be undefined if yyoverflow is a macro. */
2171  yyoverflow (YY_("memory exhausted"),
2172  &yyss1, yysize * sizeof (*yyssp),
2173  &yyvs1, yysize * sizeof (*yyvsp),
2174  &yyls1, yysize * sizeof (*yylsp),
2175  &yystacksize);
2176 
2177  yyls = yyls1;
2178  yyss = yyss1;
2179  yyvs = yyvs1;
2180  }
2181 #else /* no yyoverflow */
2182 # ifndef YYSTACK_RELOCATE
2183  goto yyexhaustedlab;
2184 # else
2185  /* Extend the stack our own way. */
2186  if (YYMAXDEPTH <= yystacksize)
2187  goto yyexhaustedlab;
2188  yystacksize *= 2;
2189  if (YYMAXDEPTH < yystacksize)
2190  yystacksize = YYMAXDEPTH;
2191 
2192  {
2193  yytype_int16 *yyss1 = yyss;
2194  union yyalloc *yyptr =
2195  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2196  if (! yyptr)
2197  goto yyexhaustedlab;
2198  YYSTACK_RELOCATE (yyss_alloc, yyss);
2199  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2200  YYSTACK_RELOCATE (yyls_alloc, yyls);
2201 # undef YYSTACK_RELOCATE
2202  if (yyss1 != yyssa)
2203  YYSTACK_FREE (yyss1);
2204  }
2205 # endif
2206 #endif /* no yyoverflow */
2207 
2208  yyssp = yyss + yysize - 1;
2209  yyvsp = yyvs + yysize - 1;
2210  yylsp = yyls + yysize - 1;
2211 
2212  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2213  (unsigned long int) yystacksize));
2214 
2215  if (yyss + yystacksize - 1 <= yyssp)
2216  YYABORT;
2217  }
2218 
2219  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2220 
2221  if (yystate == YYFINAL)
2222  YYACCEPT;
2223 
2224  goto yybackup;
2225 
2226 /*-----------.
2227 | yybackup. |
2228 `-----------*/
2229 yybackup:
2230 
2231  /* Do appropriate processing given the current state. Read a
2232  lookahead token if we need one and don't already have one. */
2233 
2234  /* First try to decide what to do without reference to lookahead token. */
2235  yyn = yypact[yystate];
2236  if (yypact_value_is_default (yyn))
2237  goto yydefault;
2238 
2239  /* Not known => get a lookahead token if don't already have one. */
2240 
2241  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2242  if (yychar == YYEMPTY)
2243  {
2244  YYDPRINTF ((stderr, "Reading a token: "));
2245  yychar = YYLEX;
2246  }
2247 
2248  if (yychar <= YYEOF)
2249  {
2250  yychar = yytoken = YYEOF;
2251  YYDPRINTF ((stderr, "Now at end of input.\n"));
2252  }
2253  else
2254  {
2255  yytoken = YYTRANSLATE (yychar);
2256  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2257  }
2258 
2259  /* If the proper action on seeing token YYTOKEN is to reduce or to
2260  detect an error, take that action. */
2261  yyn += yytoken;
2262  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2263  goto yydefault;
2264  yyn = yytable[yyn];
2265  if (yyn <= 0)
2266  {
2267  if (yytable_value_is_error (yyn))
2268  goto yyerrlab;
2269  yyn = -yyn;
2270  goto yyreduce;
2271  }
2272 
2273  /* Count tokens shifted since error; after three, turn off error
2274  status. */
2275  if (yyerrstatus)
2276  yyerrstatus--;
2277 
2278  /* Shift the lookahead token. */
2279  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2280 
2281  /* Discard the shifted token. */
2282  yychar = YYEMPTY;
2283 
2284  yystate = yyn;
2285  *++yyvsp = yylval;
2286  *++yylsp = yylloc;
2287  goto yynewstate;
2288 
2289 
2290 /*-----------------------------------------------------------.
2291 | yydefault -- do the default action for the current state. |
2292 `-----------------------------------------------------------*/
2293 yydefault:
2294  yyn = yydefact[yystate];
2295  if (yyn == 0)
2296  goto yyerrlab;
2297  goto yyreduce;
2298 
2299 
2300 /*-----------------------------.
2301 | yyreduce -- Do a reduction. |
2302 `-----------------------------*/
2303 yyreduce:
2304  /* yyn is the number of a rule to reduce with. */
2305  yylen = yyr2[yyn];
2306 
2307  /* If YYLEN is nonzero, implement the default value of the action:
2308  `$$ = $1'.
2309 
2310  Otherwise, the following line sets YYVAL to garbage.
2311  This behavior is undocumented and Bison
2312  users should not rely upon it. Assigning to YYVAL
2313  unconditionally makes the parser a bit smaller, and it avoids a
2314  GCC warning that YYVAL may be used uninitialized. */
2315  yyval = yyvsp[1-yylen];
2316 
2317  /* Default location. */
2318  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2319  YY_REDUCE_PRINT (yyn);
2320  switch (yyn)
2321  {
2322  case 2:
2323 
2324 /* Line 1806 of yacc.c */
2325 #line 191 "ael.y"
2326  { (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); }
2327  break;
2328 
2329  case 3:
2330 
2331 /* Line 1806 of yacc.c */
2332 #line 194 "ael.y"
2333  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2334  break;
2335 
2336  case 4:
2337 
2338 /* Line 1806 of yacc.c */
2339 #line 195 "ael.y"
2340  { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
2341  break;
2342 
2343  case 5:
2344 
2345 /* Line 1806 of yacc.c */
2346 #line 196 "ael.y"
2347  {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
2348  break;
2349 
2350  case 6:
2351 
2352 /* Line 1806 of yacc.c */
2353 #line 199 "ael.y"
2354  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2355  break;
2356 
2357  case 7:
2358 
2359 /* Line 1806 of yacc.c */
2360 #line 200 "ael.y"
2361  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2362  break;
2363 
2364  case 8:
2365 
2366 /* Line 1806 of yacc.c */
2367 #line 201 "ael.y"
2368  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2369  break;
2370 
2371  case 9:
2372 
2373 /* Line 1806 of yacc.c */
2374 #line 202 "ael.y"
2375  {(yyval.pval)=0;/* allow older docs to be read */}
2376  break;
2377 
2378  case 10:
2379 
2380 /* Line 1806 of yacc.c */
2381 #line 205 "ael.y"
2382  { (yyval.str) = (yyvsp[(1) - (1)].str); }
2383  break;
2384 
2385  case 11:
2386 
2387 /* Line 1806 of yacc.c */
2388 #line 206 "ael.y"
2389  { (yyval.str) = strdup("default"); }
2390  break;
2391 
2392  case 12:
2393 
2394 /* Line 1806 of yacc.c */
2395 #line 209 "ael.y"
2396  {
2397  (yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
2398  (yyval.pval)->u1.str = (yyvsp[(3) - (6)].str);
2399  (yyval.pval)->u2.statements = (yyvsp[(5) - (6)].pval);
2400  set_dads((yyval.pval),(yyvsp[(5) - (6)].pval));
2401  (yyval.pval)->u3.abstract = (yyvsp[(1) - (6)].intval);}
2402  break;
2403 
2404  case 13:
2405 
2406 /* Line 1806 of yacc.c */
2407 #line 218 "ael.y"
2408  { (yyval.intval) = 1; }
2409  break;
2410 
2411  case 14:
2412 
2413 /* Line 1806 of yacc.c */
2414 #line 219 "ael.y"
2415  { (yyval.intval) = 0; }
2416  break;
2417 
2418  case 15:
2419 
2420 /* Line 1806 of yacc.c */
2421 #line 220 "ael.y"
2422  { (yyval.intval) = 2; }
2423  break;
2424 
2425  case 16:
2426 
2427 /* Line 1806 of yacc.c */
2428 #line 221 "ael.y"
2429  { (yyval.intval)=3; }
2430  break;
2431 
2432  case 17:
2433 
2434 /* Line 1806 of yacc.c */
2435 #line 222 "ael.y"
2436  { (yyval.intval)=3; }
2437  break;
2438 
2439  case 18:
2440 
2441 /* Line 1806 of yacc.c */
2442 #line 225 "ael.y"
2443  {
2444  (yyval.pval) = npval2(PV_MACRO, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
2445  (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);
2446  set_dads((yyval.pval),(yyvsp[(7) - (8)].pval));}
2447  break;
2448 
2449  case 19:
2450 
2451 /* Line 1806 of yacc.c */
2452 #line 231 "ael.y"
2453  {
2454  (yyval.pval) = npval2(PV_GLOBALS, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2455  (yyval.pval)->u1.statements = (yyvsp[(3) - (4)].pval);
2456  set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
2457  break;
2458 
2459  case 20:
2460 
2461 /* Line 1806 of yacc.c */
2462 #line 237 "ael.y"
2463  { (yyval.pval) = NULL; }
2464  break;
2465 
2466  case 21:
2467 
2468 /* Line 1806 of yacc.c */
2469 #line 238 "ael.y"
2470  {(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
2471  break;
2472 
2473  case 22:
2474 
2475 /* Line 1806 of yacc.c */
2476 #line 239 "ael.y"
2477  {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
2478  break;
2479 
2480  case 23:
2481 
2482 /* Line 1806 of yacc.c */
2483 #line 242 "ael.y"
2484  { reset_semicount(parseio->scanner); }
2485  break;
2486 
2487  case 24:
2488 
2489 /* Line 1806 of yacc.c */
2490 #line 242 "ael.y"
2491  {
2492  (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
2493  (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
2494  (yyval.pval)->u2.val = (yyvsp[(4) - (5)].str); }
2495  break;
2496 
2497  case 25:
2498 
2499 /* Line 1806 of yacc.c */
2500 #line 248 "ael.y"
2501  { reset_semicount(parseio->scanner); }
2502  break;
2503 
2504  case 26:
2505 
2506 /* Line 1806 of yacc.c */
2507 #line 248 "ael.y"
2508  {
2509  (yyval.pval) = npval2(PV_LOCALVARDEC, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
2510  (yyval.pval)->u1.str = (yyvsp[(2) - (6)].str);
2511  (yyval.pval)->u2.val = (yyvsp[(5) - (6)].str); }
2512  break;
2513 
2514  case 27:
2515 
2516 /* Line 1806 of yacc.c */
2517 #line 255 "ael.y"
2518  { (yyval.pval) = NULL; }
2519  break;
2520 
2521  case 28:
2522 
2523 /* Line 1806 of yacc.c */
2524 #line 256 "ael.y"
2525  { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
2526  break;
2527 
2528  case 29:
2529 
2530 /* Line 1806 of yacc.c */
2531 #line 257 "ael.y"
2532  { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
2533  break;
2534 
2535  case 30:
2536 
2537 /* Line 1806 of yacc.c */
2538 #line 258 "ael.y"
2539  {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
2540  break;
2541 
2542  case 31:
2543 
2544 /* Line 1806 of yacc.c */
2545 #line 261 "ael.y"
2546  {(yyval.pval)=0;}
2547  break;
2548 
2549  case 32:
2550 
2551 /* Line 1806 of yacc.c */
2552 #line 262 "ael.y"
2553  { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
2554  break;
2555 
2556  case 33:
2557 
2558 /* Line 1806 of yacc.c */
2559 #line 263 "ael.y"
2560  { (yyval.pval)=(yyvsp[(2) - (2)].pval);}
2561  break;
2562 
2563  case 34:
2564 
2565 /* Line 1806 of yacc.c */
2566 #line 266 "ael.y"
2567  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2568  break;
2569 
2570  case 35:
2571 
2572 /* Line 1806 of yacc.c */
2573 #line 267 "ael.y"
2574  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2575  break;
2576 
2577  case 36:
2578 
2579 /* Line 1806 of yacc.c */
2580 #line 268 "ael.y"
2581  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2582  break;
2583 
2584  case 37:
2585 
2586 /* Line 1806 of yacc.c */
2587 #line 269 "ael.y"
2588  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2589  break;
2590 
2591  case 38:
2592 
2593 /* Line 1806 of yacc.c */
2594 #line 270 "ael.y"
2595  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2596  break;
2597 
2598  case 39:
2599 
2600 /* Line 1806 of yacc.c */
2601 #line 271 "ael.y"
2602  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2603  break;
2604 
2605  case 40:
2606 
2607 /* Line 1806 of yacc.c */
2608 #line 272 "ael.y"
2609  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
2610  break;
2611 
2612  case 41:
2613 
2614 /* Line 1806 of yacc.c */
2615 #line 273 "ael.y"
2616  {free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;}
2617  break;
2618 
2619  case 42:
2620 
2621 /* Line 1806 of yacc.c */
2622 #line 274 "ael.y"
2623  {(yyval.pval)=0;/* allow older docs to be read */}
2624  break;
2625 
2626  case 43:
2627 
2628 /* Line 1806 of yacc.c */
2629 #line 277 "ael.y"
2630  {
2631  (yyval.pval) = npval2(PV_IGNOREPAT, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2632  (yyval.pval)->u1.str = (yyvsp[(3) - (4)].str);}
2633  break;
2634 
2635  case 44:
2636 
2637 /* Line 1806 of yacc.c */
2638 #line 282 "ael.y"
2639  {
2640  (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2641  (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
2642  (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
2643  break;
2644 
2645  case 45:
2646 
2647 /* Line 1806 of yacc.c */
2648 #line 286 "ael.y"
2649  {
2650  (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (5)]), &(yylsp[(3) - (5)]));
2651  (yyval.pval)->u1.str = malloc(strlen((yyvsp[(1) - (5)].str))+strlen((yyvsp[(3) - (5)].str))+2);
2652  strcpy((yyval.pval)->u1.str,(yyvsp[(1) - (5)].str));
2653  strcat((yyval.pval)->u1.str,"@");
2654  strcat((yyval.pval)->u1.str,(yyvsp[(3) - (5)].str));
2655  free((yyvsp[(1) - (5)].str));
2656  (yyval.pval)->u2.statements = (yyvsp[(5) - (5)].pval); set_dads((yyval.pval),(yyvsp[(5) - (5)].pval));}
2657  break;
2658 
2659  case 46:
2660 
2661 /* Line 1806 of yacc.c */
2662 #line 294 "ael.y"
2663  {
2664  (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2665  (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
2666  (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));
2667  (yyval.pval)->u4.regexten=1;}
2668  break;
2669 
2670  case 47:
2671 
2672 /* Line 1806 of yacc.c */
2673 #line 299 "ael.y"
2674  {
2675  (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (7)]), &(yylsp[(7) - (7)]));
2676  (yyval.pval)->u1.str = (yyvsp[(5) - (7)].str);
2677  (yyval.pval)->u2.statements = (yyvsp[(7) - (7)].pval); set_dads((yyval.pval),(yyvsp[(7) - (7)].pval));
2678  (yyval.pval)->u3.hints = (yyvsp[(3) - (7)].str);}
2679  break;
2680 
2681  case 48:
2682 
2683 /* Line 1806 of yacc.c */
2684 #line 304 "ael.y"
2685  {
2686  (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
2687  (yyval.pval)->u1.str = (yyvsp[(6) - (8)].str);
2688  (yyval.pval)->u2.statements = (yyvsp[(8) - (8)].pval); set_dads((yyval.pval),(yyvsp[(8) - (8)].pval));
2689  (yyval.pval)->u4.regexten=1;
2690  (yyval.pval)->u3.hints = (yyvsp[(4) - (8)].str);}
2691  break;
2692 
2693  case 49:
2694 
2695 /* Line 1806 of yacc.c */
2696 #line 313 "ael.y"
2697  { (yyval.pval) = NULL; }
2698  break;
2699 
2700  case 50:
2701 
2702 /* Line 1806 of yacc.c */
2703 #line 314 "ael.y"
2704  { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
2705  break;
2706 
2707  case 51:
2708 
2709 /* Line 1806 of yacc.c */
2710 #line 315 "ael.y"
2711  {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
2712  break;
2713 
2714  case 52:
2715 
2716 /* Line 1806 of yacc.c */
2717 #line 321 "ael.y"
2718  {
2719  if (asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str)) < 0) {
2720  ast_log(LOG_WARNING, "asprintf() failed\n");
2721  (yyval.str) = NULL;
2722  } else {
2723  free((yyvsp[(1) - (5)].str));
2724  free((yyvsp[(3) - (5)].str));
2725  free((yyvsp[(5) - (5)].str));
2726  }
2727  }
2728  break;
2729 
2730  case 53:
2731 
2732 /* Line 1806 of yacc.c */
2733 #line 331 "ael.y"
2734  { (yyval.str) = (yyvsp[(1) - (1)].str); }
2735  break;
2736 
2737  case 54:
2738 
2739 /* Line 1806 of yacc.c */
2740 #line 335 "ael.y"
2741  {
2742  (yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)]));
2743  (yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)]));
2744  (yyval.pval)->next->next = nword((yyvsp[(5) - (7)].str), &(yylsp[(5) - (7)]));
2745  (yyval.pval)->next->next->next = nword((yyvsp[(7) - (7)].str), &(yylsp[(7) - (7)])); }
2746  break;
2747 
2748  case 55:
2749 
2750 /* Line 1806 of yacc.c */
2751 #line 343 "ael.y"
2752  { reset_parencount(parseio->scanner); }
2753  break;
2754 
2755  case 56:
2756 
2757 /* Line 1806 of yacc.c */
2758 #line 343 "ael.y"
2759  { (yyval.str) = (yyvsp[(3) - (4)].str); }
2760  break;
2761 
2762  case 57:
2763 
2764 /* Line 1806 of yacc.c */
2765 #line 347 "ael.y"
2766  {
2767  (yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
2768  (yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); }
2769  break;
2770 
2771  case 58:
2772 
2773 /* Line 1806 of yacc.c */
2774 #line 350 "ael.y"
2775  {
2776  (yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
2777  (yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);}
2778  break;
2779 
2780  case 59:
2781 
2782 /* Line 1806 of yacc.c */
2783 #line 353 "ael.y"
2784  {
2785  (yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
2786  (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);
2787  prev_word = 0; }
2788  break;
2789 
2790  case 60:
2791 
2792 /* Line 1806 of yacc.c */
2793 #line 364 "ael.y"
2794  { (yyval.str) = (yyvsp[(1) - (1)].str);}
2795  break;
2796 
2797  case 61:
2798 
2799 /* Line 1806 of yacc.c */
2800 #line 365 "ael.y"
2801  {
2802  if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
2803  ast_log(LOG_WARNING, "asprintf() failed\n");
2804  (yyval.str) = NULL;
2805  } else {
2806  free((yyvsp[(1) - (2)].str));
2807  free((yyvsp[(2) - (2)].str));
2808  prev_word = (yyval.str);
2809  }
2810  }
2811  break;
2812 
2813  case 62:
2814 
2815 /* Line 1806 of yacc.c */
2816 #line 377 "ael.y"
2817  { (yyval.str) = (yyvsp[(1) - (1)].str); }
2818  break;
2819 
2820  case 63:
2821 
2822 /* Line 1806 of yacc.c */
2823 #line 378 "ael.y"
2824  {
2825  if (asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
2826  ast_log(LOG_WARNING, "asprintf() failed\n");
2827  (yyval.str) = NULL;
2828  } else {
2829  free((yyvsp[(1) - (2)].str));
2830  free((yyvsp[(2) - (2)].str));
2831  }
2832  }
2833  break;
2834 
2835  case 64:
2836 
2837 /* Line 1806 of yacc.c */
2838 #line 387 "ael.y"
2839  {
2840  if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
2841  ast_log(LOG_WARNING, "asprintf() failed\n");
2842  (yyval.str) = NULL;
2843  } else {
2844  free((yyvsp[(1) - (3)].str));
2845  free((yyvsp[(3) - (3)].str));
2846  }
2847  }
2848  break;
2849 
2850  case 65:
2851 
2852 /* Line 1806 of yacc.c */
2853 #line 396 "ael.y"
2854  { /* there are often '&' in hints */
2855  if (asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
2856  ast_log(LOG_WARNING, "asprintf() failed\n");
2857  (yyval.str) = NULL;
2858  } else {
2859  free((yyvsp[(1) - (3)].str));
2860  free((yyvsp[(3) - (3)].str));
2861  }
2862  }
2863  break;
2864 
2865  case 66:
2866 
2867 /* Line 1806 of yacc.c */
2868 #line 405 "ael.y"
2869  {
2870  if (asprintf(&((yyval.str)), "%s@%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
2871  ast_log(LOG_WARNING, "asprintf() failed\n");
2872  (yyval.str) = NULL;
2873  } else {
2874  free((yyvsp[(1) - (3)].str));
2875  free((yyvsp[(3) - (3)].str));
2876  }
2877  }
2878  break;
2879 
2880  case 67:
2881 
2882 /* Line 1806 of yacc.c */
2883 #line 416 "ael.y"
2884  { (yyval.str) = (yyvsp[(1) - (1)].str);}
2885  break;
2886 
2887  case 68:
2888 
2889 /* Line 1806 of yacc.c */
2890 #line 417 "ael.y"
2891  {
2892  if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
2893  ast_log(LOG_WARNING, "asprintf() failed\n");
2894  (yyval.str) = NULL;
2895  } else {
2896  free((yyvsp[(1) - (2)].str));
2897  free((yyvsp[(2) - (2)].str));
2898  prev_word = (yyval.str);
2899  }
2900  }
2901  break;
2902 
2903  case 69:
2904 
2905 /* Line 1806 of yacc.c */
2906 #line 427 "ael.y"
2907  {
2908  if (asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
2909  ast_log(LOG_WARNING, "asprintf() failed\n");
2910  (yyval.str) = NULL;
2911  } else {
2912  free((yyvsp[(1) - (3)].str));
2913  free((yyvsp[(2) - (3)].str));
2914  free((yyvsp[(3) - (3)].str));
2915  prev_word=(yyval.str);
2916  }
2917  }
2918  break;
2919 
2920  case 70:
2921 
2922 /* Line 1806 of yacc.c */
2923 #line 440 "ael.y"
2924  { (yyval.str) = (yyvsp[(1) - (1)].str);}
2925  break;
2926 
2927  case 71:
2928 
2929 /* Line 1806 of yacc.c */
2930 #line 441 "ael.y"
2931  {
2932  if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
2933  ast_log(LOG_WARNING, "asprintf() failed\n");
2934  (yyval.str) = NULL;
2935  } else {
2936  free((yyvsp[(1) - (2)].str));
2937  free((yyvsp[(2) - (2)].str));
2938  }
2939  }
2940  break;
2941 
2942  case 72:
2943 
2944 /* Line 1806 of yacc.c */
2945 #line 450 "ael.y"
2946  {
2947  if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
2948  ast_log(LOG_WARNING, "asprintf() failed\n");
2949  (yyval.str) = NULL;
2950  } else {
2951  free((yyvsp[(1) - (3)].str));
2952  free((yyvsp[(3) - (3)].str));
2953  }
2954  }
2955  break;
2956 
2957  case 73:
2958 
2959 /* Line 1806 of yacc.c */
2960 #line 461 "ael.y"
2961  {
2962  (yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
2963  (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
2964  (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
2965  break;
2966 
2967  case 74:
2968 
2969 /* Line 1806 of yacc.c */
2970 #line 470 "ael.y"
2971  {
2972  (yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2973  (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));}
2974  break;
2975 
2976  case 75:
2977 
2978 /* Line 1806 of yacc.c */
2979 #line 473 "ael.y"
2980  { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
2981  break;
2982 
2983  case 76:
2984 
2985 /* Line 1806 of yacc.c */
2986 #line 474 "ael.y"
2987  { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
2988  break;
2989 
2990  case 77:
2991 
2992 /* Line 1806 of yacc.c */
2993 #line 475 "ael.y"
2994  {
2995  (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
2996  (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
2997  break;
2998 
2999  case 78:
3000 
3001 /* Line 1806 of yacc.c */
3002 #line 478 "ael.y"
3003  {
3004  (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
3005  (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
3006  break;
3007 
3008  case 79:
3009 
3010 /* Line 1806 of yacc.c */
3011 #line 481 "ael.y"
3012  {
3013  (yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
3014  (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); }
3015  break;
3016 
3017  case 80:
3018 
3019 /* Line 1806 of yacc.c */
3020 #line 484 "ael.y"
3021  {reset_semicount(parseio->scanner);}
3022  break;
3023 
3024  case 81:
3025 
3026 /* Line 1806 of yacc.c */
3027 #line 485 "ael.y"
3028  {reset_semicount(parseio->scanner);}
3029  break;
3030 
3031  case 82:
3032 
3033 /* Line 1806 of yacc.c */
3034 #line 486 "ael.y"
3035  {reset_parencount(parseio->scanner);}
3036  break;
3037 
3038  case 83:
3039 
3040 /* Line 1806 of yacc.c */
3041 #line 486 "ael.y"
3042  { /* XXX word_list maybe ? */
3043  (yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)]));
3044  (yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str);
3045  (yyval.pval)->u2.for_test=(yyvsp[(7) - (12)].str);
3046  (yyval.pval)->u3.for_inc = (yyvsp[(10) - (12)].str);
3047  (yyval.pval)->u4.for_statements = (yyvsp[(12) - (12)].pval); set_dads((yyval.pval),(yyvsp[(12) - (12)].pval));}
3048  break;
3049 
3050  case 84:
3051 
3052 /* Line 1806 of yacc.c */
3053 #line 492 "ael.y"
3054  {
3055  (yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
3056  (yyval.pval)->u1.str = (yyvsp[(2) - (3)].str);
3057  (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
3058  break;
3059 
3060  case 85:
3061 
3062 /* Line 1806 of yacc.c */
3063 #line 496 "ael.y"
3064  { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
3065  break;
3066 
3067  case 86:
3068 
3069 /* Line 1806 of yacc.c */
3070 #line 497 "ael.y"
3071  { (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); }
3072  break;
3073 
3074  case 87:
3075 
3076 /* Line 1806 of yacc.c */
3077 #line 498 "ael.y"
3078  { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
3079  break;
3080 
3081  case 88:
3082 
3083 /* Line 1806 of yacc.c */
3084 #line 499 "ael.y"
3085  {
3086  (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
3087  (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);}
3088  break;
3089 
3090  case 89:
3091 
3092 /* Line 1806 of yacc.c */
3093 #line 502 "ael.y"
3094  {reset_semicount(parseio->scanner);}
3095  break;
3096 
3097  case 90:
3098 
3099 /* Line 1806 of yacc.c */
3100 #line 502 "ael.y"
3101  {
3102  char *bufx;
3103  int tot=0;
3104  pval *pptr;
3105  (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
3106  (yyval.pval)->u2.val=(yyvsp[(4) - (5)].str);
3107  /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
3108  /* string to big to fit in the buffer? */
3109  tot+=strlen((yyvsp[(1) - (5)].pval)->u1.str);
3110  for(pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
3111  tot+=strlen(pptr->u1.str);
3112  tot++; /* for a sep like a comma */
3113  }
3114  tot+=4; /* for safety */
3115  bufx = calloc(1, tot);
3116  strcpy(bufx,(yyvsp[(1) - (5)].pval)->u1.str);
3117  strcat(bufx,"(");
3118  /* XXX need to advance the pointer or the loop is very inefficient */
3119  for (pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
3120  if ( pptr != (yyvsp[(1) - (5)].pval)->u2.arglist )
3121  strcat(bufx,",");
3122  strcat(bufx,pptr->u1.str);
3123  }
3124  strcat(bufx,")");
3125 #ifdef AAL_ARGCHECK
3126  if ( !ael_is_funcname((yyvsp[(1) - (5)].pval)->u1.str) )
3127  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",
3128  my_file, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column, (yylsp[(1) - (5)]).last_column, (yyvsp[(1) - (5)].pval)->u1.str);
3129 #endif
3130  (yyval.pval)->u1.str = bufx;
3131  destroy_pval((yyvsp[(1) - (5)].pval)); /* the app call it is not, get rid of that chain */
3132  prev_word = 0;
3133  }
3134  break;
3135 
3136  case 91:
3137 
3138 /* Line 1806 of yacc.c */
3139 #line 535 "ael.y"
3140  { (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
3141  break;
3142 
3143  case 92:
3144 
3145 /* Line 1806 of yacc.c */
3146 #line 536 "ael.y"
3147  { (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
3148  break;
3149 
3150  case 93:
3151 
3152 /* Line 1806 of yacc.c */
3153 #line 537 "ael.y"
3154  { (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
3155  break;
3156 
3157  case 94:
3158 
3159 /* Line 1806 of yacc.c */
3160 #line 538 "ael.y"
3161  {
3162  (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)]));
3163  (yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));
3164  (yyval.pval)->u3.else_statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
3165  break;
3166 
3167  case 95:
3168 
3169 /* Line 1806 of yacc.c */
3170 #line 542 "ael.y"
3171  { (yyval.pval)=0; }
3172  break;
3173 
3174  case 96:
3175 
3176 /* Line 1806 of yacc.c */
3177 #line 545 "ael.y"
3178  { (yyval.pval) = (yyvsp[(2) - (2)].pval); }
3179  break;
3180 
3181  case 97:
3182 
3183 /* Line 1806 of yacc.c */
3184 #line 546 "ael.y"
3185  { (yyval.pval) = NULL ; }
3186  break;
3187 
3188  case 98:
3189 
3190 /* Line 1806 of yacc.c */
3191 #line 549 "ael.y"
3192  { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
3193  break;
3194 
3195  case 99:
3196 
3197 /* Line 1806 of yacc.c */
3198 #line 550 "ael.y"
3199  {
3200  (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
3201  (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
3202  break;
3203 
3204  case 100:
3205 
3206 /* Line 1806 of yacc.c */
3207 #line 553 "ael.y"
3208  {
3209  (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
3210  (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
3211  break;
3212 
3213  case 101:
3214 
3215 /* Line 1806 of yacc.c */
3216 #line 556 "ael.y"
3217  {
3218  (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
3219  (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
3220  (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
3221  break;
3222 
3223  case 102:
3224 
3225 /* Line 1806 of yacc.c */
3226 #line 560 "ael.y"
3227  {
3228  (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
3229  (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
3230  (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
3231  break;
3232 
3233  case 103:
3234 
3235 /* Line 1806 of yacc.c */
3236 #line 564 "ael.y"
3237  {
3238  (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
3239  (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
3240  (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
3241  break;
3242 
3243  case 104:
3244 
3245 /* Line 1806 of yacc.c */
3246 #line 568 "ael.y"
3247  {
3248  (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
3249  (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
3250  (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
3251  break;
3252 
3253  case 105:
3254 
3255 /* Line 1806 of yacc.c */
3256 #line 574 "ael.y"
3257  { (yyval.str) = strdup("1"); }
3258  break;
3259 
3260  case 106:
3261 
3262 /* Line 1806 of yacc.c */
3263 #line 575 "ael.y"
3264  { (yyval.str) = (yyvsp[(2) - (2)].str); }
3265  break;
3266 
3267  case 107:
3268 
3269 /* Line 1806 of yacc.c */
3270 #line 579 "ael.y"
3271  { /* ext[, pri] default 1 */
3272  (yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)]));
3273  (yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); }
3274  break;
3275 
3276  case 108:
3277 
3278 /* Line 1806 of yacc.c */
3279 #line 582 "ael.y"
3280  { /* context, ext, pri */
3281  (yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)]));
3282  (yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)]));
3283  (yyval.pval)->next->next = nword((yyvsp[(2) - (4)].str), &(yylsp[(2) - (4)])); }
3284  break;
3285 
3286  case 109:
3287 
3288 /* Line 1806 of yacc.c */
3289 #line 588 "ael.y"
3290  {reset_argcount(parseio->scanner);}
3291  break;
3292 
3293  case 110:
3294 
3295 /* Line 1806 of yacc.c */
3296 #line 588 "ael.y"
3297  {
3298  /* XXX original code had @2 but i think we need @5 */
3299  (yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
3300  (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
3301  (yyval.pval)->u2.arglist = (yyvsp[(4) - (5)].pval);}
3302  break;
3303 
3304  case 111:
3305 
3306 /* Line 1806 of yacc.c */
3307 #line 593 "ael.y"
3308  {
3309  (yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
3310  (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); }
3311  break;
3312 
3313  case 112:
3314 
3315 /* Line 1806 of yacc.c */
3316 #line 601 "ael.y"
3317  {reset_argcount(parseio->scanner);}
3318  break;
3319 
3320  case 113:
3321 
3322 /* Line 1806 of yacc.c */
3323 #line 601 "ael.y"
3324  {
3325  if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) {
3326  (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
3327  free((yyvsp[(1) - (3)].str)); /* won't be using this */
3328  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 );
3329  } else {
3330  (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
3331  (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
3332  } }
3333  break;
3334 
3335  case 114:
3336 
3337 /* Line 1806 of yacc.c */
3338 #line 612 "ael.y"
3339  {
3340  (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)]));
3341  if( (yyval.pval)->type == PV_GOTO )
3342  (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);
3343  else
3344  (yyval.pval)->u2.arglist = (yyvsp[(2) - (3)].pval);
3345  }
3346  break;
3347 
3348  case 115:
3349 
3350 /* Line 1806 of yacc.c */
3351 #line 619 "ael.y"
3352  { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
3353  break;
3354 
3355  case 116:
3356 
3357 /* Line 1806 of yacc.c */
3358 #line 622 "ael.y"
3359  { (yyval.str) = (yyvsp[(1) - (1)].str) ;}
3360  break;
3361 
3362  case 117:
3363 
3364 /* Line 1806 of yacc.c */
3365 #line 623 "ael.y"
3366  { (yyval.str) = strdup(""); }
3367  break;
3368 
3369  case 118:
3370 
3371 /* Line 1806 of yacc.c */
3372 #line 626 "ael.y"
3373  { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
3374  break;
3375 
3376  case 119:
3377 
3378 /* Line 1806 of yacc.c */
3379 #line 627 "ael.y"
3380  {
3381  (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
3382  (yyval.pval)->u1.str = strdup(""); }
3383  break;
3384 
3385  case 120:
3386 
3387 /* Line 1806 of yacc.c */
3388 #line 630 "ael.y"
3389  { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
3390  break;
3391 
3392  case 121:
3393 
3394 /* Line 1806 of yacc.c */
3395 #line 633 "ael.y"
3396  { (yyval.pval) = NULL; }
3397  break;
3398 
3399  case 122:
3400 
3401 /* Line 1806 of yacc.c */
3402 #line 634 "ael.y"
3403  { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
3404  break;
3405 
3406  case 123:
3407 
3408 /* Line 1806 of yacc.c */
3409 #line 637 "ael.y"
3410  {
3411  (yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */
3412  (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
3413  (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
3414  break;
3415 
3416  case 124:
3417 
3418 /* Line 1806 of yacc.c */
3419 #line 641 "ael.y"
3420  {
3421  (yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
3422  (yyval.pval)->u1.str = NULL;
3423  (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
3424  break;
3425 
3426  case 125:
3427 
3428 /* Line 1806 of yacc.c */
3429 #line 645 "ael.y"
3430  {
3431  (yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */
3432  (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
3433  (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval);set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
3434  break;
3435 
3436  case 126:
3437 
3438 /* Line 1806 of yacc.c */
3439 #line 651 "ael.y"
3440  { (yyval.pval) = NULL; }
3441  break;
3442 
3443  case 127:
3444 
3445 /* Line 1806 of yacc.c */
3446 #line 652 "ael.y"
3447  { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
3448  break;
3449 
3450  case 128:
3451 
3452 /* Line 1806 of yacc.c */
3453 #line 655 "ael.y"
3454  {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
3455  break;
3456 
3457  case 129:
3458 
3459 /* Line 1806 of yacc.c */
3460 #line 656 "ael.y"
3461  { (yyval.pval)=(yyvsp[(1) - (1)].pval);}
3462  break;
3463 
3464  case 130:
3465 
3466 /* Line 1806 of yacc.c */
3467 #line 657 "ael.y"
3468  {
3469  (yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
3470  (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
3471  (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
3472  break;
3473 
3474  case 131:
3475 
3476 /* Line 1806 of yacc.c */
3477 #line 663 "ael.y"
3478  {
3479  (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
3480  (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
3481  break;
3482 
3483  case 132:
3484 
3485 /* Line 1806 of yacc.c */
3486 #line 668 "ael.y"
3487  {
3488  (yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
3489  (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
3490  break;
3491 
3492  case 133:
3493 
3494 /* Line 1806 of yacc.c */
3495 #line 673 "ael.y"
3496  { (yyval.pval) = NULL; }
3497  break;
3498 
3499  case 134:
3500 
3501 /* Line 1806 of yacc.c */
3502 #line 674 "ael.y"
3503  { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval),nword((yyvsp[(2) - (3)].str), &(yylsp[(2) - (3)]))); }
3504  break;
3505 
3506  case 135:
3507 
3508 /* Line 1806 of yacc.c */
3509 #line 675 "ael.y"
3510  {
3511  char *x;
3512  if (asprintf(&x,"%s@%s", (yyvsp[(2) - (5)].str), (yyvsp[(4) - (5)].str)) < 0) {
3513  ast_log(LOG_WARNING, "asprintf() failed\n");
3514  (yyval.pval) = NULL;
3515  } else {
3516  free((yyvsp[(2) - (5)].str));
3517  free((yyvsp[(4) - (5)].str));
3518  (yyval.pval) = linku1((yyvsp[(1) - (5)].pval),nword(x, &(yylsp[(2) - (5)])));
3519  }
3520  }
3521  break;
3522 
3523  case 136:
3524 
3525 /* Line 1806 of yacc.c */
3526 #line 686 "ael.y"
3527  {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
3528  break;
3529 
3530  case 137:
3531 
3532 /* Line 1806 of yacc.c */
3533 #line 689 "ael.y"
3534  { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
3535  break;
3536 
3537  case 138:
3538 
3539 /* Line 1806 of yacc.c */
3540 #line 690 "ael.y"
3541  {
3542  (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
3543  (yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval);
3544  prev_word=0; /* XXX sure ? */ }
3545  break;
3546 
3547  case 139:
3548 
3549 /* Line 1806 of yacc.c */
3550 #line 697 "ael.y"
3551  { (yyval.pval) = (yyvsp[(1) - (2)].pval); }
3552  break;
3553 
3554  case 140:
3555 
3556 /* Line 1806 of yacc.c */
3557 #line 698 "ael.y"
3558  { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); }
3559  break;
3560 
3561  case 141:
3562 
3563 /* Line 1806 of yacc.c */
3564 #line 699 "ael.y"
3565  {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
3566  break;
3567 
3568  case 142:
3569 
3570 /* Line 1806 of yacc.c */
3571 #line 702 "ael.y"
3572  {
3573  (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
3574  (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
3575  break;
3576 
3577  case 143:
3578 
3579 /* Line 1806 of yacc.c */
3580 #line 705 "ael.y"
3581  {
3582  (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));}
3583  break;
3584 
3585 
3586 
3587 /* Line 1806 of yacc.c */
3588 #line 3590 "ael.tab.c"
3589  default: break;
3590  }
3591  /* User semantic actions sometimes alter yychar, and that requires
3592  that yytoken be updated with the new translation. We take the
3593  approach of translating immediately before every use of yytoken.
3594  One alternative is translating here after every semantic action,
3595  but that translation would be missed if the semantic action invokes
3596  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3597  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3598  incorrect destructor might then be invoked immediately. In the
3599  case of YYERROR or YYBACKUP, subsequent parser actions might lead
3600  to an incorrect destructor call or verbose syntax error message
3601  before the lookahead is translated. */
3602  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3603 
3604  YYPOPSTACK (yylen);
3605  yylen = 0;
3606  YY_STACK_PRINT (yyss, yyssp);
3607 
3608  *++yyvsp = yyval;
3609  *++yylsp = yyloc;
3610 
3611  /* Now `shift' the result of the reduction. Determine what state
3612  that goes to, based on the state we popped back to and the rule
3613  number reduced by. */
3614 
3615  yyn = yyr1[yyn];
3616 
3617  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3618  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3619  yystate = yytable[yystate];
3620  else
3621  yystate = yydefgoto[yyn - YYNTOKENS];
3622 
3623  goto yynewstate;
3624 
3625 
3626 /*------------------------------------.
3627 | yyerrlab -- here on detecting error |
3628 `------------------------------------*/
3629 yyerrlab:
3630  /* Make sure we have latest lookahead translation. See comments at
3631  user semantic actions for why this is necessary. */
3632  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3633 
3634  /* If not already recovering from an error, report this error. */
3635  if (!yyerrstatus)
3636  {
3637  ++yynerrs;
3638 #if ! YYERROR_VERBOSE
3639  yyerror (&yylloc, parseio, YY_("syntax error"));
3640 #else
3641 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3642  yyssp, yytoken)
3643  {
3644  char const *yymsgp = YY_("syntax error");
3645  int yysyntax_error_status;
3646  yysyntax_error_status = YYSYNTAX_ERROR;
3647  if (yysyntax_error_status == 0)
3648  yymsgp = yymsg;
3649  else if (yysyntax_error_status == 1)
3650  {
3651  if (yymsg != yymsgbuf)
3652  YYSTACK_FREE (yymsg);
3653  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3654  if (!yymsg)
3655  {
3656  yymsg = yymsgbuf;
3657  yymsg_alloc = sizeof yymsgbuf;
3658  yysyntax_error_status = 2;
3659  }
3660  else
3661  {
3662  yysyntax_error_status = YYSYNTAX_ERROR;
3663  yymsgp = yymsg;
3664  }
3665  }
3666  yyerror (&yylloc, parseio, yymsgp);
3667  if (yysyntax_error_status == 2)
3668  goto yyexhaustedlab;
3669  }
3670 # undef YYSYNTAX_ERROR
3671 #endif
3672  }
3673 
3674  yyerror_range[1] = yylloc;
3675 
3676  if (yyerrstatus == 3)
3677  {
3678  /* If just tried and failed to reuse lookahead token after an
3679  error, discard it. */
3680 
3681  if (yychar <= YYEOF)
3682  {
3683  /* Return failure if at end of input. */
3684  if (yychar == YYEOF)
3685  YYABORT;
3686  }
3687  else
3688  {
3689  yydestruct ("Error: discarding",
3690  yytoken, &yylval, &yylloc, parseio);
3691  yychar = YYEMPTY;
3692  }
3693  }
3694 
3695  /* Else will try to reuse lookahead token after shifting the error
3696  token. */
3697  goto yyerrlab1;
3698 
3699 
3700 /*---------------------------------------------------.
3701 | yyerrorlab -- error raised explicitly by YYERROR. |
3702 `---------------------------------------------------*/
3703 yyerrorlab:
3704 
3705  /* Pacify compilers like GCC when the user code never invokes
3706  YYERROR and the label yyerrorlab therefore never appears in user
3707  code. */
3708  if (/*CONSTCOND*/ 0)
3709  goto yyerrorlab;
3710 
3711  yyerror_range[1] = yylsp[1-yylen];
3712  /* Do not reclaim the symbols of the rule which action triggered
3713  this YYERROR. */
3714  YYPOPSTACK (yylen);
3715  yylen = 0;
3716  YY_STACK_PRINT (yyss, yyssp);
3717  yystate = *yyssp;
3718  goto yyerrlab1;
3719 
3720 
3721 /*-------------------------------------------------------------.
3722 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3723 `-------------------------------------------------------------*/
3724 yyerrlab1:
3725  yyerrstatus = 3; /* Each real token shifted decrements this. */
3726 
3727  for (;;)
3728  {
3729  yyn = yypact[yystate];
3730  if (!yypact_value_is_default (yyn))
3731  {
3732  yyn += YYTERROR;
3733  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3734  {
3735  yyn = yytable[yyn];
3736  if (0 < yyn)
3737  break;
3738  }
3739  }
3740 
3741  /* Pop the current state because it cannot handle the error token. */
3742  if (yyssp == yyss)
3743  YYABORT;
3744 
3745  yyerror_range[1] = *yylsp;
3746  yydestruct ("Error: popping",
3747  yystos[yystate], yyvsp, yylsp, parseio);
3748  YYPOPSTACK (1);
3749  yystate = *yyssp;
3750  YY_STACK_PRINT (yyss, yyssp);
3751  }
3752 
3753  *++yyvsp = yylval;
3754 
3755  yyerror_range[2] = yylloc;
3756  /* Using YYLLOC is tempting, but would change the location of
3757  the lookahead. YYLOC is available though. */
3758  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
3759  *++yylsp = yyloc;
3760 
3761  /* Shift the error token. */
3762  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3763 
3764  yystate = yyn;
3765  goto yynewstate;
3766 
3767 
3768 /*-------------------------------------.
3769 | yyacceptlab -- YYACCEPT comes here. |
3770 `-------------------------------------*/
3771 yyacceptlab:
3772  yyresult = 0;
3773  goto yyreturn;
3774 
3775 /*-----------------------------------.
3776 | yyabortlab -- YYABORT comes here. |
3777 `-----------------------------------*/
3778 yyabortlab:
3779  yyresult = 1;
3780  goto yyreturn;
3781 
3782 #if !defined(yyoverflow) || YYERROR_VERBOSE
3783 /*-------------------------------------------------.
3784 | yyexhaustedlab -- memory exhaustion comes here. |
3785 `-------------------------------------------------*/
3786 yyexhaustedlab:
3787  yyerror (&yylloc, parseio, YY_("memory exhausted"));
3788  yyresult = 2;
3789  /* Fall through. */
3790 #endif
3791 
3792 yyreturn:
3793  if (yychar != YYEMPTY)
3794  {
3795  /* Make sure we have latest lookahead translation. See comments at
3796  user semantic actions for why this is necessary. */
3797  yytoken = YYTRANSLATE (yychar);
3798  yydestruct ("Cleanup: discarding lookahead",
3799  yytoken, &yylval, &yylloc, parseio);
3800  }
3801  /* Do not reclaim the symbols of the rule which action triggered
3802  this YYABORT or YYACCEPT. */
3803  YYPOPSTACK (yylen);
3804  YY_STACK_PRINT (yyss, yyssp);
3805  while (yyssp != yyss)
3806  {
3807  yydestruct ("Cleanup: popping",
3808  yystos[*yyssp], yyvsp, yylsp, parseio);
3809  YYPOPSTACK (1);
3810  }
3811 #ifndef yyoverflow
3812  if (yyss != yyssa)
3813  YYSTACK_FREE (yyss);
3814 #endif
3815 #if YYERROR_VERBOSE
3816  if (yymsg != yymsgbuf)
3817  YYSTACK_FREE (yymsg);
3818 #endif
3819  /* Make sure YYID is used. */
3820  return YYID (yyresult);
3821 }
void reset_semicount(yyscan_t yyscanner)
Definition: ael_lex.c:3341
union pval::@285 u1
struct pval * list
Definition: pval.h:60
static const yytype_uint8 yydefact[]
Definition: ael.tab.c:721
static void set_dads(pval *dad, pval *child_list)
Definition: ael.tab.c:4001
Definition: pval.h:32
#define YYDPRINTF(Args)
Definition: ael.tab.c:1206
struct pval * pval
Definition: ael_structs.h:77
Definition: pval.h:29
#define YY_STACK_PRINT(Bottom, Top)
Definition: ael.tab.c:1208
#define LOG_WARNING
Definition: logger.h:274
static const yytype_int16 yypact[]
Definition: ael.tab.c:768
#define YYINITDEPTH
Definition: ael.tab.c:1215
#define yylval
Definition: ael.tab.c:68
int last_line
Definition: ast_expr2.h:97
struct pval * statements
Definition: pval.h:61
#define yychar
Definition: ael.tab.c:69
struct pval * pval
Definition: ael.tab.c:217
#define YYSIZE_T
Definition: ael.tab.c:312
static const yytype_int16 yytable[]
Definition: ael.tab.c:816
Definition: pval.h:22
yyscan_t scanner
Definition: ael_structs.h:78
const char * str
Definition: app_jack.c:147
#define NULL
Definition: resample.c:96
#define yytable_value_is_error(yytable_value)
Definition: ael.tab.c:861
#define YYLAST
Definition: ael.tab.c:490
static const yytype_uint8 yyr1[]
Definition: ael.tab.c:679
Definition: pval.h:8
#define calloc(a, b)
Definition: astmm.h:157
#define YYNTOKENS
Definition: ael.tab.c:493
#define yylloc
Definition: ael.tab.c:72
#define YYMAXDEPTH
Definition: ael.tab.c:1226
static const yytype_int16 yydefgoto[]
Definition: ael.tab.c:755
pval * linku1(pval *head, pval *tail)
Definition: pval.c:5922
short int yytype_int16
Definition: ast_expr2.c:544
char * malloc()
char * val
Definition: pval.h:70
#define YYTERROR
Definition: ael.tab.c:985
#define ast_log
Definition: astobj2.c:42
void free()
Definition: pval.h:13
void reset_argcount(yyscan_t yyscanner)
Definition: ael_lex.c:3349
static pval * nword(char *string, YYLTYPE *pos)
Definition: ael.tab.c:3992
#define YYABORT
Definition: ael.tab.c:947
YYSTYPE yyvs_alloc
Definition: ast_expr2.c:679
Definition: pval.h:21
char * my_file
Definition: ael_lex.c:888
int last_column
Definition: ast_expr2.h:98
char * str
Definition: pval.h:59
int first_line
Definition: ast_expr2.h:95
#define YYEOF
Definition: ael.tab.c:944
#define YYSTACK_ALLOC
Definition: ael.tab.c:394
Definition: pval.h:48
#define YYSTACK_FREE
Definition: ael.tab.c:395
#define yyerror
Definition: ael.tab.c:67
#define YYPOPSTACK(N)
void destroy_pval(pval *item)
Definition: pval.c:4940
#define YYACCEPT
Definition: ael.tab.c:946
char * str
Definition: ael.tab.c:216
Definition: pval.h:24
struct pval * arglist
Definition: pval.h:68
YYLTYPE yyls_alloc
Definition: ast_expr2.c:680
#define YYSTACK_BYTES(N)
Definition: ael.tab.c:443
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: ael.tab.c:1207
Definition: pval.h:9
Definition: pval.h:31
int intval
Definition: ael.tab.c:215
char * prev_word
Definition: ael_lex.c:889
static const yytype_uint8 yyr2[]
Definition: ael.tab.c:699
static pval * npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last)
Definition: ael.tab.c:3978
static const yytype_uint16 yycheck[]
Definition: ael.tab.c:864
Definition: pval.h:25
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: ael.tab.c:454
static void yydestruct(char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parse_io *parseio) const
Definition: ael.tab.c:1479
Definition: pval.h:30
Definition: pval.h:23
yytype_int16 yyss_alloc
Definition: ast_expr2.c:678
#define YYSYNTAX_ERROR
#define YYFINAL
Definition: ael.tab.c:488
#define YYEMPTY
Definition: ael.tab.c:943
static const yytype_int16 yypgoto[]
Definition: ael.tab.c:802
int first_column
Definition: ast_expr2.h:96
struct pval * next
Definition: pval.h:93
#define YYID(n)
Definition: ael.tab.c:339
#define yypact_value_is_default(yystate)
Definition: ael.tab.c:858
static pval * update_last(pval *, YYLTYPE *)
Definition: ael.tab.c:3984
Definition: pval.h:27
int asprintf(char **str, const char *fmt,...)
#define strdup(a)
Definition: astmm.h:165
void reset_parencount(yyscan_t yyscanner)
Definition: ael_lex.c:3330
pval * npval(pvaltype type, int first_line, int last_line, int first_column, int last_column)
Definition: ael.tab.c:3965
static const yytype_uint8 yystos[]
Definition: ael.tab.c:908
#define YY_(msgid)
Definition: ael.tab.c:326
Definition: pval.h:26
char * for_init
Definition: pval.h:62
#define yynerrs
Definition: ael.tab.c:71
#define YYLEX
Definition: ael.tab.c:1034
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: ael.tab.c:995
Definition: pval.h:16
#define YY_REDUCE_PRINT(Rule)
Definition: ael.tab.c:1209
union pval::@286 u2
#define YYTRANSLATE(YYX)
Definition: ael.tab.c:505

◆ yystpcpy()

static char* yystpcpy ( char *  yydest,
const char *  yysrc 
)
static

Definition at line 1267 of file ael.tab.c.

References YYSIZE_T.

Referenced by yystrlen(), and yytnamerr().

1271 {
1272  char *yyd = yydest;
1273  const char *yys = yysrc;
1274 
1275  while ((*yyd++ = *yys++) != '\0')
1276  continue;
1277 
1278  return yyd - 1;
1279 }

◆ yystrlen()

static YYSIZE_T yystrlen ( char *  yystr) const
static

Definition at line 1243 of file ael.tab.c.

References YYSIZE_T, and yystpcpy().

Referenced by yysyntax_error(), and yytnamerr().

1246 {
1247  YYSIZE_T yylen;
1248  for (yylen = 0; yystr[yylen]; yylen++)
1249  continue;
1250  return yylen;
1251 }
#define YYSIZE_T
Definition: ael.tab.c:312

◆ yysyntax_error()

static int yysyntax_error ( YYSIZE_T yymsg_alloc,
char **  yymsg,
yytype_int16 yyssp,
int  yytoken 
)
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().

1342 {
1343  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1344  YYSIZE_T yysize = yysize0;
1345  YYSIZE_T yysize1;
1346  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1347  /* Internationalized format string. */
1348  const char *yyformat = 0;
1349  /* Arguments of yyformat. */
1350  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1351  /* Number of reported tokens (one for the "unexpected", one per
1352  "expected"). */
1353  int yycount = 0;
1354 
1355  /* There are many possibilities here to consider:
1356  - Assume YYFAIL is not used. It's too flawed to consider. See
1357  <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1358  for details. YYERROR is fine as it does not invoke this
1359  function.
1360  - If this state is a consistent state with a default action, then
1361  the only way this function was invoked is if the default action
1362  is an error action. In that case, don't check for expected
1363  tokens because there are none.
1364  - The only way there can be no lookahead present (in yychar) is if
1365  this state is a consistent state with a default action. Thus,
1366  detecting the absence of a lookahead is sufficient to determine
1367  that there is no unexpected or expected token to report. In that
1368  case, just report a simple "syntax error".
1369  - Don't assume there isn't a lookahead just because this state is a
1370  consistent state with a default action. There might have been a
1371  previous inconsistent state, consistent state with a non-default
1372  action, or user semantic action that manipulated yychar.
1373  - Of course, the expected token list depends on states to have
1374  correct lookahead information, and it depends on the parser not
1375  to perform extra reductions after fetching a lookahead from the
1376  scanner and before detecting a syntax error. Thus, state merging
1377  (from LALR or IELR) and default reductions corrupt the expected
1378  token list. However, the list is correct for canonical LR with
1379  one exception: it will still contain any token that will not be
1380  accepted due to an error action in a later state.
1381  */
1382  if (yytoken != YYEMPTY)
1383  {
1384  int yyn = yypact[*yyssp];
1385  yyarg[yycount++] = yytname[yytoken];
1386  if (!yypact_value_is_default (yyn))
1387  {
1388  /* Start YYX at -YYN if negative to avoid negative indexes in
1389  YYCHECK. In other words, skip the first -YYN actions for
1390  this state because they are default actions. */
1391  int yyxbegin = yyn < 0 ? -yyn : 0;
1392  /* Stay within bounds of both yycheck and yytname. */
1393  int yychecklim = YYLAST - yyn + 1;
1394  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1395  int yyx;
1396 
1397  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1398  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1399  && !yytable_value_is_error (yytable[yyx + yyn]))
1400  {
1401  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1402  {
1403  yycount = 1;
1404  yysize = yysize0;
1405  break;
1406  }
1407  yyarg[yycount++] = yytname[yyx];
1408  yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1409  if (! (yysize <= yysize1
1410  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1411  return 2;
1412  yysize = yysize1;
1413  }
1414  }
1415  }
1416 
1417  switch (yycount)
1418  {
1419 # define YYCASE_(N, S) \
1420  case N: \
1421  yyformat = S; \
1422  break
1423  YYCASE_(0, YY_("syntax error"));
1424  YYCASE_(1, YY_("syntax error, unexpected %s"));
1425  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1426  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1427  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1428  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1429 # undef YYCASE_
1430  }
1431 
1432  yysize1 = yysize + yystrlen (yyformat);
1433  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1434  return 2;
1435  yysize = yysize1;
1436 
1437  if (*yymsg_alloc < yysize)
1438  {
1439  *yymsg_alloc = 2 * yysize;
1440  if (! (yysize <= *yymsg_alloc
1441  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1442  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1443  return 1;
1444  }
1445 
1446  /* Avoid sprintf, as that infringes on the user's name space.
1447  Don't have undefined behavior even if the translation
1448  produced a string with the wrong number of "%s"s. */
1449  {
1450  char *yyp = *yymsg;
1451  int yyi = 0;
1452  while ((*yyp = *yyformat) != '\0')
1453  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1454  {
1455  yyp += yytnamerr (yyp, yyarg[yyi++]);
1456  yyformat += 2;
1457  }
1458  else
1459  {
1460  yyp++;
1461  yyformat++;
1462  }
1463  }
1464  return 0;
1465 }
#define YYSTACK_ALLOC_MAXIMUM
Definition: ael.tab.c:397
static const yytype_int16 yypact[]
Definition: ael.tab.c:768
#define YYSIZE_T
Definition: ael.tab.c:312
static const yytype_int16 yytable[]
Definition: ael.tab.c:816
#define yytable_value_is_error(yytable_value)
Definition: ael.tab.c:861
#define YYLAST
Definition: ael.tab.c:490
#define YYNTOKENS
Definition: ael.tab.c:493
#define YYCASE_(N, S)
#define YYTERROR
Definition: ael.tab.c:985
static const char *const yytname[]
Definition: ael.tab.c:642
static YYSIZE_T yystrlen(char *yystr) const
Definition: ael.tab.c:1243
static const yytype_uint16 yycheck[]
Definition: ael.tab.c:864
#define YYEMPTY
Definition: ael.tab.c:943
#define yypact_value_is_default(yystate)
Definition: ael.tab.c:858
static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
Definition: ael.tab.c:1292
#define YY_(msgid)
Definition: ael.tab.c:326

◆ yytnamerr()

static YYSIZE_T yytnamerr ( char *  yyres,
const char *  yystr 
)
static

Definition at line 1292 of file ael.tab.c.

References YYSIZE_T, yystpcpy(), and yystrlen().

Referenced by yysyntax_error().

1293 {
1294  if (*yystr == '"')
1295  {
1296  YYSIZE_T yyn = 0;
1297  char const *yyp = yystr;
1298 
1299  for (;;)
1300  switch (*++yyp)
1301  {
1302  case '\'':
1303  case ',':
1304  goto do_not_strip_quotes;
1305 
1306  case '\\':
1307  if (*++yyp != '\\')
1308  goto do_not_strip_quotes;
1309  /* Fall through. */
1310  default:
1311  if (yyres)
1312  yyres[yyn] = *yyp;
1313  yyn++;
1314  break;
1315 
1316  case '"':
1317  if (yyres)
1318  yyres[yyn] = '\0';
1319  return yyn;
1320  }
1321  do_not_strip_quotes: ;
1322  }
1323 
1324  if (! yyres)
1325  return yystrlen (yystr);
1326 
1327  return yystpcpy (yyres, yystr) - yyres;
1328 }
#define YYSIZE_T
Definition: ael.tab.c:312
static char * yystpcpy(char *yydest, const char *yysrc)
Definition: ael.tab.c:1267
static YYSIZE_T yystrlen(char *yystr) const
Definition: ael.tab.c:1243

Variable Documentation

◆ ast_compat

struct ast_flags ast_compat

◆ my_file

char* my_file

Definition at line 888 of file ael_lex.c.

Referenced by ael2_parse(), npval(), setup_filestack(), while(), yyerror(), and yyparse().

◆ token_equivs1

char* token_equivs1[]
static

Definition at line 3829 of file ael.tab.c.

Referenced by ael_token_subst().

◆ token_equivs2

char* token_equivs2[]
static

Definition at line 3869 of file ael.tab.c.

◆ yycheck

const yytype_uint16 yycheck[]
static

Definition at line 864 of file ael.tab.c.

◆ yydefact

const yytype_uint8 yydefact[]
static

Definition at line 721 of file ael.tab.c.

◆ yydefgoto

const yytype_int16 yydefgoto[]
static

Definition at line 755 of file ael.tab.c.

◆ yypact

const yytype_int16 yypact[]
static

Definition at line 768 of file ael.tab.c.

◆ yypgoto

const yytype_int16 yypgoto[]
static

Definition at line 802 of file ael.tab.c.

◆ yyr1

const yytype_uint8 yyr1[]
static

Definition at line 679 of file ael.tab.c.

◆ yyr2

const yytype_uint8 yyr2[]
static

Definition at line 699 of file ael.tab.c.

◆ yystos

const yytype_uint8 yystos[]
static

Definition at line 908 of file ael.tab.c.

◆ yytable

const yytype_int16 yytable[]
static

Definition at line 816 of file ael.tab.c.

◆ yytname

const char* const yytname[]
static

Definition at line 642 of file ael.tab.c.

◆ yytranslate

const yytype_uint8 yytranslate[]
static

Definition at line 509 of file ael.tab.c.