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 /utils | |
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 'utils')
-rw-r--r-- | utils/Makefile | 23 | ||||
-rw-r--r-- | utils/expr2.testinput | 2 |
2 files changed, 17 insertions, 8 deletions
diff --git a/utils/Makefile b/utils/Makefile index b52bba7af..6886f9859 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -15,7 +15,17 @@ .PHONY: clean all uninstall -# to get check_expr, add it to the ALL_UTILS list +# to get check_expr, add it to the ALL_UTILS list -- this is a somewhat old checking +# program that wants an ael file for input, and will check each $[] expr for +# possible (old) problems, like spacing around operators, which dates back to +# the 1.2 days. The neat part is that it will actually evaluate the expressions. +# Users could use this to quickly check expressions in their .ael file. +# to get check_expr2, add it to the ALL_UTILS list -- this is a program that will +# read in a file containing expressions (as if they were in $[ ]), one per line. +# It will, of course signal any syntax errors. Devs (like murf) should use this whenever +# changes are made to ast_expr2.y or ast_expr2.fl (or the corresponding .c files), +# as a regression test. Others (mere mortals?) need not bother, but they are +# more than welcome to play! The regression test itself is in expr2.testinput. ALL_UTILS:=astman smsq stereorize streamplayer aelparse muted UTILS:=$(ALL_UTILS) @@ -93,6 +103,10 @@ ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I../main -Wno-unused check_expr: check_expr.o ast_expr2.o ast_expr2f.o +check_expr2: ast_expr2.c ast_expr2f.o + gcc -DSTANDALONE ast_expr2.c ast_expr2f.o -o check_expr2 + check_expr2 expr2.testinput + aelbison.c: ../pbx/ael/ael.tab.c @cp $< $@ aelbison.o: aelbison.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h @@ -112,13 +126,6 @@ aelparse.o: ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL -Wno-unused aelparse: aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o -testexpr2s: ../main/ast_expr2f.c ../main/ast_expr2.c ../main/ast_expr2.h - $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2f.c -o ast_expr2f.o - $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2.c -o ast_expr2.o - $(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o - rm ast_expr2.o ast_expr2f.o - ./testexpr2s expr2.testinput - smsq: smsq.o strcompat.o smsq: LIBS+=$(POPT_LIB) diff --git a/utils/expr2.testinput b/utils/expr2.testinput index 948baaf94..a4c0216c9 100644 --- a/utils/expr2.testinput +++ b/utils/expr2.testinput @@ -90,3 +90,5 @@ x != x 3 something 043 +${GLOBAL(ULKOPREFIX)}9${x} +512059${x} |