diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-03 22:12:02 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-03 22:12:02 +0000 |
commit | 3d188dd5c61aed77cae9e4eee9bdfeeba39b2030 (patch) | |
tree | f2b0c043937f25671fdcfb3e1e3affc6b476b783 /main/ast_expr2.fl | |
parent | bc97760a8025514dcf7e35c2ff46720fbe5a0b61 (diff) |
Merged revisions 179807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
I had some work to do to port these changes to trunk; the
check_expr stuff hasn't been updated here for quite some
time, it appears. I added some more tests to the check_expr2
suite. I had to play around with the makefile a bit, etc.
I added STANDALONE2 #ifdefs to ast_expr2.y so as not to
conflict structure with aelparse.
........
r179807 | murf | 2009-03-03 11:11:34 -0700 (Tue, 03 Mar 2009) | 19 lines
These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text.
I modified and added rules in ast_expr2.fl to better handle
the concatenations.
I added some default routines to ast_expr2.y so the standalone would
compile. It also looks like I haven't run this thru bison since 2.1, so
it's good to get this updated.
The Makefile has comments added now for check_expr2 and check_expr to
explain what they are for, and how to run them.
The testexpr2s stuff has been removed, in favor of check_expr2.
expr2.testinput has been updated to include the two expressions
that inspired these changes (from mcnobody on #asterisk this morning)
The regression has been run and all looks well.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179973 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2.fl')
-rw-r--r-- | main/ast_expr2.fl | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/main/ast_expr2.fl b/main/ast_expr2.fl index 6fca88293..499706811 100644 --- a/main/ast_expr2.fl +++ b/main/ast_expr2.fl @@ -172,12 +172,17 @@ static char *expr2_token_subst(const char *mess); return TOKEN; } -([a-zA-Z0-9\.';\\_^#@]|[\x80-\xff]|($[^{]))+ { +([a-zA-Z0-9\.';\\_^#@]|[\x80-\xff]|($[^{]))+ { SET_COLUMNS; SET_STRING; return TOKEN; } +([a-zA-Z0-9\.';\\_^#@]|[\x80-\xff]|($[^{]))+\$\{ { + curlycount = 0; + BEGIN(var); + yymore(); + } <var>[^{}]*\} { curlycount--; @@ -202,6 +207,12 @@ static char *expr2_token_subst(const char *mess); return TOKEN; } +<trail>[^-\t\r \n$():?%/+=*<>!|&]*\$\{ { + curlycount = 0; + BEGIN(var); + yymore(); + } + <trail>[-\t\r \n$():?%/+=*<>!|&] { char c = yytext[yyleng-1]; BEGIN(0); @@ -211,12 +222,6 @@ static char *expr2_token_subst(const char *mess); return TOKEN; } -<trail>\$\{ { - curlycount = 0; - BEGIN(var); - yymore(); - } - <trail><<EOF>> { BEGIN(0); SET_COLUMNS; |