@ -352,8 +352,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
* yy_cp = ' \0 ' ; \
yyg - > yy_c_buf_p = yy_cp ;
# define YY_NUM_RULES 7 5
# define YY_END_OF_BUFFER 7 6
# define YY_NUM_RULES 7 6
# define YY_END_OF_BUFFER 7 7
/* This struct is not used in this scanner,
but its presence is necessary . */
struct yy_trans_info
@ -364,7 +364,7 @@ struct yy_trans_info
static yyconst flex_int16_t yy_accept [ 285 ] =
{ 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 43 , 43 ,
0 , 0 , 0 , 0 , 0 , 0 , 7 6 , 75 , 50 , 48 ,
0 , 0 , 0 , 0 , 0 , 0 , 7 7 , 75 , 50 , 48 ,
49 , 51 , 51 , 51 , 9 , 3 , 4 , 7 , 51 , 8 ,
5 , 6 , 12 , 75 , 51 , 51 , 51 , 51 , 51 , 51 ,
51 , 51 , 51 , 51 , 51 , 51 , 51 , 51 , 51 , 51 ,
@ -797,6 +797,12 @@ static yyconst flex_int16_t yy_chk[1073] =
* This renames also ael_yywrap , but since we do not use it , we just
* add option noyywrap to remove it .
*/
/* I specify this option to suppress flex generating code with ECHO
in it . This generates compiler warnings in some systems ; We ' ve
seen the fwrite generate Unused variable warnings with 4.1 .2 gcc .
Some systems have tweaked flex ECHO macro to keep the compiler
happy . To keep the warning message from getting output , I added
a default rule at the end of the patterns section */
/* ael_yyfree normally just frees its arg. It can be null sometimes,
which some systems will complain about , so , we ' ll define our own version */
/* batch gives a bit more performance if we are using it in
@ -811,7 +817,7 @@ static yyconst flex_int16_t yy_chk[1073] =
* bison - bridge passes an additional yylval argument to ael_yylex ( ) .
* bison - locations is probably not needed .
*/
# line 63 "ael.flex"
# line 71 "ael.flex"
# include "asterisk.h"
ASTERISK_FILE_VERSION ( __FILE__ , " $Revision$ " )
@ -946,7 +952,7 @@ static void pbcwhere(const char *text, int *line, int *col )
# define STORE_POS
# define STORE_LOC
# endif
# line 9 49 "ael_lex.c"
# line 9 55 "ael_lex.c"
# define INITIAL 0
# define paren 1
@ -1194,10 +1200,10 @@ YY_DECL
register int yy_act ;
struct yyguts_t * yyg = ( struct yyguts_t * ) yyscanner ;
# line 2 09 "ael.flex"
# line 2 17 "ael.flex"
# line 120 0 "ael_lex.c"
# line 120 6 "ael_lex.c"
yylval = yylval_param ;
@ -1288,260 +1294,260 @@ do_action: /* This label is used only to access EOF actions. */
case 1 :
YY_RULE_SETUP
# line 21 1 "ael.flex"
# line 21 9 "ael.flex"
{ STORE_POS ; return LC ; }
YY_BREAK
case 2 :
YY_RULE_SETUP
# line 2 1 2 "ael.flex"
# line 2 20 "ael.flex"
{ STORE_POS ; return RC ; }
YY_BREAK
case 3 :
YY_RULE_SETUP
# line 2 13 "ael.flex"
# line 2 2 1 "ael.flex"
{ STORE_POS ; return LP ; }
YY_BREAK
case 4 :
YY_RULE_SETUP
# line 2 14 "ael.flex"
# line 2 22 "ael.flex"
{ STORE_POS ; return RP ; }
YY_BREAK
case 5 :
YY_RULE_SETUP
# line 2 15 "ael.flex"
# line 2 23 "ael.flex"
{ STORE_POS ; return SEMI ; }
YY_BREAK
case 6 :
YY_RULE_SETUP
# line 2 16 "ael.flex"
# line 2 24 "ael.flex"
{ STORE_POS ; return EQ ; }
YY_BREAK
case 7 :
YY_RULE_SETUP
# line 2 17 "ael.flex"
# line 2 25 "ael.flex"
{ STORE_POS ; return COMMA ; }
YY_BREAK
case 8 :
YY_RULE_SETUP
# line 2 18 "ael.flex"
# line 2 26 "ael.flex"
{ STORE_POS ; return COLON ; }
YY_BREAK
case 9 :
YY_RULE_SETUP
# line 2 19 "ael.flex"
# line 2 27 "ael.flex"
{ STORE_POS ; return AMPER ; }
YY_BREAK
case 10 :
YY_RULE_SETUP
# line 22 0 "ael.flex"
# line 22 8 "ael.flex"
{ STORE_POS ; return BAR ; }
YY_BREAK
case 11 :
YY_RULE_SETUP
# line 22 1 "ael.flex"
# line 22 9 "ael.flex"
{ STORE_POS ; return EXTENMARK ; }
YY_BREAK
case 12 :
YY_RULE_SETUP
# line 2 22 "ael.flex"
# line 2 30 "ael.flex"
{ STORE_POS ; return AT ; }
YY_BREAK
case 13 :
YY_RULE_SETUP
# line 2 2 3 "ael.flex"
# line 2 31 "ael.flex"
{ /*comment*/ }
YY_BREAK
case 14 :
YY_RULE_SETUP
# line 2 24 "ael.flex"
# line 2 3 2 "ael.flex"
{ STORE_POS ; return KW_CONTEXT ; }
YY_BREAK
case 15 :
YY_RULE_SETUP
# line 2 25 "ael.flex"
# line 2 33 "ael.flex"
{ STORE_POS ; return KW_ABSTRACT ; }
YY_BREAK
case 16 :
YY_RULE_SETUP
# line 2 26 "ael.flex"
# line 2 34 "ael.flex"
{ STORE_POS ; return KW_EXTEND ; }
YY_BREAK
case 17 :
YY_RULE_SETUP
# line 2 27 "ael.flex"
# line 2 35 "ael.flex"
{ STORE_POS ; return KW_MACRO ; } ;
YY_BREAK
case 18 :
YY_RULE_SETUP
# line 2 28 "ael.flex"
# line 2 36 "ael.flex"
{ STORE_POS ; return KW_GLOBALS ; }
YY_BREAK
case 19 :
YY_RULE_SETUP
# line 2 29 "ael.flex"
# line 2 37 "ael.flex"
{ STORE_POS ; return KW_LOCAL ; }
YY_BREAK
case 20 :
YY_RULE_SETUP
# line 23 0 "ael.flex"
# line 23 8 "ael.flex"
{ STORE_POS ; return KW_IGNOREPAT ; }
YY_BREAK
case 21 :
YY_RULE_SETUP
# line 23 1 "ael.flex"
# line 23 9 "ael.flex"
{ STORE_POS ; return KW_SWITCH ; }
YY_BREAK
case 22 :
YY_RULE_SETUP
# line 2 32 "ael.flex"
# line 2 40 "ael.flex"
{ STORE_POS ; return KW_IF ; }
YY_BREAK
case 23 :
YY_RULE_SETUP
# line 2 33 "ael.flex"
# line 2 41 "ael.flex"
{ STORE_POS ; return KW_IFTIME ; }
YY_BREAK
case 24 :
YY_RULE_SETUP
# line 2 3 4 "ael.flex"
# line 2 42 "ael.flex"
{ STORE_POS ; return KW_RANDOM ; }
YY_BREAK
case 25 :
YY_RULE_SETUP
# line 2 35 "ael.flex"
# line 2 4 3 "ael.flex"
{ STORE_POS ; return KW_REGEXTEN ; }
YY_BREAK
case 26 :
YY_RULE_SETUP
# line 2 36 "ael.flex"
# line 2 44 "ael.flex"
{ STORE_POS ; return KW_HINT ; }
YY_BREAK
case 27 :
YY_RULE_SETUP
# line 2 37 "ael.flex"
# line 2 45 "ael.flex"
{ STORE_POS ; return KW_ELSE ; }
YY_BREAK
case 28 :
YY_RULE_SETUP
# line 2 38 "ael.flex"
# line 2 46 "ael.flex"
{ STORE_POS ; return KW_GOTO ; }
YY_BREAK
case 29 :
YY_RULE_SETUP
# line 2 39 "ael.flex"
# line 2 47 "ael.flex"
{ STORE_POS ; return KW_JUMP ; }
YY_BREAK
case 30 :
YY_RULE_SETUP
# line 24 0 "ael.flex"
# line 24 8 "ael.flex"
{ STORE_POS ; return KW_RETURN ; }
YY_BREAK
case 31 :
YY_RULE_SETUP
# line 24 1 "ael.flex"
# line 24 9 "ael.flex"
{ STORE_POS ; return KW_BREAK ; }
YY_BREAK
case 32 :
YY_RULE_SETUP
# line 2 42 "ael.flex"
# line 2 50 "ael.flex"
{ STORE_POS ; return KW_CONTINUE ; }
YY_BREAK
case 33 :
YY_RULE_SETUP
# line 2 43 "ael.flex"
# line 2 51 "ael.flex"
{ STORE_POS ; return KW_FOR ; }
YY_BREAK
case 34 :
YY_RULE_SETUP
# line 2 44 "ael.flex"
# line 2 52 "ael.flex"
{ STORE_POS ; return KW_WHILE ; }
YY_BREAK
case 35 :
YY_RULE_SETUP
# line 2 4 5 "ael.flex"
# line 2 53 "ael.flex"
{ STORE_POS ; return KW_CASE ; }
YY_BREAK
case 36 :
YY_RULE_SETUP
# line 2 46 "ael.flex"
# line 2 5 4 "ael.flex"
{ STORE_POS ; return KW_DEFAULT ; }
YY_BREAK
case 37 :
YY_RULE_SETUP
# line 2 47 "ael.flex"
# line 2 55 "ael.flex"
{ STORE_POS ; return KW_PATTERN ; }
YY_BREAK
case 38 :
YY_RULE_SETUP
# line 2 48 "ael.flex"
# line 2 56 "ael.flex"
{ STORE_POS ; return KW_CATCH ; }
YY_BREAK
case 39 :
YY_RULE_SETUP
# line 2 49 "ael.flex"
# line 2 57 "ael.flex"
{ STORE_POS ; return KW_SWITCHES ; }
YY_BREAK
case 40 :
YY_RULE_SETUP
# line 25 0 "ael.flex"
# line 25 8 "ael.flex"
{ STORE_POS ; return KW_ESWITCHES ; }
YY_BREAK
case 41 :
YY_RULE_SETUP
# line 25 1 "ael.flex"
# line 25 9 "ael.flex"
{ STORE_POS ; return KW_INCLUDES ; }
YY_BREAK
case 42 :
YY_RULE_SETUP
# line 2 52 "ael.flex"
# line 2 60 "ael.flex"
{ BEGIN ( comment ) ; my_col + = 2 ; }
YY_BREAK
case 43 :
YY_RULE_SETUP
# line 2 54 "ael.flex"
# line 2 62 "ael.flex"
{ my_col + = yyleng ; }
YY_BREAK
case 44 :
/* rule 44 can match eol */
YY_RULE_SETUP
# line 2 55 "ael.flex"
# line 2 63 "ael.flex"
{ + + my_lineno ; my_col = 1 ; }
YY_BREAK
case 45 :
YY_RULE_SETUP
# line 2 5 6 "ael.flex"
# line 2 64 "ael.flex"
{ my_col + = yyleng ; }
YY_BREAK
case 46 :
/* rule 46 can match eol */
YY_RULE_SETUP
# line 2 57 "ael.flex"
# line 2 6 5 "ael.flex"
{ + + my_lineno ; my_col = 1 ; }
YY_BREAK
case 47 :
YY_RULE_SETUP
# line 2 58 "ael.flex"
# line 2 66 "ael.flex"
{ my_col + = 2 ; BEGIN ( INITIAL ) ; } /* the nice thing about comments is that you know exactly what ends them */
YY_BREAK
case 48 :
/* rule 48 can match eol */
YY_RULE_SETUP
# line 26 0 "ael.flex"
# line 26 8 "ael.flex"
{ my_lineno + + ; my_col = 1 ; }
YY_BREAK
case 49 :
YY_RULE_SETUP
# line 26 1 "ael.flex"
# line 26 9 "ael.flex"
{ my_col + = yyleng ; }
YY_BREAK
case 50 :
YY_RULE_SETUP
# line 2 62 "ael.flex"
# line 2 70 "ael.flex"
{ my_col + = ( yyleng * 8 ) - ( my_col % 8 ) ; }
YY_BREAK
case 51 :
YY_RULE_SETUP
# line 2 64 "ael.flex"
# line 2 72 "ael.flex"
{
/* boy did I open a can of worms when I changed the lexical token "word".
all the above keywords can be used as a beginning to a " word " . -
@ -1570,22 +1576,22 @@ YY_RULE_SETUP
YY_BREAK
case 52 :
YY_RULE_SETUP
# line 29 0 "ael.flex"
# line 29 8 "ael.flex"
{ yymore ( ) ; /* Keep going */ }
YY_BREAK
case 53 :
YY_RULE_SETUP
# line 29 1 "ael.flex"
# line 29 9 "ael.flex"
{ yymore ( ) ; /* Keep going */ }
YY_BREAK
case 54 :
YY_RULE_SETUP
# line 292 "ael.flex"
# line 300 "ael.flex"
{ yymore ( ) ; /* Keep Going */ }
YY_BREAK
case 55 :
YY_RULE_SETUP
# line 29 3 "ael.flex"
# line 301 "ael.flex"
{ /* the beginning of a ${} construct. prepare and pop into curlystate */
parencount2 = 0 ;
pbcpos2 = 0 ;
@ -1596,7 +1602,7 @@ YY_RULE_SETUP
YY_BREAK
case 56 :
YY_RULE_SETUP
# line 30 0 "ael.flex"
# line 30 8 "ael.flex"
{ /* the beginning of a $[] construct. prepare and pop into brackstate */
parencount3 = 0 ;
pbcpos3 = 0 ;
@ -1608,7 +1614,7 @@ YY_RULE_SETUP
case 57 :
/* rule 57 can match eol */
YY_RULE_SETUP
# line 3 07 "ael.flex"
# line 3 15 "ael.flex"
{
/* a non-word constituent char, like a space, tab, curly, paren, etc */
char c = yytext [ yyleng - 1 ] ;
@ -1624,7 +1630,7 @@ YY_RULE_SETUP
case 58 :
/* rule 58 can match eol */
YY_RULE_SETUP
# line 32 0 "ael.flex"
# line 32 8 "ael.flex"
{
if ( pbcpop2 ( ' } ' ) ) { /* error */
STORE_LOC ;
@ -1647,7 +1653,7 @@ YY_RULE_SETUP
case 59 :
/* rule 59 can match eol */
YY_RULE_SETUP
# line 3 39 "ael.flex"
# line 3 47 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' { ' )
@ -1659,7 +1665,7 @@ YY_RULE_SETUP
case 60 :
/* rule 60 can match eol */
YY_RULE_SETUP
# line 3 47 "ael.flex"
# line 3 55 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop2 ( c ) ) { /* error */
@ -1678,7 +1684,7 @@ YY_RULE_SETUP
case 61 :
/* rule 61 can match eol */
YY_RULE_SETUP
# line 3 63 "ael.flex"
# line 3 71 "ael.flex"
{
if ( pbcpop3 ( ' ] ' ) ) { /* error */
STORE_LOC ;
@ -1701,7 +1707,7 @@ YY_RULE_SETUP
case 62 :
/* rule 62 can match eol */
YY_RULE_SETUP
# line 3 82 "ael.flex"
# line 3 90 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' [ ' )
@ -1713,7 +1719,7 @@ YY_RULE_SETUP
case 63 :
/* rule 63 can match eol */
YY_RULE_SETUP
# line 39 0 "ael.flex"
# line 39 8 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop3 ( c ) ) { /* error */
@ -1739,7 +1745,7 @@ YY_RULE_SETUP
case 64 :
/* rule 64 can match eol */
YY_RULE_SETUP
# line 4 13 "ael.flex"
# line 4 2 1 "ael.flex"
{
if ( pbcpop ( ' ) ' ) ) { /* error */
STORE_LOC ;
@ -1768,7 +1774,7 @@ YY_RULE_SETUP
case 65 :
/* rule 65 can match eol */
YY_RULE_SETUP
# line 4 38 "ael.flex"
# line 4 46 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' ( ' )
@ -1780,7 +1786,7 @@ YY_RULE_SETUP
case 66 :
/* rule 66 can match eol */
YY_RULE_SETUP
# line 4 46 "ael.flex"
# line 4 5 4 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
@ -1807,7 +1813,7 @@ YY_RULE_SETUP
case 67 :
/* rule 67 can match eol */
YY_RULE_SETUP
# line 47 0 "ael.flex"
# line 47 8 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' ( ' )
@ -1819,7 +1825,7 @@ YY_RULE_SETUP
case 68 :
/* rule 68 can match eol */
YY_RULE_SETUP
# line 4 7 8 "ael.flex"
# line 4 86 "ael.flex"
{
if ( pbcpop ( ' ) ' ) ) { /* error */
STORE_LOC ;
@ -1850,7 +1856,7 @@ YY_RULE_SETUP
case 69 :
/* rule 69 can match eol */
YY_RULE_SETUP
# line 5 05 "ael.flex"
# line 5 13 "ael.flex"
{
if ( parencount ! = 0 ) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */
yymore ( ) ;
@ -1869,7 +1875,7 @@ YY_RULE_SETUP
case 70 :
/* rule 70 can match eol */
YY_RULE_SETUP
# line 52 0 "ael.flex"
# line 52 8 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
@ -1892,7 +1898,7 @@ YY_RULE_SETUP
case 71 :
/* rule 71 can match eol */
YY_RULE_SETUP
# line 5 39 "ael.flex"
# line 5 47 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
yymore ( ) ;
@ -1902,7 +1908,7 @@ YY_RULE_SETUP
case 72 :
/* rule 72 can match eol */
YY_RULE_SETUP
# line 5 4 5 "ael.flex"
# line 5 53 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
@ -1920,7 +1926,7 @@ YY_RULE_SETUP
case 73 :
/* rule 73 can match eol */
YY_RULE_SETUP
# line 5 59 "ael.flex"
# line 5 67 "ael.flex"
{
STORE_LOC ;
yylval - > str = malloc ( yyleng ) ;
@ -1934,7 +1940,7 @@ YY_RULE_SETUP
case 74 :
/* rule 74 can match eol */
YY_RULE_SETUP
# line 5 69 "ael.flex"
# line 5 77 "ael.flex"
{
char fnamebuf [ 1024 ] , * p1 , * p2 ;
int glob_ret ;
@ -1987,7 +1993,7 @@ case YY_STATE_EOF(comment):
case YY_STATE_EOF ( curlystate ) :
case YY_STATE_EOF ( wordstate ) :
case YY_STATE_EOF ( brackstate ) :
# line 6 14 "ael.flex"
# line 6 22 "ael.flex"
{
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 ) {
@ -2021,11 +2027,17 @@ case YY_STATE_EOF(brackstate):
}
YY_BREAK
case 75 :
/* rule 75 can match eol */
YY_RULE_SETUP
# line 654 "ael.flex"
{ /* default rule */ ast_log ( LOG_ERROR , " Unhandled char(s): %s \n " , yytext ) ; }
YY_BREAK
case 76 :
YY_RULE_SETUP
# line 646 "ael.flex"
ECHO ;
# line 6 5 6 "ael.flex"
YY_FATAL_ERROR ( " flex scanner jammed " ) ;
YY_BREAK
# line 2028 "ael_lex.c"
# line 20 40 "ael_lex.c"
case YY_END_OF_BUFFER :
{
@ -3198,7 +3210,7 @@ void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
# define YYTABLES_NAME "yytables"
# line 6 4 6 "ael.flex"
# line 6 5 6 "ael.flex"