@ -804,9 +804,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
# define GLOB_ABORTED GLOB_ABEND
# define GLOB_ABORTED GLOB_ABEND
# endif
# endif
# include <glob.h>
# include <glob.h>
# include "asterisk/logger.h"
# include "asterisk/logger.h"
# include "asterisk/utils.h"
# include "asterisk/utils.h"
# include "asterisk/lock.h"
# include "asterisk/hashtab.h"
# include "ael/ael.tab.h"
# include "ael/ael.tab.h"
# include "asterisk/ael_structs.h"
# include "asterisk/ael_structs.h"
@ -907,7 +908,7 @@ static void pbcwhere(const char *text, int *line, int *col )
# define STORE_POS
# define STORE_POS
# define STORE_LOC
# define STORE_LOC
# endif
# endif
# line 9 09 "ael_lex.c"
# line 9 11 "ael_lex.c"
# define INITIAL 0
# define INITIAL 0
# define paren 1
# define paren 1
@ -1146,10 +1147,10 @@ YY_DECL
register int yy_act ;
register int yy_act ;
struct yyguts_t * yyg = ( struct yyguts_t * ) yyscanner ;
struct yyguts_t * yyg = ( struct yyguts_t * ) yyscanner ;
# line 18 7 "ael.flex"
# line 18 9 "ael.flex"
# line 115 1 "ael_lex.c"
# line 115 3 "ael_lex.c"
yylval = yylval_param ;
yylval = yylval_param ;
@ -1240,260 +1241,260 @@ do_action: /* This label is used only to access EOF actions. */
case 1 :
case 1 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 1 8 9 "ael.flex"
# line 1 91 "ael.flex"
{ STORE_POS ; return LC ; }
{ STORE_POS ; return LC ; }
YY_BREAK
YY_BREAK
case 2 :
case 2 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 0 "ael.flex"
# line 19 2 "ael.flex"
{ STORE_POS ; return RC ; }
{ STORE_POS ; return RC ; }
YY_BREAK
YY_BREAK
case 3 :
case 3 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 1 "ael.flex"
# line 19 3 "ael.flex"
{ STORE_POS ; return LP ; }
{ STORE_POS ; return LP ; }
YY_BREAK
YY_BREAK
case 4 :
case 4 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 2 "ael.flex"
# line 19 4 "ael.flex"
{ STORE_POS ; return RP ; }
{ STORE_POS ; return RP ; }
YY_BREAK
YY_BREAK
case 5 :
case 5 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 3 "ael.flex"
# line 19 5 "ael.flex"
{ STORE_POS ; return SEMI ; }
{ STORE_POS ; return SEMI ; }
YY_BREAK
YY_BREAK
case 6 :
case 6 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 4 "ael.flex"
# line 19 6 "ael.flex"
{ STORE_POS ; return EQ ; }
{ STORE_POS ; return EQ ; }
YY_BREAK
YY_BREAK
case 7 :
case 7 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 5 "ael.flex"
# line 19 7 "ael.flex"
{ STORE_POS ; return COMMA ; }
{ STORE_POS ; return COMMA ; }
YY_BREAK
YY_BREAK
case 8 :
case 8 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 6 "ael.flex"
# line 19 8 "ael.flex"
{ STORE_POS ; return COLON ; }
{ STORE_POS ; return COLON ; }
YY_BREAK
YY_BREAK
case 9 :
case 9 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 19 7 "ael.flex"
# line 19 9 "ael.flex"
{ STORE_POS ; return AMPER ; }
{ STORE_POS ; return AMPER ; }
YY_BREAK
YY_BREAK
case 10 :
case 10 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 198 "ael.flex"
# line 200 "ael.flex"
{ STORE_POS ; return BAR ; }
{ STORE_POS ; return BAR ; }
YY_BREAK
YY_BREAK
case 11 :
case 11 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 199 "ael.flex"
# line 20 1 "ael.flex"
{ STORE_POS ; return EXTENMARK ; }
{ STORE_POS ; return EXTENMARK ; }
YY_BREAK
YY_BREAK
case 12 :
case 12 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 0 "ael.flex"
# line 20 2 "ael.flex"
{ STORE_POS ; return AT ; }
{ STORE_POS ; return AT ; }
YY_BREAK
YY_BREAK
case 13 :
case 13 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 1 "ael.flex"
# line 20 3 "ael.flex"
{ /*comment*/ }
{ /*comment*/ }
YY_BREAK
YY_BREAK
case 14 :
case 14 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 2 "ael.flex"
# line 20 4 "ael.flex"
{ STORE_POS ; return KW_CONTEXT ; }
{ STORE_POS ; return KW_CONTEXT ; }
YY_BREAK
YY_BREAK
case 15 :
case 15 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 3 "ael.flex"
# line 20 5 "ael.flex"
{ STORE_POS ; return KW_ABSTRACT ; }
{ STORE_POS ; return KW_ABSTRACT ; }
YY_BREAK
YY_BREAK
case 16 :
case 16 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 4 "ael.flex"
# line 20 6 "ael.flex"
{ STORE_POS ; return KW_EXTEND ; }
{ STORE_POS ; return KW_EXTEND ; }
YY_BREAK
YY_BREAK
case 17 :
case 17 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 5 "ael.flex"
# line 20 7 "ael.flex"
{ STORE_POS ; return KW_MACRO ; } ;
{ STORE_POS ; return KW_MACRO ; } ;
YY_BREAK
YY_BREAK
case 18 :
case 18 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 6 "ael.flex"
# line 20 8 "ael.flex"
{ STORE_POS ; return KW_GLOBALS ; }
{ STORE_POS ; return KW_GLOBALS ; }
YY_BREAK
YY_BREAK
case 19 :
case 19 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 20 7 "ael.flex"
# line 20 9 "ael.flex"
{ STORE_POS ; return KW_LOCAL ; }
{ STORE_POS ; return KW_LOCAL ; }
YY_BREAK
YY_BREAK
case 20 :
case 20 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 08 "ael.flex"
# line 2 1 0 "ael.flex"
{ STORE_POS ; return KW_IGNOREPAT ; }
{ STORE_POS ; return KW_IGNOREPAT ; }
YY_BREAK
YY_BREAK
case 21 :
case 21 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 09 "ael.flex"
# line 2 11 "ael.flex"
{ STORE_POS ; return KW_SWITCH ; }
{ STORE_POS ; return KW_SWITCH ; }
YY_BREAK
YY_BREAK
case 22 :
case 22 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 0 "ael.flex"
# line 21 2 "ael.flex"
{ STORE_POS ; return KW_IF ; }
{ STORE_POS ; return KW_IF ; }
YY_BREAK
YY_BREAK
case 23 :
case 23 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 1 "ael.flex"
# line 21 3 "ael.flex"
{ STORE_POS ; return KW_IFTIME ; }
{ STORE_POS ; return KW_IFTIME ; }
YY_BREAK
YY_BREAK
case 24 :
case 24 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 2 "ael.flex"
# line 21 4 "ael.flex"
{ STORE_POS ; return KW_RANDOM ; }
{ STORE_POS ; return KW_RANDOM ; }
YY_BREAK
YY_BREAK
case 25 :
case 25 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 3 "ael.flex"
# line 21 5 "ael.flex"
{ STORE_POS ; return KW_REGEXTEN ; }
{ STORE_POS ; return KW_REGEXTEN ; }
YY_BREAK
YY_BREAK
case 26 :
case 26 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 4 "ael.flex"
# line 21 6 "ael.flex"
{ STORE_POS ; return KW_HINT ; }
{ STORE_POS ; return KW_HINT ; }
YY_BREAK
YY_BREAK
case 27 :
case 27 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 5 "ael.flex"
# line 21 7 "ael.flex"
{ STORE_POS ; return KW_ELSE ; }
{ STORE_POS ; return KW_ELSE ; }
YY_BREAK
YY_BREAK
case 28 :
case 28 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 6 "ael.flex"
# line 21 8 "ael.flex"
{ STORE_POS ; return KW_GOTO ; }
{ STORE_POS ; return KW_GOTO ; }
YY_BREAK
YY_BREAK
case 29 :
case 29 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 21 7 "ael.flex"
# line 21 9 "ael.flex"
{ STORE_POS ; return KW_JUMP ; }
{ STORE_POS ; return KW_JUMP ; }
YY_BREAK
YY_BREAK
case 30 :
case 30 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 18 "ael.flex"
# line 2 20 "ael.flex"
{ STORE_POS ; return KW_RETURN ; }
{ STORE_POS ; return KW_RETURN ; }
YY_BREAK
YY_BREAK
case 31 :
case 31 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 19 "ael.flex"
# line 2 2 1 "ael.flex"
{ STORE_POS ; return KW_BREAK ; }
{ STORE_POS ; return KW_BREAK ; }
YY_BREAK
YY_BREAK
case 32 :
case 32 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 0 "ael.flex"
# line 22 2 "ael.flex"
{ STORE_POS ; return KW_CONTINUE ; }
{ STORE_POS ; return KW_CONTINUE ; }
YY_BREAK
YY_BREAK
case 33 :
case 33 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 1 "ael.flex"
# line 22 3 "ael.flex"
{ STORE_POS ; return KW_FOR ; }
{ STORE_POS ; return KW_FOR ; }
YY_BREAK
YY_BREAK
case 34 :
case 34 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 2 "ael.flex"
# line 22 4 "ael.flex"
{ STORE_POS ; return KW_WHILE ; }
{ STORE_POS ; return KW_WHILE ; }
YY_BREAK
YY_BREAK
case 35 :
case 35 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 3 "ael.flex"
# line 22 5 "ael.flex"
{ STORE_POS ; return KW_CASE ; }
{ STORE_POS ; return KW_CASE ; }
YY_BREAK
YY_BREAK
case 36 :
case 36 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 4 "ael.flex"
# line 22 6 "ael.flex"
{ STORE_POS ; return KW_DEFAULT ; }
{ STORE_POS ; return KW_DEFAULT ; }
YY_BREAK
YY_BREAK
case 37 :
case 37 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 5 "ael.flex"
# line 22 7 "ael.flex"
{ STORE_POS ; return KW_PATTERN ; }
{ STORE_POS ; return KW_PATTERN ; }
YY_BREAK
YY_BREAK
case 38 :
case 38 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 6 "ael.flex"
# line 22 8 "ael.flex"
{ STORE_POS ; return KW_CATCH ; }
{ STORE_POS ; return KW_CATCH ; }
YY_BREAK
YY_BREAK
case 39 :
case 39 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 22 7 "ael.flex"
# line 22 9 "ael.flex"
{ STORE_POS ; return KW_SWITCHES ; }
{ STORE_POS ; return KW_SWITCHES ; }
YY_BREAK
YY_BREAK
case 40 :
case 40 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 28 "ael.flex"
# line 2 30 "ael.flex"
{ STORE_POS ; return KW_ESWITCHES ; }
{ STORE_POS ; return KW_ESWITCHES ; }
YY_BREAK
YY_BREAK
case 41 :
case 41 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 29 "ael.flex"
# line 2 31 "ael.flex"
{ STORE_POS ; return KW_INCLUDES ; }
{ STORE_POS ; return KW_INCLUDES ; }
YY_BREAK
YY_BREAK
case 42 :
case 42 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 23 0 "ael.flex"
# line 23 2 "ael.flex"
{ BEGIN ( comment ) ; my_col + = 2 ; }
{ BEGIN ( comment ) ; my_col + = 2 ; }
YY_BREAK
YY_BREAK
case 43 :
case 43 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 23 2 "ael.flex"
# line 23 4 "ael.flex"
{ my_col + = yyleng ; }
{ my_col + = yyleng ; }
YY_BREAK
YY_BREAK
case 44 :
case 44 :
/* rule 44 can match eol */
/* rule 44 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 23 3 "ael.flex"
# line 23 5 "ael.flex"
{ + + my_lineno ; my_col = 1 ; }
{ + + my_lineno ; my_col = 1 ; }
YY_BREAK
YY_BREAK
case 45 :
case 45 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 23 4 "ael.flex"
# line 23 6 "ael.flex"
{ my_col + = yyleng ; }
{ my_col + = yyleng ; }
YY_BREAK
YY_BREAK
case 46 :
case 46 :
/* rule 46 can match eol */
/* rule 46 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 23 5 "ael.flex"
# line 23 7 "ael.flex"
{ + + my_lineno ; my_col = 1 ; }
{ + + my_lineno ; my_col = 1 ; }
YY_BREAK
YY_BREAK
case 47 :
case 47 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 23 6 "ael.flex"
# line 23 8 "ael.flex"
{ my_col + = 2 ; BEGIN ( INITIAL ) ; }
{ my_col + = 2 ; BEGIN ( INITIAL ) ; }
YY_BREAK
YY_BREAK
case 48 :
case 48 :
/* rule 48 can match eol */
/* rule 48 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 38 "ael.flex"
# line 2 40 "ael.flex"
{ my_lineno + + ; my_col = 1 ; }
{ my_lineno + + ; my_col = 1 ; }
YY_BREAK
YY_BREAK
case 49 :
case 49 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 39 "ael.flex"
# line 2 41 "ael.flex"
{ my_col + = yyleng ; }
{ my_col + = yyleng ; }
YY_BREAK
YY_BREAK
case 50 :
case 50 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 24 0 "ael.flex"
# line 24 2 "ael.flex"
{ my_col + = ( yyleng * 8 ) - ( my_col % 8 ) ; }
{ my_col + = ( yyleng * 8 ) - ( my_col % 8 ) ; }
YY_BREAK
YY_BREAK
case 51 :
case 51 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 24 2 "ael.flex"
# line 24 4 "ael.flex"
{
{
STORE_POS ;
STORE_POS ;
yylval - > str = strdup ( yytext ) ;
yylval - > str = strdup ( yytext ) ;
@ -1511,7 +1512,7 @@ YY_RULE_SETUP
case 52 :
case 52 :
/* rule 52 can match eol */
/* rule 52 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 58 "ael.flex"
# line 2 60 "ael.flex"
{
{
if ( pbcpop ( ' ) ' ) ) { /* error */
if ( pbcpop ( ' ) ' ) ) { /* error */
STORE_LOC ;
STORE_LOC ;
@ -1537,7 +1538,7 @@ YY_RULE_SETUP
case 53 :
case 53 :
/* rule 53 can match eol */
/* rule 53 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 28 0 "ael.flex"
# line 28 2 "ael.flex"
{
{
char c = yytext [ yyleng - 1 ] ;
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' ( ' )
if ( c = = ' ( ' )
@ -1549,7 +1550,7 @@ YY_RULE_SETUP
case 54 :
case 54 :
/* rule 54 can match eol */
/* rule 54 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 2 88 "ael.flex"
# line 2 90 "ael.flex"
{
{
char c = yytext [ yyleng - 1 ] ;
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
if ( pbcpop ( c ) ) { /* error */
@ -1574,7 +1575,7 @@ YY_RULE_SETUP
case 55 :
case 55 :
/* rule 55 can match eol */
/* rule 55 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 31 0 "ael.flex"
# line 31 2 "ael.flex"
{
{
char c = yytext [ yyleng - 1 ] ;
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' ( ' )
if ( c = = ' ( ' )
@ -1586,7 +1587,7 @@ YY_RULE_SETUP
case 56 :
case 56 :
/* rule 56 can match eol */
/* rule 56 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 3 18 "ael.flex"
# line 3 20 "ael.flex"
{
{
if ( pbcpop ( ' ) ' ) ) { /* error */
if ( pbcpop ( ' ) ' ) ) { /* error */
STORE_LOC ;
STORE_LOC ;
@ -1614,7 +1615,7 @@ YY_RULE_SETUP
case 57 :
case 57 :
/* rule 57 can match eol */
/* rule 57 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 34 2 "ael.flex"
# line 34 4 "ael.flex"
{
{
if ( parencount ! = 0 ) { /* printf("Folding in a comma!\n"); */
if ( parencount ! = 0 ) { /* printf("Folding in a comma!\n"); */
yymore ( ) ;
yymore ( ) ;
@ -1632,7 +1633,7 @@ YY_RULE_SETUP
case 58 :
case 58 :
/* rule 58 can match eol */
/* rule 58 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 35 6 "ael.flex"
# line 35 8 "ael.flex"
{
{
char c = yytext [ yyleng - 1 ] ;
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
if ( pbcpop ( c ) ) { /* error */
@ -1653,7 +1654,7 @@ YY_RULE_SETUP
case 59 :
case 59 :
/* rule 59 can match eol */
/* rule 59 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 37 3 "ael.flex"
# line 37 5 "ael.flex"
{
{
char c = yytext [ yyleng - 1 ] ;
char c = yytext [ yyleng - 1 ] ;
yymore ( ) ;
yymore ( ) ;
@ -1663,7 +1664,7 @@ YY_RULE_SETUP
case 60 :
case 60 :
/* rule 60 can match eol */
/* rule 60 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 3 79 "ael.flex"
# line 3 81 "ael.flex"
{
{
char c = yytext [ yyleng - 1 ] ;
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
if ( pbcpop ( c ) ) { /* error */
@ -1679,7 +1680,7 @@ YY_RULE_SETUP
case 61 :
case 61 :
/* rule 61 can match eol */
/* rule 61 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 39 1 "ael.flex"
# line 39 3 "ael.flex"
{
{
STORE_LOC ;
STORE_LOC ;
yylval - > str = strdup ( yytext ) ;
yylval - > str = strdup ( yytext ) ;
@ -1692,7 +1693,7 @@ YY_RULE_SETUP
case 62 :
case 62 :
/* rule 62 can match eol */
/* rule 62 can match eol */
YY_RULE_SETUP
YY_RULE_SETUP
# line 40 0 "ael.flex"
# line 40 2 "ael.flex"
{
{
char fnamebuf [ 1024 ] , * p1 , * p2 ;
char fnamebuf [ 1024 ] , * p1 , * p2 ;
int glob_ret ;
int glob_ret ;
@ -1742,7 +1743,7 @@ case YY_STATE_EOF(paren):
case YY_STATE_EOF ( semic ) :
case YY_STATE_EOF ( semic ) :
case YY_STATE_EOF ( argg ) :
case YY_STATE_EOF ( argg ) :
case YY_STATE_EOF ( comment ) :
case YY_STATE_EOF ( comment ) :
# line 44 5 "ael.flex"
# line 44 7 "ael.flex"
{
{
char fnamebuf [ 2048 ] ;
char fnamebuf [ 2048 ] ;
if ( include_stack_index > 0 & & include_stack [ include_stack_index - 1 ] . globbuf_pos < include_stack [ include_stack_index - 1 ] . globbuf . gl_pathc - 1 ) {
if ( include_stack_index > 0 & & include_stack [ include_stack_index - 1 ] . globbuf_pos < include_stack [ include_stack_index - 1 ] . globbuf . gl_pathc - 1 ) {
@ -1777,10 +1778,10 @@ case YY_STATE_EOF(comment):
YY_BREAK
YY_BREAK
case 63 :
case 63 :
YY_RULE_SETUP
YY_RULE_SETUP
# line 4 79 "ael.flex"
# line 4 81 "ael.flex"
ECHO ;
ECHO ;
YY_BREAK
YY_BREAK
# line 178 4 "ael_lex.c"
# line 178 6 "ael_lex.c"
case YY_END_OF_BUFFER :
case YY_END_OF_BUFFER :
{
{
@ -2905,7 +2906,7 @@ void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
# define YYTABLES_NAME "yytables"
# define YYTABLES_NAME "yytables"
# line 4 79 "ael.flex"
# line 4 81 "ael.flex"