aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael/ael.y
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-12 19:28:33 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-12 19:28:33 +0000
commit55a5f946844ad207f7f774f8ca75eb5bf5d570ba (patch)
treeb54e2b9d3d46f7e5afca969e81cd8b413b46b79c /pbx/ael/ael.y
parent0d42de398c741a718a2c7db09f94bc7c29e885a5 (diff)
This commit merges the contents of 7721, as it applied to the trunk version. Added the item that would previously trigger a false error to test1.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39571 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/ael/ael.y')
-rw-r--r--pbx/ael/ael.y17
1 files changed, 14 insertions, 3 deletions
diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y
index 309cc939a..81a76fd33 100644
--- a/pbx/ael/ael.y
+++ b/pbx/ael/ael.y
@@ -132,7 +132,7 @@ static pval *update_last(pval *, YYLTYPE *);
%type <str>goto_word
%type <str>word_list
-%type <str>word3_list
+%type <str>word3_list hint_word
%type <str>test_expr
%type <str>opt_pri
@@ -272,12 +272,12 @@ extension : word EXTENMARK statement {
$$->u1.str = $2;
$$->u2.statements = $4; set_dads($$,$4);
$$->u4.regexten=1;}
- | KW_HINT LP word3_list RP word EXTENMARK statement {
+ | KW_HINT LP hint_word RP word EXTENMARK statement {
$$ = npval2(PV_EXTENSION, &@1, &@7);
$$->u1.str = $5;
$$->u2.statements = $7; set_dads($$,$7);
$$->u3.hints = $3;}
- | KW_REGEXTEN KW_HINT LP word3_list RP word EXTENMARK statement {
+ | KW_REGEXTEN KW_HINT LP hint_word RP word EXTENMARK statement {
$$ = npval2(PV_EXTENSION, &@1, &@8);
$$->u1.str = $6;
$$->u2.statements = $8; set_dads($$,$8);
@@ -341,6 +341,17 @@ word_list : word { $$ = $1;}
prev_word = $$;}
;
+hint_word : word { $$ = $1; }
+ | hint_word word {
+ asprintf(&($$), "%s %s", $1, $2);
+ free($1);
+ free($2); }
+ | hint_word AMPER word { /* there are often '&' in hints */
+ asprintf(&($$), "%s&%s", $1, $3);
+ free($1);
+ free($3);}
+
+
word3_list : word { $$ = $1;}
| word word {
asprintf(&($$), "%s%s", $1, $2);