[asterisk-commits] trunk r23066 - in /trunk/pbx/ael: ael.tab.c ael.y
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Apr 27 23:26:28 MST 2006
Author: rizzo
Date: Fri Apr 28 01:26:27 2006
New Revision: 23066
URL: http://svn.digium.com/view/asterisk?rev=23066&view=rev
Log:
more npval -> npval2 conversions
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=23066&r1=23065&r2=23066&view=diff
==============================================================================
--- trunk/pbx/ael/ael.tab.c (original)
+++ trunk/pbx/ael/ael.tab.c Fri Apr 28 01:26:27 2006
@@ -574,9 +574,9 @@
531, 536, 543, 550, 557, 566, 571, 576, 583, 590,
597, 606, 606, 611, 616, 616, 626, 632, 635, 638,
641, 646, 653, 654, 659, 663, 667, 671, 674, 677,
- 682, 683, 688, 689, 692, 693, 696, 697, 700, 701,
- 702, 705, 706, 722, 735, 736, 751, 764, 767, 768,
- 771, 774
+ 682, 683, 688, 689, 695, 698, 702, 703, 706, 709,
+ 714, 717, 718, 734, 747, 752, 767, 780, 783, 784,
+ 787, 790
};
#endif
@@ -2409,14 +2409,14 @@
case 73:
#line 412 "ael.y"
{
- (yyval.pval)=npval(PV_GOTO,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);
+ (yyval.pval) = npval2(PV_GOTO, &(yylsp[-2]), &(yylsp[0]));
(yyval.pval)->u1.list = (yyvsp[-1].pval);;}
break;
case 74:
#line 415 "ael.y"
{
- (yyval.pval)=npval(PV_LABEL,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);
+ (yyval.pval) = npval2(PV_LABEL, &(yylsp[-1]), &(yylsp[0]));
(yyval.pval)->u1.str = (yyvsp[-1].str); ;}
break;
@@ -2438,7 +2438,7 @@
case 78:
#line 420 "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) = npval2(PV_FOR, &(yylsp[-11]), &(yylsp[0]));
(yyval.pval)->u1.for_init = (yyvsp[-8].str);
(yyval.pval)->u2.for_test=(yyvsp[-5].str);
(yyval.pval)->u3.for_inc = (yyvsp[-2].str);
@@ -2453,7 +2453,7 @@
case 80:
#line 426 "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) = npval2(PV_WHILE, &(yylsp[-5]), &(yylsp[0]));
(yyval.pval)->u1.str = (yyvsp[-2].str);
(yyval.pval)->u2.statements = (yyvsp[0].pval); ;}
break;
@@ -2910,51 +2910,63 @@
case 133:
#line 689 "ael.y"
- {(yyval.pval)=npval(PV_CATCH,(yylsp[-4]).first_line,(yylsp[0]).last_line, (yylsp[-4]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = (yyvsp[-3].str); (yyval.pval)->u2.statements = (yyvsp[-1].pval);;}
+ {
+ (yyval.pval) = npval2(PV_CATCH, &(yylsp[-4]), &(yylsp[0]));
+ (yyval.pval)->u1.str = (yyvsp[-3].str);
+ (yyval.pval)->u2.statements = (yyvsp[-1].pval);;}
break;
case 134:
-#line 692 "ael.y"
- {(yyval.pval)= npval(PV_SWITCHES,(yylsp[-3]).first_line,(yylsp[0]).last_line, (yylsp[-3]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.list = (yyvsp[-1].pval); ;}
+#line 695 "ael.y"
+ {
+ (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[-3]), &(yylsp[0]));
+ (yyval.pval)->u1.list = (yyvsp[-1].pval); ;}
break;
case 135:
-#line 693 "ael.y"
- {(yyval.pval)= npval(PV_SWITCHES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);;}
+#line 698 "ael.y"
+ {
+ (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[-2]), &(yylsp[0])); ;}
break;
case 136:
-#line 696 "ael.y"
+#line 702 "ael.y"
{(yyval.pval)= npval(PV_ESWITCHES,(yylsp[-3]).first_line,(yylsp[0]).last_line, (yylsp[-3]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.list = (yyvsp[-1].pval); ;}
break;
case 137:
-#line 697 "ael.y"
+#line 703 "ael.y"
{(yyval.pval)= npval(PV_ESWITCHES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); ;}
break;
case 138:
-#line 700 "ael.y"
+#line 706 "ael.y"
+ {
+ (yyval.pval) = npval2(PV_WORD, &(yylsp[-1]), &(yylsp[0]));
+ (yyval.pval)->u1.str = (yyvsp[-1].str);;}
+ break;
+
+ case 139:
+#line 709 "ael.y"
+ {
+ pval *z = npval2(PV_WORD, &(yylsp[-1]), &(yylsp[0]));
+ z->u1.str = (yyvsp[-1].str);
+ (yyval.pval)=(yyvsp[-2].pval);
+ linku1((yyval.pval),z); ;}
+ break;
+
+ case 140:
+#line 714 "ael.y"
+ {(yyval.pval)=(yyvsp[-1].pval);;}
+ break;
+
+ case 141:
+#line 717 "ael.y"
{(yyval.pval)=npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = (yyvsp[-1].str);;}
break;
- case 139:
-#line 701 "ael.y"
- {pval *z = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column); (yyval.pval)=(yyvsp[-2].pval); z->u1.str = (yyvsp[-1].str); linku1((yyval.pval),z); ;}
- break;
-
- case 140:
-#line 702 "ael.y"
- {(yyval.pval)=(yyvsp[-1].pval);;}
- break;
-
- case 141:
-#line 705 "ael.y"
- {(yyval.pval)=npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = (yyvsp[-1].str);;}
- break;
-
case 142:
-#line 706 "ael.y"
+#line 718 "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)->u1.str = (yyvsp[-13].str);
@@ -2974,7 +2986,7 @@
break;
case 143:
-#line 722 "ael.y"
+#line 734 "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)->u1.str = (yyvsp[-9].str);
@@ -2991,12 +3003,16 @@
break;
case 144:
-#line 735 "ael.y"
- {pval *z = npval(PV_WORD,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column); (yyval.pval)=(yyvsp[-2].pval); z->u1.str = (yyvsp[-1].str); linku1((yyval.pval),z); ;}
+#line 747 "ael.y"
+ {
+ pval *z = npval2(PV_WORD, &(yylsp[-1]), &(yylsp[0])); /* XXX don't we need @1- at 4 ?*/
+ (yyval.pval)=(yyvsp[-2].pval);
+ z->u1.str = (yyvsp[-1].str);
+ linku1((yyval.pval),z); ;}
break;
case 145:
-#line 736 "ael.y"
+#line 752 "ael.y"
{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);
@@ -3015,7 +3031,7 @@
break;
case 146:
-#line 752 "ael.y"
+#line 768 "ael.y"
{pval *z = npval(PV_WORD,(yylsp[-9]).first_line,(yylsp[-9]).last_line, (yylsp[-9]).first_column, (yylsp[-8]).last_column);
(yyval.pval)=(yyvsp[-10].pval); z->u1.str = (yyvsp[-9].str); linku1((yyval.pval),z);
z->u2.arglist = npval(PV_WORD,(yylsp[-7]).first_line,(yylsp[-7]).last_line, (yylsp[-7]).first_column, (yylsp[-7]).last_column);
@@ -3031,29 +3047,29 @@
break;
case 147:
-#line 764 "ael.y"
+#line 780 "ael.y"
{(yyval.pval)=(yyvsp[-1].pval);;}
break;
case 148:
-#line 767 "ael.y"
+#line 783 "ael.y"
{ (yyval.str) = (yyvsp[0].str);;}
break;
case 149:
-#line 768 "ael.y"
+#line 784 "ael.y"
{(yyval.str)=strdup("default");;}
break;
case 150:
-#line 771 "ael.y"
+#line 787 "ael.y"
{
(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[-3]), &(yylsp[0]));
(yyval.pval)->u1.list = (yyvsp[-1].pval);;}
break;
case 151:
-#line 774 "ael.y"
+#line 790 "ael.y"
{
(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[-2]), &(yylsp[0]));;}
break;
@@ -3063,7 +3079,7 @@
}
/* Line 1126 of yacc.c. */
-#line 3067 "ael.tab.c"
+#line 3083 "ael.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -3338,7 +3354,7 @@
}
-#line 779 "ael.y"
+#line 795 "ael.y"
static char *token_equivs1[] =
Modified: trunk/pbx/ael/ael.y
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael.y?rev=23066&r1=23065&r2=23066&view=diff
==============================================================================
--- trunk/pbx/ael/ael.y (original)
+++ trunk/pbx/ael/ael.y Fri Apr 28 01:26:27 2006
@@ -410,21 +410,21 @@
$$ = npval2(PV_GOTO, &@1, &@3);
$$->u1.list = $2;}
| KW_JUMP jumptarget SEMI {
- $$=npval(PV_GOTO, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column);
+ $$ = npval2(PV_GOTO, &@1, &@3);
$$->u1.list = $2;}
| word COLON {
- $$=npval(PV_LABEL, at 1.first_line, at 2.last_line, @1.first_column, @2.last_column);
+ $$ = npval2(PV_LABEL, &@1, &@2);
$$->u1.str = $1; }
| KW_FOR LP {reset_semicount(parseio->scanner);} word SEMI
{reset_semicount(parseio->scanner);} word SEMI
{reset_parencount(parseio->scanner);} word RP statement {
- $$=npval(PV_FOR, at 1.first_line, at 12.last_line, @1.first_column, @12.last_column);
+ $$ = npval2(PV_FOR, &@1, &@12);
$$->u1.for_init = $4;
$$->u2.for_test=$7;
$$->u3.for_inc = $10;
$$->u4.for_statements = $12;}
| KW_WHILE LP {reset_parencount(parseio->scanner);} word RP statement {
- $$=npval(PV_WHILE, at 1.first_line, at 6.last_line, @1.first_column, @6.last_column);
+ $$ = npval2(PV_WHILE, &@1, &@6);
$$->u1.str = $4;
$$->u2.statements = $6; }
| switch_head RC /* empty list OK */ {
@@ -686,19 +686,31 @@
;
macro_statement : statement {$$=$1;}
- | KW_CATCH word LC statements RC {$$=npval(PV_CATCH, at 1.first_line, at 5.last_line, @1.first_column, @5.last_column); $$->u1.str = $2; $$->u2.statements = $4;}
- ;
-
-switches : KW_SWITCHES LC switchlist RC {$$= npval(PV_SWITCHES, at 1.first_line, at 4.last_line, @1.first_column, @4.last_column); $$->u1.list = $3; }
- | KW_SWITCHES LC RC /* empty switch list OK */ {$$= npval(PV_SWITCHES, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column);}
+ | KW_CATCH word LC statements RC {
+ $$ = npval2(PV_CATCH, &@1, &@5);
+ $$->u1.str = $2;
+ $$->u2.statements = $4;}
+ ;
+
+switches : KW_SWITCHES LC switchlist RC {
+ $$ = npval2(PV_SWITCHES, &@1, &@4);
+ $$->u1.list = $3; }
+ | KW_SWITCHES LC RC /* empty switch list OK */ {
+ $$ = npval2(PV_SWITCHES, &@1, &@3); }
;
eswitches : KW_ESWITCHES LC switchlist RC {$$= npval(PV_ESWITCHES, at 1.first_line, at 4.last_line, @1.first_column, @4.last_column); $$->u1.list = $3; }
| KW_ESWITCHES LC RC /* empty switch list OK */ {$$= npval(PV_ESWITCHES, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column); } /* if there's nothing to declare, why include it? */
;
-switchlist : word SEMI {$$=npval(PV_WORD, at 1.first_line, at 2.last_line, @1.first_column, @2.last_column); $$->u1.str = $1;}
- | switchlist word SEMI {pval *z = npval(PV_WORD, at 2.first_line, at 3.last_line, @2.first_column, @3.last_column); $$=$1; z->u1.str = $2; linku1($$,z); }
+switchlist : word SEMI {
+ $$ = npval2(PV_WORD, &@1, &@2);
+ $$->u1.str = $1;}
+ | switchlist word SEMI {
+ pval *z = npval2(PV_WORD, &@2, &@3);
+ z->u1.str = $2;
+ $$=$1;
+ linku1($$,z); }
| switchlist error {$$=$1;}
;
@@ -732,7 +744,11 @@
$$->u2.arglist->next->next->next->u1.str = $9;
prev_word=0;
}
- | includeslist includedname SEMI {pval *z = npval(PV_WORD, at 2.first_line, at 3.last_line, @2.first_column, @3.last_column); $$=$1; z->u1.str = $2; linku1($$,z); }
+ | includeslist includedname SEMI {
+ pval *z = npval2(PV_WORD, &@2, &@3); /* XXX don't we need @1- at 4 ?*/
+ $$=$1;
+ z->u1.str = $2;
+ linku1($$,z); }
| includeslist includedname BAR word3_list COLON word3_list COLON word3_list BAR word3_list BAR word3_list BAR word3_list SEMI {pval *z = npval(PV_WORD, at 2.first_line, at 3.last_line, @2.first_column, @3.last_column);
$$=$1; z->u1.str = $2; linku1($$,z);
z->u2.arglist = npval(PV_WORD, at 4.first_line, at 4.last_line, @4.first_column, @4.last_column);
More information about the asterisk-commits
mailing list