[asterisk-commits] branch murf/AEL2 r21539 - in /team/murf/AEL2: doc/ include/asterisk/ pbx/ pbx...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 19 09:59:08 MST 2006


Author: murf
Date: Wed Apr 19 11:59:02 2006
New Revision: 21539

URL: http://svn.digium.com/view/asterisk?rev=21539&view=rev
Log:
Now, I'm working on the second half of the assignment--
I've removed the aal stuff (argdesc items), commented
them out of the makefile deps and compile lists, removed
the argdesc stuff from the makefile. Edited the pbx_ael.c
file and #ifdef'd out the applist related checks, such that at
some point in the future they can be re-implemented.

I've modified the ael.txt file and separated out the 
removed semantic checks, with some explanation of their
removal.

The regression test references have been updated.


Removed:
    team/murf/AEL2/include/asterisk/argdesc.h
    team/murf/AEL2/pbx/aal/
Modified:
    team/murf/AEL2/doc/ael.txt
    team/murf/AEL2/include/asterisk/ael_structs.h
    team/murf/AEL2/pbx/Makefile
    team/murf/AEL2/pbx/ael/ael-test/ref.ael-test1
    team/murf/AEL2/pbx/ael/ael-test/ref.ael-test2
    team/murf/AEL2/pbx/ael/ael-test/ref.ael-test3
    team/murf/AEL2/pbx/ael/ael-test/ref.ael-test4
    team/murf/AEL2/pbx/pbx_ael.c

Modified: team/murf/AEL2/doc/ael.txt
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/doc/ael.txt?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/doc/ael.txt (original)
+++ team/murf/AEL2/doc/ael.txt Wed Apr 19 11:59:02 2006
@@ -184,6 +184,10 @@
 You can also use the "aelparse" program to check your extensions.ael
 file before feeding it to asterisk. Wouldn't it be nice to eliminate
 most errors before giving the file to asterisk?
+
+aelparse is compiled in the utils directory of the asterisk release.
+It isn't installed anywhere (yet). You can copy it to your favorite
+spot in your PATH.
 
 aelparse has two optional arguments:
 
@@ -1060,6 +1064,37 @@
 AEL, after parsing, but before compiling, traverses the dialplan
 tree, and makes several checks:
 
