diff --git a/pbx/ael/ael.tab.c b/pbx/ael/ael.tab.c index f53fc2c1eb9a7276645171d78e1ffe1f16ad3662..500ca039ea13200ca1dee7f40b78540fafa28c14 100644 --- a/pbx/ael/ael.tab.c +++ b/pbx/ael/ael.tab.c @@ -574,9 +574,9 @@ static const unsigned short int yyrline[] = 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 @@ yyreduce: 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 @@ yyreduce: 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 @@ yyreduce: 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 @@ yyreduce: 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" - {(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);;} +#line 706 "ael.y" + { + (yyval.pval) = npval2(PV_WORD, &(yylsp[-1]), &(yylsp[0])); + (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); ;} +#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 702 "ael.y" +#line 714 "ael.y" {(yyval.pval)=(yyvsp[-1].pval);;} break; case 141: -#line 705 "ael.y" +#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 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 @@ yyreduce: 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 @@ yyreduce: 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-@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 @@ yyreduce: 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 @@ yyreduce: 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 @@ yyreduce: } /* Line 1126 of yacc.c. */ -#line 3067 "ael.tab.c" +#line 3083 "ael.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -3338,7 +3354,7 @@ yyreturn: } -#line 779 "ael.y" +#line 795 "ael.y" static char *token_equivs1[] = diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y index 877ba6943c7eb0001d4ef622fb0635714bffb912..62ec4ebaad2386a99b7cf9678120cb99948f1dad 100644 --- a/pbx/ael/ael.y +++ b/pbx/ael/ael.y @@ -410,21 +410,21 @@ statement : LC statements RC { $$ = npval2(PV_GOTO, &@1, &@3); $$->u1.list = $2;} | KW_JUMP jumptarget SEMI { - $$=npval(PV_GOTO,@1.first_line,@3.last_line, @1.first_column, @3.last_column); + $$ = npval2(PV_GOTO, &@1, &@3); $$->u1.list = $2;} | word COLON { - $$=npval(PV_LABEL,@1.first_line,@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,@1.first_line,@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,@1.first_line,@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_statements: macro_statement {$$ = $1;} ; macro_statement : statement {$$=$1;} - | KW_CATCH word LC statements RC {$$=npval(PV_CATCH,@1.first_line,@5.last_line, @1.first_column, @5.last_column); $$->u1.str = $2; $$->u2.statements = $4;} + | KW_CATCH word LC statements RC { + $$ = npval2(PV_CATCH, &@1, &@5); + $$->u1.str = $2; + $$->u2.statements = $4;} ; -switches : KW_SWITCHES LC switchlist RC {$$= npval(PV_SWITCHES,@1.first_line,@4.last_line, @1.first_column, @4.last_column); $$->u1.list = $3; } - | KW_SWITCHES LC RC /* empty switch list OK */ {$$= npval(PV_SWITCHES,@1.first_line,@3.last_line, @1.first_column, @3.last_column);} +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,@1.first_line,@4.last_line, @1.first_column, @4.last_column); $$->u1.list = $3; } | KW_ESWITCHES LC RC /* empty switch list OK */ {$$= npval(PV_ESWITCHES,@1.first_line,@3.last_line, @1.first_column, @3.last_column); } /* if there's nothing to declare, why include it? */ ; -switchlist : word SEMI {$$=npval(PV_WORD,@1.first_line,@2.last_line, @1.first_column, @2.last_column); $$->u1.str = $1;} - | switchlist word SEMI {pval *z = npval(PV_WORD,@2.first_line,@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 @@ includeslist : includedname SEMI {$$=npval(PV_WORD,@1.first_line,@2.last_line, @ $$->u2.arglist->next->next->next->u1.str = $9; prev_word=0; } - | includeslist includedname SEMI {pval *z = npval(PV_WORD,@2.first_line,@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-@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,@2.first_line,@3.last_line, @2.first_column, @3.last_column); $$=$1; z->u1.str = $2; linku1($$,z); z->u2.arglist = npval(PV_WORD,@4.first_line,@4.last_line, @4.first_column, @4.last_column);