[asterisk-commits] trunk r22572 - in /trunk/pbx/ael: ael.tab.c ael.y
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Apr 26 11:43:30 MST 2006
Author: rizzo
Date: Wed Apr 26 13:43:29 2006
New Revision: 22572
URL: http://svn.digium.com/view/asterisk?rev=22572&view=rev
Log:
whitespace-only change:
partly fix indentation/formatting of the bison source,
and of the generated file
Modified:
trunk/pbx/ael/ael.tab.c
trunk/pbx/ael/ael.y
Modified: trunk/pbx/ael/ael.tab.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael.tab.c?rev=22572&r1=22571&r2=22572&view=diff
==============================================================================
--- trunk/pbx/ael/ael.tab.c (original)
+++ trunk/pbx/ael/ael.tab.c Wed Apr 26 13:43:29 2006
@@ -153,7 +153,7 @@
#line 1 "ael.y"
/*
- * Asterisk -- An open source telephony toolkit.
+ * Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2006, Digium, Inc.
*
@@ -172,7 +172,7 @@
/*! \file
*
* \brief Bison Grammar description of AEL2.
- *
+ *
*/
#include <stdio.h>
#include <stdlib.h>
@@ -193,7 +193,7 @@
#endif
static char *ael_token_subst(char *mess);
extern char *prev_word;
-
+
/* Enabling traces. */
@@ -247,7 +247,7 @@
/* declaring these AFTER the union makes things a lot simpler! */
void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s);
int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner);
-
+
/* Line 219 of yacc.c. */
@@ -1818,7 +1818,7 @@
case 4:
#line 130 "ael.y"
- {if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
+ {if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
else if ( (yyvsp[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
break;
@@ -1890,7 +1890,7 @@
case 18:
#line 152 "ael.y"
- {(yyval.pval)=npval(PV_MACRO,(yylsp[-7]).first_line,(yylsp[0]).last_line, (yylsp[-7]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_MACRO,(yylsp[-7]).first_line,(yylsp[0]).last_line, (yylsp[-7]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u1.str = (yyvsp[-6].str); (yyval.pval)->u2.arglist = (yyvsp[-4].pval); (yyval.pval)->u3.macro_statements = (yyvsp[-1].pval); ;}
break;
@@ -1971,9 +1971,9 @@
case 34:
#line 178 "ael.y"
- { if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
- else if ( (yyvsp[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
- else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
+ { if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
+ else if ( (yyvsp[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
+ else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
break;
case 35:
@@ -2058,7 +2058,7 @@
case 51:
#line 205 "ael.y"
- {if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
+ {if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
else if ( (yyvsp[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
break;
@@ -2090,8 +2090,8 @@
case 57:
#line 217 "ael.y"
- { (yyval.pval)= npval(PV_IFTIME,(yylsp[-13]).first_line,(yylsp[-9]).last_line, (yylsp[-13]).first_column, (yylsp[-9]).last_column);
- (yyval.pval)->u1.list = npval(PV_WORD,(yylsp[-11]).first_line,(yylsp[-11]).last_line, (yylsp[-11]).first_column, (yylsp[-11]).last_column);
+ { (yyval.pval)= npval(PV_IFTIME,(yylsp[-13]).first_line,(yylsp[-9]).last_line, (yylsp[-13]).first_column, (yylsp[-9]).last_column);
+ (yyval.pval)->u1.list = npval(PV_WORD,(yylsp[-11]).first_line,(yylsp[-11]).last_line, (yylsp[-11]).first_column, (yylsp[-11]).last_column);
(yyval.pval)->u1.list->u1.str = (char*)malloc(strlen((yyvsp[-11].str))+strlen((yyvsp[-9].str))+strlen((yyvsp[-7].str))+4);
strcpy((yyval.pval)->u1.list->u1.str,(yyvsp[-11].str));
strcat((yyval.pval)->u1.list->u1.str,":");
@@ -2101,27 +2101,27 @@
free((yyvsp[-11].str));
free((yyvsp[-9].str));
free((yyvsp[-7].str));
- (yyval.pval)->u1.list->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
- (yyval.pval)->u1.list->next->u1.str = (yyvsp[-5].str);
- (yyval.pval)->u1.list->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
- (yyval.pval)->u1.list->next->next->u1.str = (yyvsp[-3].str);
- (yyval.pval)->u1.list->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
- (yyval.pval)->u1.list->next->next->next->u1.str = (yyvsp[-1].str);
+ (yyval.pval)->u1.list->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
+ (yyval.pval)->u1.list->next->u1.str = (yyvsp[-5].str);
+ (yyval.pval)->u1.list->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
+ (yyval.pval)->u1.list->next->next->u1.str = (yyvsp[-3].str);
+ (yyval.pval)->u1.list->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
+ (yyval.pval)->u1.list->next->next->next->u1.str = (yyvsp[-1].str);
prev_word = 0;
;}
break;
case 58:
#line 236 "ael.y"
- { (yyval.pval)= npval(PV_IFTIME,(yylsp[-9]).first_line,(yylsp[-5]).last_line, (yylsp[-9]).first_column, (yylsp[-5]).last_column);
- (yyval.pval)->u1.list = npval(PV_WORD,(yylsp[-7]).first_line,(yylsp[-7]).last_line, (yylsp[-7]).first_column, (yylsp[-7]).last_column);
+ { (yyval.pval)= npval(PV_IFTIME,(yylsp[-9]).first_line,(yylsp[-5]).last_line, (yylsp[-9]).first_column, (yylsp[-5]).last_column);
+ (yyval.pval)->u1.list = npval(PV_WORD,(yylsp[-7]).first_line,(yylsp[-7]).last_line, (yylsp[-7]).first_column, (yylsp[-7]).last_column);
(yyval.pval)->u1.list->u1.str = (yyvsp[-7].str);
- (yyval.pval)->u1.list->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
- (yyval.pval)->u1.list->next->u1.str = (yyvsp[-5].str);
- (yyval.pval)->u1.list->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
- (yyval.pval)->u1.list->next->next->u1.str = (yyvsp[-3].str);
- (yyval.pval)->u1.list->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
- (yyval.pval)->u1.list->next->next->next->u1.str = (yyvsp[-1].str);
+ (yyval.pval)->u1.list->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
+ (yyval.pval)->u1.list->next->u1.str = (yyvsp[-5].str);
+ (yyval.pval)->u1.list->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
+ (yyval.pval)->u1.list->next->next->u1.str = (yyvsp[-3].str);
+ (yyval.pval)->u1.list->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
+ (yyval.pval)->u1.list->next->next->next->u1.str = (yyvsp[-1].str);
prev_word = 0;
;}
break;
@@ -2189,7 +2189,7 @@
case 71:
#line 275 "ael.y"
- {(yyval.pval)=npval(PV_VARDEC,(yylsp[-4]).first_line,(yylsp[0]).last_line, (yylsp[-4]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_VARDEC,(yylsp[-4]).first_line,(yylsp[0]).last_line, (yylsp[-4]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u1.str = (yyvsp[-4].str); (yyval.pval)->u2.val = (yyvsp[-1].str); ;}
break;
@@ -2225,7 +2225,7 @@
case 78:
#line 283 "ael.y"
- { (yyval.pval)=npval(PV_FOR,(yylsp[-11]).first_line,(yylsp[0]).last_line, (yylsp[-11]).first_column, (yylsp[0]).last_column);
+ { (yyval.pval)=npval(PV_FOR,(yylsp[-11]).first_line,(yylsp[0]).last_line, (yylsp[-11]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u1.for_init = (yyvsp[-8].str); (yyval.pval)->u2.for_test=(yyvsp[-5].str); (yyval.pval)->u3.for_inc = (yyvsp[-2].str); (yyval.pval)->u4.for_statements = (yyvsp[0].pval);;}
break;
@@ -2236,7 +2236,7 @@
case 80:
#line 286 "ael.y"
- {(yyval.pval)=npval(PV_WHILE,(yylsp[-5]).first_line,(yylsp[0]).last_line, (yylsp[-5]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WHILE,(yylsp[-5]).first_line,(yylsp[0]).last_line, (yylsp[-5]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->u2.statements = (yyvsp[0].pval); ;}
break;
@@ -2262,7 +2262,7 @@
case 85:
#line 292 "ael.y"
- { (yyval.pval)= npval(PV_APPLICATION_CALL,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);
+ { (yyval.pval)= npval(PV_APPLICATION_CALL,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u1.str = (yyvsp[-1].str);;}
break;
@@ -2277,7 +2277,7 @@
char *bufx;
int tot=0;
pval *pptr;
-
+
(yyval.pval) = npval(PV_VARDEC,(yylsp[-4]).first_line,(yylsp[0]).last_line, (yylsp[-4]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u2.val=(yyvsp[-1].str);
/* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
@@ -2299,7 +2299,7 @@
strcat(bufx,")");
#ifdef AAL_ARGCHECK
if ( !ael_is_funcname((yyvsp[-4].pval)->u1.str) )
- 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",
+ 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",
my_file, (yylsp[-4]).first_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column, (yyvsp[-4].pval)->u1.str);
#endif
(yyval.pval)->u1.str = bufx;
@@ -2365,101 +2365,101 @@
case 99:
#line 340 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->u1.str = (yyvsp[0].str);;}
break;
case 100:
#line 343 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->u1.str = (yyvsp[0].str);;}
break;
case 101:
#line 346 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
- (yyval.pval)->u1.str = (yyvsp[-4].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-2].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[-4].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-2].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = (yyvsp[0].str); ;}
break;
case 102:
#line 351 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
- (yyval.pval)->u1.str = (yyvsp[-4].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-2].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[-4].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-2].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = (yyvsp[0].str); ;}
break;
case 103:
#line 356 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
- (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-2].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
+ (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-2].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = (yyvsp[0].str); ;}
break;
case 104:
#line 361 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
- (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-2].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
+ (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-2].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = (yyvsp[0].str); ;}
break;
case 105:
#line 368 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
- (yyval.pval)->u1.str = (yyvsp[0].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[0].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->u1.str = strdup("1");;}
break;
case 106:
#line 371 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->u1.str = (yyvsp[0].str);;}
break;
case 107:
#line 374 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
- (yyval.pval)->u1.str = (yyvsp[0].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-4].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[0].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-4].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = (yyvsp[-2].str); ;}
break;
case 108:
#line 379 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->u1.str = (yyvsp[0].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-2].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->u1.str = (yyvsp[0].str); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-2].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = strdup("1"); ;}
break;
case 109:
#line 384 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
- (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-4].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-4]).first_line,(yylsp[-4]).last_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column);
+ (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-4].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = (yyvsp[-2].str); ;}
break;
case 110:
#line 389 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
- (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
- (yyval.pval)->next->u1.str = (yyvsp[-2].str);
- (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ {(yyval.pval)=npval(PV_WORD,(yylsp[-2]).first_line,(yylsp[-2]).last_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column);
+ (yyval.pval)->u1.str = strdup("default"); (yyval.pval)->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
+ (yyval.pval)->next->u1.str = (yyvsp[-2].str);
+ (yyval.pval)->next->next = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column);
(yyval.pval)->next->next->u1.str = strdup("1"); ;}
break;
@@ -2470,7 +2470,7 @@
case 112:
#line 397 "ael.y"
- {(yyval.pval)= npval(PV_MACRO_CALL,(yylsp[-4]).first_line,(yylsp[-3]).last_line, (yylsp[-4]).first_column, (yylsp[-3]).last_column);
+ {(yyval.pval)= npval(PV_MACRO_CALL,(yylsp[-4]).first_line,(yylsp[-3]).last_line, (yylsp[-4]).first_column, (yylsp[-3]).last_column);
(yyval.pval)->u1.str = (yyvsp[-4].str); (yyval.pval)->u2.arglist = (yyvsp[-1].pval);;}
break;
@@ -2491,7 +2491,7 @@
free((yyvsp[-2].str)); /* won't be using this */
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[-2]).first_line, (yylsp[-2]).first_column, (yylsp[-2]).last_column );
} else
- (yyval.pval)= npval(PV_APPLICATION_CALL,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);
+ (yyval.pval)= npval(PV_APPLICATION_CALL,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u1.str = (yyvsp[-2].str); ;}
break;
@@ -2537,7 +2537,7 @@
case 123:
#line 427 "ael.y"
- { if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
+ { if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
else if ( (yyvsp[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
break;
@@ -2579,7 +2579,7 @@
case 131:
#line 441 "ael.y"
- { if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
+ { if ( (yyvsp[-1].pval) && (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[-1].pval); linku1((yyval.pval),(yyvsp[0].pval));}
else if ( (yyvsp[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
break;
@@ -2637,9 +2637,9 @@
case 142:
#line 464 "ael.y"
{
- (yyval.pval)=npval(PV_WORD,(yylsp[-13]).first_line,(yylsp[-12]).last_line, (yylsp[-13]).first_column, (yylsp[-12]).last_column);
+ (yyval.pval)=npval(PV_WORD,(yylsp[-13]).first_line,(yylsp[-12]).last_line, (yylsp[-13]).first_column, (yylsp[-12]).last_column);
(yyval.pval)->u1.str = (yyvsp[-13].str);
- (yyval.pval)->u2.arglist = npval(PV_WORD,(yylsp[-11]).first_line,(yylsp[-7]).last_line, (yylsp[-11]).first_column, (yylsp[-7]).last_column);
+ (yyval.pval)->u2.arglist = npval(PV_WORD,(yylsp[-11]).first_line,(yylsp[-7]).last_line, (yylsp[-11]).first_column, (yylsp[-7]).last_column);
(yyval.pval)->u2.arglist->u1.str = (char*)malloc(strlen((yyvsp[-11].str))+strlen((yyvsp[-9].str))+strlen((yyvsp[-7].str))+4);
strcpy((yyval.pval)->u2.arglist->u1.str,(yyvsp[-11].str));
strcat((yyval.pval)->u2.arglist->u1.str,":");
@@ -2649,12 +2649,12 @@
free((yyvsp[-11].str));
free((yyvsp[-9].str));
free((yyvsp[-7].str));
- (yyval.pval)->u2.arglist->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
- (yyval.pval)->u2.arglist->next->u1.str = (yyvsp[-5].str);
- (yyval.pval)->u2.arglist->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
- (yyval.pval)->u2.arglist->next->next->u1.str = (yyvsp[-3].str);
- (yyval.pval)->u2.arglist->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
- (yyval.pval)->u2.arglist->next->next->next->u1.str = (yyvsp[-1].str);
+ (yyval.pval)->u2.arglist->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
+ (yyval.pval)->u2.arglist->next->u1.str = (yyvsp[-5].str);
+ (yyval.pval)->u2.arglist->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
+ (yyval.pval)->u2.arglist->next->next->u1.str = (yyvsp[-3].str);
+ (yyval.pval)->u2.arglist->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
+ (yyval.pval)->u2.arglist->next->next->next->u1.str = (yyvsp[-1].str);
prev_word=0;
;}
break;
@@ -2662,16 +2662,16 @@
case 143:
#line 485 "ael.y"
{
- (yyval.pval)=npval(PV_WORD,(yylsp[-9]).first_line,(yylsp[-8]).last_line, (yylsp[-9]).first_column, (yylsp[-8]).last_column);
+ (yyval.pval)=npval(PV_WORD,(yylsp[-9]).first_line,(yylsp[-8]).last_line, (yylsp[-9]).first_column, (yylsp[-8]).last_column);
(yyval.pval)->u1.str = (yyvsp[-9].str);
- (yyval.pval)->u2.arglist = npval(PV_WORD,(yylsp[-7]).first_line,(yylsp[-7]).last_line, (yylsp[-7]).first_column, (yylsp[-7]).last_column);
+ (yyval.pval)->u2.arglist = npval(PV_WORD,(yylsp[-7]).first_line,(yylsp[-7]).last_line, (yylsp[-7]).first_column, (yylsp[-7]).last_column);
(yyval.pval)->u2.arglist->u1.str = (yyvsp[-7].str);
- (yyval.pval)->u2.arglist->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
- (yyval.pval)->u2.arglist->next->u1.str = (yyvsp[-5].str);
- (yyval.pval)->u2.arglist->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
- (yyval.pval)->u2.arglist->next->next->u1.str = (yyvsp[-3].str);
- (yyval.pval)->u2.arglist->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
- (yyval.pval)->u2.arglist->next->next->next->u1.str = (yyvsp[-1].str);
+ (yyval.pval)->u2.arglist->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
+ (yyval.pval)->u2.arglist->next->u1.str = (yyvsp[-5].str);
+ (yyval.pval)->u2.arglist->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
+ (yyval.pval)->u2.arglist->next->next->u1.str = (yyvsp[-3].str);
+ (yyval.pval)->u2.arglist->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
+ (yyval.pval)->u2.arglist->next->next->next->u1.str = (yyvsp[-1].str);
prev_word=0;
;}
break;
@@ -2683,9 +2683,9 @@
case 145:
#line 499 "ael.y"
- {pval *z = npval(PV_WORD,(yylsp[-13]).first_line,(yylsp[-12]).last_line, (yylsp[-13]).first_column, (yylsp[-12]).last_column);
+ {pval *z = npval(PV_WORD,(yylsp[-13]).first_line,(yylsp[-12]).last_line, (yylsp[-13]).first_column, (yylsp[-12]).last_column);
(yyval.pval)=(yyvsp[-14].pval); z->u1.str = (yyvsp[-13].str); linku1((yyval.pval),z);
- z->u2.arglist = npval(PV_WORD,(yylsp[-11]).first_line,(yylsp[-11]).last_line, (yylsp[-11]).first_column, (yylsp[-11]).last_column);
+ z->u2.arglist = npval(PV_WORD,(yylsp[-11]).first_line,(yylsp[-11]).last_line, (yylsp[-11]).first_column, (yylsp[-11]).last_column);
(yyval.pval)->u2.arglist->u1.str = (char*)malloc(strlen((yyvsp[-11].str))+strlen((yyvsp[-9].str))+strlen((yyvsp[-7].str))+4);
strcpy((yyval.pval)->u2.arglist->u1.str,(yyvsp[-11].str));
strcat((yyval.pval)->u2.arglist->u1.str,":");
@@ -2695,12 +2695,12 @@
free((yyvsp[-11].str));
free((yyvsp[-9].str));
free((yyvsp[-7].str));
- z->u2.arglist->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
- z->u2.arglist->next->u1.str = (yyvsp[-5].str);
- z->u2.arglist->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
- z->u2.arglist->next->next->u1.str = (yyvsp[-3].str);
- z->u2.arglist->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
- z->u2.arglist->next->next->next->u1.str = (yyvsp[-1].str);
+ z->u2.arglist->next = npval(PV_WORD,(yylsp[-5]).first_line,(yylsp[-5]).last_line, (yylsp[-5]).first_column, (yylsp[-5]).last_column);
+ z->u2.arglist->next->u1.str = (yyvsp[-5].str);
+ z->u2.arglist->next->next = npval(PV_WORD,(yylsp[-3]).first_line,(yylsp[-3]).last_line, (yylsp[-3]).first_column, (yylsp[-3]).last_column);
+ z->u2.arglist->next->next->u1.str = (yyvsp[-3].str);
+ z->u2.arglist->next->next->next = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[-1]).last_line, (yylsp[-1]).first_column, (yylsp[-1]).last_column);
+ z->u2.arglist->next->next->next->u1.str = (yyvsp[-1].str);
prev_word=0;
;}
break;
@@ -3029,7 +3029,7 @@
#line 544 "ael.y"
-static char *token_equivs1[] =
+static char *token_equivs1[] =
{
"AMPER",
"AT",
@@ -3038,15 +3038,15 @@
"COMMA",
"EQ",
"EXTENMARK",
- "KW_BREAK",
- "KW_CASE",
- "KW_CATCH",
+ "KW_BREAK",
+ "KW_CASE",
+ "KW_CATCH",
"KW_CONTEXT",
- "KW_CONTINUE",
- "KW_DEFAULT",
+ "KW_CONTINUE",
+ "KW_DEFAULT",
"KW_ELSE",
"KW_ESWITCHES",
- "KW_FOR",
+ "KW_FOR",
"KW_GLOBALS",
"KW_GOTO",
"KW_HINT",
@@ -3056,12 +3056,12 @@
"KW_INCLUDES"
"KW_JUMP",
"KW_MACRO",
- "KW_PATTERN",
- "KW_REGEXTEN",
- "KW_RETURN",
- "KW_SWITCHES",
+ "KW_PATTERN",
+ "KW_REGEXTEN",
+ "KW_RETURN",
+ "KW_SWITCHES",
"KW_SWITCH",
- "KW_WHILE",
+ "KW_WHILE",
"LC",
"LP",
"RC",
@@ -3069,7 +3069,7 @@
"SEMI",
};
-static char *token_equivs2[] =
+static char *token_equivs2[] =
{
"&",
"@",
@@ -3078,15 +3078,15 @@
",",
"=",
"=>",
- "break",
- "case",
- "catch",
+ "break",
+ "case",
+ "catch",
"context",
- "continue",
- "default",
+ "continue",
+ "default",
"else",
"eswitches",
- "for",
+ "for",
"globals",
"goto",
"hint",
@@ -3096,12 +3096,12 @@
"includes"
"jump",
"macro",
- "pattern",
- "regexten",
- "return",
- "switches",
+ "pattern",
+ "regexten",
+ "return",
+ "switches",
"switch",
- "while",
+ "while",
"{",
"(",
"}",
Modified: trunk/pbx/ael/ael.y
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael.y?rev=22572&r1=22571&r2=22572&view=diff
==============================================================================
--- trunk/pbx/ael/ael.y (original)
+++ trunk/pbx/ael/ael.y Wed Apr 26 13:43:29 2006
@@ -1,6 +1,6 @@
%{
/*
- * Asterisk -- An open source telephony toolkit.
+ * Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2006, Digium, Inc.
*
@@ -19,7 +19,7 @@
/*! \file
*
* \brief Bison Grammar description of AEL2.
- *
+ *
*/
#include <stdio.h>
#include <stdlib.h>
@@ -40,7 +40,7 @@
#endif
static char *ael_token_subst(char *mess);
extern char *prev_word;
-
+
%}
@@ -53,10 +53,10 @@
/* declaring these AFTER the union makes things a lot simpler! */
void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s);
int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner);
-
+
%}
-
+
%token KW_CONTEXT LC RC LP RP SEMI EQ COMMA COLON AMPER BAR AT
%token KW_MACRO KW_GLOBALS KW_IGNOREPAT KW_SWITCH KW_IF KW_IFTIME KW_ELSE KW_RANDOM KW_ABSTRACT
%token EXTENMARK KW_GOTO KW_JUMP KW_RETURN KW_BREAK KW_CONTINUE KW_REGEXTEN KW_HINT
@@ -99,23 +99,23 @@
%type <pval>macro
%type <pval>context
%type <pval>object
-%type <pval>objects
-%type <pval>file
+%type <pval>objects
+%type <pval>file
/* OPTIONS */
%locations
%pure-parser
%name-prefix="ael_yy"
-/* the following option does two things:
+/* the following option does two things:
it adds the locp arg to the yyerror
and it adds the NULL to the yyerrr arg list, and calls yyerror with NULL for that arg.
You can't get the locp arg without the NULL arg, don't ask me why. */
%parse-param {struct parse_io *parseio}
-/* there will be two shift/reduce conflicts, they involve the if statement, where a single statement occurs not wrapped in curlies in the "true" section
+/* there will be two shift/reduce conflicts, they involve the if statement, where a single statement occurs not wrapped in curlies in the "true" section
the default action to shift will attach the else to the preceeding if. */
%expect 5
%error-verbose
-%destructor { if (yymsg[0] != 'C') {destroy_pval($$); prev_word=0;} else {printf("Cleanup destructor called for pvals\n");} } includes includeslist switchlist eswitches switches macro_statement macro_statements case_statement case_statements eval_arglist application_call
+%destructor { if (yymsg[0] != 'C') {destroy_pval($$); prev_word=0;} else {printf("Cleanup destructor called for pvals\n");} } includes includeslist switchlist eswitches switches macro_statement macro_statements case_statement case_statements eval_arglist application_call
application_call_head macro_call target jumptarget statement switch_head if_head random_head iftime_head statements extension ignorepat element
elements arglist global_statement global_statements globals macro context object objects
%destructor { free($$);} word word_list goto_word word3_list includedname
@@ -127,7 +127,7 @@
;
objects : object {$$=$1;}
- | objects object {if ( $1 && $2 ) {$$=$1; linku1($$,$2);}
+ | objects object {if ( $1 && $2 ) {$$=$1; linku1($$,$2);}
else if ( $1 ) {$$=$1;}
else if ( $2 ) {$$=$2;} }
| objects error {$$=$1;}
@@ -143,13 +143,13 @@
| KW_CONTEXT word LC RC /* empty context OK */ {$$=npval(PV_CONTEXT, at 1.first_line, at 4.last_line, @1.first_column, @4.last_column); $$->u1.str = $2; }
| KW_CONTEXT KW_DEFAULT LC elements RC {$$=npval(PV_CONTEXT, at 1.first_line, at 5.last_line, @1.first_column, @5.last_column); $$->u1.str = strdup("default"); $$->u2.statements = $4; }
| KW_CONTEXT KW_DEFAULT LC RC /* empty context OK */ {$$=npval(PV_CONTEXT, at 1.first_line, at 4.last_line, @1.first_column, @4.last_column); $$->u1.str = strdup("default"); }
- | KW_ABSTRACT KW_CONTEXT word LC elements RC {$$=npval(PV_CONTEXT, at 1.first_line, at 6.last_line, @1.first_column, @6.last_column); $$->u1.str = $3; $$->u2.statements = $5; $$->u3.abstract = 1;}
+ | KW_ABSTRACT KW_CONTEXT word LC elements RC {$$=npval(PV_CONTEXT, at 1.first_line, at 6.last_line, @1.first_column, @6.last_column); $$->u1.str = $3; $$->u2.statements = $5; $$->u3.abstract = 1;}
| KW_ABSTRACT KW_CONTEXT word LC RC /* empty context OK */ {$$=npval(PV_CONTEXT, at 1.first_line, at 5.last_line, @1.first_column, @5.last_column); $$->u1.str = $3; $$->u3.abstract = 1; }
| KW_ABSTRACT KW_CONTEXT KW_DEFAULT LC elements RC {$$=npval(PV_CONTEXT, at 1.first_line, at 6.last_line, @1.first_column, @6.last_column); $$->u1.str = strdup("default"); $$->u2.statements = $5; $$->u3.abstract = 1; }
| KW_ABSTRACT KW_CONTEXT KW_DEFAULT LC RC /* empty context OK */ {$$=npval(PV_CONTEXT, at 1.first_line, at 5.last_line, @1.first_column, @5.last_column); $$->u1.str = strdup("default"); $$->u3.abstract = 1; }
;
-macro : KW_MACRO word LP arglist RP LC macro_statements RC {$$=npval(PV_MACRO, at 1.first_line, at 8.last_line, @1.first_column, @8.last_column);
+macro : KW_MACRO word LP arglist RP LC macro_statements RC {$$=npval(PV_MACRO, at 1.first_line, at 8.last_line, @1.first_column, @8.last_column);
$$->u1.str = $2; $$->u2.arglist = $4; $$->u3.macro_statements = $7; }
| KW_MACRO word LP arglist RP LC RC {$$=npval(PV_MACRO, at 1.first_line, at 7.last_line, @1.first_column, @7.last_column); $$->u1.str = $2; $$->u2.arglist = $4; }
| KW_MACRO word LP RP LC macro_statements RC {$$=npval(PV_MACRO, at 1.first_line, at 7.last_line, @1.first_column, @7.last_column); $$->u1.str = $2; $$->u3.macro_statements = $6; }
@@ -174,10 +174,10 @@
;
elements : element { $$=$1;}
- | error {$$=0;}
- | elements element { if ( $1 && $2 ) {$$=$1; linku1($$,$2);}
- else if ( $1 ) {$$=$1;}
- else if ( $2 ) {$$=$2;} }
+ | error {$$=0;}
+ | elements element { if ( $1 && $2 ) {$$=$1; linku1($$,$2);}
+ else if ( $1 ) {$$=$1;}
+ else if ( $2 ) {$$=$2;} }
| elements error { $$=$1;}
;
@@ -187,7 +187,7 @@
| eswitches {$$=$1;}
| ignorepat {$$=$1;}
| word EQ { reset_semicount(parseio->scanner); } word SEMI {$$=npval(PV_VARDEC, at 1.first_line, at 5.last_line, @1.first_column, @5.last_column); $$->u1.str = $1;$$->u2.val = $4; }
- | word error {free($1); $$=0;}
+ | word error {free($1); $$=0;}
| SEMI {$$=0;/* allow older docs to be read */}
;
@@ -202,7 +202,7 @@
;
statements : statement {$$=$1;}
- | statements statement {if ( $1 && $2 ) {$$=$1; linku1($$,$2);}
+ | statements statement {if ( $1 && $2 ) {$$=$1; linku1($$,$2);}
else if ( $1 ) {$$=$1;}
else if ( $2 ) {$$=$2;} }
| statements error {$$=$1;}
@@ -214,8 +214,8 @@
random_head : KW_RANDOM LP { reset_parencount(parseio->scanner); } word_list RP { $$= npval(PV_RANDOM, at 1.first_line, at 5.last_line, @1.first_column, @5.last_column); $$->u1.str=$4;}
;
-iftime_head : KW_IFTIME LP word3_list COLON word3_list COLON word3_list BAR word3_list BAR word3_list BAR word3_list RP { $$= npval(PV_IFTIME, at 1.first_line, at 5.last_line, @1.first_column, @5.last_column);
- $$->u1.list = npval(PV_WORD, at 3.first_line, at 3.last_line, @3.first_column, @3.last_column);
[... 441 lines stripped ...]
More information about the asterisk-commits
mailing list