+    * Macro calls to non-existent macros.
+    * Macro calls to contexts.
+    * Macro calls with argument count not matching the definition.
+    * application call to macro. (missing the '&')
+    * application calls to "GotoIf", "GotoIfTime", "while",
+      "endwhile", "Random", and "execIf", will generate a message to
+      consider converting the call to AEL goto, while, etc. constructs.
+    * goto a label in an empty extension.
+    * goto a non-existent label, either a within-extension,
+      within-context, or in a different context, or in any included
+      contexts. Will even check "sister" context references.
+    * All the checks done on the time values in the dial plan, are
+      done on the time values in the ifTime() and includes times:
+          o the time range has to have two times separated by a dash;
+          o the times have to be in range of 0 to 24 hours.
+          o The weekdays have to match the internal list, if they are provided;
+          o the day of the month, if provided, must be in range of 1 to 31;
+          o the month name or names have to match those in the internal list. 
+    * (0.5) If an expression is wrapped in $[ ... ], and the compiler
+      will wrap it again, a warning is issued.
+    * (0.5) If an expression had operators (you know,
+      +,-,*,/,%,!,etc), but no ${ } variables, a warning is
+      issued. Maybe someone forgot to wrap a variable name?
+    * (0.12) check for duplicate context names.
+    * (0.12) check for abstract contexts that are not included by any context.
+    * (0.13) Issue a warning if a label is a numeric value. 
+
+There are a subset of checks that have been removed until the proposed
+AAL (Asterisk Argument Language) is developed and incorporated into Asterisk.
+These checks will be:
+
     * (if the application argument analyzer is working: the presence
       of the 'j' option is reported as error.
     * if options are specified, that are not available in an
@@ -1072,37 +1107,12 @@
     * a Switch construct is used, which is uses a known variable, and
       the application that would set that variable is not called in
       the same extension. This is a warning only...
-    * Macro calls to non-existent macros.
-    * Macro calls to contexts.
-    * Macro calls with argument count not matching the definition.
-    * application call to macro.
-    * application calls to "GotoIf", "GotoIfTime", "while",
-      "endwhile", "Random", and "execIf", will generate a message to
-      consider converting the call to AEL goto, while, etc. constructs.
     * Calls to applications not in the "applist" database (installed
       in /var/lib/asterisk/applist" on most systems).
-    * goto a label in an empty extension.
-    * goto a non-existent label, either a within-extension,
-      within-context, or in a different context, or in any included
-      contexts. Will even check "sister" context references.
-    * All the checks done on the time values in the dial plan, are
-      done on the time values in the ifTime() and includes times:
-          o the time range has to have two times separated by a dash;
-          o the times have to be in range of 0 to 24 hours.
-          o The weekdays have to match the internal list, if they are provided;
-          o the day of the month, if provided, must be in range of 1 to 31;
-          o the month name or names have to match those in the internal list. 
     * In an assignment statement, if the assignment is to a function,
       the function name used is checked to see if it one of the
       currently known functions. A warning is issued if it is not.
-    * (0.5) If an expression is wrapped in $[ ... ], and the compiler
-      will wrap it again, a warning is issued.
-    * (0.5) If an expression had operators (you know,
-      +,-,*,/,%,!,etc), but no ${ } variables, a warning is
-      issued. Maybe someone forgot to wrap a variable name?
-    * (0.12) check for duplicate context names.
-    * (0.12) check for abstract contexts that are not included by any context.
-    * (0.13) Issue a warning if a label is a numeric value. 
+
 
 
 Differences with the original version of AEL

Modified: team/murf/AEL2/include/asterisk/ael_structs.h
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/include/asterisk/ael_structs.h?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/include/asterisk/ael_structs.h (original)
+++ team/murf/AEL2/include/asterisk/ael_structs.h Wed Apr 19 11:59:02 2006
@@ -18,7 +18,6 @@
 #   define QUAD_MAX     (0x7fffffffffffffffLL)
 #  endif
 
-#include "asterisk/argdesc.h"
 
 typedef enum 
 {
@@ -118,7 +117,6 @@
 void linku1(pval *head, pval *tail);
 void print_pval_list(FILE *f, pval *item, int depth);
 void print_pval(FILE *f, pval *item, int depth);
-void check_pval(pval *item, struct argapp *apps);
 void ael2_semantic_check(pval *item, int *errs, int *warns, int *notes);
 struct pval *find_label_in_current_context(char *exten, char *label);
 struct pval *find_label_in_current_extension(char *label);

Modified: team/murf/AEL2/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/Makefile?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/pbx/Makefile (original)
+++ team/murf/AEL2/pbx/Makefile Wed Apr 19 11:59:02 2006
@@ -64,10 +64,10 @@
 pbx_dundi.so: dundi-parser.o pbx_dundi.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB}
 
-pbx_ael.o : ael/aelflex.o ael/aelbison.o ../include/asterisk/ael_structs.h aal/argdesc.tab.o aal/argdesc_lex.o
+pbx_ael.o : ael/aelflex.o ael/aelbison.o ../include/asterisk/ael_structs.h ## aal/argdesc.tab.o aal/argdesc_lex.o
 
-pbx_ael.so : pbx_ael.o ael/aelbison.o ael/aelflex.o aal/argdesc.tab.o aal/argdesc_lex.o
-	$(CC) $(SOLINK) -o $@ pbx_ael.o ael/aelbison.o ael/aelflex.o aal/argdesc.tab.o aal/argdesc_lex.o
+pbx_ael.so : pbx_ael.o ael/aelbison.o ael/aelflex.o ## aal/argdesc.tab.o aal/argdesc_lex.o
+	$(CC) $(SOLINK) -o $@ pbx_ael.o ael/aelbison.o ael/aelflex.o ## aal/argdesc.tab.o aal/argdesc_lex.o
 
 ael/aelflex.o : ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
 	$(CC) $(CFLAGS) -c -o ael/aelflex.o ael/ael_lex.c
@@ -81,17 +81,6 @@
 ael/ael.tab.c ael/ael.tab.h : ael/ael.y
 	(cd ael; bison -v -d ael.y)
 
-aal/argdesc.tab.c aal/argdesc.tab.h : aal/argdesc.y
-	(cd aal; bison -v -d argdesc.y )
-
-aal/argdesc_lex.c : aal/argdesc.l ../include/asterisk/argdesc.h
-	(cd aal; flex argdesc.l)
-
-aal/argdesc.tab.o : aal/argdesc.tab.c aal/argdesc.tab.h
-	$(CC) $(CFLAGS) -c -o aal/argdesc.tab.o aal/argdesc.tab.c ## -DYYDEBUG
-	
-aal/argdesc_lex.o : aal/argdesc_lex.c ../include/asterisk/argdesc.h aal/argdesc.tab.h
-	$(CC) $(CFLAGS) -c -o aal/argdesc_lex.o aal/argdesc_lex.c
 
 
 %.moc : %.h

Modified: team/murf/AEL2/pbx/ael/ael-test/ref.ael-test1
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/ael/ael-test/ref.ael-test1?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/pbx/ael/ael-test/ref.ael-test1 (original)
+++ team/murf/AEL2/pbx/ael/ael-test/ref.ael-test1 Wed Apr 19 11:59:02 2006
@@ -1,18 +1,11 @@
 Executed ast_register_file_version();
-LOG: lev:2 file:pbx_ael.c  line:3391 func: pbx_load_module  Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c  line:3398 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3401 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c  line:1864 func: check_switch_expr  Warning: file ./extensions.ael, line 54-60: switch with expression(${DIALSTATUS}) does not handle the case of DONTCALL !
-LOG: lev:3 file:pbx_ael.c  line:1864 func: check_switch_expr  Warning: file ./extensions.ael, line 54-60: switch with expression(${DIALSTATUS}) does not handle the case of CANCEL !
-LOG: lev:3 file:pbx_ael.c  line:1864 func: check_switch_expr  Warning: file ./extensions.ael, line 54-60: switch with expression(${DIALSTATUS}) does not handle the case of ANSWER !
-LOG: lev:3 file:pbx_ael.c  line:1864 func: check_switch_expr  Warning: file ./extensions.ael, line 54-60: switch with expression(${DIALSTATUS}) does not handle the case of NOANSWER !
-LOG: lev:3 file:pbx_ael.c  line:1864 func: check_switch_expr  Warning: file ./extensions.ael, line 54-60: switch with expression(${DIALSTATUS}) does not handle the case of CONGESTION !
-LOG: lev:3 file:pbx_ael.c  line:1864 func: check_switch_expr  Warning: file ./extensions.ael, line 54-60: switch with expression(${DIALSTATUS}) does not handle the case of CHANUNAVAIL !
-LOG: lev:3 file:pbx_ael.c  line:1897 func: check_switch_expr  Warning: file ./extensions.ael, line 54-60: Couldn't find an application call in this extension that sets the  expression (${DIALSTATUS}) value!
-LOG: lev:3 file:pbx_ael.c  line:872 func: check_dow  Warning: file ./extensions.ael, line 67-67: The day (m0n) must be one of 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', or 'sat'!
-LOG: lev:3 file:pbx_ael.c  line:830 func: check_timerange  Warning: file ./extensions.ael, line 78-78: The end time (25:00) is out of range!
-LOG: lev:2 file:pbx_ael.c  line:3404 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3406 func: pbx_load_module  AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3409 func: pbx_load_module  AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3412 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3427 func: pbx_load_module  Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c  line:3434 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3437 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pbx_ael.c  line:891 func: check_dow  Warning: file ./extensions.ael, line 67-67: The day (m0n) must be one of 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', or 'sat'!
+LOG: lev:3 file:pbx_ael.c  line:849 func: check_timerange  Warning: file ./extensions.ael, line 78-78: The end time (25:00) is out of range!
+LOG: lev:2 file:pbx_ael.c  line:3440 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3442 func: pbx_load_module  AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3445 func: pbx_load_module  AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3448 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
 LOG: lev:4 file:ael2_parse  line:261 func: main  5 contexts, 13 extensions, 156 priorities

Modified: team/murf/AEL2/pbx/ael/ael-test/ref.ael-test2
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/ael/ael-test/ref.ael-test2?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/pbx/ael/ael-test/ref.ael-test2 (original)
+++ team/murf/AEL2/pbx/ael/ael-test/ref.ael-test2 Wed Apr 19 11:59:02 2006
@@ -1,33 +1,15 @@
 Executed ast_register_file_version();
-LOG: lev:2 file:pbx_ael.c  line:3391 func: pbx_load_module  Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c  line:3398 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3427 func: pbx_load_module  Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c  line:3434 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file ./apptest.ael2, 3474 chars
 LOG: lev:3 file:ael.y  line:396 func: ael_yyparse  ==== File: ./apptest.ael2, Line 46, Cols: 8-11: Suggestion: Use the goto statement instead of the Goto() application call in AEL.
-LOG: lev:2 file:pbx_ael.c  line:3401 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 5-5: The j option in the AddQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 14-14: The j option in the Authenticate application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 19-19: The j option in the ChanIsAvail application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 22-22: The j option in the ControlPlayback application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 27-27: The j option in the Dial application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 32-32: The j option in the DUNDiLookup application call is not appropriate for AEL!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 35-35: application call to EndWhile needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 37-37: application call to ExecIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:1081 func: check_goto  Error: file ./apptest.ael2, line 46-46: goto:  no context cont could be found that matches the goto target!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 47-47: application call to GotoIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 50-50: The j option in the HasNewVoicemail application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 51-51: The j option in the HasVoicemail application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 56-56: The j option in the LookupBlacklist application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 61-61: The j option in the MailboxExists application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 78-78: The j option in the PauseQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 80-80: The j option in the Playback application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 82-82: The j option in the PrivacyManager application call is not appropriate for AEL!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 85-85: application call to Random needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 91-91: The j option in the RemoveQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 104-104: The j option in the SendText application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 127-127: The j option in the Transfer application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 130-130: The j option in the UnpauseQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 134-134: The j option in the VoiceMail application call is not appropriate for AEL!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 141-141: application call to While needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:3414 func: pbx_load_module  Sorry, but 0 syntax errors and 19 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:2 file:pbx_ael.c  line:3437 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 35-35: application call to EndWhile needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 37-37: application call to ExecIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:4 file:pbx_ael.c  line:1100 func: check_goto  Error: file ./apptest.ael2, line 46-46: goto:  no context cont could be found that matches the goto target!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 47-47: application call to GotoIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 85-85: application call to Random needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 141-141: application call to While needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:4 file:pbx_ael.c  line:3450 func: pbx_load_module  Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile.
 LOG: lev:4 file:ael2_parse  line:261 func: main  0 contexts, 0 extensions, 0 priorities

Modified: team/murf/AEL2/pbx/ael/ael-test/ref.ael-test3
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/ael/ael-test/ref.ael-test3?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/pbx/ael/ael-test/ref.ael-test3 (original)
+++ team/murf/AEL2/pbx/ael/ael-test/ref.ael-test3 Wed Apr 19 11:59:02 2006
@@ -1,18 +1,18 @@
 Executed ast_register_file_version();
-LOG: lev:2 file:pbx_ael.c  line:3391 func: pbx_load_module  Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c  line:3398 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3427 func: pbx_load_module  Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c  line:3434 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file ./include1.ael2, 78 chars
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file ./include2.ael2, 98 chars
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file ./include3.ael2, 57 chars
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file ./include5.ael2, 56 chars
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file ./include4.ael2, 87 chars
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file /etc/asterisk/telemarket_torture.ael2, 28036 chars
-LOG: lev:2 file:pbx_ael.c  line:3401 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c  line:2155 func: check_pval_item  Warning: file ./extensions.ael, line 5-5: expression Console/dsp has operators, but no variables. Interesting...
-LOG: lev:3 file:pbx_ael.c  line:2155 func: check_pval_item  Warning: file ./extensions.ael, line 8-8: expression "Joe-Worker" has operators, but no variables. Interesting...
-LOG: lev:3 file:pbx_ael.c  line:2155 func: check_pval_item  Warning: file ./extensions.ael, line 10-10: expression Zap/6  has operators, but no variables. Interesting...
-LOG: lev:2 file:pbx_ael.c  line:3404 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3406 func: pbx_load_module  AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3409 func: pbx_load_module  AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3412 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3437 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pbx_ael.c  line:2186 func: check_pval_item  Warning: file ./extensions.ael, line 5-5: expression Console/dsp has operators, but no variables. Interesting...
+LOG: lev:3 file:pbx_ael.c  line:2186 func: check_pval_item  Warning: file ./extensions.ael, line 8-8: expression "Joe-Worker" has operators, but no variables. Interesting...
+LOG: lev:3 file:pbx_ael.c  line:2186 func: check_pval_item  Warning: file ./extensions.ael, line 10-10: expression Zap/6  has operators, but no variables. Interesting...
+LOG: lev:2 file:pbx_ael.c  line:3440 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3442 func: pbx_load_module  AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3445 func: pbx_load_module  AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3448 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
 LOG: lev:4 file:ael2_parse  line:261 func: main  172 contexts, 858 extensions, 2326 priorities

Modified: team/murf/AEL2/pbx/ael/ael-test/ref.ael-test4
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/ael/ael-test/ref.ael-test4?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/pbx/ael/ael-test/ref.ael-test4 (original)
+++ team/murf/AEL2/pbx/ael/ael-test/ref.ael-test4 Wed Apr 19 11:59:02 2006
@@ -1,33 +1,15 @@
 Executed ast_register_file_version();
-LOG: lev:2 file:pbx_ael.c  line:3391 func: pbx_load_module  Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c  line:3398 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3427 func: pbx_load_module  Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c  line:3434 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
 LOG: lev:2 file:ael.flex  line:465 func: ael_yylex    --Read in included file ./apptest.ael2, 3474 chars
 LOG: lev:3 file:ael.y  line:396 func: ael_yyparse  ==== File: ./apptest.ael2, Line 46, Cols: 8-11: Suggestion: Use the goto statement instead of the Goto() application call in AEL.
-LOG: lev:2 file:pbx_ael.c  line:3401 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 5-5: The j option in the AddQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 14-14: The j option in the Authenticate application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 19-19: The j option in the ChanIsAvail application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 22-22: The j option in the ControlPlayback application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 27-27: The j option in the Dial application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 32-32: The j option in the DUNDiLookup application call is not appropriate for AEL!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 35-35: application call to EndWhile needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 37-37: application call to ExecIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:1081 func: check_goto  Error: file ./apptest.ael2, line 46-46: goto:  no context cont could be found that matches the goto target!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 47-47: application call to GotoIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 50-50: The j option in the HasNewVoicemail application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 51-51: The j option in the HasVoicemail application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 56-56: The j option in the LookupBlacklist application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 61-61: The j option in the MailboxExists application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 78-78: The j option in the PauseQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 80-80: The j option in the Playback application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 82-82: The j option in the PrivacyManager application call is not appropriate for AEL!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 85-85: application call to Random needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 91-91: The j option in the RemoveQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 104-104: The j option in the SendText application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 127-127: The j option in the Transfer application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 130-130: The j option in the UnpauseQueueMember application call is not appropriate for AEL!
-LOG: lev:4 file:pbx_ael.c  line:1655 func: option_matches_j  Error: file ./apptest.ael2, line 134-134: The j option in the VoiceMail application call is not appropriate for AEL!
-LOG: lev:3 file:pbx_ael.c  line:2052 func: check_pval_item  Warning: file ./apptest.ael2, line 141-141: application call to While needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:4 file:pbx_ael.c  line:3414 func: pbx_load_module  Sorry, but 0 syntax errors and 19 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:2 file:pbx_ael.c  line:3437 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 35-35: application call to EndWhile needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 37-37: application call to ExecIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:4 file:pbx_ael.c  line:1100 func: check_goto  Error: file ./apptest.ael2, line 46-46: goto:  no context cont could be found that matches the goto target!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 47-47: application call to GotoIf needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 85-85: application call to Random needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pbx_ael.c  line:2081 func: check_pval_item  Warning: file ./apptest.ael2, line 141-141: application call to While needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:4 file:pbx_ael.c  line:3450 func: pbx_load_module  Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile.
 LOG: lev:4 file:ael2_parse  line:261 func: main  0 contexts, 0 extensions, 0 priorities

Modified: team/murf/AEL2/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/pbx_ael.c?rev=21539&r1=21538&r2=21539&view=diff
==============================================================================
--- team/murf/AEL2/pbx/pbx_ael.c (original)
+++ team/murf/AEL2/pbx/pbx_ael.c Wed Apr 19 11:59:02 2006
@@ -42,7 +42,9 @@
 #include "asterisk/app.h"
 #include "asterisk/callerid.h"
 #include "asterisk/ael_structs.h"
+#ifdef AAL_ARGCHECK
 #include "asterisk/argdesc.h"
+#endif
 
 static char expr_output[2096];
 
@@ -71,18 +73,37 @@
 
 static int errs, warns, notes;
 
-
+#ifndef AAL_ARGCHECK
+/* for the time being, short circuit all the AAL related structures
+   without permanently removing the code; after/during the AAL 
+   development, this code can be properly re-instated 
+*/
+
+/* null definitions for structs passed down the infrastructure */
+struct argapp
+{
+	struct argapp *next;
+};
+
+#endif
+
+#ifdef AAL_ARGCHECK
+int option_matches_j( struct argdesc *should, pval *is, struct argapp *app);
+int option_matches( struct argdesc *should, pval *is, struct argapp *app);
+#endif
+
+int check_app_args(pval *appcall, pval *arglist, struct argapp *app);
+void check_pval(pval *item, struct argapp *apps);
+void check_pval_item(pval *item, struct argapp *apps);
+void check_switch_expr(pval *item, struct argapp *apps);
 void ast_expr_register_extra_error_info(char *errmsg);
 void ast_expr_clear_extra_error_info(void);
 int  ast_expr(char *expr, char *buf, int length);
-int option_matches_j( struct argdesc *should, pval *is, struct argapp *app);
-void check_switch_expr(pval *item, struct argapp *apps);
 int ael_is_funcname(char *name);
 struct pval *find_macro(char *name);
 struct pval *find_context(char *name);
 struct pval *find_context(char *name);
 struct pval *find_macro(char *name);
-void check_pval_item(pval *item, struct argapp *apps);
 struct ael_priority *new_prio(void);
 struct ael_extension *new_exten(void);
 void linkprio(struct ael_extension *exten, struct ael_priority *prio);
@@ -97,13 +118,11 @@
 int is_float(char *arg );
 int is_int(char *arg );
 int is_empty(char *arg);
-int option_matches( struct argdesc *should, pval *is, struct argapp *app);
-int check_app_args(pval *appcall, pval *arglist, struct argapp *app);
 static pval *current_db;
 static pval *current_context;
 static pval *current_extension;
-const char *description(void);
-const char *key(void);
+static const char *description(void);
+static const char *key(void);
 
 static char *match_context;
 static char *match_exten;
@@ -1622,6 +1641,7 @@
 	return 1;
 }
 
+#ifdef AAL_ARGCHECK
 int option_matches_j( struct argdesc *should, pval *is, struct argapp *app)
 {
 	struct argchoice *ac;
@@ -1754,9 +1774,11 @@
 	}
 	return 1; /* unless some for-sure match or non-match returns, then it must be close enough ... */
 }
