aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael/ael.y
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-03 16:33:00 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-03 16:33:00 +0000
commitfb458f5cf763e065d9ea3177bdc21dbf315d6a84 (patch)
tree42d1fe9985c114b0b6002fc6c5b786de9a7fe6eb /pbx/ael/ael.y
parent34daabde85cde513e57d6713a7511203085a51b0 (diff)
remove a redundant rule
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24426 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/ael/ael.y')
-rw-r--r--pbx/ael/ael.y21
1 files changed, 7 insertions, 14 deletions
diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y
index 2b4108b90..f9b543594 100644
--- a/pbx/ael/ael.y
+++ b/pbx/ael/ael.y
@@ -121,7 +121,6 @@ static pval *update_last(pval *, YYLTYPE *);
%type <pval>switchlist_block
%type <pval>timespec
%type <pval>included_entry
-%type <pval>opt_statements
%type <str>opt_word
%type <str>context_name
@@ -170,7 +169,6 @@ static pval *update_last(pval *, YYLTYPE *);
opt_else
elements_block switchlist_block
timespec included_entry
- opt_statements
%destructor { free($$);} word word_list goto_word word3_list opt_word context_name
timerange
@@ -282,8 +280,9 @@ extension : word EXTENMARK statement {
;
-statements : statement {$$=$1;}
- | statements statement { $$ = linku1($1, $2); }
+/* list of statements in a block or after a case label - can be empty */
+statements : /* empty */ { $$ = NULL; }
+ | statement statements { $$ = linku1($1, $2); }
| statements error {$$=$1;}
;
@@ -541,24 +540,18 @@ eval_arglist : word_list { $$ = nword($1, &@1); }
;
case_statements: /* empty */ { $$ = NULL; }
- | case_statement {$$=$1;}
- | case_statements case_statement { $$ = linku1($1, $2); }
+ | case_statement case_statements { $$ = linku1($1, $2); }
;
-/* statement in a switch body after a label */
-opt_statements : { $$ = NULL; }
- | statements { $$ = $1; }
- ;
-
-case_statement: KW_CASE word COLON opt_statements {
+case_statement: KW_CASE word COLON statements {
$$ = npval2(PV_CASE, &@1, &@3); /* XXX 3 or 4 ? */
$$->u1.str = $2;
$$->u2.statements = $4;}
- | KW_DEFAULT COLON opt_statements {
+ | KW_DEFAULT COLON statements {
$$ = npval2(PV_DEFAULT, &@1, &@3);
$$->u1.str = NULL;
$$->u2.statements = $3;}
- | KW_PATTERN word COLON opt_statements {
+ | KW_PATTERN word COLON statements {
$$ = npval2(PV_PATTERN, &@1, &@4); /* XXX@3 or @4 ? */
$$->u1.str = $2;
$$->u2.statements = $4;}