more indentation fixes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2006-04-27 06:44:38 +00:00
parent 6c8c83c106
commit c740982bef
2 changed files with 182 additions and 170 deletions

View File

@@ -562,14 +562,14 @@ static const unsigned short int yyrline[] =
288, 289, 292, 295, 295, 300, 300, 305, 326, 346, 288, 289, 292, 295, 295, 300, 300, 305, 326, 346,
347, 349, 350, 351, 354, 355, 356, 359, 359, 364, 347, 349, 350, 351, 354, 355, 356, 359, 359, 364,
365, 365, 368, 369, 370, 371, 372, 373, 371, 376, 365, 365, 368, 369, 370, 371, 372, 373, 371, 376,
376, 379, 380, 381, 382, 383, 385, 385, 418, 419, 376, 379, 380, 381, 382, 383, 385, 385, 417, 418,
420, 421, 422, 423, 424, 425, 426, 427, 430, 431, 419, 420, 421, 422, 423, 424, 425, 426, 429, 430,
434, 437, 442, 447, 452, 459, 462, 465, 470, 475, 435, 440, 445, 450, 455, 462, 465, 468, 473, 478,
480, 487, 487, 490, 493, 493, 502, 508, 511, 512, 483, 490, 490, 493, 496, 496, 505, 511, 514, 515,
513, 514, 517, 518, 523, 524, 525, 526, 527, 528, 516, 517, 520, 521, 526, 527, 528, 529, 530, 531,
531, 532, 537, 538, 541, 542, 545, 546, 549, 550, 534, 535, 540, 541, 544, 545, 548, 549, 552, 553,
551, 554, 555, 576, 589, 590, 610, 623, 626, 627, 554, 557, 558, 579, 592, 593, 613, 626, 629, 630,
630, 631 633, 636
}; };
#endif #endif
@@ -2363,111 +2363,114 @@ yyreduce:
case 87: case 87:
#line 385 "ael.y" #line 385 "ael.y"
{ {
char *bufx; char *bufx;
int tot=0; int tot=0;
pval *pptr; 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) = 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);
(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 */
/* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */ /* string to big to fit in the buffer? */
/* string to big to fit in the buffer? */ tot+=strlen((yyvsp[-4].pval)->u1.str);
tot+=strlen((yyvsp[-4].pval)->u1.str); for(pptr=(yyvsp[-4].pval)->u2.arglist;pptr;pptr=pptr->next) {
for(pptr=(yyvsp[-4].pval)->u2.arglist;pptr;pptr=pptr->next) { tot+=strlen(pptr->u1.str);
tot+=strlen(pptr->u1.str); tot++; /* for a sep like a comma */
tot++; /* for a sep like a comma */ }
} tot+=4; /* for safety */
tot+=4; /* for safety */ bufx = (char *)malloc(tot);
bufx = (char *)malloc(tot); strcpy(bufx,(yyvsp[-4].pval)->u1.str);
strcpy(bufx,(yyvsp[-4].pval)->u1.str); strcat(bufx,"(");
strcat(bufx,"("); for (pptr=(yyvsp[-4].pval)->u2.arglist;pptr;pptr=pptr->next) {
for (pptr=(yyvsp[-4].pval)->u2.arglist;pptr;pptr=pptr->next) { if ( pptr != (yyvsp[-4].pval)->u2.arglist )
if ( pptr != (yyvsp[-4].pval)->u2.arglist ) strcat(bufx,",");
strcat(bufx,","); strcat(bufx,pptr->u1.str);
strcat(bufx,pptr->u1.str); }
} strcat(bufx,")");
strcat(bufx,")");
#ifdef AAL_ARGCHECK #ifdef AAL_ARGCHECK
if ( !ael_is_funcname((yyvsp[-4].pval)->u1.str) ) 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); my_file, (yylsp[-4]).first_line, (yylsp[-4]).first_column, (yylsp[-4]).last_column, (yyvsp[-4].pval)->u1.str);
#endif #endif
(yyval.pval)->u1.str = bufx; (yyval.pval)->u1.str = bufx;
destroy_pval((yyvsp[-4].pval)); /* the app call it is not, get rid of that chain */ destroy_pval((yyvsp[-4].pval)); /* the app call it is not, get rid of that chain */
prev_word = 0; prev_word = 0;
;} ;}
break; break;
case 88: case 88:
#line 418 "ael.y" #line 417 "ael.y"
{ (yyval.pval) = npval(PV_BREAK,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);;} { (yyval.pval) = npval(PV_BREAK,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);;}
break; break;
case 89: case 89:
#line 419 "ael.y" #line 418 "ael.y"
{(yyval.pval) = npval(PV_RETURN,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);;} {(yyval.pval) = npval(PV_RETURN,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);;}
break; break;
case 90: case 90:
#line 420 "ael.y" #line 419 "ael.y"
{(yyval.pval) = npval(PV_CONTINUE,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);;} {(yyval.pval) = npval(PV_CONTINUE,(yylsp[-1]).first_line,(yylsp[0]).last_line, (yylsp[-1]).first_column, (yylsp[0]).last_column);;}
break; break;
case 91: case 91:
#line 421 "ael.y" #line 420 "ael.y"
{(yyval.pval)=(yyvsp[-1].pval); (yyval.pval)->u2.statements = (yyvsp[0].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;} {(yyval.pval)=(yyvsp[-1].pval); (yyval.pval)->u2.statements = (yyvsp[0].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;}
break; break;
case 92: case 92:
#line 422 "ael.y" #line 421 "ael.y"
{(yyval.pval)=(yyvsp[-3].pval); (yyval.pval)->u2.statements = (yyvsp[-2].pval);(yyval.pval)->endline = (yylsp[-2]).last_line; (yyval.pval)->endcol = (yylsp[-2]).last_column; (yyval.pval)->u3.else_statements = (yyvsp[0].pval);;} {(yyval.pval)=(yyvsp[-3].pval); (yyval.pval)->u2.statements = (yyvsp[-2].pval);(yyval.pval)->endline = (yylsp[-2]).last_line; (yyval.pval)->endcol = (yylsp[-2]).last_column; (yyval.pval)->u3.else_statements = (yyvsp[0].pval);;}
break; break;
case 93: case 93:
#line 423 "ael.y" #line 422 "ael.y"
{(yyval.pval)=(yyvsp[-1].pval); (yyval.pval)->u2.statements = (yyvsp[0].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;} {(yyval.pval)=(yyvsp[-1].pval); (yyval.pval)->u2.statements = (yyvsp[0].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;}
break; break;
case 94: case 94:
#line 424 "ael.y" #line 423 "ael.y"
{(yyval.pval)=(yyvsp[-3].pval); (yyval.pval)->u2.statements = (yyvsp[-2].pval);(yyval.pval)->endline = (yylsp[-2]).last_line; (yyval.pval)->endcol = (yylsp[-2]).last_column; (yyval.pval)->u3.else_statements = (yyvsp[0].pval);;} {(yyval.pval)=(yyvsp[-3].pval); (yyval.pval)->u2.statements = (yyvsp[-2].pval);(yyval.pval)->endline = (yylsp[-2]).last_line; (yyval.pval)->endcol = (yylsp[-2]).last_column; (yyval.pval)->u3.else_statements = (yyvsp[0].pval);;}
break; break;
case 95: case 95:
#line 425 "ael.y" #line 424 "ael.y"
{(yyval.pval)=(yyvsp[-1].pval); (yyval.pval)->u2.statements = (yyvsp[0].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;} {(yyval.pval)=(yyvsp[-1].pval); (yyval.pval)->u2.statements = (yyvsp[0].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;}
break; break;
case 96: case 96:
#line 426 "ael.y" #line 425 "ael.y"
{(yyval.pval)=(yyvsp[-3].pval); (yyval.pval)->u2.statements = (yyvsp[-2].pval);(yyval.pval)->endline = (yylsp[-2]).last_line; (yyval.pval)->endcol = (yylsp[-2]).last_column; (yyval.pval)->u3.else_statements = (yyvsp[0].pval);;} {(yyval.pval)=(yyvsp[-3].pval); (yyval.pval)->u2.statements = (yyvsp[-2].pval);(yyval.pval)->endline = (yylsp[-2]).last_line; (yyval.pval)->endcol = (yylsp[-2]).last_column; (yyval.pval)->u3.else_statements = (yyvsp[0].pval);;}
break; break;
case 97: case 97:
#line 427 "ael.y" #line 426 "ael.y"
{ (yyval.pval)=0; ;} { (yyval.pval)=0; ;}
break; break;
case 98: case 98:
#line 430 "ael.y" #line 429 "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) = 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);;}
break; break;
case 99: case 99:
#line 431 "ael.y" #line 430 "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)->next->u1.str = (yyvsp[0].str);;} (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; break;
case 100: case 100:
#line 434 "ael.y" #line 435 "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)->next->u1.str = (yyvsp[0].str);;} (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; break;
case 101: case 101:
#line 437 "ael.y" #line 440 "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)=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)->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->u1.str = (yyvsp[-2].str);
@@ -2476,7 +2479,7 @@ yyreduce:
break; break;
case 102: case 102:
#line 442 "ael.y" #line 445 "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)=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)->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->u1.str = (yyvsp[-2].str);
@@ -2485,7 +2488,7 @@ yyreduce:
break; break;
case 103: case 103:
#line 447 "ael.y" #line 450 "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)=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)->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->u1.str = (yyvsp[-2].str);
@@ -2494,7 +2497,7 @@ yyreduce:
break; break;
case 104: case 104:
#line 452 "ael.y" #line 455 "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)=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)->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->u1.str = (yyvsp[-2].str);
@@ -2503,21 +2506,21 @@ yyreduce:
break; break;
case 105: case 105:
#line 459 "ael.y" #line 462 "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)=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)->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");;} (yyval.pval)->next->u1.str = strdup("1");;}
break; break;
case 106: case 106:
#line 462 "ael.y" #line 465 "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)=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)->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);;} (yyval.pval)->next->u1.str = (yyvsp[0].str);;}
break; break;
case 107: case 107:
#line 465 "ael.y" #line 468 "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)=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)->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->u1.str = (yyvsp[-4].str);
@@ -2526,7 +2529,7 @@ yyreduce:
break; break;
case 108: case 108:
#line 470 "ael.y" #line 473 "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)=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)->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->u1.str = (yyvsp[-2].str);
@@ -2535,7 +2538,7 @@ yyreduce:
break; break;
case 109: case 109:
#line 475 "ael.y" #line 478 "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)=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)->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->u1.str = (yyvsp[-4].str);
@@ -2544,7 +2547,7 @@ yyreduce:
break; break;
case 110: case 110:
#line 480 "ael.y" #line 483 "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)=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)->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->u1.str = (yyvsp[-2].str);
@@ -2553,39 +2556,39 @@ yyreduce:
break; break;
case 111: case 111:
#line 487 "ael.y" #line 490 "ael.y"
{reset_argcount(parseio->scanner);;} {reset_argcount(parseio->scanner);;}
break; break;
case 112: case 112:
#line 488 "ael.y" #line 491 "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);;} (yyval.pval)->u1.str = (yyvsp[-4].str); (yyval.pval)->u2.arglist = (yyvsp[-1].pval);;}
break; break;
case 113: case 113:
#line 490 "ael.y" #line 493 "ael.y"
{(yyval.pval)= npval(PV_MACRO_CALL,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.str = (yyvsp[-2].str); ;} {(yyval.pval)= npval(PV_MACRO_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; break;
case 114: case 114:
#line 493 "ael.y" #line 496 "ael.y"
{reset_argcount(parseio->scanner);;} {reset_argcount(parseio->scanner);;}
break; break;
case 115: case 115:
#line 493 "ael.y" #line 496 "ael.y"
{if (strcasecmp((yyvsp[-2].str),"goto") == 0) { {if (strcasecmp((yyvsp[-2].str),"goto") == 0) {
(yyval.pval)= npval(PV_GOTO,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); (yyval.pval)= npval(PV_GOTO,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);
free((yyvsp[-2].str)); /* won't be using this */ 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 ); 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 } 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); ;} (yyval.pval)->u1.str = (yyvsp[-2].str); ;}
break; break;
case 116: case 116:
#line 502 "ael.y" #line 505 "ael.y"
{(yyval.pval) = (yyvsp[-2].pval); {(yyval.pval) = (yyvsp[-2].pval);
if( (yyval.pval)->type == PV_GOTO ) if( (yyval.pval)->type == PV_GOTO )
(yyval.pval)->u1.list = (yyvsp[-1].pval); (yyval.pval)->u1.list = (yyvsp[-1].pval);
@@ -2595,136 +2598,136 @@ yyreduce:
break; break;
case 117: case 117:
#line 508 "ael.y" #line 511 "ael.y"
{(yyval.pval)=(yyvsp[-1].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;} {(yyval.pval)=(yyvsp[-1].pval);(yyval.pval)->endline = (yylsp[0]).last_line; (yyval.pval)->endcol = (yylsp[0]).last_column;;}
break; break;
case 118: case 118:
#line 511 "ael.y" #line 514 "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)= 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);;}
break; break;
case 119: case 119:
#line 512 "ael.y" #line 515 "ael.y"
{ (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/); (yyval.pval)->u1.str = strdup(""); ;} { (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/); (yyval.pval)->u1.str = strdup(""); ;}
break; break;
case 120: case 120:
#line 513 "ael.y" #line 516 "ael.y"
{ pval *z = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column); (yyval.pval) = (yyvsp[-2].pval); linku1((yyvsp[-2].pval),z); z->u1.str = (yyvsp[0].str);;} { pval *z = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column); (yyval.pval) = (yyvsp[-2].pval); linku1((yyvsp[-2].pval),z); z->u1.str = (yyvsp[0].str);;}
break; break;
case 121: case 121:
#line 514 "ael.y" #line 517 "ael.y"
{ pval *z = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column); (yyval.pval) = (yyvsp[-1].pval); linku1((yyvsp[-1].pval),z); z->u1.str = strdup("");;} { pval *z = npval(PV_WORD,(yylsp[0]).first_line,(yylsp[0]).last_line, (yylsp[0]).first_column, (yylsp[0]).last_column); (yyval.pval) = (yyvsp[-1].pval); linku1((yyvsp[-1].pval),z); z->u1.str = strdup("");;}
break; break;
case 122: case 122:
#line 517 "ael.y" #line 520 "ael.y"
{(yyval.pval)=(yyvsp[0].pval);;} {(yyval.pval)=(yyvsp[0].pval);;}
break; break;
case 123: case 123:
#line 518 "ael.y" #line 521 "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[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;} else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
break; break;
case 124: case 124:
#line 523 "ael.y" #line 526 "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) = 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);;}
break; break;
case 125: case 125:
#line 524 "ael.y" #line 527 "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);;} {(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);;}
break; break;
case 126: case 126:
#line 525 "ael.y" #line 528 "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);;} {(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);;}
break; break;
case 127: case 127:
#line 526 "ael.y" #line 529 "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);;} {(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);;}
break; break;
case 128: case 128:
#line 527 "ael.y" #line 530 "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;;} {(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;;}
break; break;
case 129: case 129:
#line 528 "ael.y" #line 531 "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);;} {(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);;}
break; break;
case 130: case 130:
#line 531 "ael.y" #line 534 "ael.y"
{(yyval.pval) = (yyvsp[0].pval);;} {(yyval.pval) = (yyvsp[0].pval);;}
break; break;
case 131: case 131:
#line 532 "ael.y" #line 535 "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[-1].pval) ) {(yyval.pval)=(yyvsp[-1].pval);}
else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;} else if ( (yyvsp[0].pval) ) {(yyval.pval)=(yyvsp[0].pval);} ;}
break; break;
case 132: case 132:
#line 537 "ael.y" #line 540 "ael.y"
{(yyval.pval)=(yyvsp[0].pval);;} {(yyval.pval)=(yyvsp[0].pval);;}
break; break;
case 133: case 133:
#line 538 "ael.y" #line 541 "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)=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; break;
case 134: case 134:
#line 541 "ael.y" #line 544 "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); ;} {(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; break;
case 135: case 135:
#line 542 "ael.y" #line 545 "ael.y"
{(yyval.pval)= npval(PV_SWITCHES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);;} {(yyval.pval)= npval(PV_SWITCHES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);;}
break; break;
case 136: case 136:
#line 545 "ael.y" #line 548 "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); ;} {(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; break;
case 137: case 137:
#line 546 "ael.y" #line 549 "ael.y"
{(yyval.pval)= npval(PV_ESWITCHES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); ;} {(yyval.pval)= npval(PV_ESWITCHES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column); ;}
break; break;
case 138: case 138:
#line 549 "ael.y" #line 552 "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);;} {(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; break;
case 139: case 139:
#line 550 "ael.y" #line 553 "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); ;} {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; break;
case 140: case 140:
#line 551 "ael.y" #line 554 "ael.y"
{(yyval.pval)=(yyvsp[-1].pval);;} {(yyval.pval)=(yyvsp[-1].pval);;}
break; break;
case 141: case 141:
#line 554 "ael.y" #line 557 "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);;} {(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; break;
case 142: case 142:
#line 555 "ael.y" #line 558 "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)->u1.str = (yyvsp[-13].str);
@@ -2749,7 +2752,7 @@ yyreduce:
break; break;
case 143: case 143:
#line 576 "ael.y" #line 579 "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)->u1.str = (yyvsp[-9].str);
@@ -2766,12 +2769,12 @@ yyreduce:
break; break;
case 144: case 144:
#line 589 "ael.y" #line 592 "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); ;} {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; break;
case 145: case 145:
#line 590 "ael.y" #line 593 "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); (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);
@@ -2795,7 +2798,7 @@ yyreduce:
break; break;
case 146: case 146:
#line 611 "ael.y" #line 614 "ael.y"
{pval *z = npval(PV_WORD,(yylsp[-9]).first_line,(yylsp[-9]).last_line, (yylsp[-9]).first_column, (yylsp[-8]).last_column); {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); (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); z->u2.arglist = npval(PV_WORD,(yylsp[-7]).first_line,(yylsp[-7]).last_line, (yylsp[-7]).first_column, (yylsp[-7]).last_column);
@@ -2811,28 +2814,31 @@ yyreduce:
break; break;
case 147: case 147:
#line 623 "ael.y" #line 626 "ael.y"
{(yyval.pval)=(yyvsp[-1].pval);;} {(yyval.pval)=(yyvsp[-1].pval);;}
break; break;
case 148: case 148:
#line 626 "ael.y" #line 629 "ael.y"
{ (yyval.str) = (yyvsp[0].str);;} { (yyval.str) = (yyvsp[0].str);;}
break; break;
case 149: case 149:
#line 627 "ael.y" #line 630 "ael.y"
{(yyval.str)=strdup("default");;} {(yyval.str)=strdup("default");;}
break; break;
case 150: case 150:
#line 630 "ael.y" #line 633 "ael.y"
{(yyval.pval)= npval(PV_INCLUDES,(yylsp[-3]).first_line,(yylsp[0]).last_line, (yylsp[-3]).first_column, (yylsp[0]).last_column); (yyval.pval)->u1.list = (yyvsp[-1].pval);;} {
(yyval.pval)= npval(PV_INCLUDES,(yylsp[-3]).first_line,(yylsp[0]).last_line, (yylsp[-3]).first_column, (yylsp[0]).last_column);
(yyval.pval)->u1.list = (yyvsp[-1].pval);;}
break; break;
case 151: case 151:
#line 631 "ael.y" #line 636 "ael.y"
{(yyval.pval)= npval(PV_INCLUDES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);;} {
(yyval.pval)= npval(PV_INCLUDES,(yylsp[-2]).first_line,(yylsp[0]).last_line, (yylsp[-2]).first_column, (yylsp[0]).last_column);;}
break; break;
@@ -2840,7 +2846,7 @@ yyreduce:
} }
/* Line 1126 of yacc.c. */ /* Line 1126 of yacc.c. */
#line 2844 "ael.tab.c" #line 2850 "ael.tab.c"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
@@ -3115,7 +3121,7 @@ yyreturn:
} }
#line 635 "ael.y" #line 641 "ael.y"
static char *token_equivs1[] = static char *token_equivs1[] =

View File

@@ -383,38 +383,37 @@ statement : LC statements RC {$$=npval(PV_STATEMENTBLOCK,@1.first_line,@3.last_l
| word SEMI { $$= npval(PV_APPLICATION_CALL,@1.first_line,@2.last_line, @1.first_column, @2.last_column); | word SEMI { $$= npval(PV_APPLICATION_CALL,@1.first_line,@2.last_line, @1.first_column, @2.last_column);
$$->u1.str = $1;} $$->u1.str = $1;}
| application_call EQ {reset_semicount(parseio->scanner);} word SEMI { | application_call EQ {reset_semicount(parseio->scanner);} word SEMI {
char *bufx; char *bufx;
int tot=0; int tot=0;
pval *pptr; pval *pptr;
$$ = npval(PV_VARDEC,@1.first_line,@5.last_line, @1.first_column, @5.last_column);
$$ = npval(PV_VARDEC,@1.first_line,@5.last_line, @1.first_column, @5.last_column); $$->u2.val=$4;
$$->u2.val=$4; /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
/* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */ /* string to big to fit in the buffer? */
/* string to big to fit in the buffer? */ tot+=strlen($1->u1.str);
tot+=strlen($1->u1.str); for(pptr=$1->u2.arglist;pptr;pptr=pptr->next) {
for(pptr=$1->u2.arglist;pptr;pptr=pptr->next) { tot+=strlen(pptr->u1.str);
tot+=strlen(pptr->u1.str); tot++; /* for a sep like a comma */
tot++; /* for a sep like a comma */ }
} tot+=4; /* for safety */
tot+=4; /* for safety */ bufx = (char *)malloc(tot);
bufx = (char *)malloc(tot); strcpy(bufx,$1->u1.str);
strcpy(bufx,$1->u1.str); strcat(bufx,"(");
strcat(bufx,"("); for (pptr=$1->u2.arglist;pptr;pptr=pptr->next) {
for (pptr=$1->u2.arglist;pptr;pptr=pptr->next) { if ( pptr != $1->u2.arglist )
if ( pptr != $1->u2.arglist ) strcat(bufx,",");
strcat(bufx,","); strcat(bufx,pptr->u1.str);
strcat(bufx,pptr->u1.str); }
} strcat(bufx,")");
strcat(bufx,")");
#ifdef AAL_ARGCHECK #ifdef AAL_ARGCHECK
if ( !ael_is_funcname($1->u1.str) ) if ( !ael_is_funcname($1->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, @1.first_line, @1.first_column, @1.last_column, $1->u1.str); my_file, @1.first_line, @1.first_column, @1.last_column, $1->u1.str);
#endif #endif
$$->u1.str = bufx; $$->u1.str = bufx;
destroy_pval($1); /* the app call it is not, get rid of that chain */ destroy_pval($1); /* the app call it is not, get rid of that chain */
prev_word = 0; prev_word = 0;
} }
| KW_BREAK SEMI { $$ = npval(PV_BREAK,@1.first_line,@2.last_line, @1.first_column, @2.last_column);} | KW_BREAK SEMI { $$ = npval(PV_BREAK,@1.first_line,@2.last_line, @1.first_column, @2.last_column);}
| KW_RETURN SEMI {$$ = npval(PV_RETURN,@1.first_line,@2.last_line, @1.first_column, @2.last_column);} | KW_RETURN SEMI {$$ = npval(PV_RETURN,@1.first_line,@2.last_line, @1.first_column, @2.last_column);}
| KW_CONTINUE SEMI {$$ = npval(PV_CONTINUE,@1.first_line,@2.last_line, @1.first_column, @2.last_column);} | KW_CONTINUE SEMI {$$ = npval(PV_CONTINUE,@1.first_line,@2.last_line, @1.first_column, @2.last_column);}
@@ -428,12 +427,16 @@ statement : LC statements RC {$$=npval(PV_STATEMENTBLOCK,@1.first_line,@3.last_l
; ;
target : goto_word { $$ = npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); $$->u1.str = $1;} target : goto_word { $$ = npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); $$->u1.str = $1;}
| goto_word BAR goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); | goto_word BAR goto_word {
$$->u1.str = $1; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->next->u1.str = $3;} $$->u1.str = $1;
| goto_word COMMA goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->u1.str = $1; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->next->u1.str = $3;}
$$->next->u1.str = $3;} | goto_word COMMA goto_word {
$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = $1;
$$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->u1.str = $3;}
| goto_word BAR goto_word BAR goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); | goto_word BAR goto_word BAR goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = $1; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->u1.str = $1; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->u1.str = $3; $$->next->u1.str = $3;
@@ -459,30 +462,30 @@ target : goto_word { $$ = npval(PV_WORD,@1.first_line,@1.last_line, @1.first_col
jumptarget : goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); jumptarget : goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = $1; $$->next = npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); $$->u1.str = $1; $$->next = npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->next->u1.str = strdup("1");} /* jump extension[,priority][@context] */ $$->next->u1.str = strdup("1");} /* jump extension[,priority][@context] */
| goto_word COMMA goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); | goto_word COMMA goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = $1; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->u1.str = $1; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->u1.str = $3;} $$->next->u1.str = $3;}
| goto_word COMMA word AT word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); | goto_word COMMA word AT word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = $5; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->u1.str = $5; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->u1.str = $1; $$->next->u1.str = $1;
$$->next->next = npval(PV_WORD,@5.first_line,@5.last_line, @5.first_column, @5.last_column); $$->next->next = npval(PV_WORD,@5.first_line,@5.last_line, @5.first_column, @5.last_column);
$$->next->next->u1.str = $3; } $$->next->next->u1.str = $3; }
| goto_word AT goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); | goto_word AT goto_word {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = $3; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->u1.str = $3; $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->u1.str = $1; $$->next->u1.str = $1;
$$->next->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->next->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->next->u1.str = strdup("1"); } $$->next->next->u1.str = strdup("1"); }
| goto_word COMMA word AT KW_DEFAULT {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); | goto_word COMMA word AT KW_DEFAULT {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = strdup("default"); $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->u1.str = strdup("default"); $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->u1.str = $1; $$->next->u1.str = $1;
$$->next->next = npval(PV_WORD,@5.first_line,@5.last_line, @5.first_column, @5.last_column); $$->next->next = npval(PV_WORD,@5.first_line,@5.last_line, @5.first_column, @5.last_column);
$$->next->next->u1.str = $3; } $$->next->next->u1.str = $3; }
| goto_word AT KW_DEFAULT {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column); | goto_word AT KW_DEFAULT {$$=npval(PV_WORD,@1.first_line,@1.last_line, @1.first_column, @1.last_column);
$$->u1.str = strdup("default"); $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->u1.str = strdup("default"); $$->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->u1.str = $1; $$->next->u1.str = $1;
$$->next->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column); $$->next->next = npval(PV_WORD,@3.first_line,@3.last_line, @3.first_column, @3.last_column);
$$->next->next->u1.str = strdup("1"); } $$->next->next->u1.str = strdup("1"); }
; ;
macro_call : word LP {reset_argcount(parseio->scanner);} eval_arglist RP macro_call : word LP {reset_argcount(parseio->scanner);} eval_arglist RP
{$$= npval(PV_MACRO_CALL,@1.first_line,@2.last_line, @1.first_column, @2.last_column); {$$= npval(PV_MACRO_CALL,@1.first_line,@2.last_line, @1.first_column, @2.last_column);
@@ -491,12 +494,12 @@ macro_call : word LP {reset_argcount(parseio->scanner);} eval_arglist RP
; ;
application_call_head: word {reset_argcount(parseio->scanner);} LP {if (strcasecmp($1,"goto") == 0) { application_call_head: word {reset_argcount(parseio->scanner);} LP {if (strcasecmp($1,"goto") == 0) {
$$= npval(PV_GOTO,@1.first_line,@3.last_line, @1.first_column, @3.last_column); $$= npval(PV_GOTO,@1.first_line,@3.last_line, @1.first_column, @3.last_column);
free($1); /* won't be using this */ free($1); /* 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, @1.first_line, @1.first_column, @1.last_column ); 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, @1.first_line, @1.first_column, @1.last_column );
} else } else
$$= npval(PV_APPLICATION_CALL,@1.first_line,@3.last_line, @1.first_column, @3.last_column); $$= npval(PV_APPLICATION_CALL,@1.first_line,@3.last_line, @1.first_column, @3.last_column);
$$->u1.str = $1; } $$->u1.str = $1; }
; ;
application_call : application_call_head eval_arglist RP {$$ = $1; application_call : application_call_head eval_arglist RP {$$ = $1;
@@ -624,11 +627,14 @@ includeslist : includedname SEMI {$$=npval(PV_WORD,@1.first_line,@2.last_line, @
; ;
includedname : word { $$ = $1;} includedname : word { $$ = $1;}
| KW_DEFAULT {$$=strdup("default");} | KW_DEFAULT {$$=strdup("default");}
; ;
includes : KW_INCLUDES LC includeslist RC {$$= npval(PV_INCLUDES,@1.first_line,@4.last_line, @1.first_column, @4.last_column); $$->u1.list = $3;} includes : KW_INCLUDES LC includeslist RC {
| KW_INCLUDES LC RC {$$= npval(PV_INCLUDES,@1.first_line,@3.last_line, @1.first_column, @3.last_column);} $$= npval(PV_INCLUDES,@1.first_line,@4.last_line, @1.first_column, @4.last_column);
$$->u1.list = $3;}
| KW_INCLUDES LC RC {
$$= npval(PV_INCLUDES,@1.first_line,@3.last_line, @1.first_column, @3.last_column);}
; ;