simplify handling of 'include' lists

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Luigi Rizzo 20 years ago
parent 827abbf46e
commit 9eaa57bebc

File diff suppressed because it is too large Load Diff

@ -120,6 +120,7 @@ static pval *update_last(pval *, YYLTYPE *);
%type <pval>elements_block %type <pval>elements_block
%type <pval>switchlist_block %type <pval>switchlist_block
%type <pval>timespec %type <pval>timespec
%type <pval>included_entry
%type <str>opt_word %type <str>opt_word
%type <str>word_or_default %type <str>word_or_default
@ -166,7 +167,7 @@ static pval *update_last(pval *, YYLTYPE *);
global_statements globals macro context object objects global_statements globals macro context object objects
opt_else opt_else
elements_block switchlist_block elements_block switchlist_block
timespec timespec included_entry
%destructor { free($$);} word word_list goto_word word3_list opt_word word_or_default %destructor { free($$);} word word_list goto_word word3_list opt_word word_or_default
timerange timerange
@ -617,17 +618,17 @@ switchlist : word SEMI { $$ = nword($1, &@1); }
| switchlist error {$$=$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 { | word_or_default BAR timespec SEMI {
$$ = nword($1, &@1); $$ = nword($1, &@1);
$$->u2.arglist = $3; $$->u2.arglist = $3;
prev_word=0; } prev_word=0; /* XXX sure ? */ }
| includeslist word_or_default SEMI { $$ = linku1($1, nword($2, &@2)); } ;
| includeslist word_or_default BAR timespec SEMI {
pval *z = nword($2, &@2); /* list of ';' separated context names followed by optional timespec */
z->u2.arglist = $4; includeslist : included_entry { $$ = $1; }
$$ = linku1($1, z); | includeslist included_entry { $$ = linku1($1, $2); }
prev_word=0; }
| includeslist error {$$=$1;} | includeslist error {$$=$1;}
; ;

Loading…
Cancel
Save