Mon Oct 8 12:39:06 2012

Asterisk developer's documentation


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"

Go to the source code of this file.

Data Structures

union  yyalloc
struct  YYLTYPE
union  YYSTYPE

Defines

#define YY_(msgid)   msgid
#define YY_LOCATION_PRINT(File, Loc)
#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   0
#define yydebug   ael_yydebug
#define YYDPRINTF(Args)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define YYERROR   goto yyerrorlab
#define yyerror   ael_yyerror
#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   yylex (&yylval, &yylloc, YYLEX_PARAM)
#define yylex   ael_yylex
#define YYLEX_PARAM   ((struct parse_io *)parseio)->scanner
#define yylloc   ael_yylloc
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YYLSP_NEEDED   1
#define yyltype   YYLTYPE
#define YYLTYPE_IS_DECLARED   1
#define YYLTYPE_IS_TRIVIAL   1
#define yylval   ael_yylval
#define YYMALLOC   malloc
#define YYMAXDEPTH   10000
#define YYMAXUTOK   298
#define yynerrs   ael_yynerrs
#define YYNNTS   56
#define YYNRULES   143
#define YYNSTATES   283
#define YYNTOKENS   44
#define YYPACT_NINF   -211
#define 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
#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 YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYUNDEFTOK   2
#define YYUSE(e)   ((void) (e))

Typedefs

typedef short int yytype_int16
typedef short int yytype_int8
typedef unsigned short int yytype_uint16
typedef unsigned char yytype_uint8

Enumerations

enum  yytokentype {
  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 (struct parse_io *parseio)
int yyparse ()
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

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.


Define Documentation

#define YY_ ( msgid   )     msgid

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

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

#define YY_REDUCE_PRINT ( Rule   ) 

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

#define YY_STACK_PRINT ( Bottom,
Top   ) 

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

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

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

#define YYABORT   goto yyabortlab

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

#define YYACCEPT   goto yyacceptlab

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

#define YYBACKUP ( Token,
Value   ) 

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

#define YYBISON   1

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

#define YYBISON_VERSION   "2.5"

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

#define YYCASE_ ( N,
 ) 

Value:

case N:                               \
        yyformat = S;                       \
      break

#define yychar   ael_yychar

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

#define yyclearin   (yychar = YYEMPTY)

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

#define YYCOPY ( To,
From,
Count   ) 

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

#define YYCOPY_NEEDED   1

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

#define YYDEBUG   0

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

#define yydebug   ael_yydebug

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

#define YYDPRINTF ( Args   ) 

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

#define YYEMPTY   (-2)

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

#define YYEOF   0

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

#define YYERRCODE   256

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

#define yyerrok   (yyerrstatus = 0)

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

#define YYERROR   goto yyerrorlab

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

#define yyerror   ael_yyerror

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

#define YYERROR_VERBOSE   1

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

#define YYERROR_VERBOSE   1

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

#define YYFAIL   goto yyerrlab

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

#define YYFINAL   17

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

#define YYFREE   free

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

#define YYID (  )     (n)

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

#define YYINITDEPTH   200

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

#define YYLAST   371

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

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

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

#define yylex   ael_yylex

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

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

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

#define yylloc   ael_yylloc

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

#define YYLLOC_DEFAULT ( Current,
Rhs,
 ) 

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

#define YYLSP_NEEDED   1

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

#define yyltype   YYLTYPE

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

#define YYLTYPE_IS_DECLARED   1

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

#define YYLTYPE_IS_TRIVIAL   1

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

#define yylval   ael_yylval

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

#define YYMALLOC   malloc

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

#define YYMAXDEPTH   10000

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

#define YYMAXUTOK   298

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

#define yynerrs   ael_yynerrs

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

#define YYNNTS   56

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

#define YYNRULES   143

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

#define YYNSTATES   283

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

#define YYNTOKENS   44

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

#define YYPACT_NINF   -211

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

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

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

#define yyparse   ael_yyparse

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

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

#define YYPULL   1

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

#define YYPURE   1

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

#define YYPUSH   0

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

 
#define YYRECOVERING (  )     (!!yyerrstatus)

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

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

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

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

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

#define YYSIZE_T   unsigned int

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

#define YYSKELETON_NAME   "yacc.c"

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

#define YYSTACK_ALLOC   YYMALLOC

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

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

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

#define YYSTACK_BYTES (  ) 

Value:

((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
      + 2 * YYSTACK_GAP_MAXIMUM)

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

#define YYSTACK_FREE   YYFREE

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

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

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

#define YYSTACK_RELOCATE ( Stack_alloc,
Stack   ) 

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

#define yystype   YYSTYPE

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

#define YYSTYPE_IS_DECLARED   1

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

#define YYSTYPE_IS_TRIVIAL   1

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

#define YYSYNTAX_ERROR

Value:

yysyntax_error (&yymsg_alloc, &yymsg, \
                                        yyssp, yytoken)

#define YYTABLE_NINF   -134

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

#define yytable_value_is_error ( yytable_value   )     YYID (0)

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

#define YYTERROR   1

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

#define YYTOKEN_TABLE   0

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

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

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

#define YYUNDEFTOK   2

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

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

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


Typedef Documentation

typedef short int yytype_int16

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

typedef short int yytype_int8

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

typedef unsigned short int yytype_uint16

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

typedef unsigned char yytype_uint8

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


Enumeration Type Documentation

enum yytokentype

Enumerator:
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 162 of file ael.tab.c.

00162                     {
00163      KW_CONTEXT = 258,
00164      LC = 259,
00165      RC = 260,
00166      LP = 261,
00167      RP = 262,
00168      SEMI = 263,
00169      EQ = 264,
00170      COMMA = 265,
00171      COLON = 266,
00172      AMPER = 267,
00173      BAR = 268,
00174      AT = 269,
00175      KW_MACRO = 270,
00176      KW_GLOBALS = 271,
00177      KW_IGNOREPAT = 272,
00178      KW_SWITCH = 273,
00179      KW_IF = 274,
00180      KW_IFTIME = 275,
00181      KW_ELSE = 276,
00182      KW_RANDOM = 277,
00183      KW_ABSTRACT = 278,
00184      KW_EXTEND = 279,
00185      EXTENMARK = 280,
00186      KW_GOTO = 281,
00187      KW_JUMP = 282,
00188      KW_RETURN = 283,
00189      KW_BREAK = 284,
00190      KW_CONTINUE = 285,
00191      KW_REGEXTEN = 286,
00192      KW_HINT = 287,
00193      KW_FOR = 288,
00194      KW_WHILE = 289,
00195      KW_CASE = 290,
00196      KW_PATTERN = 291,
00197      KW_DEFAULT = 292,
00198      KW_CATCH = 293,
00199      KW_SWITCHES = 294,
00200      KW_ESWITCHES = 295,
00201      KW_INCLUDES = 296,
00202      KW_LOCAL = 297,
00203      word = 298
00204    };


Function Documentation

static char * ael_token_subst ( const char *  mess  )  [static]

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

References calloc, and len().

Referenced by yyerror().

03912 {
03913    /* calc a length, malloc, fill, and return; yyerror had better free it! */
03914    int len=0,i;
03915    const char *p;
03916    char *res, *s,*t;
03917    int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*);
03918 
03919    for (p=mess; *p; p++) {
03920       for (i=0; i<token_equivs_entries; i++) {
03921          if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 )
03922          {
03923             len+=strlen(token_equivs2[i])+2;
03924             p += strlen(token_equivs1[i])-1;
03925             break;
03926          }
03927       }
03928       len++;
03929    }
03930    res = calloc(1, len+1);
03931    res[0] = 0;
03932    s = res;
03933    for (p=mess; *p;) {
03934       int found = 0;
03935       for (i=0; i<token_equivs_entries; i++) {
03936          if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) {
03937             *s++ = '\'';
03938             for (t=token_equivs2[i]; *t;) {
03939                *s++ = *t++;
03940             }
03941             *s++ = '\'';
03942             p += strlen(token_equivs1[i]);
03943             found = 1;
03944             break;
03945          }
03946       }
03947       if( !found )
03948          *s++ = *p++;
03949    }
03950    *s++ = 0;
03951    return res;
03952 }

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

pval* linku1 ( pval head,
pval tail 
)

Definition at line 5927 of file pval.c.

References pval::next, pval::prev, and pval::u1_last.

05928 {
05929    if (!head)
05930       return tail;
05931    if (tail) {
05932       if (!head->next) {
05933          head->next = tail;
05934       } else {
05935          head->u1_last->next = tail;
05936       }
05937       head->u1_last = tail;
05938       tail->prev = head; /* the dad link only points to containers */
05939    }
05940    return head;
05941 }

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

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

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

References first, last, and npval().

Referenced by nword(), and yyparse().

03980 {
03981    return npval(type, first->first_line, last->last_line,
03982          first->first_column, last->last_column);
03983 }

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

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

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

Referenced by yyparse().

03994 {
03995    pval *p = npval2(PV_WORD, pos, pos);
03996    if (p)
03997       p->u1.str = string;
03998    return p;
03999 }

void reset_argcount ( yyscan_t  yyscanner  ) 

Referenced by yyparse().

void reset_parencount ( yyscan_t  yyscanner  ) 

Referenced by yyparse().

void reset_semicount ( yyscan_t  yyscanner  ) 

Referenced by yyparse().

static void set_dads ( pval dad,
pval child_list 
) [static]

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

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

Referenced by yyparse().

04003 {
04004    struct pval *t;
04005    
04006    for(t=child_list;t;t=t->next)  /* simple stuff */
04007       t->dad = dad;
04008 }

static struct pval * update_last ( pval ,
YYLTYPE  
) [static]

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

References pval::endcol, pval::endline, and last.

Referenced by yyparse().

03986 {
03987    obj->endline = last->last_line;
03988    obj->endcol = last->last_column;
03989    return obj;
03990 }

static void yydestruct ( char *  yymsg,
int  yytype,
YYSTYPE yyvaluep,
YYLTYPE yylocationp,
struct parse_io parseio 
) const [static]

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

References destroy_pval(), free, prev_word, YYSTYPE::pval, YYSTYPE::str, YY_SYMBOL_PRINT, and YYUSE.

