merge changes from team/murf/AEL-trunk-fixesonly
- fix callerid matching for extensions - fix nested switch statements - fix compilation with bison 2.1a or higher (issue #7309) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34665 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
6c9e5a30c9
commit
0851906c83
21
doc/ael.txt
21
doc/ael.txt
|
@ -35,7 +35,7 @@ AEL is really the merger of 4 different 'languages', or syntaxes:
|
|||
Asterisk. Embedded in this language is the Application/AGI
|
||||
commands, of which one application call per step, or priority
|
||||
can be made. You can think of this as a "macro assembler"
|
||||
language, that AEL2 will compile into.
|
||||
language, that AEL will compile into.
|
||||
|
||||
|
||||
Any programmer of AEL should be familiar with it's syntax, of course,
|
||||
|
@ -178,7 +178,7 @@ facilities to debug your file:
|
|||
* About "aelparse" *
|
||||
*****************************
|
||||
|
||||
You can also use the "aelparse" program to check your extensions.ael
|
||||
You can 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?
|
||||
|
||||
|
@ -270,7 +270,7 @@ do not wish to do so, you can still use the application, by using a
|
|||
capitalized letter somewhere in its name. In the Asterisk extension
|
||||
language, application names are NOT case-sensitive.
|
||||
|
||||
The following are keywords in the AEL2 language:
|
||||
The following are keywords in the AEL language:
|
||||
|
||||
* abstract
|
||||
* context
|
||||
|
@ -581,6 +581,9 @@ Two optional items have been added to the AEL syntax, that allow the
|
|||
specification of hints, and a keyword, regexten, that will force the
|
||||
numbering of priorities to start at 2.
|
||||
|
||||
The ability to make extensions match by CID is preserved in
|
||||
AEL; just use '/' and the CID number in the specification. See below.
|
||||
|
||||
|
||||
context default {
|
||||
|
||||
|
@ -604,6 +607,18 @@ context default {
|
|||
|
||||
The regexten must come before the hint if they are both present.
|
||||
|
||||
CID matching is done as with the extensions.conf file. Follow the extension
|
||||
name/number with a slash (/) and the number to match against the Caller ID:
|
||||
|
||||
context zoombo
|
||||
{
|
||||
819/7079953345 => { NoOp(hello, 3345); }
|
||||
}
|
||||
|
||||
In the above, the 819/7079953345 extension will only be matched if the
|
||||
CallerID is 7079953345, and the dialed number is 819. Hopefully you have
|
||||
another 819 extension defined for all those who wish 819, that are not so lucky
|
||||
as to have 7079953345 as their CallerID!
|
||||
|
||||
|
||||
Includes
|
||||
|
|
|
@ -170,6 +170,7 @@ struct ael_priority
|
|||
struct ael_extension
|
||||
{
|
||||
char *name;
|
||||
char *cidmatch;
|
||||
char *hints;
|
||||
int regexten;
|
||||
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
context default
|
||||
{
|
||||
|
||||
706/3077610011 => {
|
||||
JabberStatus(asterisk|jmls@mike,StatusCode);
|
||||
|
||||
switch(${StatusCode}) {
|
||||
case 1:
|
||||
Dial(SIP/706,12);
|
||||
switch(${DIALSTATUS}) {
|
||||
case BUSY:
|
||||
Voicemail(b706);
|
||||
break;
|
||||
default:
|
||||
Voicemail(u706);
|
||||
};
|
||||
BackGround(hello);
|
||||
break;
|
||||
default:
|
||||
Voicemail(u706);
|
||||
};
|
||||
|
||||
Hangup();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3438 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:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3449 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:3 file:../pbx/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/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/pbx_ael.c line:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3449 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
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./apptest.ael2, 3474 chars
|
||||
LOG: lev:3 file:ael.y line:405 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:3438 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:3451 func: pbx_load_module Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:3 file:../pbx/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/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/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/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/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/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/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/pbx_ael.c line:3451 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
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include1.ael2, 78 chars
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include2.ael2, 98 chars
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include3.ael2, 57 chars
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include5.ael2, 56 chars
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include4.ael2, 87 chars
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file /etc/asterisk/telemarket_torture.ael2, 28036 chars
|
||||
LOG: lev:2 file:pbx_ael.c line:3438 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:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3449 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:3 file:../pbx/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/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/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/pbx_ael.c line:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3449 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
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./apptest.ael2, 3474 chars
|
||||
LOG: lev:3 file:ael.y line:405 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:3438 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:3451 func: pbx_load_module Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:3 file:../pbx/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/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/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/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/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/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/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/pbx_ael.c line:3451 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
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3449 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3449 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
|
||||
LOG: lev:4 file:ael2_parse line:261 func: main 38 contexts, 90 extensions, 484 priorities
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:4 file:ael.flex line:193 func: ael_yylex File=./extensions.ael, line=165, column=21: Mismatched '}' in expression!
|
||||
LOG: lev:4 file:ael.y line:674 func: ael_yyerror ==== File: ./extensions.ael, Line 165, Cols: 23-23: Error: syntax error, unexpected '=', expecting ')'
|
||||
LOG: lev:4 file:ael.flex line:317 func: ael_yylex File=./extensions.ael, line=174, column=63: Mismatched '}' in expression!
|
||||
LOG: lev:4 file:ael.flex line:317 func: ael_yylex File=./extensions.ael, line=180, column=46: Mismatched '}' in expression!
|
||||
LOG: lev:4 file:ael.y line:674 func: ael_yyerror ==== File: ./extensions.ael, Line 184, Cols: 0-4: Error: syntax error, unexpected 'macro'
|
||||
LOG: lev:4 file:ael.flex line:193 func: ael_yylex File=./extensions.ael, line=222, column=21: Mismatched '}' in expression!
|
||||
LOG: lev:4 file:ael.y line:674 func: ael_yyerror ==== File: ./extensions.ael, Line 222, Cols: 23-23: Error: syntax error, unexpected '=', expecting ')'
|
||||
LOG: lev:4 file:ael.flex line:317 func: ael_yylex File=./extensions.ael, line=228, column=37: Mismatched '}' in expression!
|
||||
LOG: lev:4 file:ael.y line:674 func: ael_yyerror ==== File: ./extensions.ael, Line 235, Cols: 0-6: Error: syntax error, unexpected 'context'
|
||||
LOG: lev:4 file:ael.y line:674 func: ael_yyerror ==== File: ./extensions.ael, Line 344, Cols: 32-32: Error: syntax error, unexpected ';', expecting '{'
|
||||
LOG: lev:4 file:ael.y line:674 func: ael_yyerror ==== File: ./extensions.ael, Line 350, Cols: 32-32: Error: syntax error, unexpected ';', expecting '{'
|
||||
LOG: lev:4 file:ael.y line:674 func: ael_yyerror ==== File: ./extensions.ael, Line 461, Cols: 10-13: Error: syntax error, unexpected 'else'
|
||||
LOG: lev:2 file:pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:4 file:pbx_ael.c line:1100 func: check_goto Error: file ./extensions.ael, line 11-11: goto: no context default could be found that matches the goto target!
|
||||
LOG: lev:4 file:pbx_ael.c line:2036 func: check_pval_item Error: file ./extensions.ael, line 206-206: macro call to non-existent uvm !
|
||||
LOG: lev:4 file:pbx_ael.c line:3451 func: pbx_load_module Sorry, but 7 syntax errors and 2 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
|
||||
Executed ast_register_file_version();
|
||||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3453 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3460 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:4 file:ael.flex line:267 func: ael_yylex File=./extensions.ael, line=165, column=49: Mismatched '}' in expression!
|
||||
LOG: lev:4 file:ael.y line:726 func: ael_yyerror ==== File: ./extensions.ael, Line 165, Cols: 51-51: Error: syntax error, unexpected '=', expecting ')'
|
||||
LOG: lev:4 file:ael.y line:726 func: ael_yyerror ==== File: ./extensions.ael, Line 169, Cols: 24-24: Error: syntax error, unexpected '&'
|
||||
LOG: lev:4 file:ael.flex line:267 func: ael_yylex File=./extensions.ael, line=222, column=41: Mismatched '}' in expression!
|
||||
LOG: lev:4 file:ael.y line:726 func: ael_yyerror ==== File: ./extensions.ael, Line 222, Cols: 43-43: Error: syntax error, unexpected '=', expecting ')'
|
||||
LOG: lev:4 file:ael.y line:726 func: ael_yyerror ==== File: ./extensions.ael, Line 226, Cols: 16-16: Error: syntax error, unexpected '&'
|
||||
LOG: lev:4 file:ael.y line:726 func: ael_yyerror ==== File: ./extensions.ael, Line 291, Cols: 21-28: Error: syntax error, unexpected word, expecting '(' or ';' or '=' or ':'
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3463 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:4 file:../pbx/pbx_ael.c line:3476 func: pbx_load_module Sorry, but 5 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile.
|
||||
LOG: lev:4 file:ael2_parse line:253 func: main 0 contexts, 0 extensions, 0 priorities
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:pbx_ael.c line:3438 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 6-6: 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 10-10: expression pstn-spa3k has operators, but no variables. Interesting...
|
||||
LOG: lev:4 file:pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:pbx_ael.c line:2036 func: check_pval_item Error: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael !
|
||||
LOG: lev:4 file:pbx_ael.c line:3451 func: pbx_load_module Sorry, but 0 syntax errors and 5 semantic errors were detected. It doesn't make sense to compile.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 6-6: expression Console/dsp has operators, but no variables. Interesting...
|
||||
LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 10-10: expression pstn-spa3k has operators, but no variables. Interesting...
|
||||
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
|
||||
LOG: lev:4 file:../pbx/pbx_ael.c line:2036 func: check_pval_item Error: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael !
|
||||
LOG: lev:4 file:../pbx/pbx_ael.c line:3451 func: pbx_load_module Sorry, but 0 syntax errors and 5 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
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
Executed ast_register_file_version();
|
||||
Executed ast_register_file_version();
|
||||
Executed ast_register_file_version();
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3453 func: pbx_load_module Starting AEL load process.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3460 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3463 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3466 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3468 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3471 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
|
||||
LOG: lev:2 file:../pbx/pbx_ael.c line:3474 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
|
||||
LOG: lev:4 file:ael2_parse line:253 func: main 1 contexts, 5 extensions, 15 priorities
|
1832
pbx/ael/ael.tab.c
1832
pbx/ael/ael.tab.c
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
/* A Bison parser, made by GNU Bison 2.1. */
|
||||
/* A Bison parser, made by GNU Bison 2.1a. */
|
||||
|
||||
/* Skeleton parser for Yacc-like parsing with Bison,
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -114,15 +114,17 @@
|
|||
|
||||
|
||||
|
||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 48 "ael.y"
|
||||
typedef union YYSTYPE {
|
||||
{
|
||||
int intval; /* integer value, typically flags */
|
||||
char *str; /* strings */
|
||||
struct pval *pval; /* full objects */
|
||||
} YYSTYPE;
|
||||
/* Line 1447 of yacc.c. */
|
||||
#line 126 "ael.tab.h"
|
||||
}
|
||||
/* Line 1536 of yacc.c. */
|
||||
#line 127 "ael.tab.h"
|
||||
YYSTYPE;
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
|
@ -130,7 +132,7 @@ typedef union YYSTYPE {
|
|||
|
||||
|
||||
|
||||
#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
|
||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
typedef struct YYLTYPE
|
||||
{
|
||||
int first_line;
|
||||
|
|
|
@ -153,7 +153,7 @@ static pval *update_last(pval *, YYLTYPE *);
|
|||
|
||||
/* there will be two shift/reduce conflicts, they involve the if statement, where a single statement occurs not wrapped in curlies in the "true" section
|
||||
the default action to shift will attach the else to the preceeding if. */
|
||||
%expect 5
|
||||
%expect 7
|
||||
%error-verbose
|
||||
|
||||
/*
|
||||
|
@ -449,8 +449,6 @@ statement : LC statements RC {
|
|||
opt_else : KW_ELSE statement { $$ = $2; }
|
||||
| { $$ = NULL ; }
|
||||
|
||||
/* XXX unused */
|
||||
bar_or_comma: BAR | COMMA ;
|
||||
|
||||
target : goto_word { $$ = nword($1, &@1); }
|
||||
| goto_word BAR goto_word {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 33
|
||||
#define YY_FLEX_SUBMINOR_VERSION 31
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
|
@ -32,15 +32,7 @@
|
|||
|
||||
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
|
||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||
* if you want the limit (max/min) macros for int types.
|
||||
*/
|
||||
#ifndef __STDC_LIMIT_MACROS
|
||||
#define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
typedef int8_t flex_int8_t;
|
||||
typedef uint8_t flex_uint8_t;
|
||||
|
@ -163,10 +155,6 @@ int ael_yylex_init (yyscan_t* scanner);
|
|||
#define YY_BUF_SIZE 16384
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
*/
|
||||
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
|
||||
|
||||
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
||||
#define YY_TYPEDEF_YY_BUFFER_STATE
|
||||
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||
|
@ -785,13 +773,11 @@ static void pbcwhere(const char *text, int *line, int *col )
|
|||
#define semic 2
|
||||
#define argg 3
|
||||
|
||||
#ifndef YY_NO_UNISTD_H
|
||||
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
||||
* down here because we want the user's section 1 to have been scanned first.
|
||||
* The user has a chance to override it with an option.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef YY_EXTRA_TYPE
|
||||
#define YY_EXTRA_TYPE void *
|
||||
|
@ -835,8 +821,6 @@ struct yyguts_t
|
|||
|
||||
}; /* end struct yyguts_t */
|
||||
|
||||
static int yy_init_globals (yyscan_t yyscanner );
|
||||
|
||||
/* This must go here because YYSTYPE and YYLTYPE are included
|
||||
* from bison output in section 1.*/
|
||||
# define yylval yyg->yylval_r
|
||||
|
@ -987,11 +971,9 @@ static int input (yyscan_t yyscanner );
|
|||
#ifndef YY_DECL
|
||||
#define YY_DECL_IS_OURS 1
|
||||
|
||||
extern int ael_yylex \
|
||||
(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
|
||||
extern int ael_yylex (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
|
||||
|
||||
#define YY_DECL int ael_yylex \
|
||||
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
||||
#define YY_DECL int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
||||
#endif /* !YY_DECL */
|
||||
|
||||
/* Code executed at the beginning of each rule, after yytext and yyleng
|
||||
|
@ -1027,9 +1009,9 @@ YY_DECL
|
|||
|
||||
yylloc = yylloc_param;
|
||||
|
||||
if ( !yyg->yy_init )
|
||||
if ( yyg->yy_init )
|
||||
{
|
||||
yyg->yy_init = 1;
|
||||
yyg->yy_init = 0;
|
||||
|
||||
#ifdef YY_USER_INIT
|
||||
YY_USER_INIT;
|
||||
|
@ -1795,7 +1777,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
|||
|
||||
else
|
||||
{
|
||||
int num_to_read =
|
||||
size_t num_to_read =
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
||||
|
||||
while ( num_to_read <= 0 )
|
||||
|
@ -1911,7 +1893,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
|||
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
|
||||
{
|
||||
register int yy_is_jam;
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
register char *yy_cp = yyg->yy_c_buf_p;
|
||||
|
||||
register YY_CHAR yy_c = 1;
|
||||
|
@ -2354,16 +2336,16 @@ YY_BUFFER_STATE ael_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yys
|
|||
|
||||
/** Setup the input buffer state to scan a string. The next call to ael_yylex() will
|
||||
* scan from a @e copy of @a str.
|
||||
* @param yystr a NUL-terminated string to scan
|
||||
* @param str a NUL-terminated string to scan
|
||||
* @param yyscanner The scanner object.
|
||||
* @return the newly allocated buffer state object.
|
||||
* @note If you want to scan bytes that may contain NUL values, then use
|
||||
* ael_yy_scan_bytes() instead.
|
||||
*/
|
||||
YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
|
||||
YY_BUFFER_STATE ael_yy_scan_string (yyconst char * str , yyscan_t yyscanner)
|
||||
{
|
||||
|
||||
return ael_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
|
||||
return ael_yy_scan_bytes(str,strlen(str) ,yyscanner);
|
||||
}
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to ael_yylex() will
|
||||
|
@ -2373,7 +2355,7 @@ YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
|
|||
* @param yyscanner The scanner object.
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
|
||||
YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscanner)
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
char *buf;
|
||||
|
@ -2381,15 +2363,15 @@ YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ,
|
|||
int i;
|
||||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
n = _yybytes_len + 2;
|
||||
n = len + 2;
|
||||
buf = (char *) ael_yyalloc(n ,yyscanner );
|
||||
if ( ! buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_bytes()" );
|
||||
|
||||
for ( i = 0; i < _yybytes_len; ++i )
|
||||
buf[i] = yybytes[i];
|
||||
for ( i = 0; i < len; ++i )
|
||||
buf[i] = bytes[i];
|
||||
|
||||
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
||||
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
|
||||
|
||||
b = ael_yy_scan_buffer(buf,n ,yyscanner);
|
||||
if ( ! b )
|
||||
|
@ -2600,6 +2582,37 @@ void ael_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
|||
yylloc = yylloc_param;
|
||||
}
|
||||
|
||||
static int yy_init_globals (yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
/* Initialization is the same as for the non-reentrant scanner.
|
||||
This function is called once per scanner lifetime. */
|
||||
|
||||
yyg->yy_buffer_stack = 0;
|
||||
yyg->yy_buffer_stack_top = 0;
|
||||
yyg->yy_buffer_stack_max = 0;
|
||||
yyg->yy_c_buf_p = (char *) 0;
|
||||
yyg->yy_init = 1;
|
||||
yyg->yy_start = 0;
|
||||
yyg->yy_start_stack_ptr = 0;
|
||||
yyg->yy_start_stack_depth = 0;
|
||||
yyg->yy_start_stack = (int *) 0;
|
||||
|
||||
/* Defined in main.c */
|
||||
#ifdef YY_STDINIT
|
||||
yyin = stdin;
|
||||
yyout = stdout;
|
||||
#else
|
||||
yyin = (FILE *) 0;
|
||||
yyout = (FILE *) 0;
|
||||
#endif
|
||||
|
||||
/* For future reference: Set errno on error, since we are called by
|
||||
* ael_yylex_init()
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* User-visible API */
|
||||
|
||||
/* ael_yylex_init is special because it creates the scanner itself, so it is
|
||||
|
@ -2622,45 +2635,11 @@ int ael_yylex_init(yyscan_t* ptr_yy_globals)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
|
||||
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
|
||||
memset(*ptr_yy_globals,0,sizeof(struct yyguts_t));
|
||||
|
||||
return yy_init_globals ( *ptr_yy_globals );
|
||||
}
|
||||
|
||||
static int yy_init_globals (yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
/* Initialization is the same as for the non-reentrant scanner.
|
||||
* This function is called from ael_yylex_destroy(), so don't allocate here.
|
||||
*/
|
||||
|
||||
yyg->yy_buffer_stack = 0;
|
||||
yyg->yy_buffer_stack_top = 0;
|
||||
yyg->yy_buffer_stack_max = 0;
|
||||
yyg->yy_c_buf_p = (char *) 0;
|
||||
yyg->yy_init = 0;
|
||||
yyg->yy_start = 0;
|
||||
|
||||
yyg->yy_start_stack_ptr = 0;
|
||||
yyg->yy_start_stack_depth = 0;
|
||||
yyg->yy_start_stack = NULL;
|
||||
|
||||
/* Defined in main.c */
|
||||
#ifdef YY_STDINIT
|
||||
yyin = stdin;
|
||||
yyout = stdout;
|
||||
#else
|
||||
yyin = (FILE *) 0;
|
||||
yyout = (FILE *) 0;
|
||||
#endif
|
||||
|
||||
/* For future reference: Set errno on error, since we are called by
|
||||
* ael_yylex_init()
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ael_yylex_destroy is for both reentrant and non-reentrant scanners. */
|
||||
int ael_yylex_destroy (yyscan_t yyscanner)
|
||||
{
|
||||
|
@ -2681,13 +2660,8 @@ int ael_yylex_destroy (yyscan_t yyscanner)
|
|||
ael_yyfree(yyg->yy_start_stack ,yyscanner );
|
||||
yyg->yy_start_stack = NULL;
|
||||
|
||||
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
||||
* ael_yylex() is called, initialization will occur. */
|
||||
yy_init_globals( yyscanner);
|
||||
|
||||
/* Destroy the main struct (reentrant only). */
|
||||
ael_yyfree ( yyscanner , yyscanner );
|
||||
yyscanner = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2699,6 +2673,7 @@ int ael_yylex_destroy (yyscan_t yyscanner)
|
|||
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
|
||||
{
|
||||
register int i;
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
|
@ -2708,6 +2683,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
|
|||
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
|
||||
{
|
||||
register int n;
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
for ( n = 0; s[n]; ++n )
|
||||
;
|
||||
|
||||
|
@ -2739,7 +2715,19 @@ void ael_yyfree (void * ptr , yyscan_t yyscanner)
|
|||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 453 "ael.flex"
|
||||
#undef YY_NEW_FILE
|
||||
#undef YY_FLUSH_BUFFER
|
||||
#undef yy_set_bol
|
||||
#undef yy_new_buffer
|
||||
#undef yy_set_interactive
|
||||
#undef yytext_ptr
|
||||
#undef YY_DO_BEFORE_ACTION
|
||||
|
||||
#ifdef YY_DECL_IS_OURS
|
||||
#undef YY_DECL_IS_OURS
|
||||
#undef YY_DECL
|
||||
#endif
|
||||
#line 450 "ael.flex"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2487,6 +2487,10 @@ void destroy_extensions(struct ael_extension *exten)
|
|||
if (ne->name)
|
||||
free(ne->name);
|
||||
|
||||
/* cidmatch fields are allocated with name, and freed when
|
||||
the name field is freed. Don't do a free for this field,
|
||||
unless you LIKE to see a crash! */
|
||||
|
||||
if (ne->hints)
|
||||
free(ne->hints);
|
||||
|
||||
|
@ -2536,6 +2540,7 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
char *strp, *strp2;
|
||||
char new_label[2000];
|
||||
int default_exists;
|
||||
int local_control_statement_count;
|
||||
struct ael_priority *loop_break_save;
|
||||
struct ael_priority *loop_continue_save;
|
||||
struct ael_extension *switch_case;
|
||||
|
@ -2695,6 +2700,7 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
|
||||
case PV_SWITCH:
|
||||
control_statement_count++;
|
||||
local_control_statement_count = control_statement_count;
|
||||
loop_break_save = exten->loop_break; /* save them, then restore before leaving */
|
||||
loop_continue_save = exten->loop_continue;
|
||||
snprintf(new_label,sizeof(new_label),"sw-%s-%d", label, control_statement_count);
|
||||
|
@ -2729,9 +2735,9 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
switch_case->loop_continue = exten->loop_continue;
|
||||
|
||||
linkexten(exten,switch_case);
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s", control_statement_count, p2->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s", local_control_statement_count, p2->u1.str);
|
||||
switch_case->name = strdup(buf1);
|
||||
snprintf(new_label,sizeof(new_label),"sw-%s-%s-%d", label, p2->u1.str, control_statement_count);
|
||||
snprintf(new_label,sizeof(new_label),"sw-%s-%s-%d", label, p2->u1.str, local_control_statement_count);
|
||||
|
||||
gen_prios(switch_case, new_label, p2->u2.statements, exten); /* this will link in all the case body statements here */
|
||||
|
||||
|
@ -2747,21 +2753,21 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",control_statement_count, p2->next->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (p2->next && p2->next->type == PV_PATTERN) {
|
||||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s|1",control_statement_count, p2->next->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (p2->next && p2->next->type == PV_DEFAULT) {
|
||||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.|1",control_statement_count);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.|1",local_control_statement_count);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (!p2->next) {
|
||||
|
@ -2790,9 +2796,9 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
switch_case->loop_continue = exten->loop_continue;
|
||||
|
||||
linkexten(exten,switch_case);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s", control_statement_count, p2->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s", local_control_statement_count, p2->u1.str);
|
||||
switch_case->name = strdup(buf1);
|
||||
snprintf(new_label,sizeof(new_label),"sw-%s-%s-%d", label, p2->u1.str, control_statement_count);
|
||||
snprintf(new_label,sizeof(new_label),"sw-%s-%s-%d", label, p2->u1.str, local_control_statement_count);
|
||||
|
||||
gen_prios(switch_case, new_label, p2->u2.statements, exten); /* this will link in all the while body statements here */
|
||||
/* here is where we write code to "fall thru" to the next case... if there is one... */
|
||||
|
@ -2807,21 +2813,21 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",control_statement_count, p2->next->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (p2->next && p2->next->type == PV_PATTERN) {
|
||||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s|1",control_statement_count, p2->next->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (p2->next && p2->next->type == PV_DEFAULT) {
|
||||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.|1",control_statement_count);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.|1",local_control_statement_count);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (!p2->next) {
|
||||
|
@ -2850,10 +2856,10 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
switch_case->loop_break = exten->loop_break;
|
||||
switch_case->loop_continue = exten->loop_continue;
|
||||
linkexten(exten,switch_case);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.", control_statement_count);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.", local_control_statement_count);
|
||||
switch_case->name = strdup(buf1);
|
||||
|
||||
snprintf(new_label,sizeof(new_label),"sw-%s-default-%d", label, control_statement_count);
|
||||
snprintf(new_label,sizeof(new_label),"sw-%s-default-%d", label, local_control_statement_count);
|
||||
|
||||
gen_prios(switch_case, new_label, p2->u2.statements, exten); /* this will link in all the while body statements here */
|
||||
|
||||
|
@ -2869,21 +2875,21 @@ void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct
|
|||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",control_statement_count, p2->next->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (p2->next && p2->next->type == PV_PATTERN) {
|
||||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s|1",control_statement_count, p2->next->u1.str);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (p2->next && p2->next->type == PV_DEFAULT) {
|
||||
fall_thru = new_prio();
|
||||
fall_thru->type = AEL_APPCALL;
|
||||
fall_thru->app = strdup("Goto");
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.|1",control_statement_count);
|
||||
snprintf(buf1,sizeof(buf1),"_sw-%d-.|1",local_control_statement_count);
|
||||
fall_thru->appargs = strdup(buf1);
|
||||
linkprio(switch_case, fall_thru);
|
||||
} else if (!p2->next) {
|
||||
|
@ -3180,7 +3186,7 @@ void add_extensions(struct ael_extension *exten, struct ast_context *context)
|
|||
struct ael_priority *last = 0;
|
||||
|
||||
if (exten->hints) {
|
||||
if (ast_add_extension2(context, 0 /*no replace*/, exten->name, PRIORITY_HINT, NULL, NULL,
|
||||
if (ast_add_extension2(context, 0 /*no replace*/, exten->name, PRIORITY_HINT, NULL, exten->cidmatch,
|
||||
exten->hints, NULL, FREE, registrar)) {
|
||||
ast_log(LOG_WARNING, "Unable to add step at priority 'hint' of extension '%s'\n",
|
||||
exten->name);
|
||||
|
@ -3262,7 +3268,7 @@ void add_extensions(struct ael_extension *exten, struct ast_context *context)
|
|||
label = 0;
|
||||
|
||||
|
||||
if (ast_add_extension2(context, 0 /*no replace*/, exten->name, pr->priority_num, (label?label:NULL), NULL,
|
||||
if (ast_add_extension2(context, 0 /*no replace*/, exten->name, pr->priority_num, (label?label:NULL), exten->cidmatch,
|
||||
app, strdup(appargs), FREE, registrar)) {
|
||||
ast_log(LOG_WARNING, "Unable to add step at priority '%d' of extension '%s'\n", pr->priority_num,
|
||||
exten->name);
|
||||
|
@ -3336,11 +3342,18 @@ void ast_compile_ael2(struct ast_context **local_contexts, struct pval *root)
|
|||
/* contexts contain: ignorepat, includes, switches, eswitches, extensions, */
|
||||
for (p2=p->u2.statements; p2; p2=p2->next) {
|
||||
pval *p3;
|
||||
char *s3;
|
||||
|
||||
switch (p2->type) {
|
||||
case PV_EXTENSION:
|
||||
exten = new_exten();
|
||||
exten->name = strdup(p2->u1.str);
|
||||
if( (s3=strchr(exten->name, '/') ) != 0 )
|
||||
{
|
||||
*s3 = 0;
|
||||
exten->cidmatch = s3+1;
|
||||
}
|
||||
|
||||
if ( p2->u3.hints )
|
||||
exten->hints = strdup(p2->u3.hints);
|
||||
exten->regexten = p2->u4.regexten;
|
||||
|
|
Reference in New Issue