diff options
Diffstat (limited to 'res/ael/ael.y')
-rw-r--r-- | res/ael/ael.y | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/res/ael/ael.y b/res/ael/ael.y index d16d20dff..f8398dd2e 100644 --- a/res/ael/ael.y +++ b/res/ael/ael.y @@ -159,7 +159,7 @@ static pval *update_last(pval *, YYLTYPE *); /* 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 3 +%expect 30 %error-verbose /* @@ -235,7 +235,7 @@ globals : KW_GLOBALS LC global_statements RC { ; global_statements : { $$ = NULL; } - | assignment global_statements {$$ = linku1($1, $2); } + | global_statements assignment {$$ = linku1($1, $2); } | error global_statements {$$=$2;} ; @@ -259,7 +259,7 @@ arglist : /* empty */ { $$ = NULL; } ; elements : {$$=0;} - | element elements { $$ = linku1($1, $2); } + | elements element { $$ = linku1($1, $2); } | error elements { $$=$2;} ; @@ -311,7 +311,7 @@ extension : word EXTENMARK statement { /* list of statements in a block or after a case label - can be empty */ statements : /* empty */ { $$ = NULL; } - | statement statements { $$ = linku1($1, $2); } + | statements statement { $$ = linku1($1, $2); } | error statements {$$=$2;} ; @@ -622,7 +622,7 @@ eval_arglist : word_list { $$ = nword($1, &@1); } ; case_statements: /* empty */ { $$ = NULL; } - | case_statement case_statements { $$ = linku1($1, $2); } + | case_statements case_statement { $$ = linku1($1, $2); } ; case_statement: KW_CASE word COLON statements { @@ -640,7 +640,7 @@ case_statement: KW_CASE word COLON statements { ; macro_statements: /* empty */ { $$ = NULL; } - | macro_statement macro_statements { $$ = linku1($1, $2); } + | macro_statements macro_statement { $$ = linku1($1, $2); } ; macro_statement : statement {$$=$1;} @@ -662,16 +662,16 @@ eswitches : KW_ESWITCHES LC switchlist RC { ; switchlist : /* empty */ { $$ = NULL; } - | word SEMI switchlist { $$ = linku1(nword($1, &@1), $3); } - | word AT word SEMI switchlist { + | switchlist word SEMI { $$ = linku1($1,nword($2, &@2)); } + | switchlist word AT word SEMI { char *x; - if (asprintf(&x,"%s@%s", $1, $3) < 0) { + if (asprintf(&x,"%s@%s", $2, $4) < 0) { ast_log(LOG_WARNING, "asprintf() failed\n"); $$ = NULL; } else { - free($1); - free($3); - $$ = linku1(nword(x, &@1), $5); + free($2); + free($4); + $$ = linku1($1,nword(x, &@2)); } } | error switchlist {$$=$2;} |