01487 {
01488   YYUSE (yyvaluep);
01489   YYUSE (yylocationp);
01490   YYUSE (parseio);
01491 
01492   if (!yymsg)
01493     yymsg = "Deleting";
01494   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01495 
01496   switch (yytype)
01497     {
01498       case 43: /* "word" */
01499 
01500 /* Line 1391 of yacc.c  */
01501 #line 183 "ael.y"
01502    { free((yyvaluep->str));};
01503 
01504 /* Line 1391 of yacc.c  */
01505 #line 1506 "ael.tab.c"
01506    break;
01507       case 46: /* "objects" */
01508 
01509 /* Line 1391 of yacc.c  */
01510 #line 170 "ael.y"
01511    {
01512       destroy_pval((yyvaluep->pval));
01513       prev_word=0;
01514    };
01515 
01516 /* Line 1391 of yacc.c  */
01517 #line 1518 "ael.tab.c"
01518    break;
01519       case 47: /* "object" */
01520 
01521 /* Line 1391 of yacc.c  */
01522 #line 170 "ael.y"
01523    {
01524       destroy_pval((yyvaluep->pval));
01525       prev_word=0;
01526    };
01527 
01528 /* Line 1391 of yacc.c  */
01529 #line 1530 "ael.tab.c"
01530    break;
01531       case 48: /* "context_name" */
01532 
01533 /* Line 1391 of yacc.c  */
01534 #line 183 "ael.y"
01535    { free((yyvaluep->str));};
01536 
01537 /* Line 1391 of yacc.c  */
01538 #line 1539 "ael.tab.c"
01539    break;
01540       case 49: /* "context" */
01541 
01542 /* Line 1391 of yacc.c  */
01543 #line 170 "ael.y"
01544    {
01545       destroy_pval((yyvaluep->pval));
01546       prev_word=0;
01547    };
01548 
01549 /* Line 1391 of yacc.c  */
01550 #line 1551 "ael.tab.c"
01551    break;
01552       case 51: /* "macro" */
01553 
01554 /* Line 1391 of yacc.c  */
01555 #line 170 "ael.y"
01556    {
01557       destroy_pval((yyvaluep->pval));
01558       prev_word=0;
01559    };
01560 
01561 /* Line 1391 of yacc.c  */
01562 #line 1563 "ael.tab.c"
01563    break;
01564       case 52: /* "globals" */
01565 
01566 /* Line 1391 of yacc.c  */
01567 #line 170 "ael.y"
01568    {
01569       destroy_pval((yyvaluep->pval));
01570       prev_word=0;
01571    };
01572 
01573 /* Line 1391 of yacc.c  */
01574 #line 1575 "ael.tab.c"
01575    break;
01576       case 53: /* "global_statements" */
01577 
01578 /* Line 1391 of yacc.c  */
01579 #line 170 "ael.y"
01580    {
01581       destroy_pval((yyvaluep->pval));
01582       prev_word=0;
01583    };
01584 
01585 /* Line 1391 of yacc.c  */
01586 #line 1587 "ael.tab.c"
01587    break;
01588       case 54: /* "assignment" */
01589 
01590 /* Line 1391 of yacc.c  */
01591 #line 170 "ael.y"
01592    {
01593       destroy_pval((yyvaluep->pval));
01594       prev_word=0;
01595    };
01596 
01597 /* Line 1391 of yacc.c  */
01598 #line 1599 "ael.tab.c"
01599    break;
01600       case 56: /* "local_assignment" */
01601 
01602 /* Line 1391 of yacc.c  */
01603 #line 170 "ael.y"
01604    {
01605       destroy_pval((yyvaluep->pval));
01606       prev_word=0;
01607    };
01608 
01609 /* Line 1391 of yacc.c  */
01610 #line 1611 "ael.tab.c"
01611    break;
01612       case 58: /* "arglist" */
01613 
01614 /* Line 1391 of yacc.c  */
01615 #line 170 "ael.y"
01616    {
01617       destroy_pval((yyvaluep->pval));
01618       prev_word=0;
01619    };
01620 
01621 /* Line 1391 of yacc.c  */
01622 #line 1623 "ael.tab.c"
01623    break;
01624       case 59: /* "elements" */
01625 
01626 /* Line 1391 of yacc.c  */
01627 #line 170 "ael.y"
01628    {
01629       destroy_pval((yyvaluep->pval));
01630       prev_word=0;
01631    };
01632 
01633 /* Line 1391 of yacc.c  */
01634 #line 1635 "ael.tab.c"
01635    break;
01636       case 60: /* "element" */
01637 
01638 /* Line 1391 of yacc.c  */
01639 #line 170 "ael.y"
01640    {
01641       destroy_pval((yyvaluep->pval));
01642       prev_word=0;
01643    };
01644 
01645 /* Line 1391 of yacc.c  */
01646 #line 1647 "ael.tab.c"
01647    break;
01648       case 61: /* "ignorepat" */
01649 
01650 /* Line 1391 of yacc.c  */
01651 #line 170 "ael.y"
01652    {
01653       destroy_pval((yyvaluep->pval));
01654       prev_word=0;
01655    };
01656 
01657 /* Line 1391 of yacc.c  */
01658 #line 1659 "ael.tab.c"
01659    break;
01660       case 62: /* "extension" */
01661 
01662 /* Line 1391 of yacc.c  */
01663 #line 170 "ael.y"
01664    {
01665       destroy_pval((yyvaluep->pval));
01666       prev_word=0;
01667    };
01668 
01669 /* Line 1391 of yacc.c  */
01670 #line 1671 "ael.tab.c"
01671    break;
01672       case 63: /* "statements" */
01673 
01674 /* Line 1391 of yacc.c  */
01675 #line 170 "ael.y"
01676    {
01677       destroy_pval((yyvaluep->pval));
01678       prev_word=0;
01679    };
01680 
01681 /* Line 1391 of yacc.c  */
01682 #line 1683 "ael.tab.c"
01683    break;
01684       case 64: /* "timerange" */
01685 
01686 /* Line 1391 of yacc.c  */
01687 #line 183 "ael.y"
01688    { free((yyvaluep->str));};
01689 
01690 /* Line 1391 of yacc.c  */
01691 #line 1692 "ael.tab.c"
01692    break;
01693       case 65: /* "timespec" */
01694 
01695 /* Line 1391 of yacc.c  */
01696 #line 170 "ael.y"
01697    {
01698       destroy_pval((yyvaluep->pval));
01699       prev_word=0;
01700    };
01701 
01702 /* Line 1391 of yacc.c  */
01703 #line 1704 "ael.tab.c"
01704    break;
01705       case 66: /* "test_expr" */
01706 
01707 /* Line 1391 of yacc.c  */
01708 #line 183 "ael.y"
01709    { free((yyvaluep->str));};
01710 
01711 /* Line 1391 of yacc.c  */
01712 #line 1713 "ael.tab.c"
01713    break;
01714       case 68: /* "if_like_head" */
01715 
01716 /* Line 1391 of yacc.c  */
01717 #line 170 "ael.y"
01718    {
01719       destroy_pval((yyvaluep->pval));
01720       prev_word=0;
01721    };
01722 
01723 /* Line 1391 of yacc.c  */
01724 #line 1725 "ael.tab.c"
01725    break;
01726       case 69: /* "word_list" */
01727 
01728 /* Line 1391 of yacc.c  */
01729 #line 183 "ael.y"
01730    { free((yyvaluep->str));};
01731 
01732 /* Line 1391 of yacc.c  */
01733 #line 1734 "ael.tab.c"
01734    break;
01735       case 71: /* "word3_list" */
01736 
01737 /* Line 1391 of yacc.c  */
01738 #line 183 "ael.y"
01739    { free((yyvaluep->str));};
01740 
01741 /* Line 1391 of yacc.c  */
01742 #line 1743 "ael.tab.c"
01743    break;
01744       case 72: /* "goto_word" */
01745 
01746 /* Line 1391 of yacc.c  */
01747 #line 183 "ael.y"
01748    { free((yyvaluep->str));};
01749 
01750 /* Line 1391 of yacc.c  */
01751 #line 1752 "ael.tab.c"
01752    break;
01753       case 73: /* "switch_statement" */
01754 
01755 /* Line 1391 of yacc.c  */
01756 #line 170 "ael.y"
01757    {
01758       destroy_pval((yyvaluep->pval));
01759       prev_word=0;
01760    };
01761 
01762 /* Line 1391 of yacc.c  */
01763 #line 1764 "ael.tab.c"
01764    break;
01765       case 74: /* "statement" */
01766 
01767 /* Line 1391 of yacc.c  */
01768 #line 170 "ael.y"
01769    {
01770       destroy_pval((yyvaluep->pval));
01771       prev_word=0;
01772    };
01773 
01774 /* Line 1391 of yacc.c  */
01775 #line 1776 "ael.tab.c"
01776    break;
01777       case 79: /* "opt_else" */
01778 
01779 /* Line 1391 of yacc.c  */
01780 #line 170 "ael.y"
01781    {
01782       destroy_pval((yyvaluep->pval));
01783       prev_word=0;
01784    };
01785 
01786 /* Line 1391 of yacc.c  */
01787 #line 1788 "ael.tab.c"
01788    break;
01789       case 80: /* "target" */
01790 
01791 /* Line 1391 of yacc.c  */
01792 #line 170 "ael.y"
01793    {
01794       destroy_pval((yyvaluep->pval));
01795       prev_word=0;
01796    };
01797 
01798 /* Line 1391 of yacc.c  */
01799 #line 1800 "ael.tab.c"
01800    break;
01801       case 81: /* "opt_pri" */
01802 
01803 /* Line 1391 of yacc.c  */
01804 #line 183 "ael.y"
01805    { free((yyvaluep->str));};
01806 
01807 /* Line 1391 of yacc.c  */
01808 #line 1809 "ael.tab.c"
01809    break;
01810       case 82: /* "jumptarget" */
01811 
01812 /* Line 1391 of yacc.c  */
01813 #line 170 "ael.y"
01814    {
01815       destroy_pval((yyvaluep->pval));
01816       prev_word=0;
01817    };
01818 
01819 /* Line 1391 of yacc.c  */
01820 #line 1821 "ael.tab.c"
01821    break;
01822       case 83: /* "macro_call" */
01823 
01824 /* Line 1391 of yacc.c  */
01825 #line 170 "ael.y"
01826    {
01827       destroy_pval((yyvaluep->pval));
01828       prev_word=0;
01829    };
01830 
01831 /* Line 1391 of yacc.c  */
01832 #line 1833 "ael.tab.c"
01833    break;
01834       case 85: /* "application_call_head" */
01835 
01836 /* Line 1391 of yacc.c  */
01837 #line 170 "ael.y"
01838    {
01839       destroy_pval((yyvaluep->pval));
01840       prev_word=0;
01841    };
01842 
01843 /* Line 1391 of yacc.c  */
01844 #line 1845 "ael.tab.c"
01845    break;
01846       case 87: /* "application_call" */
01847 
01848 /* Line 1391 of yacc.c  */
01849 #line 170 "ael.y"
01850    {
01851       destroy_pval((yyvaluep->pval));
01852       prev_word=0;
01853    };
01854 
01855 /* Line 1391 of yacc.c  */
01856 #line 1857 "ael.tab.c"
01857    break;
01858       case 88: /* "opt_word" */
01859 
01860 /* Line 1391 of yacc.c  */
01861 #line 183 "ael.y"
01862    { free((yyvaluep->str));};
01863 
01864 /* Line 1391 of yacc.c  */
01865 #line 1866 "ael.tab.c"
01866    break;
01867       case 89: /* "eval_arglist" */
01868 
01869 /* Line 1391 of yacc.c  */
01870 #line 170 "ael.y"
01871    {
01872       destroy_pval((yyvaluep->pval));
01873       prev_word=0;
01874    };
01875 
01876 /* Line 1391 of yacc.c  */
01877 #line 1878 "ael.tab.c"
01878    break;
01879       case 90: /* "case_statements" */
01880 
01881 /* Line 1391 of yacc.c  */
01882 #line 170 "ael.y"
01883    {
01884       destroy_pval((yyvaluep->pval));
01885       prev_word=0;
01886    };
01887 
01888 /* Line 1391 of yacc.c  */
01889 #line 1890 "ael.tab.c"
01890    break;
01891       case 91: /* "case_statement" */
01892 
01893 /* Line 1391 of yacc.c  */
01894 #line 170 "ael.y"
01895    {
01896       destroy_pval((yyvaluep->pval));
01897       prev_word=0;
01898    };
01899 
01900 /* Line 1391 of yacc.c  */
01901 #line 1902 "ael.tab.c"
01902    break;
01903       case 92: /* "macro_statements" */
01904 
01905 /* Line 1391 of yacc.c  */
01906 #line 170 "ael.y"
01907    {
01908       destroy_pval((yyvaluep->pval));
01909       prev_word=0;
01910    };
01911 
01912 /* Line 1391 of yacc.c  */
01913 #line 1914 "ael.tab.c"
01914    break;
01915       case 93: /* "macro_statement" */
01916 
01917 /* Line 1391 of yacc.c  */
01918 #line 170 "ael.y"
01919    {
01920       destroy_pval((yyvaluep->pval));
01921       prev_word=0;
01922    };
01923 
01924 /* Line 1391 of yacc.c  */
01925 #line 1926 "ael.tab.c"
01926    break;
01927       case 94: /* "switches" */
01928 
01929 /* Line 1391 of yacc.c  */
01930 #line 170 "ael.y"
01931    {
01932       destroy_pval((yyvaluep->pval));
01933       prev_word=0;
01934    };
01935 
01936 /* Line 1391 of yacc.c  */
01937 #line 1938 "ael.tab.c"
01938    break;
01939       case 95: /* "eswitches" */
01940 
01941 /* Line 1391 of yacc.c  */
01942 #line 170 "ael.y"
01943    {
01944       destroy_pval((yyvaluep->pval));
01945       prev_word=0;
01946    };
01947 
01948 /* Line 1391 of yacc.c  */
01949 #line 1950 "ael.tab.c"
01950    break;
01951       case 96: /* "switchlist" */
01952 
01953 /* Line 1391 of yacc.c  */
01954 #line 170 "ael.y"
01955    {
01956       destroy_pval((yyvaluep->pval));
01957       prev_word=0;
01958    };
01959 
01960 /* Line 1391 of yacc.c  */
01961 #line 1962 "ael.tab.c"
01962    break;
01963       case 97: /* "included_entry" */
01964 
01965 /* Line 1391 of yacc.c  */
01966 #line 170 "ael.y"
01967    {
01968       destroy_pval((yyvaluep->pval));
01969       prev_word=0;
01970    };
01971 
01972 /* Line 1391 of yacc.c  */
01973 #line 1974 "ael.tab.c"
01974    break;
01975       case 98: /* "includeslist" */
01976 
01977 /* Line 1391 of yacc.c  */
01978 #line 170 "ael.y"
01979    {
01980       destroy_pval((yyvaluep->pval));
01981       prev_word=0;
01982    };
01983 
01984 /* Line 1391 of yacc.c  */
01985 #line 1986 "ael.tab.c"
01986    break;
01987       case 99: /* "includes" */
01988 
01989 /* Line 1391 of yacc.c  */
01990 #line 170 "ael.y"
01991    {
01992       destroy_pval((yyvaluep->pval));
01993       prev_word=0;
01994    };
01995 
01996 /* Line 1391 of yacc.c  */
01997 #line 1998 "ael.tab.c"
01998    break;
01999 
02000       default:
02001    break;
02002     }
02003 }

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

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

