summaryrefslogtreecommitdiff
path: root/pbx/ael/ael.y
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2006-05-02 18:41:57 +0000
committerLuigi Rizzo <rizzo@icir.org>2006-05-02 18:41:57 +0000
commit9eaa57bebc0c8b8b2f730bd9b77da1ee427a6271 (patch)
tree3d4c2e5ad589567acf28278d65a66c1466346f46 /pbx/ael/ael.y
parent827abbf46e5274608fa144231dffa64b1f3644d3 (diff)
simplify handling of 'include' lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/ael/ael.y')
-rw-r--r--pbx/ael/ael.y19
1 files changed, 10 insertions, 9 deletions
diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y
index e51777895..2a58b732a 100644
--- a/pbx/ael/ael.y
+++ b/pbx/ael/ael.y
@@ -120,6 +120,7 @@ static pval *update_last(pval *, YYLTYPE *);
%type <pval>elements_block
%type <pval>switchlist_block
%type <pval>timespec
+%type <pval>included_entry
%type <str>opt_word
%type <str>word_or_default
@@ -166,7 +167,7 @@ static pval *update_last(pval *, YYLTYPE *);
global_statements globals macro context object objects
opt_else
elements_block switchlist_block
- timespec
+ timespec included_entry
%destructor { free($$);} word word_list goto_word word3_list opt_word word_or_default
timerange
@@ -617,17 +618,17 @@ switchlist : word SEMI { $$ = nword($1, &@1); }
| switchlist error {$$=$1;}
;
-includeslist : word_or_default SEMI { $$ = nword($1, &@1); }
+
+included_entry : word_or_default SEMI { $$ = nword($1, &@1); }
| word_or_default BAR timespec SEMI {
$$ = nword($1, &@1);
$$->u2.arglist = $3;
- prev_word=0; }
- | includeslist word_or_default SEMI { $$ = linku1($1, nword($2, &@2)); }
- | includeslist word_or_default BAR timespec SEMI {
- pval *z = nword($2, &@2);
- z->u2.arglist = $4;
- $$ = linku1($1, z);
- prev_word=0; }
+ prev_word=0; /* XXX sure ? */ }
+ ;
+
+/* list of ';' separated context names followed by optional timespec */
+includeslist : included_entry { $$ = $1; }
+ | includeslist included_entry { $$ = linku1($1, $2); }
| includeslist error {$$=$1;}
;