diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-03 18:11:34 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-03 18:11:34 +0000 |
commit | 0167fbba73144e7dcf81a783a1d6c985343222f4 (patch) | |
tree | cfe43c2bc810b18faaeb570a8738a75faa396909 /main/ast_expr2.fl | |
parent | bdc6e64d123b518da7a24884cea93685e1a41e63 (diff) |
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/branches/1.4@179807 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2.fl')
-rw-r--r-- | main/ast_expr2.fl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/main/ast_expr2.fl b/main/ast_expr2.fl index b258726a1..68ccb4a17 100644 --- a/main/ast_expr2.fl +++ b/main/ast_expr2.fl @@ -158,6 +158,12 @@ HIBIT [\x80-\xff] return TOKEN; } +([a-zA-Z0-9\.';\\_^#@]|{HIBIT}|($[^{]))+\$\{ { + curlycount = 0; + BEGIN(var); + yymore(); + } + <var>[^{}]*\} { curlycount--; @@ -182,6 +188,12 @@ HIBIT [\x80-\xff] return TOKEN; } +<trail>[^-\t\r \n$():?%/+=*<>!|&]*\$\{ { + curlycount = 0; + BEGIN(var); + yymore(); + } + <trail>[-\t\r \n$():?%/+=*<>!|&] { char c = yytext[yyleng-1]; BEGIN(0); @@ -191,12 +203,6 @@ HIBIT [\x80-\xff] return TOKEN; } -<trail>\$\{ { - curlycount = 0; - BEGIN(var); - yymore(); - } - <trail><<EOF>> { BEGIN(0); SET_COLUMNS; |