References ael_token_subst(), ast_log(), YYLTYPE::first_column, YYLTYPE::first_line, free, YYLTYPE::last_column, YYLTYPE::last_line, LOG_ERROR, and parse_io::syntax_error_count.

03955 {
03956    char *s2 = ael_token_subst((char *)s);
03957    if (locp->first_line == locp->last_line) {
03958       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);
03959    } else {
03960       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);
03961    }
03962    free(s2);
03963    parseio->syntax_error_count++;
03964 }

int yyparse ( struct parse_io parseio  ) 

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

References pval::arglist, asprintf, ast_log(), calloc, destroy_pval(), pval::for_init, free, YYSTYPE::intval, linku1(), pval::list, LOG_WARNING, malloc, pval::next, npval(), npval2(), nword(), prev_word, PV_APPLICATION_CALL, PV_BREAK, PV_CASE, PV_CATCH, PV_CONTEXT, PV_CONTINUE, PV_DEFAULT, PV_ESWITCHES, PV_EXTENSION, PV_FOR, PV_GLOBALS, PV_GOTO, PV_IF, PV_IFTIME, PV_IGNOREPAT, PV_INCLUDES, PV_LABEL, PV_LOCALVARDEC, PV_MACRO, PV_MACRO_CALL, PV_PATTERN, PV_RANDOM, PV_RETURN, PV_STATEMENTBLOCK, PV_SWITCH, PV_SWITCHES, PV_VARDEC, PV_WHILE, PV_WORD, YYSTYPE::pval, reset_argcount(), reset_parencount(), reset_semicount(), set_dads(), pval::statements, pval::str, str, YYSTYPE::str, strdup, pval::u1, pval::u2, update_last(), 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.

