[asterisk-commits] trunk r22955 - in /trunk/pbx/ael: ael.tab.c ael.y

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Apr 27 12:14:08 MST 2006


Author: rizzo
Date: Thu Apr 27 14:14:07 2006
New Revision: 22955

URL: http://svn.digium.com/view/asterisk?rev=22955&view=rev
Log:
imore 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=22955&r1=22954&r2=22955&view=diff
==============================================================================
--- trunk/pbx/ael/ael.tab.c (original)
+++ trunk/pbx/ael/ael.tab.c Thu Apr 27 14:14:07 2006
@@ -573,10 +573,10 @@
      466,   468,   473,   479,   484,   490,   495,   501,   504,   505,
      510,   515,   522,   529,   536,   545,   550,   555,   562,   569,
      576,   585,   585,   590,   595,   595,   605,   611,   614,   617,
-     620,   625,   632,   633,   638,   640,   641,   642,   643,   644,
-     647,   648,   653,   654,   657,   658,   661,   662,   665,   666,
-     667,   670,   671,   687,   700,   701,   716,   729,   732,   733,
-     736,   739
+     620,   625,   632,   633,   638,   642,   646,   650,   653,   656,
+     661,   662,   667,   668,   671,   672,   675,   676,   679,   680,
+     681,   684,   685,   701,   714,   715,   730,   743,   746,   747,
+     750,   753
 };
 #endif
 
@@ -2295,7 +2295,7 @@
   case 71:
 #line 384 "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) = npval2(PV_VARDEC, &(yylsp[-4]), &(yylsp[0]));
 		(yyval.pval)->u1.str = (yyvsp[-4].str);
 		(yyval.pval)->u2.val = (yyvsp[-1].str); ;}
     break;
@@ -2303,7 +2303,7 @@
   case 72:
 #line 388 "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;
 
@@ -2750,98 +2750,112 @@
   case 124:
 #line 638 "ael.y"
     {
-		(yyval.pval) = npval(PV_CASE,(yylsp[-3]).first_line,(yylsp[-1]).last_line, (yylsp[-3]).first_column, (yylsp[-1]).last_column); (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->u2.statements = (yyvsp[0].pval);;}
+		(yyval.pval) = npval2(PV_CASE, &(yylsp[-3]), &(yylsp[-1])); /* XXX 3 or 4 ? */
+		(yyval.pval)->u1.str = (yyvsp[-2].str);
+		(yyval.pval)->u2.statements = (yyvsp[0].pval);;}
     break;
 
   case 125:
-#line 640 "ael.y"
-    {(yyval.pval) = npval(PV_DEFAULT,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = 0; (yyval.pval)->u2.statements = (yyvsp[0].pval);;}
+#line 642 "ael.y"
+    {
+		(yyval.pval) = npval2(PV_DEFAULT, &(yylsp[-2]), &(yylsp[0]));
+		(yyval.pval)->u1.str = NULL;
+		(yyval.pval)->u2.statements = (yyvsp[0].pval);;}
     break;
 
   case 126:
-#line 641 "ael.y"
-    {(yyval.pval) = npval(PV_PATTERN,(yylsp[-3]).first_line,(yylsp[-1]).last_line, (yylsp[-3]).first_column, (yylsp[-1]).last_column); (yyval.pval)->u1.str = (yyvsp[-2].str); (yyval.pval)->u2.statements = (yyvsp[0].pval);;}
+#line 646 "ael.y"
+    {
+		(yyval.pval) = npval2(PV_PATTERN, &(yylsp[-3]), &(yylsp[0])); /* XXX at 3 or @4 ? */
+		(yyval.pval)->u1.str = (yyvsp[-2].str);
+		(yyval.pval)->u2.statements = (yyvsp[0].pval);;}
     break;
 
   case 127:
-#line 642 "ael.y"
-    {(yyval.pval) = npval(PV_CASE,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = (yyvsp[-1].str);;}
+#line 650 "ael.y"
+    {
+		(yyval.pval) = npval2(PV_CASE, &(yylsp[-2]), &(yylsp[0]));
+		(yyval.pval)->u1.str = (yyvsp[-1].str);;}
     break;
 
   case 128:
-#line 643 "ael.y"
-    {(yyval.pval) = npval(PV_DEFAULT,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = 0;;}
+#line 653 "ael.y"
+    {
+		(yyval.pval) = npval2(PV_DEFAULT, &(yylsp[-1]), &(yylsp[0]));
+		(yyval.pval)->u1.str = NULL;;}
     break;
 
   case 129:
-#line 644 "ael.y"
-    {(yyval.pval) = npval(PV_PATTERN,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = (yyvsp[-1].str);;}
+#line 656 "ael.y"
+    {
+		(yyval.pval) = npval2(PV_PATTERN, &(yylsp[-2]), &(yylsp[0]));
+		(yyval.pval)->u1.str = (yyvsp[-1].str);;}
     break;
 
   case 130:
-#line 647 "ael.y"
+#line 661 "ael.y"
     {(yyval.pval) = (yyvsp[0].pval);;}
     break;
 
   case 131:
-#line 648 "ael.y"
+#line 662 "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);} ;}
     break;
 
   case 132:
-#line 653 "ael.y"
+#line 667 "ael.y"
     {(yyval.pval)=(yyvsp[0].pval);;}
     break;
 
   case 133:
-#line 654 "ael.y"
+#line 668 "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);;}
     break;
 
   case 134:
-#line 657 "ael.y"
+#line 671 "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); ;}
     break;
 
   case 135:
-#line 658 "ael.y"
+#line 672 "ael.y"
     {(yyval.pval)= npval(PV_SWITCHES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);;}
     break;
 
   case 136:
-#line 661 "ael.y"
+#line 675 "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 662 "ael.y"
+#line 676 "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 665 "ael.y"
+#line 679 "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 666 "ael.y"
+#line 680 "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 667 "ael.y"
+#line 681 "ael.y"
     {(yyval.pval)=(yyvsp[-1].pval);;}
     break;
 
   case 141:
-#line 670 "ael.y"
+#line 684 "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 671 "ael.y"
+#line 685 "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);
@@ -2861,7 +2875,7 @@
     break;
 
   case 143:
-#line 687 "ael.y"
+#line 701 "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);
@@ -2878,12 +2892,12 @@
     break;
 
   case 144:
-#line 700 "ael.y"
+#line 714 "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 145:
-#line 701 "ael.y"
+#line 715 "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);
@@ -2902,7 +2916,7 @@
     break;
 
   case 146:
-#line 717 "ael.y"
+#line 731 "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);
@@ -2918,29 +2932,29 @@
     break;
 
   case 147:
-#line 729 "ael.y"
+#line 743 "ael.y"
     {(yyval.pval)=(yyvsp[-1].pval);;}
     break;
 
   case 148:
-#line 732 "ael.y"
+#line 746 "ael.y"
     { (yyval.str) = (yyvsp[0].str);;}
     break;
 
   case 149:
-#line 733 "ael.y"
+#line 747 "ael.y"
     {(yyval.str)=strdup("default");;}
     break;
 
   case 150:
-#line 736 "ael.y"
+#line 750 "ael.y"
     {
 		(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[-3]), &(yylsp[0]));
 		(yyval.pval)->u1.list = (yyvsp[-1].pval);;}
     break;
 
   case 151:
-#line 739 "ael.y"
+#line 753 "ael.y"
     {
 		(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[-2]), &(yylsp[0]));;}
     break;
@@ -2950,7 +2964,7 @@
     }
 
 /* Line 1126 of yacc.c.  */
-#line 2954 "ael.tab.c"
+#line 2968 "ael.tab.c"
 
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -3225,7 +3239,7 @@
 }
 
 