+#endif
 
 int check_app_args(pval* appcall, pval *arglist, struct argapp *app)
 {
+#ifdef AAL_ARGCHECK
 	struct argdesc *ad = app->args;
 	pval *pa;
 	int z;
@@ -1803,10 +1825,14 @@
 		}
 	}
 	return 0;
+#else
+	return 0;
+#endif
 }
 
 void check_switch_expr(pval *item, struct argapp *apps)
 {
+#ifdef AAL_ARGCHECK
 	/* get and clean the variable name */
 	char buff1[1024],*p;
 	struct argapp *a,*a2;
@@ -1899,6 +1925,7 @@
 			warns++;
 		}
 	}
+#endif
 }
 
 static void check_context_names(void)
@@ -1951,7 +1978,9 @@
 void check_pval_item(pval *item, struct argapp *apps)
 {
 	pval *lp;
+#ifdef AAL_ARGCHECK
 	struct argapp *app, *found;
+#endif
 	struct pval *macro_def;
 	struct pval *app_def;
 	
@@ -2053,6 +2082,7 @@
 					item->filename, item->startline, item->endline, item->u1.str);
 			warns++;
 		}
+#ifdef AAL_ARGCHECK
 		found = 0;
 		for (app=apps; app; app=app->next) {
 			if (strcasecmp(app->name, item->u1.str) == 0) {
@@ -2066,6 +2096,7 @@
 			warns++;
 		} else
 			check_app_args(item, item->u2.arglist, app);
+#endif
 		break;
 		
 	case PV_CASE:
@@ -2378,22 +2409,27 @@
 void ael2_semantic_check(pval *item, int *arg_errs, int *arg_warns, int *arg_notes)
 {
 	
+#ifdef AAL_ARGCHECK
 	int argapp_errs =0;
 	char *rfilename;
-	struct argapp *apps;
-
+#endif
+	struct argapp *apps=0;
+
+#ifdef AAL_ARGCHECK
 	rfilename = alloca(10 + strlen(ast_config_AST_VAR_DIR));
 	sprintf(rfilename, "%s/applist", ast_config_AST_VAR_DIR);
 	
 	apps = argdesc_parse(rfilename, &argapp_errs); /* giveth */
-
+#endif
 	current_db = item;
 	errs = warns = notes = 0;
 
 	check_context_names();
 	check_pval(item, apps);
 
+#ifdef AAL_ARGCHECK
 	argdesc_destroy(apps);  /* taketh away */
+#endif
 	
 	*arg_errs = errs;
 	*arg_warns = warns;
@@ -3487,12 +3523,12 @@
 	return pbx_load_module();
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return dtext;
 }
 
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }



More information about the asterisk-commits mailing list