02047 {
02048 /* The lookahead symbol.  */
02049 int yychar;
02050 
02051 /* The semantic value of the lookahead symbol.  */
02052 YYSTYPE yylval;
02053 
02054 /* Location data for the lookahead symbol.  */
02055 YYLTYPE yylloc;
02056 
02057     /* Number of syntax errors so far.  */
02058     int yynerrs;
02059 
02060     int yystate;
02061     /* Number of tokens to shift before error messages enabled.  */
02062     int yyerrstatus;
02063 
02064     /* The stacks and their tools:
02065        `yyss': related to states.
02066        `yyvs': related to semantic values.
02067        `yyls': related to locations.
02068 
02069        Refer to the stacks thru separate pointers, to allow yyoverflow
02070        to reallocate them elsewhere.  */
02071 
02072     /* The state stack.  */
02073     yytype_int16 yyssa[YYINITDEPTH];
02074     yytype_int16 *yyss;
02075     yytype_int16 *yyssp;
02076 
02077     /* The semantic value stack.  */
02078     YYSTYPE yyvsa[YYINITDEPTH];
02079     YYSTYPE *yyvs;
02080     YYSTYPE *yyvsp;
02081 
02082     /* The location stack.  */
02083     YYLTYPE yylsa[YYINITDEPTH];
02084     YYLTYPE *yyls;
02085     YYLTYPE *yylsp;
02086 
02087     /* The locations where the error started and ended.  */
02088     YYLTYPE yyerror_range[3];
02089 
02090     YYSIZE_T yystacksize;
02091 
02092   int yyn;
02093   int yyresult;
02094   /* Lookahead token as an internal (translated) token number.  */
02095   int yytoken;
02096   /* The variables used to return semantic value and location from the
02097      action routines.  */
02098   YYSTYPE yyval;
02099   YYLTYPE yyloc;
02100 
02101 #if YYERROR_VERBOSE
02102   /* Buffer for error messages, and its allocated size.  */
02103   char yymsgbuf[128];
02104   char *yymsg = yymsgbuf;
02105   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
02106 #endif
02107 
02108 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
02109 
02110   /* The number of symbols on the RHS of the reduced rule.
02111      Keep to zero when no symbol should be popped.  */
02112   int yylen = 0;
02113 
02114   yytoken = 0;
02115   yyss = yyssa;
02116   yyvs = yyvsa;
02117   yyls = yylsa;
02118   yystacksize = YYINITDEPTH;
02119 
02120   YYDPRINTF ((stderr, "Starting parse\n"));
02121 
02122   yystate = 0;
02123   yyerrstatus = 0;
02124   yynerrs = 0;
02125   yychar = YYEMPTY; /* Cause a token to be read.  */
02126 
02127   /* Initialize stack pointers.
02128      Waste one element of value and location stack
02129      so that they stay on the same level as the state stack.
02130      The wasted elements are never initialized.  */
02131   yyssp = yyss;
02132   yyvsp = yyvs;
02133   yylsp = yyls;
02134 
02135 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
02136   /* Initialize the default location before parsing starts.  */
02137   yylloc.first_line   = yylloc.last_line   = 1;
02138   yylloc.first_column = yylloc.last_column = 1;
02139 #endif
02140 
02141   goto yysetstate;
02142 
02143 /*------------------------------------------------------------.
02144 | yynewstate -- Push a new state, which is found in yystate.  |
02145 `------------------------------------------------------------*/
02146  yynewstate:
02147   /* In all cases, when you get here, the value and location stacks
02148      have just been pushed.  So pushing a state here evens the stacks.  */
02149   yyssp++;
02150 
02151  yysetstate:
02152   *yyssp = yystate;
02153 
02154   if (yyss + yystacksize - 1 <= yyssp)
02155     {
02156       /* Get the current used size of the three stacks, in elements.  */
02157       YYSIZE_T yysize = yyssp - yyss + 1;
02158 
02159 #ifdef yyoverflow
02160       {
02161    /* Give user a chance to reallocate the stack.  Use copies of
02162       these so that the &'s don't force the real ones into
02163       memory.  */
02164    YYSTYPE *yyvs1 = yyvs;
02165    yytype_int16 *yyss1 = yyss;
02166    YYLTYPE *yyls1 = yyls;
02167 
02168    /* Each stack pointer address is followed by the size of the
02169       data in use in that stack, in bytes.  This used to be a
02170       conditional around just the two extra args, but that might
02171       be undefined if yyoverflow is a macro.  */
02172    yyoverflow (YY_("memory exhausted"),
02173           &yyss1, yysize * sizeof (*yyssp),
02174           &yyvs1, yysize * sizeof (*yyvsp),
02175           &yyls1, yysize * sizeof (*yylsp),
02176           &yystacksize);
02177 
02178    yyls = yyls1;
02179    yyss = yyss1;
02180    yyvs = yyvs1;
02181       }
02182 #else /* no yyoverflow */
02183 # ifndef YYSTACK_RELOCATE
02184       goto yyexhaustedlab;
02185 # else
02186       /* Extend the stack our own way.  */
02187       if (YYMAXDEPTH <= yystacksize)
02188    goto yyexhaustedlab;
02189       yystacksize *= 2;
02190       if (YYMAXDEPTH < yystacksize)
02191    yystacksize = YYMAXDEPTH;
02192 
02193       {
02194    yytype_int16 *yyss1 = yyss;
02195    union yyalloc *yyptr =
02196      (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
02197    if (! yyptr)
02198      goto yyexhaustedlab;
02199    YYSTACK_RELOCATE (yyss_alloc, yyss);
02200    YYSTACK_RELOCATE (yyvs_alloc, yyvs);
02201    YYSTACK_RELOCATE (yyls_alloc, yyls);
02202 #  undef YYSTACK_RELOCATE
02203    if (yyss1 != yyssa)
02204      YYSTACK_FREE (yyss1);
02205       }
02206 # endif
02207 #endif /* no yyoverflow */
02208 
02209       yyssp = yyss + yysize - 1;
02210       yyvsp = yyvs + yysize - 1;
02211       yylsp = yyls + yysize - 1;
02212 
02213       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
02214         (unsigned long int) yystacksize));
02215 
02216       if (yyss + yystacksize - 1 <= yyssp)
02217    YYABORT;
02218     }
02219 
02220   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
02221 
02222   if (yystate == YYFINAL)
02223     YYACCEPT;
02224 
02225   goto yybackup;
02226 
02227 /*-----------.
02228 | yybackup.  |
02229 `-----------*/
02230 yybackup:
02231 
02232   /* Do appropriate processing given the current state.  Read a
02233      lookahead token if we need one and don't already have one.  */
02234 
02235   /* First try to decide what to do without reference to lookahead token.  */
02236   yyn = yypact[yystate];
02237   if (yypact_value_is_default (yyn))
02238     goto yydefault;
02239 
02240   /* Not known => get a lookahead token if don't already have one.  */
02241 
02242   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
02243   if (yychar == YYEMPTY)
02244     {
02245       YYDPRINTF ((stderr, "Reading a token: "));
02246       yychar = YYLEX;
02247     }
02248 
02249   if (yychar <= YYEOF)
02250     {
02251       yychar = yytoken = YYEOF;
02252       YYDPRINTF ((stderr, "Now at end of input.\n"));
02253     }
02254   else
02255     {
02256       yytoken = YYTRANSLATE (yychar);
02257       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
02258     }
02259 
02260   /* If the proper action on seeing token YYTOKEN is to reduce or to
02261      detect an error, take that action.  */
02262   yyn += yytoken;
02263   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
02264     goto yydefault;
02265   yyn = yytable[yyn];
02266   if (yyn <= 0)
02267     {
02268       if (yytable_value_is_error (yyn))
02269         goto yyerrlab;
02270       yyn = -yyn;
02271       goto yyreduce;
02272     }
02273 
02274   /* Count tokens shifted since error; after three, turn off error
02275      status.  */
02276   if (yyerrstatus)
02277     yyerrstatus--;
02278 
02279   /* Shift the lookahead token.  */
02280   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
02281 
02282   /* Discard the shifted token.  */
02283   yychar = YYEMPTY;
02284 
02285   yystate = yyn;
02286   *++yyvsp = yylval;
02287   *++yylsp = yylloc;
02288   goto yynewstate;
02289 
02290 
02291 /*-----------------------------------------------------------.
02292 | yydefault -- do the default action for the current state.  |
02293 `-----------------------------------------------------------*/
02294 yydefault:
02295   yyn = yydefact[yystate];
02296   if (yyn == 0)
02297     goto yyerrlab;
02298   goto yyreduce;
02299 
02300 
02301 /*-----------------------------.
02302 | yyreduce -- Do a reduction.  |
02303 `-----------------------------*/
02304 yyreduce:
02305   /* yyn is the number of a rule to reduce with.  */
02306   yylen = yyr2[yyn];
02307 
02308   /* If YYLEN is nonzero, implement the default value of the action:
02309      `$$ = $1'.
02310 
02311      Otherwise, the following line sets YYVAL to garbage.
02312      This behavior is undocumented and Bison
02313      users should not rely upon it.  Assigning to YYVAL
02314      unconditionally makes the parser a bit smaller, and it avoids a
02315      GCC warning that YYVAL may be used uninitialized.  */
02316   yyval = yyvsp[1-yylen];
02317 
02318   /* Default location.  */
02319   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
02320   YY_REDUCE_PRINT (yyn);
02321   switch (yyn)
02322     {
02323         case 2:
02324 
02325 /* Line 1806 of yacc.c  */
02326 #line 191 "ael.y"
02327     { (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); }
02328     break;
02329 
02330   case 3:
02331 
02332 /* Line 1806 of yacc.c  */
02333 #line 194 "ael.y"
02334     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02335     break;
02336 
02337   case 4:
02338 
02339 /* Line 1806 of yacc.c  */
02340 #line 195 "ael.y"
02341     { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
02342     break;
02343 
02344   case 5:
02345 
02346 /* Line 1806 of yacc.c  */
02347 #line 196 "ael.y"
02348     {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
02349     break;
02350 
02351   case 6:
02352 
02353 /* Line 1806 of yacc.c  */
02354 #line 199 "ael.y"
02355     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02356     break;
02357 
02358   case 7:
02359 
02360 /* Line 1806 of yacc.c  */
02361 #line 200 "ael.y"
02362     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02363     break;
02364 
02365   case 8:
02366 
02367 /* Line 1806 of yacc.c  */
02368 #line 201 "ael.y"
02369     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02370     break;
02371 
02372   case 9:
02373 
02374 /* Line 1806 of yacc.c  */
02375 #line 202 "ael.y"
02376     {(yyval.pval)=0;/* allow older docs to be read */}
02377     break;
02378 
02379   case 10:
02380 
02381 /* Line 1806 of yacc.c  */
02382 #line 205 "ael.y"
02383     { (yyval.str) = (yyvsp[(1) - (1)].str); }
02384     break;
02385 
02386   case 11:
02387 
02388 /* Line 1806 of yacc.c  */
02389 #line 206 "ael.y"
02390     { (yyval.str) = strdup("default"); }
02391     break;
02392 
02393   case 12:
02394 
02395 /* Line 1806 of yacc.c  */
02396 #line 209 "ael.y"
02397     {
02398       (yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
02399       (yyval.pval)->u1.str = (yyvsp[(3) - (6)].str);
02400       (yyval.pval)->u2.statements = (yyvsp[(5) - (6)].pval);
02401       set_dads((yyval.pval),(yyvsp[(5) - (6)].pval));
02402       (yyval.pval)->u3.abstract = (yyvsp[(1) - (6)].intval);}
02403     break;
02404 
02405   case 13:
02406 
02407 /* Line 1806 of yacc.c  */
02408 #line 218 "ael.y"
02409     { (yyval.intval) = 1; }
02410     break;
02411 
02412   case 14:
02413 
02414 /* Line 1806 of yacc.c  */
02415 #line 219 "ael.y"
02416     { (yyval.intval) = 0; }
02417     break;
02418 
02419   case 15:
02420 
02421 /* Line 1806 of yacc.c  */
02422 #line 220 "ael.y"
02423     { (yyval.intval) = 2; }
02424     break;
02425 
02426   case 16:
02427 
02428 /* Line 1806 of yacc.c  */
02429 #line 221 "ael.y"
02430     { (yyval.intval)=3; }
02431     break;
02432 
02433   case 17:
02434 
02435 /* Line 1806 of yacc.c  */
02436 #line 222 "ael.y"
02437     { (yyval.intval)=3; }
02438     break;
02439 
02440   case 18:
02441 
02442 /* Line 1806 of yacc.c  */
02443 #line 225 "ael.y"
02444     {
02445       (yyval.pval) = npval2(PV_MACRO, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
02446       (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);
02447         set_dads((yyval.pval),(yyvsp[(7) - (8)].pval));}
02448     break;
02449 
02450   case 19:
02451 
02452 /* Line 1806 of yacc.c  */
02453 #line 231 "ael.y"
02454     {
02455       (yyval.pval) = npval2(PV_GLOBALS, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
02456       (yyval.pval)->u1.statements = (yyvsp[(3) - (4)].pval);
02457         set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
02458     break;
02459 
02460   case 20:
02461 
02462 /* Line 1806 of yacc.c  */
02463 #line 237 "ael.y"
02464     { (yyval.pval) = NULL; }
02465     break;
02466 
02467   case 21:
02468 
02469 /* Line 1806 of yacc.c  */
02470 #line 238 "ael.y"
02471     {(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
02472     break;
02473 
02474   case 22:
02475 
02476 /* Line 1806 of yacc.c  */
02477 #line 239 "ael.y"
02478     {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
02479     break;
02480 
02481   case 23:
02482 
02483 /* Line 1806 of yacc.c  */
02484 #line 242 "ael.y"
02485     { reset_semicount(parseio->scanner); }
02486     break;
02487 
02488   case 24:
02489 
02490 /* Line 1806 of yacc.c  */
02491 #line 242 "ael.y"
02492     {
02493       (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
02494       (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
02495       (yyval.pval)->u2.val = (yyvsp[(4) - (5)].str); }
02496     break;
02497 
02498   case 25:
02499 
02500 /* Line 1806 of yacc.c  */
02501 #line 248 "ael.y"
02502     { reset_semicount(parseio->scanner); }
02503     break;
02504 
02505   case 26:
02506 
02507 /* Line 1806 of yacc.c  */
02508 #line 248 "ael.y"
02509     {
02510       (yyval.pval) = npval2(PV_LOCALVARDEC, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
02511       (yyval.pval)->u1.str = (yyvsp[(2) - (6)].str);
02512       (yyval.pval)->u2.val = (yyvsp[(5) - (6)].str); }
02513     break;
02514 
02515   case 27:
02516 
02517 /* Line 1806 of yacc.c  */
02518 #line 255 "ael.y"
02519     { (yyval.pval) = NULL; }
02520     break;
02521 
02522   case 28:
02523 
02524 /* Line 1806 of yacc.c  */
02525 #line 256 "ael.y"
02526     { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
02527     break;
02528 
02529   case 29:
02530 
02531 /* Line 1806 of yacc.c  */
02532 #line 257 "ael.y"
02533     { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
02534     break;
02535 
02536   case 30:
02537 
02538 /* Line 1806 of yacc.c  */
02539 #line 258 "ael.y"
02540     {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
02541     break;
02542 
02543   case 31:
02544 
02545 /* Line 1806 of yacc.c  */
02546 #line 261 "ael.y"
02547     {(yyval.pval)=0;}
02548     break;
02549 
02550   case 32:
02551 
02552 /* Line 1806 of yacc.c  */
02553 #line 262 "ael.y"
02554     { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
02555     break;
02556 
02557   case 33:
02558 
02559 /* Line 1806 of yacc.c  */
02560 #line 263 "ael.y"
02561     { (yyval.pval)=(yyvsp[(2) - (2)].pval);}
02562     break;
02563 
02564   case 34:
02565 
02566 /* Line 1806 of yacc.c  */
02567 #line 266 "ael.y"
02568     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02569     break;
02570 
02571   case 35:
02572 
02573 /* Line 1806 of yacc.c  */
02574 #line 267 "ael.y"
02575     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02576     break;
02577 
02578   case 36:
02579 
02580 /* Line 1806 of yacc.c  */
02581 #line 268 "ael.y"
02582     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02583     break;
02584 
02585   case 37:
02586 
02587 /* Line 1806 of yacc.c  */
02588 #line 269 "ael.y"
02589     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02590     break;
02591 
02592   case 38:
02593 
02594 /* Line 1806 of yacc.c  */
02595 #line 270 "ael.y"
02596     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02597     break;
02598 
02599   case 39:
02600 
02601 /* Line 1806 of yacc.c  */
02602 #line 271 "ael.y"
02603     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02604     break;
02605 
02606   case 40:
02607 
02608 /* Line 1806 of yacc.c  */
02609 #line 272 "ael.y"
02610     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
02611     break;
02612 
02613   case 41:
02614 
02615 /* Line 1806 of yacc.c  */
02616 #line 273 "ael.y"
02617     {free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;}
02618     break;
02619 
02620   case 42:
02621 
02622 /* Line 1806 of yacc.c  */
02623 #line 274 "ael.y"
02624     {(yyval.pval)=0;/* allow older docs to be read */}
02625     break;
02626 
02627   case 43:
02628 
02629 /* Line 1806 of yacc.c  */
02630 #line 277 "ael.y"
02631     {
02632       (yyval.pval) = npval2(PV_IGNOREPAT, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
02633       (yyval.pval)->u1.str = (yyvsp[(3) - (4)].str);}
02634     break;
02635 
02636   case 44:
02637 
02638 /* Line 1806 of yacc.c  */
02639 #line 282 "ael.y"
02640     {
02641       (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
02642       (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
02643       (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
02644     break;
02645 
02646   case 45:
02647 
02648 /* Line 1806 of yacc.c  */
02649 #line 286 "ael.y"
02650     {
02651       (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (5)]), &(yylsp[(3) - (5)]));
02652       (yyval.pval)->u1.str = malloc(strlen((yyvsp[(1) - (5)].str))+strlen((yyvsp[(3) - (5)].str))+2);
02653       strcpy((yyval.pval)->u1.str,(yyvsp[(1) - (5)].str));
02654       strcat((yyval.pval)->u1.str,"@");
02655       strcat((yyval.pval)->u1.str,(yyvsp[(3) - (5)].str));
02656       free((yyvsp[(1) - (5)].str));
02657       (yyval.pval)->u2.statements = (yyvsp[(5) - (5)].pval); set_dads((yyval.pval),(yyvsp[(5) - (5)].pval));}
02658     break;
02659 
02660   case 46:
02661 
02662 /* Line 1806 of yacc.c  */
02663 #line 294 "ael.y"
02664     {
02665       (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
02666       (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
02667       (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));
02668       (yyval.pval)->u4.regexten=1;}
02669     break;
02670 
02671   case 47:
02672 
02673 /* Line 1806 of yacc.c  */
02674 #line 299 "ael.y"
02675     {
02676       (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (7)]), &(yylsp[(7) - (7)]));
02677       (yyval.pval)->u1.str = (yyvsp[(5) - (7)].str);
02678       (yyval.pval)->u2.statements = (yyvsp[(7) - (7)].pval); set_dads((yyval.pval),(yyvsp[(7) - (7)].pval));
02679       (yyval.pval)->u3.hints = (yyvsp[(3) - (7)].str);}
02680     break;
02681 
02682   case 48:
02683 
02684 /* Line 1806 of yacc.c  */
02685 #line 304 "ael.y"
02686     {
02687       (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
02688       (yyval.pval)->u1.str = (yyvsp[(6) - (8)].str);
02689       (yyval.pval)->u2.statements = (yyvsp[(8) - (8)].pval); set_dads((yyval.pval),(yyvsp[(8) - (8)].pval));
02690       (yyval.pval)->u4.regexten=1;
02691       (yyval.pval)->u3.hints = (yyvsp[(4) - (8)].str);}
02692     break;
02693 
02694   case 49:
02695 
02696 /* Line 1806 of yacc.c  */
02697 #line 313 "ael.y"
02698     { (yyval.pval) = NULL; }
02699     break;
02700 
02701   case 50:
02702 
02703 /* Line 1806 of yacc.c  */
02704 #line 314 "ael.y"
02705     { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
02706     break;
02707 
02708   case 51:
02709 
02710 /* Line 1806 of yacc.c  */
02711 #line 315 "ael.y"
02712     {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
02713     break;
02714 
02715   case 52:
02716 
02717 /* Line 1806 of yacc.c  */
02718 #line 321 "ael.y"
02719     {
02720       if (asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str)) < 0) {
02721          ast_log(LOG_WARNING, "asprintf() failed\n");
02722          (yyval.str) = NULL;
02723       } else {
02724          free((yyvsp[(1) - (5)].str));
02725          free((yyvsp[(3) - (5)].str));
02726          free((yyvsp[(5) - (5)].str));
02727       }
02728    }
02729     break;
02730 
02731   case 53:
02732 
02733 /* Line 1806 of yacc.c  */
02734 #line 331 "ael.y"
02735     { (yyval.str) = (yyvsp[(1) - (1)].str); }
02736     break;
02737 
02738   case 54:
02739 
02740 /* Line 1806 of yacc.c  */
02741 #line 335 "ael.y"
02742     {
02743       (yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)]));
02744       (yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)]));
02745       (yyval.pval)->next->next = nword((yyvsp[(5) - (7)].str), &(yylsp[(5) - (7)]));
02746       (yyval.pval)->next->next->next = nword((yyvsp[(7) - (7)].str), &(yylsp[(7) - (7)])); }
02747     break;
02748 
02749   case 55:
02750 
02751 /* Line 1806 of yacc.c  */
02752 #line 343 "ael.y"
02753     { reset_parencount(parseio->scanner); }
02754     break;
02755 
02756   case 56:
02757 
02758 /* Line 1806 of yacc.c  */
02759 #line 343 "ael.y"
02760     { (yyval.str) = (yyvsp[(3) - (4)].str); }
02761     break;
02762 
02763   case 57:
02764 
02765 /* Line 1806 of yacc.c  */
02766 #line 347 "ael.y"
02767     {
02768       (yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
02769       (yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); }
02770     break;
02771 
02772   case 58:
02773 
02774 /* Line 1806 of yacc.c  */
02775 #line 350 "ael.y"
02776     {
02777       (yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
02778       (yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);}
02779     break;
02780 
02781   case 59:
02782 
02783 /* Line 1806 of yacc.c  */
02784 #line 353 "ael.y"
02785     {
02786       (yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
02787       (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);
02788       prev_word = 0; }
02789     break;
02790 
02791   case 60:
02792 
02793 /* Line 1806 of yacc.c  */
02794 #line 364 "ael.y"
02795     { (yyval.str) = (yyvsp[(1) - (1)].str);}
02796     break;
02797 
02798   case 61:
02799 
02800 /* Line 1806 of yacc.c  */
02801 #line 365 "ael.y"
02802     {
02803       if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
02804          ast_log(LOG_WARNING, "asprintf() failed\n");
02805          (yyval.str) = NULL;
02806       } else {
02807          free((yyvsp[(1) - (2)].str));
02808          free((yyvsp[(2) - (2)].str));
02809          prev_word = (yyval.str);
02810       }
02811    }
02812     break;
02813 
02814   case 62:
02815 
02816 /* Line 1806 of yacc.c  */
02817 #line 377 "ael.y"
02818     { (yyval.str) = (yyvsp[(1) - (1)].str); }
02819     break;
02820 
02821   case 63:
02822 
02823 /* Line 1806 of yacc.c  */
02824 #line 378 "ael.y"
02825     {
02826       if (asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
02827          ast_log(LOG_WARNING, "asprintf() failed\n");
02828          (yyval.str) = NULL;
02829       } else {
02830          free((yyvsp[(1) - (2)].str));
02831          free((yyvsp[(2) - (2)].str));
02832       }
02833    }
02834     break;
02835 
02836   case 64:
02837 
02838 /* Line 1806 of yacc.c  */
02839 #line 387 "ael.y"
02840     {
02841       if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
02842          ast_log(LOG_WARNING, "asprintf() failed\n");
02843          (yyval.str) = NULL;
02844       } else {
02845          free((yyvsp[(1) - (3)].str));
02846          free((yyvsp[(3) - (3)].str));
02847       }
02848    }
02849     break;
02850 
02851   case 65:
02852 
02853 /* Line 1806 of yacc.c  */
02854 #line 396 "ael.y"
02855     {  /* there are often '&' in hints */
02856       if (asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
02857          ast_log(LOG_WARNING, "asprintf() failed\n");
02858          (yyval.str) = NULL;
02859       } else {
02860          free((yyvsp[(1) - (3)].str));
02861          free((yyvsp[(3) - (3)].str));
02862       }
02863    }
02864     break;
02865 
02866   case 66:
02867 
02868 /* Line 1806 of yacc.c  */
02869 #line 405 "ael.y"
02870     {
02871       if (asprintf(&((yyval.str)), "%s@%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
02872          ast_log(LOG_WARNING, "asprintf() failed\n");
02873          (yyval.str) = NULL;
02874       } else {
02875          free((yyvsp[(1) - (3)].str));
02876          free((yyvsp[(3) - (3)].str));
02877       }
02878    }
02879     break;
02880 
02881   case 67:
02882 
02883 /* Line 1806 of yacc.c  */
02884 #line 416 "ael.y"
02885     { (yyval.str) = (yyvsp[(1) - (1)].str);}
02886     break;
02887 
02888   case 68:
02889 
02890 /* Line 1806 of yacc.c  */
02891 #line 417 "ael.y"
02892     {
02893       if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
02894          ast_log(LOG_WARNING, "asprintf() failed\n");
02895          (yyval.str) = NULL;
02896       } else {
02897          free((yyvsp[(1) - (2)].str));
02898          free((yyvsp[(2) - (2)].str));
02899          prev_word = (yyval.str);
02900       }        
02901    }
02902     break;
02903 
02904   case 69:
02905 
02906 /* Line 1806 of yacc.c  */
02907 #line 427 "ael.y"
02908     {
02909       if (asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
02910          ast_log(LOG_WARNING, "asprintf() failed\n");
02911          (yyval.str) = NULL;
02912       } else {
02913          free((yyvsp[(1) - (3)].str));
02914          free((yyvsp[(2) - (3)].str));
02915          free((yyvsp[(3) - (3)].str));
02916          prev_word=(yyval.str);
02917       }
02918    }
02919     break;
02920 
02921   case 70:
02922 
02923 /* Line 1806 of yacc.c  */
02924 #line 440 "ael.y"
02925     { (yyval.str) = (yyvsp[(1) - (1)].str);}
02926     break;
02927 
02928   case 71:
02929 
02930 /* Line 1806 of yacc.c  */
02931 #line 441 "ael.y"
02932     {
02933       if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
02934          ast_log(LOG_WARNING, "asprintf() failed\n");
02935          (yyval.str) = NULL;
02936       } else {
02937          free((yyvsp[(1) - (2)].str));
02938          free((yyvsp[(2) - (2)].str));
02939       }
02940    }
02941     break;
02942 
02943   case 72:
02944 
02945 /* Line 1806 of yacc.c  */
02946 #line 450 "ael.y"
02947     {
02948       if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
02949          ast_log(LOG_WARNING, "asprintf() failed\n");
02950          (yyval.str) = NULL;
02951       } else {
02952          free((yyvsp[(1) - (3)].str));
02953          free((yyvsp[(3) - (3)].str));
02954       }
02955    }
02956     break;
02957 
02958   case 73:
02959 
02960 /* Line 1806 of yacc.c  */
02961 #line 461 "ael.y"
02962     {
02963       (yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
02964       (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
02965       (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
02966     break;
02967 
02968   case 74:
02969 
02970 /* Line 1806 of yacc.c  */
02971 #line 470 "ael.y"
02972     {
02973       (yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
02974       (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));}
02975     break;
02976 
02977   case 75:
02978 
02979 /* Line 1806 of yacc.c  */
02980 #line 473 "ael.y"
02981     { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
02982     break;
02983 
02984   case 76:
02985 
02986 /* Line 1806 of yacc.c  */
02987 #line 474 "ael.y"
02988     { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
02989     break;
02990 
02991   case 77:
02992 
02993 /* Line 1806 of yacc.c  */
02994 #line 475 "ael.y"
02995     {
02996       (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
02997       (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
02998     break;
02999 
03000   case 78:
03001 
03002 /* Line 1806 of yacc.c  */
03003 #line 478 "ael.y"
03004     {
03005       (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
03006       (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
03007     break;
03008 
03009   case 79:
03010 
03011 /* Line 1806 of yacc.c  */
03012 #line 481 "ael.y"
03013     {
03014       (yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
03015       (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); }
03016     break;
03017 
03018   case 80:
03019 
03020 /* Line 1806 of yacc.c  */
03021 #line 484 "ael.y"
03022     {reset_semicount(parseio->scanner);}
03023     break;
03024 
03025   case 81:
03026 
03027 /* Line 1806 of yacc.c  */
03028 #line 485 "ael.y"
03029     {reset_semicount(parseio->scanner);}
03030     break;
03031 
03032   case 82:
03033 
03034 /* Line 1806 of yacc.c  */
03035 #line 486 "ael.y"
03036     {reset_parencount(parseio->scanner);}
03037     break;
03038 
03039   case 83:
03040 
03041 /* Line 1806 of yacc.c  */
03042 #line 486 "ael.y"
03043     { /* XXX word_list maybe ? */
03044       (yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)]));
03045       (yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str);
03046       (yyval.pval)->u2.for_test=(yyvsp[(7) - (12)].str);
03047       (yyval.pval)->u3.for_inc = (yyvsp[(10) - (12)].str);
03048       (yyval.pval)->u4.for_statements = (yyvsp[(12) - (12)].pval); set_dads((yyval.pval),(yyvsp[(12) - (12)].pval));}
03049     break;
03050 
03051   case 84:
03052 
03053 /* Line 1806 of yacc.c  */
03054 #line 492 "ael.y"
03055     {
03056       (yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
03057       (yyval.pval)->u1.str = (yyvsp[(2) - (3)].str);
03058       (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
03059     break;
03060 
03061   case 85:
03062 
03063 /* Line 1806 of yacc.c  */
03064 #line 496 "ael.y"
03065     { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
03066     break;
03067 
03068   case 86:
03069 
03070 /* Line 1806 of yacc.c  */
03071 #line 497 "ael.y"
03072     { (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); }
03073     break;
03074 
03075   case 87:
03076 
03077 /* Line 1806 of yacc.c  */
03078 #line 498 "ael.y"
03079     { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
03080     break;
03081 
03082   case 88:
03083 
03084 /* Line 1806 of yacc.c  */
03085 #line 499 "ael.y"
03086     {
03087       (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
03088       (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);}
03089     break;
03090 
03091   case 89:
03092 
03093 /* Line 1806 of yacc.c  */
03094 #line 502 "ael.y"
03095     {reset_semicount(parseio->scanner);}
03096     break;
03097 
03098   case 90:
03099 
03100 /* Line 1806 of yacc.c  */
03101 #line 502 "ael.y"
03102     {
03103       char *bufx;
03104       int tot=0;
03105       pval *pptr;
03106       (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
03107       (yyval.pval)->u2.val=(yyvsp[(4) - (5)].str);
03108       /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
03109       /* string to big to fit in the buffer? */
03110       tot+=strlen((yyvsp[(1) - (5)].pval)->u1.str);
03111       for(pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
03112          tot+=strlen(pptr->u1.str);
03113          tot++; /* for a sep like a comma */
03114       }
03115       tot+=4; /* for safety */
03116       bufx = calloc(1, tot);
03117       strcpy(bufx,(yyvsp[(1) - (5)].pval)->u1.str);
03118       strcat(bufx,"(");
03119       /* XXX need to advance the pointer or the loop is very inefficient */
03120       for (pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
03121          if ( pptr != (yyvsp[(1) - (5)].pval)->u2.arglist )
03122             strcat(bufx,",");
03123          strcat(bufx,pptr->u1.str);
03124       }
03125       strcat(bufx,")");
03126 #ifdef AAL_ARGCHECK
03127       if ( !ael_is_funcname((yyvsp[(1) - (5)].pval)->u1.str) )
03128          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",
03129             my_file, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column, (yylsp[(1) - (5)]).last_column, (yyvsp[(1) - (5)].pval)->u1.str);
03130 #endif
03131       (yyval.pval)->u1.str = bufx;
03132       destroy_pval((yyvsp[(1) - (5)].pval)); /* the app call it is not, get rid of that chain */
03133       prev_word = 0;
03134    }
03135     break;
03136 
03137   case 91:
03138 
03139 /* Line 1806 of yacc.c  */
03140 #line 535 "ael.y"
03141     { (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
03142     break;
03143 
03144   case 92:
03145 
03146 /* Line 1806 of yacc.c  */
03147 #line 536 "ael.y"
03148     { (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
03149     break;
03150 
03151   case 93:
03152 
03153 /* Line 1806 of yacc.c  */
03154 #line 537 "ael.y"
03155     { (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
03156     break;
03157 
03158   case 94:
03159 
03160 /* Line 1806 of yacc.c  */
03161 #line 538 "ael.y"
03162     {
03163       (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)]));
03164       (yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));
03165       (yyval.pval)->u3.else_statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
03166     break;
03167 
03168   case 95:
03169 
03170 /* Line 1806 of yacc.c  */
03171 #line 542 "ael.y"
03172     { (yyval.pval)=0; }
03173     break;
03174 
03175   case 96:
03176 
03177 /* Line 1806 of yacc.c  */
03178 #line 545 "ael.y"
03179     { (yyval.pval) = (yyvsp[(2) - (2)].pval); }
03180     break;
03181 
03182   case 97:
03183 
03184 /* Line 1806 of yacc.c  */
03185 #line 546 "ael.y"
03186     { (yyval.pval) = NULL ; }
03187     break;
03188 
03189   case 98:
03190 
03191 /* Line 1806 of yacc.c  */
03192 #line 549 "ael.y"
03193     { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
03194     break;
03195 
03196   case 99:
03197 
03198 /* Line 1806 of yacc.c  */
03199 #line 550 "ael.y"
03200     {
03201       (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
03202       (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
03203     break;
03204 
03205   case 100:
03206 
03207 /* Line 1806 of yacc.c  */
03208 #line 553 "ael.y"
03209     {
03210       (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
03211       (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
03212     break;
03213 
03214   case 101:
03215 
03216 /* Line 1806 of yacc.c  */
03217 #line 556 "ael.y"
03218     {
03219       (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
03220       (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
03221       (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
03222     break;
03223 
03224   case 102:
03225 
03226 /* Line 1806 of yacc.c  */
03227 #line 560 "ael.y"
03228     {
03229       (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
03230       (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
03231       (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
03232     break;
03233 
03234   case 103:
03235 
03236 /* Line 1806 of yacc.c  */
03237 #line 564 "ael.y"
03238     {
03239       (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
03240       (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
03241       (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
03242     break;
03243 
03244   case 104:
03245 
03246 /* Line 1806 of yacc.c  */
03247 #line 568 "ael.y"
03248     {
03249       (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
03250       (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
03251       (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
03252     break;
03253 
03254   case 105:
03255 
03256 /* Line 1806 of yacc.c  */
03257 #line 574 "ael.y"
03258     { (yyval.str) = strdup("1"); }
03259     break;
03260 
03261   case 106:
03262 
03263 /* Line 1806 of yacc.c  */
03264 #line 575 "ael.y"
03265     { (yyval.str) = (yyvsp[(2) - (2)].str); }
03266     break;
03267 
03268   case 107:
03269 
03270 /* Line 1806 of yacc.c  */
03271 #line 579 "ael.y"
03272     {       /* ext[, pri] default 1 */
03273       (yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)]));
03274       (yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); }
03275     break;
03276 
03277   case 108:
03278 
03279 /* Line 1806 of yacc.c  */
03280 #line 582 "ael.y"
03281     { /* context, ext, pri */
03282       (yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)]));
03283       (yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)]));
03284       (yyval.pval)->next->next = nword((yyvsp[(2) - (4)].str), &(yylsp[(2) - (4)])); }
03285     break;
03286 
03287   case 109:
03288 
03289 /* Line 1806 of yacc.c  */
03290 #line 588 "ael.y"
03291     {reset_argcount(parseio->scanner);}
03292     break;
03293 
03294   case 110:
03295 
03296 /* Line 1806 of yacc.c  */
03297 #line 588 "ael.y"
03298     {
03299       /* XXX original code had @2 but i think we need @5 */
03300       (yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
03301       (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
03302       (yyval.pval)->u2.arglist = (yyvsp[(4) - (5)].pval);}
03303     break;
03304 
03305   case 111:
03306 
03307 /* Line 1806 of yacc.c  */
03308 #line 593 "ael.y"
03309     {
03310       (yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
03311       (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); }
03312     break;
03313 
03314   case 112:
03315 
03316 /* Line 1806 of yacc.c  */
03317 #line 601 "ael.y"
03318     {reset_argcount(parseio->scanner);}
03319     break;
03320 
03321   case 113:
03322 
03323 /* Line 1806 of yacc.c  */
03324 #line 601 "ael.y"
03325     {
03326       if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) {
03327          (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
03328          free((yyvsp[(1) - (3)].str)); /* won't be using this */
03329          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 );
03330       } else {
03331          (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
03332          (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
03333       } }
03334     break;
03335 
03336   case 114:
03337 
03338 /* Line 1806 of yacc.c  */
03339 #line 612 "ael.y"
03340     {
03341       (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)]));
03342       if( (yyval.pval)->type == PV_GOTO )
03343          (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);
03344       else
03345          (yyval.pval)->u2.arglist = (yyvsp[(2) - (3)].pval);
03346    }
03347     break;
03348 
03349   case 115:
03350 
03351 /* Line 1806 of yacc.c  */
03352 #line 619 "ael.y"
03353     { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
03354     break;
03355 
03356   case 116:
03357 
03358 /* Line 1806 of yacc.c  */
03359 #line 622 "ael.y"
03360     { (yyval.str) = (yyvsp[(1) - (1)].str) ;}
03361     break;
03362 
03363   case 117:
03364 
03365 /* Line 1806 of yacc.c  */
03366 #line 623 "ael.y"
03367     { (yyval.str) = strdup(""); }
03368     break;
03369 
03370   case 118:
03371 
03372 /* Line 1806 of yacc.c  */
03373 #line 626 "ael.y"
03374     { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
03375     break;
03376 
03377   case 119:
03378 
03379 /* Line 1806 of yacc.c  */
03380 #line 627 "ael.y"
03381     {
03382       (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
03383       (yyval.pval)->u1.str = strdup(""); }
03384     break;
03385 
03386   case 120:
03387 
03388 /* Line 1806 of yacc.c  */
03389 #line 630 "ael.y"
03390     { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
03391     break;
03392 
03393   case 121:
03394 
03395 /* Line 1806 of yacc.c  */
03396 #line 633 "ael.y"
03397     { (yyval.pval) = NULL; }
03398     break;
03399 
03400   case 122:
03401 
03402 /* Line 1806 of yacc.c  */
03403 #line 634 "ael.y"
03404     { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
03405     break;
03406 
03407   case 123:
03408 
03409 /* Line 1806 of yacc.c  */
03410 #line 637 "ael.y"
03411     {
03412       (yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */
03413       (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
03414       (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
03415     break;
03416 
03417   case 124:
03418 
03419 /* Line 1806 of yacc.c  */
03420 #line 641 "ael.y"
03421     {
03422       (yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
03423       (yyval.pval)->u1.str = NULL;
03424       (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
03425     break;
03426 
03427   case 125:
03428 
03429 /* Line 1806 of yacc.c  */
03430 #line 645 "ael.y"
03431     {
03432       (yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */
03433       (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
03434       (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval);set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
03435     break;
03436 
03437   case 126:
03438 
03439 /* Line 1806 of yacc.c  */
03440 #line 651 "ael.y"
03441     { (yyval.pval) = NULL; }
03442     break;
03443 
03444   case 127:
03445 
03446 /* Line 1806 of yacc.c  */
03447 #line 652 "ael.y"
03448     { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
03449     break;
03450 
03451   case 128:
03452 
03453 /* Line 1806 of yacc.c  */
03454 #line 655 "ael.y"
03455     {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
03456     break;
03457 
03458   case 129:
03459 
03460 /* Line 1806 of yacc.c  */
03461 #line 656 "ael.y"
03462     { (yyval.pval)=(yyvsp[(1) - (1)].pval);}
03463     break;
03464 
03465   case 130:
03466 
03467 /* Line 1806 of yacc.c  */
03468 #line 657 "ael.y"
03469     {
03470       (yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
03471       (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
03472       (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
03473     break;
03474 
03475   case 131:
03476 
03477 /* Line 1806 of yacc.c  */
03478 #line 663 "ael.y"
03479     {
03480       (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
03481       (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
03482     break;
03483 
03484   case 132:
03485 
03486 /* Line 1806 of yacc.c  */
03487 #line 668 "ael.y"
03488     {
03489       (yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
03490       (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
03491     break;
03492 
03493   case 133:
03494 
03495 /* Line 1806 of yacc.c  */
03496 #line 673 "ael.y"
03497     { (yyval.pval) = NULL; }
03498     break;
03499 
03500   case 134:
03501 
03502 /* Line 1806 of yacc.c  */
03503 #line 674 "ael.y"
03504     { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval),nword((yyvsp[(2) - (3)].str), &(yylsp[(2) - (3)]))); }
03505     break;
03506 
03507   case 135:
03508 
03509 /* Line 1806 of yacc.c  */
03510 #line 675 "ael.y"
03511     {
03512      char *x;
03513      if (asprintf(&x,"%s@%s", (yyvsp[(2) - (5)].str), (yyvsp[(4) - (5)].str)) < 0) {
03514       ast_log(LOG_WARNING, "asprintf() failed\n");
03515       (yyval.pval) = NULL;
03516      } else {
03517       free((yyvsp[(2) - (5)].str));
03518       free((yyvsp[(4) - (5)].str));
03519       (yyval.pval) = linku1((yyvsp[(1) - (5)].pval),nword(x, &(yylsp[(2) - (5)])));
03520      }
03521    }
03522     break;
03523 
03524   case 136:
03525 
03526 /* Line 1806 of yacc.c  */
03527 #line 686 "ael.y"
03528     {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
03529     break;
03530 
03531   case 137:
03532 
03533 /* Line 1806 of yacc.c  */
03534 #line 689 "ael.y"
03535     { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
03536     break;
03537 
03538   case 138:
03539 
03540 /* Line 1806 of yacc.c  */
03541 #line 690 "ael.y"
03542     {
03543       (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
03544       (yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval);
03545       prev_word=0; /* XXX sure ? */ }
03546     break;
03547 
03548   case 139:
03549 
03550 /* Line 1806 of yacc.c  */
03551 #line 697 "ael.y"
03552     { (yyval.pval) = (yyvsp[(1) - (2)].pval); }
03553     break;
03554 
03555   case 140:
03556 
03557 /* Line 1806 of yacc.c  */
03558 #line 698 "ael.y"
03559     { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); }
03560     break;
03561 
03562   case 141:
03563 
03564 /* Line 1806 of yacc.c  */
03565 #line 699 "ael.y"
03566     {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
03567     break;
03568 
03569   case 142:
03570 
03571 /* Line 1806 of yacc.c  */
03572 #line 702 "ael.y"
03573     {
03574       (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
03575       (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
03576     break;
03577 
03578   case 143:
03579 
03580 /* Line 1806 of yacc.c  */
03581 #line 705 "ael.y"
03582     {
03583       (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));}
03584     break;
03585 
03586 
03587 
03588 /* Line 1806 of yacc.c  */
03589 #line 3590 "ael.tab.c"
03590       default: break;
03591     }
03592   /* User semantic actions sometimes alter yychar, and that requires
03593      that yytoken be updated with the new translation.  We take the
03594      approach of translating immediately before every use of yytoken.
03595      One alternative is translating here after every semantic action,
03596      but that translation would be missed if the semantic action invokes
03597      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
03598      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
03599      incorrect destructor might then be invoked immediately.  In the
03600      case of YYERROR or YYBACKUP, subsequent parser actions might lead
03601      to an incorrect destructor call or verbose syntax error message
03602      before the lookahead is translated.  */
03603   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
03604 
03605   YYPOPSTACK (yylen);
03606   yylen = 0;
03607   YY_STACK_PRINT (yyss, yyssp);
03608 
03609   *++yyvsp = yyval;
03610   *++yylsp = yyloc;
03611 
03612   /* Now `shift' the result of the reduction.  Determine what state
03613      that goes to, based on the state we popped back to and the rule
03614      number reduced by.  */
03615 
03616   yyn = yyr1[yyn];
03617 
03618   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
03619   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
03620     yystate = yytable[yystate];
03621   else
03622     yystate = yydefgoto[yyn - YYNTOKENS];
03623 
03624   goto yynewstate;
03625 
03626 
03627 /*------------------------------------.
03628 | yyerrlab -- here on detecting error |
03629 `------------------------------------*/
03630 yyerrlab:
03631   /* Make sure we have latest lookahead translation.  See comments at
03632      user semantic actions for why this is necessary.  */
03633   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
03634 
03635   /* If not already recovering from an error, report this error.  */
03636   if (!yyerrstatus)
03637     {
03638       ++yynerrs;
03639 #if ! YYERROR_VERBOSE
03640       yyerror (&yylloc, parseio, YY_("syntax error"));
03641 #else
03642 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
03643                                         yyssp, yytoken)
03644       {
03645         char const *yymsgp = YY_("syntax error");
03646         int yysyntax_error_status;
03647         yysyntax_error_status = YYSYNTAX_ERROR;
03648         if (yysyntax_error_status == 0)
03649           yymsgp = yymsg;
03650         else if (yysyntax_error_status == 1)
03651           {
03652             if (yymsg != yymsgbuf)
03653               YYSTACK_FREE (yymsg);
03654             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
03655             if (!yymsg)
03656               {
03657                 yymsg = yymsgbuf;
03658                 yymsg_alloc = sizeof yymsgbuf;
03659                 yysyntax_error_status = 2;
03660               }
03661             else
03662               {
03663                 yysyntax_error_status = YYSYNTAX_ERROR;
03664                 yymsgp = yymsg;
03665               }
03666           }
03667         yyerror (&yylloc, parseio, yymsgp);
03668         if (yysyntax_error_status == 2)
03669           goto yyexhaustedlab;
03670       }
03671 # undef YYSYNTAX_ERROR
03672 #endif
03673     }
03674 
03675   yyerror_range[1] = yylloc;
03676 
03677   if (yyerrstatus == 3)
03678     {
03679       /* If just tried and failed to reuse lookahead token after an
03680     error, discard it.  */
03681 
03682       if (yychar <= YYEOF)
03683    {
03684      /* Return failure if at end of input.  */
03685      if (yychar == YYEOF)
03686        YYABORT;
03687    }
03688       else
03689    {
03690      yydestruct ("Error: discarding",
03691             yytoken, &yylval, &yylloc, parseio);
03692      yychar = YYEMPTY;
03693    }
03694     }
03695 
03696   /* Else will try to reuse lookahead token after shifting the error
03697      token.  */
03698   goto yyerrlab1;
03699 
03700 
03701 /*---------------------------------------------------.
03702 | yyerrorlab -- error raised explicitly by YYERROR.  |
03703 `---------------------------------------------------*/
03704 yyerrorlab:
03705 
03706   /* Pacify compilers like GCC when the user code never invokes
03707      YYERROR and the label yyerrorlab therefore never appears in user
03708      code.  */
03709   if (/*CONSTCOND*/ 0)
03710      goto yyerrorlab;
03711 
03712   yyerror_range[1] = yylsp[1-yylen];
03713   /* Do not reclaim the symbols of the rule which action triggered
03714      this YYERROR.  */
03715   YYPOPSTACK (yylen);
03716   yylen = 0;
03717   YY_STACK_PRINT (yyss, yyssp);
03718   yystate = *yyssp;
03719   goto yyerrlab1;
03720 
03721 
03722 /*-------------------------------------------------------------.
03723 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
03724 `-------------------------------------------------------------*/
03725 yyerrlab1:
03726   yyerrstatus = 3;   /* Each real token shifted decrements this.  */
03727 
03728   for (;;)
03729     {
03730       yyn = yypact[yystate];
03731       if (!yypact_value_is_default (yyn))
03732    {
03733      yyn += YYTERROR;
03734      if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
03735        {
03736          yyn = yytable[yyn];
03737          if (0 < yyn)
03738       break;
03739        }
03740    }
03741 
03742       /* Pop the current state because it cannot handle the error token.  */
03743       if (yyssp == yyss)
03744    YYABORT;
03745 
03746       yyerror_range[1] = *yylsp;
03747       yydestruct ("Error: popping",
03748         yystos[yystate], yyvsp, yylsp, parseio);
03749       YYPOPSTACK (1);
03750       yystate = *yyssp;
03751       YY_STACK_PRINT (yyss, yyssp);
03752     }
03753 
03754   *++yyvsp = yylval;
03755 
03756   yyerror_range[2] = yylloc;
03757   /* Using YYLLOC is tempting, but would change the location of
03758      the lookahead.  YYLOC is available though.  */
03759   YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
03760   *++yylsp = yyloc;
03761 
03762   /* Shift the error token.  */
03763   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
03764 
03765   yystate = yyn;
03766   goto yynewstate;
03767 
03768 
03769 /*-------------------------------------.
03770 | yyacceptlab -- YYACCEPT comes here.  |
03771 `-------------------------------------*/
03772 yyacceptlab:
03773   yyresult = 0;
03774   goto yyreturn;
03775 
03776 /*-----------------------------------.
03777 | yyabortlab -- YYABORT comes here.  |
03778 `-----------------------------------*/
03779 yyabortlab:
03780   yyresult = 1;
03781   goto yyreturn;
03782 
03783 #if !defined(yyoverflow) || YYERROR_VERBOSE
03784 /*-------------------------------------------------.
03785 | yyexhaustedlab -- memory exhaustion comes here.  |
03786 `-------------------------------------------------*/
03787 yyexhaustedlab:
03788   yyerror (&yylloc, parseio, YY_("memory exhausted"));
03789   yyresult = 2;
03790   /* Fall through.  */
03791 #endif
03792 
03793 yyreturn:
03794   if (yychar != YYEMPTY)
03795     {
03796       /* Make sure we have latest lookahead translation.  See comments at
03797          user semantic actions for why this is necessary.  */
03798       yytoken = YYTRANSLATE (yychar);
03799       yydestruct ("Cleanup: discarding lookahead",
03800                   yytoken, &yylval, &yylloc, parseio);
03801     }
03802   /* Do not reclaim the symbols of the rule which action triggered
03803      this YYABORT or YYACCEPT.  */
03804   YYPOPSTACK (yylen);
03805   YY_STACK_PRINT (yyss, yyssp);
03806   while (yyssp != yyss)
03807     {
03808       yydestruct ("Cleanup: popping",
03809         yystos[*yyssp], yyvsp, yylsp, parseio);
03810       YYPOPSTACK (1);
03811     }
03812 #ifndef yyoverflow
03813   if (yyss != yyssa)
03814     YYSTACK_FREE (yyss);
03815 #endif
03816 #if YYERROR_VERBOSE
03817   if (yymsg != yymsgbuf)
03818     YYSTACK_FREE (yymsg);
03819 #endif
03820   /* Make sure YYID is used.  */
03821   return YYID (yyresult);
03822 }

int yyparse (  ) 

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

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

01272 {
01273   char *yyd = yydest;
01274   const char *yys = yysrc;
01275 
01276   while ((*yyd++ = *yys++) != '\0')
01277     continue;
01278 
01279   return yyd - 1;
01280 }

static YYSIZE_T yystrlen ( char *  yystr  )  const [static]

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

References YYSIZE_T.

01247 {
01248   YYSIZE_T yylen;
01249   for (yylen = 0; yystr[yylen]; yylen++)
01250     continue;
01251   return yylen;
01252 }

static int yysyntax_error ( YYSIZE_T *  yymsg_alloc,
char **  yymsg,
yytype_int16 yyssp,
int  yytoken 
) [static]

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

References YY_, YYCASE_, YYEMPTY, YYLAST, YYNTOKENS, yypact_value_is_default, YYSIZE_T, YYSTACK_ALLOC_MAXIMUM, yystrlen(), yytable_value_is_error, YYTERROR, and yytnamerr().

01343 {
01344   YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
01345   YYSIZE_T yysize = yysize0;
01346   YYSIZE_T yysize1;
01347   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
01348   /* Internationalized format string. */
01349   const char *yyformat = 0;
01350   /* Arguments of yyformat. */
01351   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
01352   /* Number of reported tokens (one for the "unexpected", one per
01353      "expected"). */
01354   int yycount = 0;
01355 
01356   /* There are many possibilities here to consider:
01357      - Assume YYFAIL is not used.  It's too flawed to consider.  See
01358        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
01359        for details.  YYERROR is fine as it does not invoke this
01360        function.
01361      - If this state is a consistent state with a default action, then
01362        the only way this function was invoked is if the default action
01363        is an error action.  In that case, don't check for expected
01364        tokens because there are none.
01365      - The only way there can be no lookahead present (in yychar) is if
01366        this state is a consistent state with a default action.  Thus,
01367        detecting the absence of a lookahead is sufficient to determine
01368        that there is no unexpected or expected token to report.  In that
01369        case, just report a simple "syntax error".
01370      - Don't assume there isn't a lookahead just because this state is a
01371        consistent state with a default action.  There might have been a
01372        previous inconsistent state, consistent state with a non-default
01373        action, or user semantic action that manipulated yychar.
01374      - Of course, the expected token list depends on states to have
01375        correct lookahead information, and it depends on the parser not
01376        to perform extra reductions after fetching a lookahead from the
01377        scanner and before detecting a syntax error.  Thus, state merging
01378        (from LALR or IELR) and default reductions corrupt the expected
01379        token list.  However, the list is correct for canonical LR with
01380        one exception: it will still contain any token that will not be
01381        accepted due to an error action in a later state.
01382   */
01383   if (yytoken != YYEMPTY)
01384     {
01385       int yyn = yypact[*yyssp];
01386       yyarg[yycount++] = yytname[yytoken];
01387       if (!yypact_value_is_default (yyn))
01388         {
01389           /* Start YYX at -YYN if negative to avoid negative indexes in
01390              YYCHECK.  In other words, skip the first -YYN actions for
01391              this state because they are default actions.  */
01392           int yyxbegin = yyn < 0 ? -yyn : 0;
01393           /* Stay within bounds of both yycheck and yytname.  */
01394           int yychecklim = YYLAST - yyn + 1;
01395           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
01396           int yyx;
01397 
01398           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
01399             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
01400                 && !yytable_value_is_error (yytable[yyx + yyn]))
01401               {
01402                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
01403                   {
01404                     yycount = 1;
01405                     yysize = yysize0;
01406                     break;
01407                   }
01408                 yyarg[yycount++] = yytname[yyx];
01409                 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
01410                 if (! (yysize <= yysize1
01411                        && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
01412                   return 2;
01413                 yysize = yysize1;
01414               }
01415         }
01416     }
01417 
01418   switch (yycount)
01419     {
01420 # define YYCASE_(N, S)                      \
01421       case N:                               \
01422         yyformat = S;                       \
01423       break
01424       YYCASE_(0, YY_("syntax error"));
01425       YYCASE_(1, YY_("syntax error, unexpected %s"));
01426       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
01427       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
01428       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
01429       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
01430 # undef YYCASE_
01431     }
01432 
01433   yysize1 = yysize + yystrlen (yyformat);
01434   if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
01435     return 2;
01436   yysize = yysize1;
01437 
01438   if (*yymsg_alloc < yysize)
01439     {
01440       *yymsg_alloc = 2 * yysize;
01441       if (! (yysize <= *yymsg_alloc
01442              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
01443         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
01444       return 1;
01445     }
01446 
01447   /* Avoid sprintf, as that infringes on the user's name space.
01448      Don't have undefined behavior even if the translation
01449      produced a string with the wrong number of "%s"s.  */
01450   {
01451     char *yyp = *yymsg;
01452     int yyi = 0;
01453     while ((*yyp = *yyformat) != '\0')
01454       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
01455         {
01456           yyp += yytnamerr (yyp, yyarg[yyi++]);
01457           yyformat += 2;
01458         }
01459       else
01460         {
01461           yyp++;
01462           yyformat++;
01463         }
01464   }
01465   return 0;
01466 }

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

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

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

01294 {
01295   if (*yystr == '"')
01296     {
01297       YYSIZE_T yyn = 0;
01298       char const *yyp = yystr;
01299 
01300       for (;;)
01301    switch (*++yyp)
01302      {
01303      case '\'':
01304      case ',':
01305        goto do_not_strip_quotes;
01306 
01307      case '\\':
01308        if (*++yyp != '\\')
01309          goto do_not_strip_quotes;
01310        /* Fall through.  */
01311      default:
01312        if (yyres)
01313          yyres[yyn] = *yyp;
01314        yyn++;
01315        break;
01316 
01317      case '"':
01318        if (yyres)
01319          yyres[yyn] = '\0';
01320        return yyn;
01321      }
01322     do_not_strip_quotes: ;
01323     }
01324 
01325   if (! yyres)
01326     return yystrlen (yystr);
01327 
01328   return yystpcpy (yyres, yystr) - yyres;
01329 }


Variable Documentation

char* my_file

Definition at line 873 of file ael_lex.c.

char* token_equivs1[] [static]

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

char* token_equivs2[] [static]

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

const yytype_uint16 yycheck[] [static]

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

const yytype_uint8 yydefact[] [static]

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

const yytype_int16 yydefgoto[] [static]

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

const yytype_int16 yypact[] [static]

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

const yytype_int16 yypgoto[] [static]

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

const yytype_uint8 yyr1[] [static]

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

const yytype_uint8 yyr2[] [static]

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

const yytype_uint8 yystos[] [static]

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

const yytype_int16 yytable[] [static]

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

const char* const yytname[] [static]

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

const yytype_uint8 yytranslate[] [static]

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


Generated on Mon Oct 8 12:39:06 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.4.7