@ -32,7 +32,7 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
# if __STDC_VERSION__ >= 199901L
# if !defined __STDC_VERSION__ || __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 .
@ -778,6 +778,8 @@ static yyconst flex_int16_t yy_chk[1035] =
* This renames also ael_yywrap , but since we do not use it , we just
* add option noyywrap to remove it .
*/
/* 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
* a non - interactive mode . We probably don ' t care much .
*/
@ -790,7 +792,7 @@ static yyconst flex_int16_t yy_chk[1035] =
* bison - bridge passes an additional yylval argument to ael_yylex ( ) .
* bison - locations is probably not needed .
*/
# line 59 "ael.flex"
# line 63 "ael.flex"
ASTERISK_FILE_VERSION ( __FILE__ , " $Revision$ " )
# include <sys/types.h>
@ -904,7 +906,7 @@ static void pbcwhere(const char *text, int *line, int *col )
# define STORE_POS
# define STORE_LOC
# endif
# line 90 7 "ael_lex.c"
# line 90 9 "ael_lex.c"
# define INITIAL 0
# define paren 1
@ -1143,10 +1145,10 @@ YY_DECL
register int yy_act ;
struct yyguts_t * yyg = ( struct yyguts_t * ) yyscanner ;
# line 18 3 "ael.flex"
# line 18 7 "ael.flex"
# line 11 49 "ael_lex.c"
# line 11 51 "ael_lex.c"
yylval = yylval_param ;
@ -1237,260 +1239,260 @@ do_action: /* This label is used only to access EOF actions. */
case 1 :
YY_RULE_SETUP
# line 18 5 "ael.flex"
# line 18 9 "ael.flex"
{ STORE_POS ; return LC ; }
YY_BREAK
case 2 :
YY_RULE_SETUP
# line 1 86 "ael.flex"
# line 1 90 "ael.flex"
{ STORE_POS ; return RC ; }
YY_BREAK
case 3 :
YY_RULE_SETUP
# line 1 87 "ael.flex"
# line 1 91 "ael.flex"
{ STORE_POS ; return LP ; }
YY_BREAK
case 4 :
YY_RULE_SETUP
# line 1 88 "ael.flex"
# line 1 92 "ael.flex"
{ STORE_POS ; return RP ; }
YY_BREAK
case 5 :
YY_RULE_SETUP
# line 1 8 9 "ael.flex"
# line 1 93 "ael.flex"
{ STORE_POS ; return SEMI ; }
YY_BREAK
case 6 :
YY_RULE_SETUP
# line 19 0 "ael.flex"
# line 19 4 "ael.flex"
{ STORE_POS ; return EQ ; }
YY_BREAK
case 7 :
YY_RULE_SETUP
# line 19 1 "ael.flex"
# line 19 5 "ael.flex"
{ STORE_POS ; return COMMA ; }
YY_BREAK
case 8 :
YY_RULE_SETUP
# line 19 2 "ael.flex"
# line 19 6 "ael.flex"
{ STORE_POS ; return COLON ; }
YY_BREAK
case 9 :
YY_RULE_SETUP
# line 19 3 "ael.flex"
# line 19 7 "ael.flex"
{ STORE_POS ; return AMPER ; }
YY_BREAK
case 10 :
YY_RULE_SETUP
# line 19 4 "ael.flex"
# line 19 8 "ael.flex"
{ STORE_POS ; return BAR ; }
YY_BREAK
case 11 :
YY_RULE_SETUP
# line 19 5 "ael.flex"
# line 19 9 "ael.flex"
{ STORE_POS ; return EXTENMARK ; }
YY_BREAK
case 12 :
YY_RULE_SETUP
# line 196 "ael.flex"
# line 200 "ael.flex"
{ STORE_POS ; return AT ; }
YY_BREAK
case 13 :
YY_RULE_SETUP
# line 197 "ael.flex"
# line 20 1 "ael.flex"
{ /*comment*/ }
YY_BREAK
case 14 :
YY_RULE_SETUP
# line 198 "ael.flex"
# line 202 "ael.flex"
{ STORE_POS ; return KW_CONTEXT ; }
YY_BREAK
case 15 :
YY_RULE_SETUP
# line 199 "ael.flex"
# line 203 "ael.flex"
{ STORE_POS ; return KW_ABSTRACT ; }
YY_BREAK
case 16 :
YY_RULE_SETUP
# line 20 0 "ael.flex"
# line 20 4 "ael.flex"
{ STORE_POS ; return KW_EXTEND ; }
YY_BREAK
case 17 :
YY_RULE_SETUP
# line 20 1 "ael.flex"
# line 20 5 "ael.flex"
{ STORE_POS ; return KW_MACRO ; } ;
YY_BREAK
case 18 :
YY_RULE_SETUP
# line 20 2 "ael.flex"
# line 20 6 "ael.flex"
{ STORE_POS ; return KW_GLOBALS ; }
YY_BREAK
case 19 :
YY_RULE_SETUP
# line 20 3 "ael.flex"
# line 20 7 "ael.flex"
{ STORE_POS ; return KW_LOCAL ; }
YY_BREAK
case 20 :
YY_RULE_SETUP
# line 20 4 "ael.flex"
# line 20 8 "ael.flex"
{ STORE_POS ; return KW_IGNOREPAT ; }
YY_BREAK
case 21 :
YY_RULE_SETUP
# line 20 5 "ael.flex"
# line 20 9 "ael.flex"
{ STORE_POS ; return KW_SWITCH ; }
YY_BREAK
case 22 :
YY_RULE_SETUP
# line 2 06 "ael.flex"
# line 2 1 0 "ael.flex"
{ STORE_POS ; return KW_IF ; }
YY_BREAK
case 23 :
YY_RULE_SETUP
# line 2 07 "ael.flex"
# line 2 11 "ael.flex"
{ STORE_POS ; return KW_IFTIME ; }
YY_BREAK
case 24 :
YY_RULE_SETUP
# line 2 08 "ael.flex"
# line 2 12 "ael.flex"
{ STORE_POS ; return KW_RANDOM ; }
YY_BREAK
case 25 :
YY_RULE_SETUP
# line 2 09 "ael.flex"
# line 2 13 "ael.flex"
{ STORE_POS ; return KW_REGEXTEN ; }
YY_BREAK
case 26 :
YY_RULE_SETUP
# line 21 0 "ael.flex"
# line 21 4 "ael.flex"
{ STORE_POS ; return KW_HINT ; }
YY_BREAK
case 27 :
YY_RULE_SETUP
# line 21 1 "ael.flex"
# line 21 5 "ael.flex"
{ STORE_POS ; return KW_ELSE ; }
YY_BREAK
case 28 :
YY_RULE_SETUP
# line 21 2 "ael.flex"
# line 21 6 "ael.flex"
{ STORE_POS ; return KW_GOTO ; }
YY_BREAK
case 29 :
YY_RULE_SETUP
# line 21 3 "ael.flex"
# line 21 7 "ael.flex"
{ STORE_POS ; return KW_JUMP ; }
YY_BREAK
case 30 :
YY_RULE_SETUP
# line 21 4 "ael.flex"
# line 21 8 "ael.flex"
{ STORE_POS ; return KW_RETURN ; }
YY_BREAK
case 31 :
YY_RULE_SETUP
# line 21 5 "ael.flex"
# line 21 9 "ael.flex"
{ STORE_POS ; return KW_BREAK ; }
YY_BREAK
case 32 :
YY_RULE_SETUP
# line 2 16 "ael.flex"
# line 2 20 "ael.flex"
{ STORE_POS ; return KW_CONTINUE ; }
YY_BREAK
case 33 :
YY_RULE_SETUP
# line 2 17 "ael.flex"
# line 2 2 1 "ael.flex"
{ STORE_POS ; return KW_FOR ; }
YY_BREAK
case 34 :
YY_RULE_SETUP
# line 2 18 "ael.flex"
# line 2 22 "ael.flex"
{ STORE_POS ; return KW_WHILE ; }
YY_BREAK
case 35 :
YY_RULE_SETUP
# line 2 19 "ael.flex"
# line 2 23 "ael.flex"
{ STORE_POS ; return KW_CASE ; }
YY_BREAK
case 36 :
YY_RULE_SETUP
# line 22 0 "ael.flex"
# line 22 4 "ael.flex"
{ STORE_POS ; return KW_DEFAULT ; }
YY_BREAK
case 37 :
YY_RULE_SETUP
# line 22 1 "ael.flex"
# line 22 5 "ael.flex"
{ STORE_POS ; return KW_PATTERN ; }
YY_BREAK
case 38 :
YY_RULE_SETUP
# line 22 2 "ael.flex"
# line 22 6 "ael.flex"
{ STORE_POS ; return KW_CATCH ; }
YY_BREAK
case 39 :
YY_RULE_SETUP
# line 22 3 "ael.flex"
# line 22 7 "ael.flex"
{ STORE_POS ; return KW_SWITCHES ; }
YY_BREAK
case 40 :
YY_RULE_SETUP
# line 22 4 "ael.flex"
# line 22 8 "ael.flex"
{ STORE_POS ; return KW_ESWITCHES ; }
YY_BREAK
case 41 :
YY_RULE_SETUP
# line 22 5 "ael.flex"
# line 22 9 "ael.flex"
{ STORE_POS ; return KW_INCLUDES ; }
YY_BREAK
case 42 :
YY_RULE_SETUP
# line 2 26 "ael.flex"
# line 2 30 "ael.flex"
{ BEGIN ( comment ) ; my_col + = 2 ; }
YY_BREAK
case 43 :
YY_RULE_SETUP
# line 2 28 "ael.flex"
# line 2 3 2 "ael.flex"
{ my_col + = yyleng ; }
YY_BREAK
case 44 :
/* rule 44 can match eol */
YY_RULE_SETUP
# line 2 29 "ael.flex"
# line 2 33 "ael.flex"
{ + + my_lineno ; my_col = 1 ; }
YY_BREAK
case 45 :
YY_RULE_SETUP
# line 23 0 "ael.flex"
# line 23 4 "ael.flex"
{ my_col + = yyleng ; }
YY_BREAK
case 46 :
/* rule 46 can match eol */
YY_RULE_SETUP
# line 23 1 "ael.flex"
# line 23 5 "ael.flex"
{ + + my_lineno ; my_col = 1 ; }
YY_BREAK
case 47 :
YY_RULE_SETUP
# line 23 2 "ael.flex"
# line 23 6 "ael.flex"
{ my_col + = 2 ; BEGIN ( INITIAL ) ; }
YY_BREAK
case 48 :
/* rule 48 can match eol */
YY_RULE_SETUP
# line 23 4 "ael.flex"
# line 23 8 "ael.flex"
{ my_lineno + + ; my_col = 1 ; }
YY_BREAK
case 49 :
YY_RULE_SETUP
# line 23 5 "ael.flex"
# line 23 9 "ael.flex"
{ my_col + = yyleng ; }
YY_BREAK
case 50 :
YY_RULE_SETUP
# line 2 36 "ael.flex"
# line 2 40 "ael.flex"
{ my_col + = ( yyleng * 8 ) - ( my_col % 8 ) ; }
YY_BREAK
case 51 :
YY_RULE_SETUP
# line 2 38 "ael.flex"
# line 2 42 "ael.flex"
{
STORE_POS ;
yylval - > str = strdup ( yytext ) ;
@ -1508,7 +1510,7 @@ YY_RULE_SETUP
case 52 :
/* rule 52 can match eol */
YY_RULE_SETUP
# line 25 4 "ael.flex"
# line 25 8 "ael.flex"
{
if ( pbcpop ( ' ) ' ) ) { /* error */
STORE_LOC ;
@ -1534,7 +1536,7 @@ YY_RULE_SETUP
case 53 :
/* rule 53 can match eol */
YY_RULE_SETUP
# line 2 76 "ael.flex"
# line 2 80 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' ( ' )
@ -1546,7 +1548,7 @@ YY_RULE_SETUP
case 54 :
/* rule 54 can match eol */
YY_RULE_SETUP
# line 28 4 "ael.flex"
# line 28 8 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
@ -1571,7 +1573,7 @@ YY_RULE_SETUP
case 55 :
/* rule 55 can match eol */
YY_RULE_SETUP
# line 3 06 "ael.flex"
# line 3 1 0 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( c = = ' ( ' )
@ -1583,7 +1585,7 @@ YY_RULE_SETUP
case 56 :
/* rule 56 can match eol */
YY_RULE_SETUP
# line 31 4 "ael.flex"
# line 31 8 "ael.flex"
{
if ( pbcpop ( ' ) ' ) ) { /* error */
STORE_LOC ;
@ -1611,7 +1613,7 @@ YY_RULE_SETUP
case 57 :
/* rule 57 can match eol */
YY_RULE_SETUP
# line 3 38 "ael.flex"
# line 3 42 "ael.flex"
{
if ( parencount ! = 0 ) { /* printf("Folding in a comma!\n"); */
yymore ( ) ;
@ -1629,7 +1631,7 @@ YY_RULE_SETUP
case 58 :
/* rule 58 can match eol */
YY_RULE_SETUP
# line 35 2 "ael.flex"
# line 35 6 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
@ -1650,7 +1652,7 @@ YY_RULE_SETUP
case 59 :
/* rule 59 can match eol */
YY_RULE_SETUP
# line 3 69 "ael.flex"
# line 3 73 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
yymore ( ) ;
@ -1660,7 +1662,7 @@ YY_RULE_SETUP
case 60 :
/* rule 60 can match eol */
YY_RULE_SETUP
# line 37 5 "ael.flex"
# line 37 9 "ael.flex"
{
char c = yytext [ yyleng - 1 ] ;
if ( pbcpop ( c ) ) { /* error */
@ -1676,7 +1678,7 @@ YY_RULE_SETUP
case 61 :
/* rule 61 can match eol */
YY_RULE_SETUP
# line 3 87 "ael.flex"
# line 3 91 "ael.flex"
{
STORE_LOC ;
yylval - > str = strdup ( yytext ) ;
@ -1689,7 +1691,7 @@ YY_RULE_SETUP
case 62 :
/* rule 62 can match eol */
YY_RULE_SETUP
# line 396 "ael.flex"
# line 400 "ael.flex"
{
char fnamebuf [ 1024 ] , * p1 , * p2 ;
int glob_ret ;
@ -1739,7 +1741,7 @@ case YY_STATE_EOF(paren):
case YY_STATE_EOF ( semic ) :
case YY_STATE_EOF ( argg ) :
case YY_STATE_EOF ( comment ) :
# line 44 1 "ael.flex"
# line 44 5 "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 ) {
@ -1776,10 +1778,10 @@ case YY_STATE_EOF(comment):
YY_BREAK
case 63 :
YY_RULE_SETUP
# line 47 5 "ael.flex"
# line 47 9 "ael.flex"
ECHO ;
YY_BREAK
# line 178 2 "ael_lex.c"
# line 178 4 "ael_lex.c"
case YY_END_OF_BUFFER :
{
@ -2902,14 +2904,9 @@ void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
return ( void * ) realloc ( ( char * ) ptr , size ) ;
}
void ael_yyfree ( void * ptr , yyscan_t yyscanner )
{
free ( ( char * ) ptr ) ; /* see ael_yyrealloc() for (char *) cast */
}
# define YYTABLES_NAME "yytables"
# line 47 5 "ael.flex"
# line 479 "ael.flex"
@ -2918,6 +2915,12 @@ static void pbcpush(char x)
pbcstack [ pbcpos + + ] = x ;
}
void ael_yyfree ( void * ptr , yyscan_t yyscanner )
{
if ( ptr )
free ( ( char * ) ptr ) ;
}
static int pbcpop ( char x )
{
if ( ( x = = ' ) ' & & pbcstack [ pbcpos - 1 ] = = ' ( ' )