-#line 744 "ael.y"
+#line 758 "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=22955&r1=22954&r2=22955&view=diff
==============================================================================
--- trunk/pbx/ael/ael.y (original)
+++ trunk/pbx/ael/ael.y Thu Apr 27 14:14:07 2006
@@ -382,11 +382,11 @@
 		$$ = npval2(PV_STATEMENTBLOCK, &@1, &@3);
 		$$->u1.list = $2; }
 	| 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);
+		$$ = npval2(PV_VARDEC, &@1, &@5);
 		$$->u1.str = $1;
 		$$->u2.val = $4; }
 	| KW_GOTO target 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;}
 	| KW_JUMP jumptarget SEMI {
 		$$=npval(PV_GOTO, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column);
@@ -636,12 +636,26 @@
 	;
 
 case_statement: KW_CASE word COLON statements {
-		$$ = npval(PV_CASE, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column); $$->u1.str = $2; $$->u2.statements = $4;}
-	| KW_DEFAULT COLON statements {$$ = npval(PV_DEFAULT, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column); $$->u1.str = 0; $$->u2.statements = $3;}
-	| KW_PATTERN word COLON statements {$$ = npval(PV_PATTERN, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column); $$->u1.str = $2; $$->u2.statements = $4;}
-	| KW_CASE word COLON {$$ = npval(PV_CASE, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column); $$->u1.str = $2;}
-	| KW_DEFAULT COLON {$$ = npval(PV_DEFAULT, at 1.first_line, at 2.last_line, @1.first_column, @2.last_column); $$->u1.str = 0;}
-	| KW_PATTERN word COLON  {$$ = npval(PV_PATTERN, at 1.first_line, at 3.last_line, @1.first_column, @3.last_column); $$->u1.str = $2;}
+		$$ = npval2(PV_CASE, &@1, &@3); /* XXX 3 or 4 ? */
+		$$->u1.str = $2;
+		$$->u2.statements = $4;}
+	| KW_DEFAULT COLON statements {
+		$$ = npval2(PV_DEFAULT, &@1, &@3);
+		$$->u1.str = NULL;
+		$$->u2.statements = $3;}
+	| KW_PATTERN word COLON statements {
+		$$ = npval2(PV_PATTERN, &@1, &@4); /* XXX at 3 or @4 ? */
+		$$->u1.str = $2;
+		$$->u2.statements = $4;}
+	| KW_CASE word COLON {
+		$$ = npval2(PV_CASE, &@1, &@3);
+		$$->u1.str = $2;}
+	| KW_DEFAULT COLON {
+		$$ = npval2(PV_DEFAULT, &@1, &@2);
+		$$->u1.str = NULL;}
+	| KW_PATTERN word COLON  {
+		$$ = npval2(PV_PATTERN, &@1, &@3);
+		$$->u1.str = $2;}
 	;
 
 macro_statements: macro_statement {$$ = $1;}



More information about the asterisk-commits mailing list