Thu Oct 11 06:47:02 2012

Asterisk developer's documentation


ael_lex.c

Go to the documentation of this file.
00001 #include "asterisk.h"
00002 
00003 #line 2 "ael_lex.c"
00004 
00005 #line 4 "ael_lex.c"
00006 
00007 #define  YY_INT_ALIGNED short int
00008 
00009 /* A lexical scanner generated by flex */
00010 
00011 #define FLEX_SCANNER
00012 #define YY_FLEX_MAJOR_VERSION 2
00013 #define YY_FLEX_MINOR_VERSION 5
00014 #define YY_FLEX_SUBMINOR_VERSION 35
00015 #if YY_FLEX_SUBMINOR_VERSION > 0
00016 #define FLEX_BETA
00017 #endif
00018 
00019 /* First, we deal with  platform-specific or compiler-specific issues. */
00020 
00021 /* begin standard C headers. */
00022 #include <stdio.h>
00023 #include <string.h>
00024 #include <errno.h>
00025 #include <stdlib.h>
00026 
00027 /* end standard C headers. */
00028 
00029 /* flex integer type definitions */
00030 
00031 #ifndef FLEXINT_H
00032 #define FLEXINT_H
00033 
00034 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00035 
00036 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00037 
00038 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00039  * if you want the limit (max/min) macros for int types. 
00040  */
00041 #ifndef __STDC_LIMIT_MACROS
00042 #define __STDC_LIMIT_MACROS 1
00043 #endif
00044 
00045 #include <inttypes.h>
00046 typedef int8_t flex_int8_t;
00047 typedef uint8_t flex_uint8_t;
00048 typedef int16_t flex_int16_t;
00049 typedef uint16_t flex_uint16_t;
00050 typedef int32_t flex_int32_t;
00051 typedef uint32_t flex_uint32_t;
00052 #else
00053 typedef signed char flex_int8_t;
00054 typedef short int flex_int16_t;
00055 typedef int flex_int32_t;
00056 typedef unsigned char flex_uint8_t; 
00057 typedef unsigned short int flex_uint16_t;
00058 typedef unsigned int flex_uint32_t;
00059 
00060 /* Limits of integral types. */
00061 #ifndef INT8_MIN
00062 #define INT8_MIN               (-128)
00063 #endif
00064 #ifndef INT16_MIN
00065 #define INT16_MIN              (-32767-1)
00066 #endif
00067 #ifndef INT32_MIN
00068 #define INT32_MIN              (-2147483647-1)
00069 #endif
00070 #ifndef INT8_MAX
00071 #define INT8_MAX               (127)
00072 #endif
00073 #ifndef INT16_MAX
00074 #define INT16_MAX              (32767)
00075 #endif
00076 #ifndef INT32_MAX
00077 #define INT32_MAX              (2147483647)
00078 #endif
00079 #ifndef UINT8_MAX
00080 #define UINT8_MAX              (255U)
00081 #endif
00082 #ifndef UINT16_MAX
00083 #define UINT16_MAX             (65535U)
00084 #endif
00085 #ifndef UINT32_MAX
00086 #define UINT32_MAX             (4294967295U)
00087 #endif
00088 
00089 #endif /* ! C99 */
00090 
00091 #endif /* ! FLEXINT_H */
00092 
00093 #ifdef __cplusplus
00094 
00095 /* The "const" storage-class-modifier is valid. */
00096 #define YY_USE_CONST
00097 
00098 #else /* ! __cplusplus */
00099 
00100 /* C99 requires __STDC__ to be defined as 1. */
00101 #if defined (__STDC__)
00102 
00103 #define YY_USE_CONST
00104 
00105 #endif   /* defined (__STDC__) */
00106 #endif   /* ! __cplusplus */
00107 
00108 #ifdef YY_USE_CONST
00109 #define yyconst const
00110 #else
00111 #define yyconst
00112 #endif
00113 
00114 /* Returned upon end-of-file. */
00115 #define YY_NULL 0
00116 
00117 /* Promotes a possibly negative, possibly signed char to an unsigned
00118  * integer for use as an array index.  If the signed char is negative,
00119  * we want to instead treat it as an 8-bit unsigned char, hence the
00120  * double cast.
00121  */
00122 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00123 
00124 /* An opaque pointer. */
00125 #ifndef YY_TYPEDEF_YY_SCANNER_T
00126 #define YY_TYPEDEF_YY_SCANNER_T
00127 typedef void* yyscan_t;
00128 #endif
00129 
00130 /* For convenience, these vars (plus the bison vars far below)
00131    are macros in the reentrant scanner. */
00132 #define yyin yyg->yyin_r
00133 #define yyout yyg->yyout_r
00134 #define yyextra yyg->yyextra_r
00135 #define yyleng yyg->yyleng_r
00136 #define yytext yyg->yytext_r
00137 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
00138 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
00139 #define yy_flex_debug yyg->yy_flex_debug_r
00140 
00141 /* Enter a start condition.  This macro really ought to take a parameter,
00142  * but we do it the disgusting crufty way forced on us by the ()-less
00143  * definition of BEGIN.
00144  */
00145 #define BEGIN yyg->yy_start = 1 + 2 *
00146 
00147 /* Translate the current start state into a value that can be later handed
00148  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00149  * compatibility.
00150  */
00151 #define YY_START ((yyg->yy_start - 1) / 2)
00152 #define YYSTATE YY_START
00153 
00154 /* Action number for EOF rule of a given start state. */
00155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00156 
00157 /* Special action meaning "start processing a new file". */
00158 #define YY_NEW_FILE ael_yyrestart(yyin ,yyscanner )
00159 
00160 #define YY_END_OF_BUFFER_CHAR 0
00161 
00162 /* Size of default input buffer. */
00163 #ifndef YY_BUF_SIZE
00164 #ifdef __ia64__
00165 /* On IA-64, the buffer size is 16k, not 8k.
00166  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
00167  * Ditto for the __ia64__ case accordingly.
00168  */
00169 #define YY_BUF_SIZE 32768
00170 #else
00171 #define YY_BUF_SIZE 16384
00172 #endif /* __ia64__ */
00173 #endif
00174 
00175 /* The state buf must be large enough to hold one state per character in the main buffer.
00176  */
00177 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00178 
00179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00180 #define YY_TYPEDEF_YY_BUFFER_STATE
00181 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00182 #endif
00183 
00184 #define EOB_ACT_CONTINUE_SCAN 0
00185 #define EOB_ACT_END_OF_FILE 1
00186 #define EOB_ACT_LAST_MATCH 2
00187 
00188     #define YY_LESS_LINENO(n)
00189     
00190 /* Return all but the first "n" matched characters back to the input stream. */
00191 #define yyless(n) \
00192    do \
00193       { \
00194       /* Undo effects of setting up yytext. */ \
00195         int yyless_macro_arg = (n); \
00196         YY_LESS_LINENO(yyless_macro_arg);\
00197       *yy_cp = yyg->yy_hold_char; \
00198       YY_RESTORE_YY_MORE_OFFSET \
00199       yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00200       YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00201       } \
00202    while ( 0 )
00203 
00204 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
00205 
00206 #ifndef YY_TYPEDEF_YY_SIZE_T
00207 #define YY_TYPEDEF_YY_SIZE_T
00208 typedef size_t yy_size_t;
00209 #endif
00210 
00211 #ifndef YY_STRUCT_YY_BUFFER_STATE
00212 #define YY_STRUCT_YY_BUFFER_STATE
00213 struct yy_buffer_state
00214    {
00215    FILE *yy_input_file;
00216 
00217    char *yy_ch_buf;     /* input buffer */
00218    char *yy_buf_pos;    /* current position in input buffer */
00219 
00220    /* Size of input buffer in bytes, not including room for EOB
00221     * characters.
00222     */
00223    yy_size_t yy_buf_size;
00224 
00225    /* Number of characters read into yy_ch_buf, not including EOB
00226     * characters.
00227     */
00228    int yy_n_chars;
00229 
00230    /* Whether we "own" the buffer - i.e., we know we created it,
00231     * and can realloc() it to grow it, and should free() it to
00232     * delete it.
00233     */
00234    int yy_is_our_buffer;
00235 
00236    /* Whether this is an "interactive" input source; if so, and
00237     * if we're using stdio for input, then we want to use getc()
00238     * instead of fread(), to make sure we stop fetching input after
00239     * each newline.
00240     */
00241    int yy_is_interactive;
00242 
00243    /* Whether we're considered to be at the beginning of a line.
00244     * If so, '^' rules will be active on the next match, otherwise
00245     * not.
00246     */
00247    int yy_at_bol;
00248 
00249     int yy_bs_lineno; /**< The line count. */
00250     int yy_bs_column; /**< The column count. */
00251     
00252    /* Whether to try to fill the input buffer when we reach the
00253     * end of it.
00254     */
00255    int yy_fill_buffer;
00256 
00257    int yy_buffer_status;
00258 
00259 #define YY_BUFFER_NEW 0
00260 #define YY_BUFFER_NORMAL 1
00261    /* When an EOF's been seen but there's still some text to process
00262     * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00263     * shouldn't try reading from the input source any more.  We might
00264     * still have a bunch of tokens to match, though, because of
00265     * possible backing-up.
00266     *
00267     * When we actually see the EOF, we change the status to "new"
00268     * (via ael_yyrestart()), so that the user can continue scanning by
00269     * just pointing yyin at a new input file.
00270     */
00271 #define YY_BUFFER_EOF_PENDING 2
00272 
00273    };
00274 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00275 
00276 /* We provide macros for accessing buffer states in case in the
00277  * future we want to put the buffer states in a more general
00278  * "scanner state".
00279  *
00280  * Returns the top of the stack, or NULL.
00281  */
00282 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
00283                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
00284                           : NULL)
00285 
00286 /* Same as previous macro, but useful when we know that the buffer stack is not
00287  * NULL or when we need an lvalue. For internal use only.
00288  */
00289 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
00290 
00291 void ael_yyrestart (FILE *input_file ,yyscan_t yyscanner );
00292 void ael_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00293 YY_BUFFER_STATE ael_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
00294 void ael_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00295 void ael_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00296 void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00297 void ael_yypop_buffer_state (yyscan_t yyscanner );
00298 
00299 static void ael_yyensure_buffer_stack (yyscan_t yyscanner );
00300 static void ael_yy_load_buffer_state (yyscan_t yyscanner );
00301 static void ael_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
00302 
00303 #define YY_FLUSH_BUFFER ael_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
00304 
00305 YY_BUFFER_STATE ael_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
00306 YY_BUFFER_STATE ael_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
00307 YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
00308 
00309 void *ael_yyalloc (yy_size_t ,yyscan_t yyscanner );
00310 void *ael_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
00311 void ael_yyfree (void * ,yyscan_t yyscanner );
00312 
00313 #define yy_new_buffer ael_yy_create_buffer
00314 
00315 #define yy_set_interactive(is_interactive) \
00316    { \
00317    if ( ! YY_CURRENT_BUFFER ){ \
00318         ael_yyensure_buffer_stack (yyscanner); \
00319       YY_CURRENT_BUFFER_LVALUE =    \
00320             ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00321    } \
00322    YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00323    }
00324 
00325 #define yy_set_bol(at_bol) \
00326    { \
00327    if ( ! YY_CURRENT_BUFFER ){\
00328         ael_yyensure_buffer_stack (yyscanner); \
00329       YY_CURRENT_BUFFER_LVALUE =    \
00330             ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00331    } \
00332    YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00333    }
00334 
00335 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00336 
00337 /* Begin user sect3 */
00338 
00339 #define ael_yywrap(n) 1
00340 #define YY_SKIP_YYWRAP
00341 
00342 typedef unsigned char YY_CHAR;
00343 
00344 typedef int yy_state_type;
00345 
00346 #define yytext_ptr yytext_r
00347 
00348 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
00349 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
00350 static int yy_get_next_buffer (yyscan_t yyscanner );
00351 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
00352 
00353 /* Done after the current pattern has been matched and before the
00354  * corresponding action - sets up yytext.
00355  */
00356 #define YY_DO_BEFORE_ACTION \
00357    yyg->yytext_ptr = yy_bp; \
00358    yyg->yytext_ptr -= yyg->yy_more_len; \
00359    yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \
00360    yyg->yy_hold_char = *yy_cp; \
00361    *yy_cp = '\0'; \
00362    yyg->yy_c_buf_p = yy_cp;
00363 
00364 #define YY_NUM_RULES 76
00365 #define YY_END_OF_BUFFER 77
00366 /* This struct is not used in this scanner,
00367    but its presence is necessary. */
00368 struct yy_trans_info
00369    {
00370    flex_int32_t yy_verify;
00371    flex_int32_t yy_nxt;
00372    };
00373 static yyconst flex_int16_t yy_accept[285] =
00374     {   0,
00375         0,    0,    0,    0,    0,    0,    0,    0,   43,   43,
00376         0,    0,    0,    0,    0,    0,   77,   75,   50,   48,
00377        49,   51,   51,   51,    9,    3,    4,    7,   51,    8,
00378         5,    6,   12,   75,   51,   51,   51,   51,   51,   51,
00379        51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
00380         1,   10,    2,   75,   65,   64,   75,   66,   75,   71,
00381        72,   73,   75,   75,   67,   68,   69,   75,   70,   43,
00382        44,   45,   75,   59,   60,   75,   58,   57,   52,   52,
00383        57,   53,   75,   62,   63,   75,   61,   50,   49,    0,
00384        51,   42,   13,   11,    0,    0,    0,    0,    0,    0,
00385 
00386         0,    0,    0,    0,    0,    0,   22,    0,    0,    0,
00387         0,    0,    0,    0,    0,    0,    0,    0,   65,   64,
00388         0,   66,   65,   64,   66,    0,   71,   72,   73,    0,
00389        71,   72,   73,    0,   67,   68,   69,    0,   70,   67,
00390        68,   69,   70,   43,   44,   45,   46,   45,   47,    0,
00391        59,   60,    0,   58,   59,   60,   58,   56,   55,   54,
00392         0,   62,   63,    0,   61,   62,   63,   61,    0,   13,
00393         0,    0,    0,    0,    0,    0,    0,    0,    0,   33,
00394         0,    0,    0,   51,    0,    0,    0,    0,    0,    0,
00395         0,    0,    0,    0,    0,    0,    0,    0,   35,    0,
00396 
00397         0,    0,   27,    0,    0,    0,   28,   26,    0,    0,
00398         0,   29,    0,    0,    0,    0,    0,    0,    0,    0,
00399         0,    0,   31,   38,    0,    0,    0,    0,    0,    0,
00400         0,    0,    0,   19,   17,    0,    0,    0,    0,    0,
00401        34,    0,    0,    0,    0,    0,    0,   16,    0,   23,
00402         0,    0,    0,   24,    0,   30,   21,    0,    0,   14,
00403         0,   36,    0,   18,    0,    0,   37,    0,   51,    0,
00404        15,   32,    0,    0,   41,   25,   39,    0,   40,   20,
00405         0,    0,   74,    0
00406     } ;
00407 
00408 static yyconst flex_int32_t yy_ec[256] =
00409     {   0,
00410         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00413         1,    4,    5,    6,    7,    8,    1,    9,    5,   10,
00414        11,   12,    5,   13,    5,    5,   14,    5,    5,    5,
00415         5,    5,    5,    5,    5,    5,    5,   15,   16,    5,
00416        17,   18,    1,   19,    5,    5,    5,    5,    5,    5,
00417         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
00418         5,    5,    5,   20,    5,    5,    5,    5,    5,    5,
00419        21,   22,   23,    1,    5,    1,   24,   25,   26,   27,
00420 
00421        28,   29,   30,   31,   32,   33,   34,   35,   36,   37,
00422        38,   39,    5,   40,   41,   42,   43,    5,   44,   45,
00423         5,    5,   46,   47,   48,    1,    1,   49,   49,   49,
00424        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00425        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00426        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00427        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00428        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00429        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00430        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00431 
00432        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00433        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00434        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00435        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00436        49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
00437        49,   49,   49,   49,   49
00438     } ;
00439 
00440 static yyconst flex_int32_t yy_meta[50] =
00441     {   0,
00442         1,    1,    2,    1,    3,    4,    3,    3,    1,    1,
00443         1,    5,    1,    3,    1,    1,    1,    3,    1,    3,
00444         3,    1,    3,    3,    3,    3,    3,    3,    3,    3,
00445         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
00446         3,    3,    3,    3,    3,    1,    1,    1,    1
00447     } ;
00448 
00449 static yyconst flex_int16_t yy_base[304] =
00450     {   0,
00451         0,    0,   40,   43,   82,  121,  160,  199,   55,   56,
00452        60,   74,  247,  296,   90,  104,  432, 1023,  429, 1023,
00453       426, 1023,  397,   31, 1023, 1023, 1023, 1023,   43, 1023,
00454      1023,  410, 1023,    0,  401,  382,   36,  389,   34,  378,
00455        38,  380,   80,  368,  372,  385,  381,   66,  357,  369,
00456      1023, 1023, 1023,  138, 1023, 1023,  143, 1023,  336, 1023,
00457      1023, 1023,  375,  414, 1023, 1023, 1023,  453, 1023,  396,
00458      1023,  104,  177, 1023, 1023,  182, 1023, 1023, 1023,   78,
00459         0, 1023,  231, 1023, 1023,  262, 1023,  393,  390,  356,
00460      1023, 1023,    0, 1023,  348,  360,   92,  350,  354,  337,
00461 
00462       333,  333,  333,  334,  329,  333,  344,  326,  335,  320,
00463       327,  322,  299,  303,   93,  302,  301,  280, 1023, 1023,
00464       314, 1023,  328,  344,  358,  492, 1023, 1023, 1023,  531,
00465       570,  609,  648,  687, 1023, 1023, 1023,  726, 1023,  765,
00466       804,  843,  882,  329, 1023,  143, 1023,  144, 1023,  392,
00467      1023, 1023,  397, 1023,  431,  436,  470, 1023, 1023, 1023,
00468       475, 1023, 1023,  484, 1023,  514,  523,  553,  305,    0,
00469       288,  305,  299,  297,  280,  297,  292,  287,  289,    0,
00470       291,  276,  250,  257,  250,  252,  247,  258,  241,  238,
00471       251,  248,  232,  232,  236,  235,  228,  233,    0,  234,
00472 
00473       113,  218,    0,  217,  209,  220,    0,    0,  207,  200,
00474       196,    0,  203,  199,  208,  197,  189,  193,  206,  203,
00475       186,  203,    0,    0,  181,  187,  184,  192,  190,  181,
00476       187,  186,  186,    0,    0,  171,  171,  160,  164,  166,
00477         0,  169,  169,  152,  147,  143,  149,    0,  138,    0,
00478       139,  149,  138,    0,  140,    0,  135,  134,  109,    0,
00479       112,    0,  111,    0,  105,   80,    0,   82,   61,   76,
00480         0,    0,   46,   30,    0,    0,    0,  170,    0,    0,
00481         0,   50, 1023, 1023,  930,  935,  940,  945,  950,  955,
00482       960,  965,  970,  975,  980,  985,  989,  994,  999, 1004,
00483 
00484      1009, 1012, 1017
00485     } ;
00486 
00487 static yyconst flex_int16_t yy_def[304] =
00488     {   0,
00489       284,    1,  285,  285,  286,  286,  287,  287,  288,  288,
00490       289,  289,  290,  290,  291,  291,  284,  284,  284,  284,
00491       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00492       284,  284,  284,  292,  284,  284,  284,  284,  284,  284,
00493       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00494       284,  284,  284,  293,  284,  284,  293,  284,  294,  284,
00495       284,  284,  294,  295,  284,  284,  284,  295,  284,  296,
00496       284,  297,  298,  284,  284,  298,  284,  284,  284,  284,
00497       299,  284,  300,  284,  284,  300,  284,  284,  284,  284,
00498       284,  284,  301,  284,  284,  284,  284,  284,  284,  284,
00499 
00500       284,  284,  284,  284,  284,  284,  302,  284,  284,  284,
00501       284,  284,  284,  284,  284,  284,  284,  293,  284,  284,
00502       293,  284,  293,  293,  293,  294,  284,  284,  284,  294,
00503       294,  294,  294,  295,  284,  284,  284,  295,  284,  295,
00504       295,  295,  295,  296,  284,  297,  284,  297,  284,  298,
00505       284,  284,  298,  284,  298,  298,  298,  284,  284,  284,
00506       300,  284,  284,  300,  284,  300,  300,  300,  284,  301,
00507       284,  284,  284,  284,  284,  284,  284,  284,  284,  302,
00508       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00509       284,  284,  284,  284,  284,  284,  284,  284,  302,  284,
00510 
00511       284,  284,  302,  284,  284,  284,  302,  302,  284,  284,
00512       284,  302,  284,  284,  284,  284,  284,  284,  284,  284,
00513       284,  284,  302,  302,  284,  284,  284,  284,  284,  284,
00514       284,  284,  284,  302,  302,  284,  284,  284,  284,  284,
00515       302,  284,  284,  284,  284,  284,  284,  302,  284,  302,
00516       284,  284,  284,  302,  284,  302,  302,  284,  284,  302,
00517       284,  302,  284,  302,  284,  284,  302,  284,  284,  284,
00518       302,  302,  284,  284,  302,  302,  302,  284,  302,  302,
00519       303,  303,  284,    0,  284,  284,  284,  284,  284,  284,
00520       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00521 
00522       284,  284,  284
00523     } ;
00524 
00525 static yyconst flex_int16_t yy_nxt[1073] =
00526     {   0,
00527        18,   19,   20,   21,   22,   22,   23,   24,   25,   26,
00528        27,   22,   28,   29,   30,   31,   32,   22,   33,   22,
00529        22,   34,   22,   35,   36,   37,   38,   39,   40,   41,
00530        42,   43,   44,   22,   45,   46,   22,   22,   47,   48,
00531        49,   22,   22,   50,   22,   51,   52,   53,   22,   55,
00532        56,   91,   55,   56,   92,  283,   93,   71,   71,   97,
00533        55,   57,   58,   55,   57,   58,   72,   72,  100,   74,
00534        75,  280,  104,   98,  101,  105,   91,  278,  102,  278,
00535        74,   76,   75,   74,   75,   55,  279,   58,   55,  114,
00536        58,   60,   61,  115,   74,   76,   75,   62,  158,   84,
00537 
00538        85,  277,   60,   63,   61,   74,  147,   77,  107,  108,
00539        84,   86,   87,   84,   85,  148,  109,  149,  276,   74,
00540       275,   77,  192,  159,   84,   86,   87,   60,  274,   61,
00541        60,   61,  173,  174,  193,   84,   62,   85,  273,  272,
00542       225,   60,   63,   61,  226,  147,  147,  119,  120,   84,
00543       271,   85,  123,  124,  284,  148,  284,  284,  119,  121,
00544       122,  270,  269,  123,  121,  125,   60,  268,   61,   65,
00545        66,  278,   67,  278,  267,  281,  266,  265,  264,  263,
00546        65,   68,   69,  119,  262,  122,  151,  152,  123,  261,
00547       125,  155,  156,  260,  259,  258,  257,  151,  153,  152,
00548 
00549       256,  255,  155,  153,  156,   65,  254,   69,   65,   66,
00550       253,   67,  252,  251,  250,  249,  248,  247,  246,   65,
00551        68,   69,  151,  245,  154,  244,  243,  155,  242,  157,
00552       241,  240,  239,  238,  237,  236,  235,  234,  233,  232,
00553       162,  163,  231,  230,   65,  229,   69,   78,   78,   78,
00554        78,  162,  164,  165,   80,   78,   78,   78,  228,   78,
00555       227,   78,   78,   78,  224,   78,  223,  222,   81,  221,
00556       220,  166,  167,  219,  218,  217,  162,  216,  163,  215,
00557       214,  213,  166,  164,  168,  212,  211,  210,  209,  119,
00558       120,  208,   78,   78,   78,   82,   78,   78,   78,   78,
00559 
00560       119,  121,  122,   80,   78,   78,   78,  166,   78,  167,
00561        78,   78,   78,  207,   78,  206,  205,   81,  204,  203,
00562       202,  201,  200,  123,  124,  119,  199,  122,  198,  197,
00563       196,  145,  195,  194,  123,  121,  125,  119,  120,  191,
00564       190,   78,   78,   78,   82,  127,  128,  189,  119,  121,
00565       122,  129,  188,  119,  120,  187,  127,  130,  128,  123,
00566       186,  125,  185,  184,  119,  121,  122,  119,  120,  183,
00567       182,  181,  180,  119,  179,  122,  178,  177,  119,  121,
00568       122,  127,  176,  128,  131,  132,  175,  172,  171,  119,
00569       133,  122,  169,   89,   88,  131,  130,  132,  145,  117,
00570 
00571       116,  151,  152,  119,  113,  122,  155,  156,  112,  111,
00572       110,  106,  151,  153,  152,  103,   99,  155,  153,  156,
00573       131,   96,  132,  135,  136,   95,  137,   94,   90,   89,
00574        88,  284,  284,  284,  135,  138,  139,  151,  284,  154,
00575       151,  152,  155,  284,  157,  151,  152,  284,  284,  284,
00576       284,  151,  153,  152,  284,  284,  151,  153,  152,  135,
00577       284,  139,  140,  141,  284,  142,  284,  284,  284,  284,
00578       284,  284,  284,  140,  138,  143,  151,  284,  154,  151,
00579       152,  151,  284,  154,  162,  163,  284,  284,  284,  284,
00580       151,  153,  152,  166,  167,  162,  164,  165,  140,  284,
00581 
00582       143,  127,  128,  284,  166,  164,  168,  129,  284,  284,
00583       284,  284,  127,  130,  128,  151,  284,  154,  284,  284,
00584       162,  284,  163,  162,  163,  284,  284,  284,  284,  166,
00585       284,  167,  162,  163,  162,  164,  165,  127,  284,  128,
00586       131,  132,  284,  162,  164,  165,  133,  284,  284,  284,
00587       284,  131,  130,  132,  284,  284,  284,  284,  284,  162,
00588       284,  163,  162,  163,  284,  284,  284,  284,  162,  284,
00589       163,  284,  284,  162,  164,  165,  131,  284,  132,  127,
00590       128,  284,  284,  284,  284,  129,  284,  284,  284,  284,
00591       127,  130,  128,  284,  284,  284,  284,  284,  162,  284,
00592 
00593       163,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00594       284,  284,  284,  284,  284,  127,  284,  128,  127,  128,
00595       284,  284,  284,  284,  129,  284,  284,  284,  284,  127,
00596       130,  128,  284,  284,  284,  284,  284,  284,  284,  284,
00597       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00598       284,  284,  284,  284,  127,  284,  128,  127,  128,  284,
00599       284,  284,  284,  129,  284,  284,  284,  284,  127,  130,
00600       128,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00601       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00602       284,  284,  284,  127,  284,  128,  135,  136,  284,  137,
00603 
00604       284,  284,  284,  284,  284,  284,  284,  135,  138,  139,
00605       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00606       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00607       284,  284,  135,  284,  139,  140,  141,  284,  142,  284,
00608       284,  284,  284,  284,  284,  284,  140,  138,  143,  284,
00609       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00610       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00611       284,  140,  284,  143,  135,  136,  284,  137,  284,  284,
00612       284,  284,  284,  284,  284,  135,  138,  139,  284,  284,
00613       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00614 
00615       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00616       135,  284,  139,  135,  136,  284,  137,  284,  284,  284,
00617       284,  284,  284,  284,  135,  138,  139,  284,  284,  284,
00618       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00619       284,  284,  284,  284,  284,  284,  284,  284,  284,  135,
00620       284,  139,  135,  136,  284,  137,  284,  284,  284,  284,
00621       284,  284,  284,  135,  138,  139,  284,  284,  284,  284,
00622       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00623       284,  284,  284,  284,  284,  284,  284,  284,  135,  284,
00624       139,  135,  136,  284,  137,  284,  284,  284,  284,  284,
00625 
00626       284,  284,  135,  138,  139,  284,  284,  284,  284,  284,
00627       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00628       284,  284,  284,  284,  284,  284,  284,  135,  284,  139,
00629        54,   54,   54,   54,   54,   59,   59,   59,   59,   59,
00630        64,   64,   64,   64,   64,   70,   70,   70,   70,   70,
00631        73,   73,   73,   73,   73,   79,   79,   79,   79,   79,
00632        83,   83,   83,   83,   83,   91,  284,   91,   91,   91,
00633       118,  118,  118,  118,  118,  126,  126,  126,  126,  126,
00634       134,  134,  134,  134,  134,  144,  144,  144,  144,  146,
00635       146,  146,  146,  146,  150,  150,  150,  150,  150,  160,
00636 
00637       284,  160,  160,  160,  161,  161,  161,  161,  161,  170,
00638       284,  170,  170,  170,   91,   91,   91,  282,  282,  282,
00639       284,  282,   17,  284,  284,  284,  284,  284,  284,  284,
00640       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00641       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00642       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00643       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00644       284,  284
00645     } ;
00646 
00647 static yyconst flex_int16_t yy_chk[1073] =
00648     {   0,
00649         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00650         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00651         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00652         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00653         1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
00654         3,   24,    4,    4,   29,  282,   29,    9,   10,   37,
00655         3,    3,    3,    4,    4,    4,    9,   10,   39,   11,
00656        11,  274,   41,   37,   39,   41,   24,  270,   39,  270,
00657        11,   11,   11,   12,   12,    3,  273,    3,    4,   48,
00658         4,    5,    5,   48,   12,   12,   12,    5,   80,   15,
00659 
00660        15,  269,    5,    5,    5,   11,   72,   11,   43,   43,
00661        15,   15,   15,   16,   16,   72,   43,   72,  268,   12,
00662       266,   12,  115,   80,   16,   16,   16,    5,  265,    5,
00663         6,    6,   97,   97,  115,   15,    6,   15,  263,  261,
00664       201,    6,    6,    6,  201,  146,  148,   54,   54,   16,
00665       259,   16,   57,   57,  146,  148,  146,  148,   54,   54,
00666        54,  258,  257,   57,   57,   57,    6,  255,    6,    7,
00667         7,  278,    7,  278,  253,  278,  252,  251,  249,  247,
00668         7,    7,    7,   54,  246,   54,   73,   73,   57,  245,
00669        57,   76,   76,  244,  243,  242,  240,   73,   73,   73,
00670 
00671       239,  238,   76,   76,   76,    7,  237,    7,    8,    8,
00672       236,    8,  233,  232,  231,  230,  229,  228,  227,    8,
00673         8,    8,   73,  226,   73,  225,  222,   76,  221,   76,
00674       220,  219,  218,  217,  216,  215,  214,  213,  211,  210,
00675        83,   83,  209,  206,    8,  205,    8,   13,   13,   13,
00676        13,   83,   83,   83,   13,   13,   13,   13,  204,   13,
00677       202,   13,   13,   13,  200,   13,  198,  197,   13,  196,
00678       195,   86,   86,  194,  193,  192,   83,  191,   83,  190,
00679       189,  188,   86,   86,   86,  187,  186,  185,  184,  118,
00680       118,  183,   13,   13,   13,   13,   14,   14,   14,   14,
00681 
00682       118,  118,  118,   14,   14,   14,   14,   86,   14,   86,
00683        14,   14,   14,  182,   14,  181,  179,   14,  178,  177,
00684       176,  175,  174,  121,  121,  118,  173,  118,  172,  171,
00685       169,  144,  117,  116,  121,  121,  121,  123,  123,  114,
00686       113,   14,   14,   14,   14,   59,   59,  112,  123,  123,
00687       123,   59,  111,  124,  124,  110,   59,   59,   59,  121,
00688       109,  121,  108,  107,  124,  124,  124,  125,  125,  106,
00689       105,  104,  103,  123,  102,  123,  101,  100,  125,  125,
00690       125,   59,   99,   59,   63,   63,   98,   96,   95,  124,
00691        63,  124,   90,   89,   88,   63,   63,   63,   70,   50,
00692 
00693        49,  150,  150,  125,   47,  125,  153,  153,   46,   45,
00694        44,   42,  150,  150,  150,   40,   38,  153,  153,  153,
00695        63,   36,   63,   64,   64,   35,   64,   32,   23,   21,
00696        19,   17,    0,    0,   64,   64,   64,  150,    0,  150,
00697       155,  155,  153,    0,  153,  156,  156,    0,    0,    0,
00698         0,  155,  155,  155,    0,    0,  156,  156,  156,   64,
00699         0,   64,   68,   68,    0,   68,    0,    0,    0,    0,
00700         0,    0,    0,   68,   68,   68,  155,    0,  155,  157,
00701       157,  156,    0,  156,  161,  161,    0,    0,    0,    0,
00702       157,  157,  157,  164,  164,  161,  161,  161,   68,    0,
00703 
00704        68,  126,  126,    0,  164,  164,  164,  126,    0,    0,
00705         0,    0,  126,  126,  126,  157,    0,  157,    0,    0,
00706       161,    0,  161,  166,  166,    0,    0,    0,    0,  164,
00707         0,  164,  167,  167,  166,  166,  166,  126,    0,  126,
00708       130,  130,    0,  167,  167,  167,  130,    0,    0,    0,
00709         0,  130,  130,  130,    0,    0,    0,    0,    0,  166,
00710         0,  166,  168,  168,    0,    0,    0,    0,  167,    0,
00711       167,    0,    0,  168,  168,  168,  130,    0,  130,  131,
00712       131,    0,    0,    0,    0,  131,    0,    0,    0,    0,
00713       131,  131,  131,    0,    0,    0,    0,    0,  168,    0,
00714 
00715       168,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00716         0,    0,    0,    0,    0,  131,    0,  131,  132,  132,
00717         0,    0,    0,    0,  132,    0,    0,    0,    0,  132,
00718       132,  132,    0,    0,    0,    0,    0,    0,    0,    0,
00719         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00720         0,    0,    0,    0,  132,    0,  132,  133,  133,    0,
00721         0,    0,    0,  133,    0,    0,    0,    0,  133,  133,
00722       133,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00723         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00724         0,    0,    0,  133,    0,  133,  134,  134,    0,  134,
00725 
00726         0,    0,    0,    0,    0,    0,    0,  134,  134,  134,
00727         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00728         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00729         0,    0,  134,    0,  134,  138,  138,    0,  138,    0,
00730         0,    0,    0,    0,    0,    0,  138,  138,  138,    0,
00731         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00732         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00733         0,  138,    0,  138,  140,  140,    0,  140,    0,    0,
00734         0,    0,    0,    0,    0,  140,  140,  140,    0,    0,
00735         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00736 
00737         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00738       140,    0,  140,  141,  141,    0,  141,    0,    0,    0,
00739         0,    0,    0,    0,  141,  141,  141,    0,    0,    0,
00740         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00741         0,    0,    0,    0,    0,    0,    0,    0,    0,  141,
00742         0,  141,  142,  142,    0,  142,    0,    0,    0,    0,
00743         0,    0,    0,  142,  142,  142,    0,    0,    0,    0,
00744         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00745         0,    0,    0,    0,    0,    0,    0,    0,  142,    0,
00746       142,  143,  143,    0,  143,    0,    0,    0,    0,    0,
00747 
00748         0,    0,  143,  143,  143,    0,    0,    0,    0,    0,
00749         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00750         0,    0,    0,    0,    0,    0,    0,  143,    0,  143,
00751       285,  285,  285,  285,  285,  286,  286,  286,  286,  286,
00752       287,  287,  287,  287,  287,  288,  288,  288,  288,  288,
00753       289,  289,  289,  289,  289,  290,  290,  290,  290,  290,
00754       291,  291,  291,  291,  291,  292,    0,  292,  292,  292,
00755       293,  293,  293,  293,  293,  294,  294,  294,  294,  294,
00756       295,  295,  295,  295,  295,  296,  296,  296,  296,  297,
00757       297,  297,  297,  297,  298,  298,  298,  298,  298,  299,
00758 
00759         0,  299,  299,  299,  300,  300,  300,  300,  300,  301,
00760         0,  301,  301,  301,  302,  302,  302,  303,  303,  303,
00761         0,  303,  284,  284,  284,  284,  284,  284,  284,  284,
00762       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00763       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00764       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00765       284,  284,  284,  284,  284,  284,  284,  284,  284,  284,
00766       284,  284
00767     } ;
00768 
00769 /* The intent behind this definition is that it'll catch
00770  * any uses of REJECT which flex missed.
00771  */
00772 #define REJECT reject_used_but_not_detected
00773 #define yymore() (yyg->yy_more_flag = 1)
00774 #define YY_MORE_ADJ yyg->yy_more_len
00775 #define YY_RESTORE_YY_MORE_OFFSET
00776 #line 1 "ael.flex"
00777 /*
00778  * Asterisk -- An open source telephony toolkit.
00779  *
00780  * Copyright (C) 2006, Digium, Inc.
00781  *
00782  * Steve Murphy <murf@parsetree.com>
00783  *
00784  * See http://www.asterisk.org for more information about
00785  * the Asterisk project. Please do not directly contact
00786  * any of the maintainers of this project for assistance;
00787  * the project provides a web site, mailing lists and IRC
00788  * channels for your use.
00789  *
00790  * This program is free software, distributed under the terms of
00791  * the GNU General Public License Version 2. See the LICENSE file
00792  * at the top of the source tree.
00793  */
00794 /*! \file
00795  *
00796  * \brief Flex scanner description of tokens used in AEL2 .
00797  *
00798  */
00799 /*
00800  * Start with flex options:
00801  *
00802  * %x describes the contexts we have: paren, semic and argg, plus INITIAL
00803  */
00804 
00805 /* prefix used for various globally-visible functions and variables.
00806  * This renames also ael_yywrap, but since we do not use it, we just
00807  * add option noyywrap to remove it.
00808  */
00809 /* I specify this option to suppress flex generating code with ECHO
00810   in it. This generates compiler warnings in some systems; We've
00811   seen the fwrite generate Unused variable warnings with 4.1.2 gcc.
00812   Some systems have tweaked flex ECHO macro to keep the compiler
00813   happy.  To keep the warning message from getting output, I added
00814   a default rule at the end of the patterns section */
00815 /* ael_yyfree normally just frees its arg. It can be null sometimes,
00816    which some systems will complain about, so, we'll define our own version */
00817 /* batch gives a bit more performance if we are using it in
00818  * a non-interactive mode. We probably don't care much.
00819  */
00820 /* outfile is the filename to be used instead of lex.yy.c */
00821 /*
00822  * These are not supported in flex 2.5.4, but we need them
00823  * at the moment:
00824  * reentrant produces a thread-safe parser. Not 100% sure that
00825  * we require it, though.
00826  * bison-bridge passes an additional yylval argument to ael_yylex().
00827  * bison-locations is probably not needed.
00828  */
00829 #line 71 "ael.flex"
00830 #include "asterisk.h"
00831 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 293195 $")
00832 
00833 #include <sys/types.h>
00834 #include <sys/stat.h>
00835 #include <unistd.h>
00836 #include <glob.h>
00837 
00838 #if !defined(GLOB_ABORTED)
00839 #define GLOB_ABORTED GLOB_ABEND
00840 #endif
00841 
00842 #include "asterisk/logger.h"
00843 #include "asterisk/utils.h"
00844 #include "asterisk/lock.h"
00845 #include "asterisk/hashtab.h"
00846 #include "ael/ael.tab.h"
00847 #include "asterisk/ael_structs.h"
00848 
00849 /*
00850  * A stack to keep track of matching brackets ( [ { } ] )
00851  */
00852 static char pbcstack[400]; /* XXX missing size checks */
00853 static int pbcpos = 0;
00854 static void pbcpush(char x);
00855 static int pbcpop(char x);
00856 static int parencount = 0;
00857 
00858 /*
00859  * A similar stack to keep track of matching brackets ( [ { } ] ) in word tokens surrounded by ${ ... }
00860  */
00861 static char pbcstack2[400];   /* XXX missing size checks */
00862 static int pbcpos2 = 0;
00863 static void pbcpush2(char x);
00864 static int pbcpop2(char x);
00865 static int parencount2 = 0;
00866 
00867 /*
00868  * A similar stack to keep track of matching brackets ( [ { } ] ) in word tokens surrounded by $[ ... ]
00869  */
00870 static char pbcstack3[400];   /* XXX missing size checks */
00871 static int pbcpos3 = 0;
00872 static void pbcpush3(char x);
00873 static int pbcpop3(char x);
00874 static int parencount3 = 0;
00875 
00876 
00877 /*
00878  * current line, column and filename, updated as we read the input.
00879  */
00880 static int my_lineno = 1;  /* current line in the source */
00881 static int my_col = 1;     /* current column in the source */
00882 char *my_file = 0;      /* used also in the bison code */
00883 char *prev_word;     /* XXX document it */
00884 
00885 #define MAX_INCLUDE_DEPTH 50
00886 
00887 /*
00888  * flex is not too smart, and generates global functions
00889  * without prototypes so the compiler may complain.
00890  * To avoid that, we declare the prototypes here,
00891  * even though these functions are not used.
00892  */
00893 int ael_yyget_column  (yyscan_t yyscanner);
00894 void ael_yyset_column (int  column_no , yyscan_t yyscanner);
00895 
00896 int ael_yyparse (struct parse_io *);
00897 
00898 /*
00899  * A stack to process include files.
00900  * As we switch into the new file we need to store the previous
00901  * state to restore it later.
00902  */
00903 struct stackelement {
00904    char *fname;
00905    int lineno;
00906    int colno;
00907    glob_t globbuf;        /* the current globbuf */
00908    int globbuf_pos;   /* where we are in the current globbuf */
00909    YY_BUFFER_STATE bufstate;
00910 };
00911 
00912 static struct stackelement  include_stack[MAX_INCLUDE_DEPTH];
00913 static int include_stack_index = 0;
00914 static void setup_filestack(char *fnamebuf, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t xscan, int create);
00915 
00916 /*
00917  * if we use the @n feature of bison, we must supply the start/end
00918  * location of tokens in the structure pointed by yylloc.
00919  * Simple tokens are just assumed to be on the same line, so
00920  * the line number is constant, and the column is incremented
00921  * by the length of the token.
00922  */
00923 #ifdef FLEX_BETA  /* set for 2.5.33 */
00924 
00925 /* compute the total number of lines and columns in the text
00926  * passed as argument.
00927  */
00928 static void pbcwhere(const char *text, int *line, int *col )
00929 {
00930    int loc_line = *line;
00931    int loc_col = *col;
00932    char c;
00933    while ( (c = *text++) ) {
00934       if ( c == '\t' ) {
00935          loc_col += 8 - (loc_col % 8);
00936       } else if ( c == '\n' ) {
00937          loc_line++;
00938          loc_col = 1;
00939       } else
00940          loc_col++;
00941    }
00942    *line = loc_line;
00943    *col = loc_col;
00944 }
00945 
00946 #define  STORE_POS do {                   \
00947       yylloc->first_line = yylloc->last_line = my_lineno;   \
00948       yylloc->first_column=my_col;           \
00949       yylloc->last_column=my_col+yyleng-1;         \
00950       my_col+=yyleng;                  \
00951    } while (0)
00952 
00953 #define  STORE_LOC do {             \
00954       yylloc->first_line = my_lineno;     \
00955       yylloc->first_column=my_col;     \
00956       pbcwhere(yytext, &my_lineno, &my_col); \
00957       yylloc->last_line = my_lineno;      \
00958       yylloc->last_column = my_col - 1;   \
00959    } while (0)
00960 #else
00961 #define  STORE_POS
00962 #define  STORE_LOC
00963 #endif
00964 #line 963 "ael_lex.c"
00965 
00966 #define INITIAL 0
00967 #define paren 1
00968 #define semic 2
00969 #define argg 3
00970 #define comment 4
00971 #define curlystate 5
00972 #define wordstate 6
00973 #define brackstate 7
00974 
00975 #ifndef YY_NO_UNISTD_H
00976 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00977  * down here because we want the user's section 1 to have been scanned first.
00978  * The user has a chance to override it with an option.
00979  */
00980 #include <unistd.h>
00981 #endif
00982 
00983 #ifndef YY_EXTRA_TYPE
00984 #define YY_EXTRA_TYPE void *
00985 #endif
00986 
00987 /* Holds the entire state of the reentrant scanner. */
00988 struct yyguts_t
00989     {
00990 
00991     /* User-defined. Not touched by flex. */
00992     YY_EXTRA_TYPE yyextra_r;
00993 
00994     /* The rest are the same as the globals declared in the non-reentrant scanner. */
00995     FILE *yyin_r, *yyout_r;
00996     size_t yy_buffer_stack_top; /**< index of top of stack. */
00997     size_t yy_buffer_stack_max; /**< capacity of stack. */
00998     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
00999     char yy_hold_char;
01000     int yy_n_chars;
01001     int yyleng_r;
01002     char *yy_c_buf_p;
01003     int yy_init;
01004     int yy_start;
01005     int yy_did_buffer_switch_on_eof;
01006     int yy_start_stack_ptr;
01007     int yy_start_stack_depth;
01008     int *yy_start_stack;
01009     yy_state_type yy_last_accepting_state;
01010     char* yy_last_accepting_cpos;
01011 
01012     int yylineno_r;
01013     int yy_flex_debug_r;
01014 
01015     char *yytext_r;
01016     int yy_more_flag;
01017     int yy_more_len;
01018 
01019     YYSTYPE * yylval_r;
01020 
01021     YYLTYPE * yylloc_r;
01022 
01023     }; /* end struct yyguts_t */
01024 
01025 static int yy_init_globals (yyscan_t yyscanner );
01026 
01027     /* This must go here because YYSTYPE and YYLTYPE are included
01028      * from bison output in section 1.*/
01029     #    define yylval yyg->yylval_r
01030     
01031     #    define yylloc yyg->yylloc_r
01032     
01033 int ael_yylex_init (yyscan_t* scanner);
01034 
01035 int ael_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
01036 
01037 /* Accessor methods to globals.
01038    These are made visible to non-reentrant scanners for convenience. */
01039 
01040 int ael_yylex_destroy (yyscan_t yyscanner );
01041 
01042 int ael_yyget_debug (yyscan_t yyscanner );
01043 
01044 void ael_yyset_debug (int debug_flag ,yyscan_t yyscanner );
01045 
01046 YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner );
01047 
01048 void ael_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
01049 
01050 FILE *ael_yyget_in (yyscan_t yyscanner );
01051 
01052 void ael_yyset_in  (FILE * in_str ,yyscan_t yyscanner );
01053 
01054 FILE *ael_yyget_out (yyscan_t yyscanner );
01055 
01056 void ael_yyset_out  (FILE * out_str ,yyscan_t yyscanner );
01057 
01058 int ael_yyget_leng (yyscan_t yyscanner );
01059 
01060 char *ael_yyget_text (yyscan_t yyscanner );
01061 
01062 int ael_yyget_lineno (yyscan_t yyscanner );
01063 
01064 void ael_yyset_lineno (int line_number ,yyscan_t yyscanner );
01065 
01066 YYSTYPE * ael_yyget_lval (yyscan_t yyscanner );
01067 
01068 void ael_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
01069 
01070        YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner );
01071     
01072         void ael_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
01073     
01074 /* Macros after this point can all be overridden by user definitions in
01075  * section 1.
01076  */
01077 
01078 #ifndef YY_SKIP_YYWRAP
01079 #ifdef __cplusplus
01080 extern "C" int ael_yywrap (yyscan_t yyscanner );
01081 #else
01082 extern int ael_yywrap (yyscan_t yyscanner );
01083 #endif
01084 #endif
01085 
01086     static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
01087     
01088 #ifndef yytext_ptr
01089 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
01090 #endif
01091 
01092 #ifdef YY_NEED_STRLEN
01093 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
01094 #endif
01095 
01096 #ifndef YY_NO_INPUT
01097 
01098 #ifdef __cplusplus
01099 static int yyinput (yyscan_t yyscanner );
01100 #else
01101 static int input (yyscan_t yyscanner );
01102 #endif
01103 
01104 #endif
01105 
01106 /* Amount of stuff to slurp up with each read. */
01107 #ifndef YY_READ_BUF_SIZE
01108 #ifdef __ia64__
01109 /* On IA-64, the buffer size is 16k, not 8k */
01110 #define YY_READ_BUF_SIZE 16384
01111 #else
01112 #define YY_READ_BUF_SIZE 8192
01113 #endif /* __ia64__ */
01114 #endif
01115 
01116 /* Copy whatever the last rule matched to the standard output. */
01117 #ifndef ECHO
01118 /* This used to be an fputs(), but since the string might contain NUL's,
01119  * we now use fwrite().
01120  */
01121 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
01122 #endif
01123 
01124 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
01125  * is returned in "result".
01126  */
01127 #ifndef YY_INPUT
01128 #define YY_INPUT(buf,result,max_size) \
01129    if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
01130       { \
01131       int c = '*'; \
01132       size_t n; \
01133       for ( n = 0; n < max_size && \
01134               (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
01135          buf[n] = (char) c; \
01136       if ( c == '\n' ) \
01137          buf[n++] = (char) c; \
01138       if ( c == EOF && ferror( yyin ) ) \
01139          YY_FATAL_ERROR( "input in flex scanner failed" ); \
01140       result = n; \
01141       } \
01142    else \
01143       { \
01144       errno=0; \
01145       while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
01146          { \
01147          if( errno != EINTR) \
01148             { \
01149             YY_FATAL_ERROR( "input in flex scanner failed" ); \
01150             break; \
01151             } \
01152          errno=0; \
01153          clearerr(yyin); \
01154          } \
01155       }\
01156 \
01157 
01158 #endif
01159 
01160 /* No semi-colon after return; correct usage is to write "yyterminate();" -
01161  * we don't want an extra ';' after the "return" because that will cause
01162  * some compilers to complain about unreachable statements.
01163  */
01164 #ifndef yyterminate
01165 #define yyterminate() return YY_NULL
01166 #endif
01167 
01168 /* Number of entries by which start-condition stack grows. */
01169 #ifndef YY_START_STACK_INCR
01170 #define YY_START_STACK_INCR 25
01171 #endif
01172 
01173 /* Report a fatal error. */
01174 #ifndef YY_FATAL_ERROR
01175 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
01176 #endif
01177 
01178 /* end tables serialization structures and prototypes */
01179 
01180 /* Default declaration of generated scanner - a define so the user can
01181  * easily add parameters.
01182  */
01183 #ifndef YY_DECL
01184 #define YY_DECL_IS_OURS 1
01185 
01186 extern int ael_yylex \
01187                (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
01188 
01189 #define YY_DECL int ael_yylex \
01190                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
01191 #endif /* !YY_DECL */
01192 
01193 /* Code executed at the beginning of each rule, after yytext and yyleng
01194  * have been set up.
01195  */
01196 #ifndef YY_USER_ACTION
01197 #define YY_USER_ACTION
01198 #endif
01199 
01200 /* Code executed at the end of each rule. */
01201 #ifndef YY_BREAK
01202 #define YY_BREAK break;
01203 #endif
01204 
01205 #define YY_RULE_SETUP \
01206    YY_USER_ACTION
01207 
01208 /** The main scanner function which does all the work.
01209  */
01210 YY_DECL
01211 {
01212    register yy_state_type yy_current_state;
01213    register char *yy_cp, *yy_bp;
01214    register int yy_act;
01215     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01216 
01217 #line 217 "ael.flex"
01218 
01219 
01220 #line 1219 "ael_lex.c"
01221 
01222     yylval = yylval_param;
01223 
01224     yylloc = yylloc_param;
01225 
01226    if ( !yyg->yy_init )
01227       {
01228       yyg->yy_init = 1;
01229 
01230 #ifdef YY_USER_INIT
01231       YY_USER_INIT;
01232 #endif
01233 
01234       if ( ! yyg->yy_start )
01235          yyg->yy_start = 1;   /* first start state */
01236 
01237       if ( ! yyin )
01238          yyin = stdin;
01239 
01240       if ( ! yyout )
01241          yyout = stdout;
01242 
01243       if ( ! YY_CURRENT_BUFFER ) {
01244          ael_yyensure_buffer_stack (yyscanner);
01245          YY_CURRENT_BUFFER_LVALUE =
01246             ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
01247       }
01248 
01249       ael_yy_load_buffer_state(yyscanner );
01250       }
01251 
01252    while ( 1 )    /* loops until end-of-file is reached */
01253       {
01254       yyg->yy_more_len = 0;
01255       if ( yyg->yy_more_flag )
01256          {
01257          yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
01258          yyg->yy_more_flag = 0;
01259          }
01260       yy_cp = yyg->yy_c_buf_p;
01261 
01262       /* Support of yytext. */
01263       *yy_cp = yyg->yy_hold_char;
01264 
01265       /* yy_bp points to the position in yy_ch_buf of the start of
01266        * the current run.
01267        */
01268       yy_bp = yy_cp;
01269 
01270       yy_current_state = yyg->yy_start;
01271 yy_match:
01272       do
01273          {
01274          register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
01275          if ( yy_accept[yy_current_state] )
01276             {
01277             yyg->yy_last_accepting_state = yy_current_state;
01278             yyg->yy_last_accepting_cpos = yy_cp;
01279             }
01280          while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01281             {
01282             yy_current_state = (int) yy_def[yy_current_state];
01283             if ( yy_current_state >= 285 )
01284                yy_c = yy_meta[(unsigned int) yy_c];
01285             }
01286          yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01287          ++yy_cp;
01288          }
01289       while ( yy_current_state != 284 );
01290       yy_cp = yyg->yy_last_accepting_cpos;
01291       yy_current_state = yyg->yy_last_accepting_state;
01292 
01293 yy_find_action:
01294       yy_act = yy_accept[yy_current_state];
01295 
01296       YY_DO_BEFORE_ACTION;
01297 
01298 do_action:  /* This label is used only to access EOF actions. */
01299 
01300       switch ( yy_act )
01301    { /* beginning of action switch */
01302          case 0: /* must back up */
01303          /* undo the effects of YY_DO_BEFORE_ACTION */
01304          *yy_cp = yyg->yy_hold_char;
01305          yy_cp = yyg->yy_last_accepting_cpos;
01306          yy_current_state = yyg->yy_last_accepting_state;
01307          goto yy_find_action;
01308 
01309 case 1:
01310 YY_RULE_SETUP
01311 #line 219 "ael.flex"
01312 { STORE_POS; return LC;}
01313    YY_BREAK
01314 case 2:
01315 YY_RULE_SETUP
01316 #line 220 "ael.flex"
01317 { STORE_POS; return RC;}
01318    YY_BREAK
01319 case 3:
01320 YY_RULE_SETUP
01321 #line 221 "ael.flex"
01322 { STORE_POS; return LP;}
01323    YY_BREAK
01324 case 4:
01325 YY_RULE_SETUP
01326 #line 222 "ael.flex"
01327 { STORE_POS; return RP;}
01328    YY_BREAK
01329 case 5:
01330 YY_RULE_SETUP
01331 #line 223 "ael.flex"
01332 { STORE_POS; return SEMI;}
01333    YY_BREAK
01334 case 6:
01335 YY_RULE_SETUP
01336 #line 224 "ael.flex"
01337 { STORE_POS; return EQ;}
01338    YY_BREAK
01339 case 7:
01340 YY_RULE_SETUP
01341 #line 225 "ael.flex"
01342 { STORE_POS; return COMMA;}
01343    YY_BREAK
01344 case 8:
01345 YY_RULE_SETUP
01346 #line 226 "ael.flex"
01347 { STORE_POS; return COLON;}
01348    YY_BREAK
01349 case 9:
01350 YY_RULE_SETUP
01351 #line 227 "ael.flex"
01352 { STORE_POS; return AMPER;}
01353    YY_BREAK
01354 case 10:
01355 YY_RULE_SETUP
01356 #line 228 "ael.flex"
01357 { STORE_POS; return BAR;}
01358    YY_BREAK
01359 case 11:
01360 YY_RULE_SETUP
01361 #line 229 "ael.flex"
01362 { STORE_POS; return EXTENMARK;}
01363    YY_BREAK
01364 case 12:
01365 YY_RULE_SETUP
01366 #line 230 "ael.flex"
01367 { STORE_POS; return AT;}
01368    YY_BREAK
01369 case 13:
01370 YY_RULE_SETUP
01371 #line 231 "ael.flex"
01372 {/*comment*/}
01373    YY_BREAK
01374 case 14:
01375 YY_RULE_SETUP
01376 #line 232 "ael.flex"
01377 { STORE_POS; return KW_CONTEXT;}
01378    YY_BREAK
01379 case 15:
01380 YY_RULE_SETUP
01381 #line 233 "ael.flex"
01382 { STORE_POS; return KW_ABSTRACT;}
01383    YY_BREAK
01384 case 16:
01385 YY_RULE_SETUP
01386 #line 234 "ael.flex"
01387 { STORE_POS; return KW_EXTEND;}
01388    YY_BREAK
01389 case 17:
01390 YY_RULE_SETUP
01391 #line 235 "ael.flex"
01392 { STORE_POS; return KW_MACRO;};
01393    YY_BREAK
01394 case 18:
01395 YY_RULE_SETUP
01396 #line 236 "ael.flex"
01397 { STORE_POS; return KW_GLOBALS;}
01398    YY_BREAK
01399 case 19:
01400 YY_RULE_SETUP
01401 #line 237 "ael.flex"
01402 { STORE_POS; return KW_LOCAL;}
01403    YY_BREAK
01404 case 20:
01405 YY_RULE_SETUP
01406 #line 238 "ael.flex"
01407 { STORE_POS; return KW_IGNOREPAT;}
01408    YY_BREAK
01409 case 21:
01410 YY_RULE_SETUP
01411 #line 239 "ael.flex"
01412 { STORE_POS; return KW_SWITCH;}
01413    YY_BREAK
01414 case 22:
01415 YY_RULE_SETUP
01416 #line 240 "ael.flex"
01417 { STORE_POS; return KW_IF;}
01418    YY_BREAK
01419 case 23:
01420 YY_RULE_SETUP
01421 #line 241 "ael.flex"
01422 { STORE_POS; return KW_IFTIME;}
01423    YY_BREAK
01424 case 24:
01425 YY_RULE_SETUP
01426 #line 242 "ael.flex"
01427 { STORE_POS; return KW_RANDOM;}
01428    YY_BREAK
01429 case 25:
01430 YY_RULE_SETUP
01431 #line 243 "ael.flex"
01432 { STORE_POS; return KW_REGEXTEN;}
01433    YY_BREAK
01434 case 26:
01435 YY_RULE_SETUP
01436 #line 244 "ael.flex"
01437 { STORE_POS; return KW_HINT;}
01438    YY_BREAK
01439 case 27:
01440 YY_RULE_SETUP
01441 #line 245 "ael.flex"
01442 { STORE_POS; return KW_ELSE;}
01443    YY_BREAK
01444 case 28:
01445 YY_RULE_SETUP
01446 #line 246 "ael.flex"
01447 { STORE_POS; return KW_GOTO;}
01448    YY_BREAK
01449 case 29:
01450 YY_RULE_SETUP
01451 #line 247 "ael.flex"
01452 { STORE_POS; return KW_JUMP;}
01453    YY_BREAK
01454 case 30:
01455 YY_RULE_SETUP
01456 #line 248 "ael.flex"
01457 { STORE_POS; return KW_RETURN;}
01458    YY_BREAK
01459 case 31:
01460 YY_RULE_SETUP
01461 #line 249 "ael.flex"
01462 { STORE_POS; return KW_BREAK;}
01463    YY_BREAK
01464 case 32:
01465 YY_RULE_SETUP
01466 #line 250 "ael.flex"
01467 { STORE_POS; return KW_CONTINUE;}
01468    YY_BREAK
01469 case 33:
01470 YY_RULE_SETUP
01471 #line 251 "ael.flex"
01472 { STORE_POS; return KW_FOR;}
01473    YY_BREAK
01474 case 34:
01475 YY_RULE_SETUP
01476 #line 252 "ael.flex"
01477 { STORE_POS; return KW_WHILE;}
01478    YY_BREAK
01479 case 35:
01480 YY_RULE_SETUP
01481 #line 253 "ael.flex"
01482 { STORE_POS; return KW_CASE;}
01483    YY_BREAK
01484 case 36:
01485 YY_RULE_SETUP
01486 #line 254 "ael.flex"
01487 { STORE_POS; return KW_DEFAULT;}
01488    YY_BREAK
01489 case 37:
01490 YY_RULE_SETUP
01491 #line 255 "ael.flex"
01492 { STORE_POS; return KW_PATTERN;}
01493    YY_BREAK
01494 case 38:
01495 YY_RULE_SETUP
01496 #line 256 "ael.flex"
01497 { STORE_POS; return KW_CATCH;}
01498    YY_BREAK
01499 case 39:
01500 YY_RULE_SETUP
01501 #line 257 "ael.flex"
01502 { STORE_POS; return KW_SWITCHES;}
01503    YY_BREAK
01504 case 40:
01505 YY_RULE_SETUP
01506 #line 258 "ael.flex"
01507 { STORE_POS; return KW_ESWITCHES;}
01508    YY_BREAK
01509 case 41:
01510 YY_RULE_SETUP
01511 #line 259 "ael.flex"
01512 { STORE_POS; return KW_INCLUDES;}
01513    YY_BREAK
01514 case 42:
01515 YY_RULE_SETUP
01516 #line 260 "ael.flex"
01517 { BEGIN(comment); my_col += 2; }
01518    YY_BREAK
01519 case 43:
01520 YY_RULE_SETUP
01521 #line 262 "ael.flex"
01522 { my_col += yyleng; }
01523    YY_BREAK
01524 case 44:
01525 /* rule 44 can match eol */
01526 YY_RULE_SETUP
01527 #line 263 "ael.flex"
01528 { ++my_lineno; my_col=1;}
01529    YY_BREAK
01530 case 45:
01531 YY_RULE_SETUP
01532 #line 264 "ael.flex"
01533 { my_col += yyleng; }
01534    YY_BREAK
01535 case 46:
01536 /* rule 46 can match eol */
01537 YY_RULE_SETUP
01538 #line 265 "ael.flex"
01539 { ++my_lineno; my_col=1;}
01540    YY_BREAK
01541 case 47:
01542 YY_RULE_SETUP
01543 #line 266 "ael.flex"
01544 { my_col += 2; BEGIN(INITIAL); } /* the nice thing about comments is that you know exactly what ends them */
01545    YY_BREAK
01546 case 48:
01547 /* rule 48 can match eol */
01548 YY_RULE_SETUP
01549 #line 268 "ael.flex"
01550 { my_lineno++; my_col = 1; }
01551    YY_BREAK
01552 case 49:
01553 YY_RULE_SETUP
01554 #line 269 "ael.flex"
01555 { my_col += yyleng; }
01556    YY_BREAK
01557 case 50:
01558 YY_RULE_SETUP
01559 #line 270 "ael.flex"
01560 { my_col += (yyleng*8)-(my_col%8); }
01561    YY_BREAK
01562 case 51:
01563 YY_RULE_SETUP
01564 #line 272 "ael.flex"
01565 { 
01566       /* boy did I open a can of worms when I changed the lexical token "word". 
01567        all the above keywords can be used as a beginning to a "word".-
01568        before, a "word" would match a longer sequence than the above  
01569         keywords, and all would be well. But now "word" is a single char      
01570         and feeds into a statemachine sort of sequence from there on. So...
01571        I added the {KEYWORD}? to the beginning of the word match sequence */
01572 
01573       if (!strcmp(yytext,"${")) {
01574             parencount2 = 0;
01575          pbcpos2 = 0;
01576          pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */
01577          BEGIN(curlystate);
01578          yymore();
01579       } else if (!strcmp(yytext,"$[")) {
01580             parencount3 = 0;
01581          pbcpos3 = 0;
01582          pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */
01583          BEGIN(brackstate);
01584          yymore();
01585       } else {
01586           BEGIN(wordstate);
01587          yymore();
01588       }
01589    }
01590    YY_BREAK
01591 case 52:
01592 YY_RULE_SETUP
01593 #line 298 "ael.flex"
01594 { yymore(); /* Keep going */ }
01595    YY_BREAK
01596 case 53:
01597 YY_RULE_SETUP
01598 #line 299 "ael.flex"
01599 { yymore(); /* Keep going */ }
01600    YY_BREAK
01601 case 54:
01602 YY_RULE_SETUP
01603 #line 300 "ael.flex"
01604 { yymore(); /* Keep Going */ }
01605    YY_BREAK
01606 case 55:
01607 YY_RULE_SETUP
01608 #line 301 "ael.flex"
01609 { /* the beginning of a ${} construct. prepare and pop into curlystate */
01610          parencount2 = 0;
01611       pbcpos2 = 0;
01612       pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */
01613       BEGIN(curlystate);
01614       yymore();
01615    }
01616    YY_BREAK
01617 case 56:
01618 YY_RULE_SETUP
01619 #line 308 "ael.flex"
01620 { /* the beginning of a $[] construct. prepare and pop into brackstate */
01621          parencount3 = 0;
01622       pbcpos3 = 0;
01623       pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */
01624       BEGIN(brackstate);
01625       yymore();
01626    }
01627    YY_BREAK
01628 case 57:
01629 /* rule 57 can match eol */
01630 YY_RULE_SETUP
01631 #line 315 "ael.flex"
01632 {
01633       /* a non-word constituent char, like a space, tab, curly, paren, etc */
01634       char c = yytext[yyleng-1];
01635       STORE_POS;
01636       yylval->str = malloc(yyleng);
01637       strncpy(yylval->str, yytext, yyleng);
01638       yylval->str[yyleng-1] = 0;
01639       unput(c);  /* put this ending char back in the stream */
01640       BEGIN(0);
01641       return word;
01642    }
01643    YY_BREAK
01644 case 58:
01645 /* rule 58 can match eol */
01646 YY_RULE_SETUP
01647 #line 328 "ael.flex"
01648 {
01649       if ( pbcpop2('}') ) {   /* error */
01650          STORE_LOC;
01651          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
01652          BEGIN(0);
01653          yylval->str = malloc(yyleng+1);
01654          strncpy(yylval->str, yytext, yyleng);
01655          yylval->str[yyleng] = 0;
01656          return word;
01657       }
01658       parencount2--;
01659       if ( parencount2 >= 0) {
01660          yymore();
01661       } else {
01662          BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */
01663          yymore();
01664       }
01665    }
01666    YY_BREAK
01667 case 59:
01668 /* rule 59 can match eol */
01669 YY_RULE_SETUP
01670 #line 347 "ael.flex"
01671 { 
01672       char c = yytext[yyleng-1];
01673       if (c == '{')
01674          parencount2++;
01675       pbcpush2(c);
01676       yymore();
01677    }
01678    YY_BREAK
01679 case 60:
01680 /* rule 60 can match eol */
01681 YY_RULE_SETUP
01682 #line 355 "ael.flex"
01683 { 
01684       char c = yytext[yyleng-1];
01685       if ( pbcpop2(c))  { /* error */
01686          STORE_LOC;
01687          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
01688             my_file, my_lineno, my_col, c);
01689          BEGIN(0);
01690          yylval->str = malloc(yyleng+1);
01691          strncpy(yylval->str, yytext, yyleng);
01692          yylval->str[yyleng] = 0;
01693          return word;
01694       }
01695       yymore();
01696    }
01697    YY_BREAK
01698 case 61:
01699 /* rule 61 can match eol */
01700 YY_RULE_SETUP
01701 #line 371 "ael.flex"
01702 {
01703       if ( pbcpop3(']') ) {   /* error */
01704          STORE_LOC;
01705          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
01706          BEGIN(0);
01707          yylval->str = malloc(yyleng+1);
01708          strncpy(yylval->str, yytext, yyleng);
01709          yylval->str[yyleng] = 0;
01710          return word;
01711       }
01712       parencount3--;
01713       if ( parencount3 >= 0) {
01714          yymore();
01715       } else {
01716          BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */
01717          yymore();
01718       }
01719    }
01720    YY_BREAK
01721 case 62:
01722 /* rule 62 can match eol */
01723 YY_RULE_SETUP
01724 #line 390 "ael.flex"
01725 { 
01726       char c = yytext[yyleng-1];
01727       if (c == '[')
01728          parencount3++;
01729       pbcpush3(c);
01730       yymore();
01731    }
01732    YY_BREAK
01733 case 63:
01734 /* rule 63 can match eol */
01735 YY_RULE_SETUP
01736 #line 398 "ael.flex"
01737 { 
01738       char c = yytext[yyleng-1];
01739       if ( pbcpop3(c))  { /* error */
01740          STORE_LOC;
01741          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
01742             my_file, my_lineno, my_col, c);
01743          BEGIN(0);
01744          yylval->str = malloc(yyleng+1);
01745          strncpy(yylval->str, yytext, yyleng);
01746          yylval->str[yyleng] = 0;
01747          return word;
01748       }
01749       yymore();
01750    }
01751    YY_BREAK
01752 /*
01753     * context used for arguments of if_head, random_head, switch_head,
01754     * for (last statement), while (XXX why not iftime_head ?).
01755     * End with the matching parentheses.
01756     * A comma at the top level is valid here, unlike in argg where it
01757     * is an argument separator so it must be returned as a token.
01758     */
01759 case 64:
01760 /* rule 64 can match eol */
01761 YY_RULE_SETUP
01762 #line 421 "ael.flex"
01763 {
01764       if ( pbcpop(')') ) { /* error */
01765          STORE_LOC;
01766          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
01767          BEGIN(0);
01768          yylval->str = malloc(yyleng+1);
01769          strncpy(yylval->str, yytext, yyleng);
01770          yylval->str[yyleng] = 0;
01771          prev_word = 0;
01772          return word;
01773       }
01774       parencount--;
01775       if ( parencount >= 0) {
01776          yymore();
01777       } else {
01778          STORE_LOC;
01779          yylval->str = malloc(yyleng);
01780          strncpy(yylval->str, yytext, yyleng);
01781          yylval->str[yyleng-1] = 0;
01782          unput(')');
01783          BEGIN(0);
01784          return word;
01785       }
01786    }
01787    YY_BREAK
01788 case 65:
01789 /* rule 65 can match eol */
01790 YY_RULE_SETUP
01791 #line 446 "ael.flex"
01792 {
01793       char c = yytext[yyleng-1];
01794       if (c == '(')
01795          parencount++;
01796       pbcpush(c);
01797       yymore();
01798    }
01799    YY_BREAK
01800 case 66:
01801 /* rule 66 can match eol */
01802 YY_RULE_SETUP
01803 #line 454 "ael.flex"
01804 {
01805       char c = yytext[yyleng-1];
01806       if ( pbcpop(c))  { /* error */
01807          STORE_LOC;
01808          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
01809             my_file, my_lineno, my_col, c);
01810          BEGIN(0);
01811          yylval->str = malloc(yyleng+1);
01812          strncpy(yylval->str, yytext, yyleng);
01813          yylval->str[yyleng] = 0;
01814          return word;
01815       }
01816       yymore();
01817    }
01818    YY_BREAK
01819 /*
01820     * handlers for arguments to a macro or application calls.
01821     * We enter this context when we find the initial '(' and
01822     * stay here until we close all matching parentheses,
01823     * and find the comma (argument separator) or the closing ')'
01824     * of the (external) call, which happens when parencount == 0
01825     * before the decrement.
01826     */
01827 case 67:
01828 /* rule 67 can match eol */
01829 YY_RULE_SETUP
01830 #line 478 "ael.flex"
01831 {
01832       char c = yytext[yyleng-1];
01833       if (c == '(')
01834          parencount++;
01835       pbcpush(c);
01836       yymore();
01837    }
01838    YY_BREAK
01839 case 68:
01840 /* rule 68 can match eol */
01841 YY_RULE_SETUP
01842 #line 486 "ael.flex"
01843 {
01844       if ( pbcpop(')') ) { /* error */
01845          STORE_LOC;
01846          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
01847          BEGIN(0);
01848          yylval->str = malloc(yyleng+1);
01849          strncpy(yylval->str, yytext, yyleng);
01850          yylval->str[yyleng] = 0;
01851          return word;
01852       }
01853 
01854       parencount--;
01855       if( parencount >= 0){
01856          yymore();
01857       } else {
01858          STORE_LOC;
01859          BEGIN(0);
01860          if ( !strcmp(yytext, ")") )
01861             return RP;
01862          yylval->str = malloc(yyleng);
01863          strncpy(yylval->str, yytext, yyleng);
01864          yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
01865          unput(')');
01866          return word;
01867       }
01868    }
01869    YY_BREAK
01870 case 69:
01871 /* rule 69 can match eol */
01872 YY_RULE_SETUP
01873 #line 513 "ael.flex"
01874 {
01875       if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */
01876          yymore();
01877       } else  {
01878          STORE_LOC;
01879          if( !strcmp(yytext,"," ) )
01880             return COMMA;
01881          yylval->str = malloc(yyleng);
01882          strncpy(yylval->str, yytext, yyleng);
01883          yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */
01884          unput(',');
01885          return word;
01886       }
01887    }
01888    YY_BREAK
01889 case 70:
01890 /* rule 70 can match eol */
01891 YY_RULE_SETUP
01892 #line 528 "ael.flex"
01893 {
01894       char c = yytext[yyleng-1];
01895       if ( pbcpop(c) ) { /* error */
01896          STORE_LOC;
01897          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
01898          BEGIN(0);
01899          yylval->str = malloc(yyleng+1);
01900          strncpy(yylval->str, yytext, yyleng);
01901          yylval->str[yyleng] = '\0';
01902          return word;
01903       }
01904       yymore();
01905    }
01906    YY_BREAK
01907 /*
01908     * context used to find tokens in the right hand side of assignments,
01909     * or in the first and second operand of a 'for'. As above, match
01910     * commas and use ';' as a separator (hence return it as a separate token).
01911     */
01912 case 71:
01913 /* rule 71 can match eol */
01914 YY_RULE_SETUP
01915 #line 547 "ael.flex"
01916 {
01917       char c = yytext[yyleng-1];
01918       yymore();
01919       pbcpush(c);
01920    }
01921    YY_BREAK
01922 case 72:
01923 /* rule 72 can match eol */
01924 YY_RULE_SETUP
01925 #line 553 "ael.flex"
01926 {
01927       char c = yytext[yyleng-1];
01928       if ( pbcpop(c) ) { /* error */
01929          STORE_LOC;
01930          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
01931          BEGIN(0);
01932          yylval->str = malloc(yyleng+1);
01933          strncpy(yylval->str, yytext, yyleng);
01934          yylval->str[yyleng] = '\0';
01935          return word;
01936       }
01937       yymore();
01938    }
01939    YY_BREAK
01940 case 73:
01941 /* rule 73 can match eol */
01942 YY_RULE_SETUP
01943 #line 567 "ael.flex"
01944 {
01945       STORE_LOC;
01946       yylval->str = malloc(yyleng);
01947       strncpy(yylval->str, yytext, yyleng);
01948       yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */
01949       unput(';');
01950       BEGIN(0);
01951       return word;
01952    }
01953    YY_BREAK
01954 case 74:
01955 /* rule 74 can match eol */
01956 YY_RULE_SETUP
01957 #line 577 "ael.flex"
01958 {
01959       char fnamebuf[1024],*p1,*p2;
01960       int glob_ret;
01961       glob_t globbuf;        /* the current globbuf */
01962       int globbuf_pos = -1;   /* where we are in the current globbuf */
01963       globbuf.gl_offs = 0; /* initialize it to silence gcc */
01964       
01965       p1 = strchr(yytext,'"');
01966       p2 = strrchr(yytext,'"');
01967       if ( include_stack_index >= MAX_INCLUDE_DEPTH ) {
01968          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Includes nested too deeply! Wow!!! How did you do that?\n", my_file, my_lineno, my_col);
01969       } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) {
01970          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Filename is incredibly way too long (%d chars!). Inclusion ignored!\n", my_file, my_lineno, my_col, yyleng - 10);
01971       } else {
01972          strncpy(fnamebuf, p1+1, p2-p1-1);
01973          fnamebuf[p2-p1-1] = 0;
01974       if (fnamebuf[0] != '/') {
01975          char fnamebuf2[1024];
01976          snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
01977          ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
01978       }
01979 #ifdef SOLARIS
01980          glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
01981 #else
01982          glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
01983 #endif
01984          if (glob_ret == GLOB_NOSPACE) {
01985             ast_log(LOG_WARNING,
01986                "Glob Expansion of pattern '%s' failed: Not enough memory\n", fnamebuf);
01987          } else if (glob_ret  == GLOB_ABORTED) {
01988             ast_log(LOG_WARNING,
01989                "Glob Expansion of pattern '%s' failed: Read error\n", fnamebuf);
01990          } else if (glob_ret  == GLOB_NOMATCH) {
01991             ast_log(LOG_WARNING,
01992                "Glob Expansion of pattern '%s' failed: No matches!\n", fnamebuf);
01993          } else {
01994            globbuf_pos = 0;
01995          }
01996       }
01997       if (globbuf_pos > -1) {
01998          setup_filestack(fnamebuf, sizeof(fnamebuf), &globbuf, 0, yyscanner, 1);
01999       }
02000    }
02001    YY_BREAK
02002 case YY_STATE_EOF(INITIAL):
02003 case YY_STATE_EOF(paren):
02004 case YY_STATE_EOF(semic):
02005 case YY_STATE_EOF(argg):
02006 case YY_STATE_EOF(comment):
02007 case YY_STATE_EOF(curlystate):
02008 case YY_STATE_EOF(wordstate):
02009 case YY_STATE_EOF(brackstate):
02010 #line 622 "ael.flex"
02011 {
02012       char fnamebuf[2048];
02013       if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
02014          ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner );
02015          include_stack[include_stack_index-1].globbuf_pos++;
02016          setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0);
02017          /* finish this */       
02018          
02019       } else {
02020          if (include_stack[include_stack_index].fname) {
02021             free(include_stack[include_stack_index].fname);
02022             include_stack[include_stack_index].fname = 0;
02023          }
02024          if (my_file) {
02025             free(my_file);
02026             my_file = 0;
02027          }
02028          if ( --include_stack_index < 0 ) {
02029             yyterminate();
02030          } else {
02031             globfree(&include_stack[include_stack_index].globbuf);
02032             include_stack[include_stack_index].globbuf_pos = -1;
02033             
02034             ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner );
02035             ael_yy_switch_to_buffer(include_stack[include_stack_index].bufstate,yyscanner );
02036             my_lineno = include_stack[include_stack_index].lineno;
02037             my_col    = include_stack[include_stack_index].colno;
02038             my_file   = strdup(include_stack[include_stack_index].fname);
02039          }
02040       }
02041    }
02042    YY_BREAK
02043 case 75:
02044 /* rule 75 can match eol */
02045 YY_RULE_SETUP
02046 #line 654 "ael.flex"
02047 { /* default rule */ ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); }
02048    YY_BREAK
02049 case 76:
02050 YY_RULE_SETUP
02051 #line 656 "ael.flex"
02052 YY_FATAL_ERROR( "flex scanner jammed" );
02053    YY_BREAK
02054 #line 2053 "ael_lex.c"
02055 
02056    case YY_END_OF_BUFFER:
02057       {
02058       /* Amount of text matched not including the EOB char. */
02059       int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
02060 
02061       /* Undo the effects of YY_DO_BEFORE_ACTION. */
02062       *yy_cp = yyg->yy_hold_char;
02063       YY_RESTORE_YY_MORE_OFFSET
02064 
02065       if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
02066          {
02067          /* We're scanning a new file or input source.  It's
02068           * possible that this happened because the user
02069           * just pointed yyin at a new source and called
02070           * ael_yylex().  If so, then we have to assure
02071           * consistency between YY_CURRENT_BUFFER and our
02072           * globals.  Here is the right place to do so, because
02073           * this is the first action (other than possibly a
02074           * back-up) that will match for the new input source.
02075           */
02076          yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
02077          YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
02078          YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
02079          }
02080 
02081       /* Note that here we test for yy_c_buf_p "<=" to the position
02082        * of the first EOB in the buffer, since yy_c_buf_p will
02083        * already have been incremented past the NUL character
02084        * (since all states make transitions on EOB to the
02085        * end-of-buffer state).  Contrast this with the test
02086        * in input().
02087        */
02088       if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
02089          { /* This was really a NUL. */
02090          yy_state_type yy_next_state;
02091 
02092          yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
02093 
02094          yy_current_state = yy_get_previous_state( yyscanner );
02095 
02096          /* Okay, we're now positioned to make the NUL
02097           * transition.  We couldn't have
02098           * yy_get_previous_state() go ahead and do it
02099           * for us because it doesn't know how to deal
02100           * with the possibility of jamming (and we don't
02101           * want to build jamming into it because then it
02102           * will run more slowly).
02103           */
02104 
02105          yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
02106 
02107          yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
02108 
02109          if ( yy_next_state )
02110             {
02111             /* Consume the NUL. */
02112             yy_cp = ++yyg->yy_c_buf_p;
02113             yy_current_state = yy_next_state;
02114             goto yy_match;
02115             }
02116 
02117          else
02118             {
02119             yy_cp = yyg->yy_last_accepting_cpos;
02120             yy_current_state = yyg->yy_last_accepting_state;
02121             goto yy_find_action;
02122             }
02123          }
02124 
02125       else switch ( yy_get_next_buffer( yyscanner ) )
02126          {
02127          case EOB_ACT_END_OF_FILE:
02128             {
02129             yyg->yy_did_buffer_switch_on_eof = 0;
02130 
02131             if ( ael_yywrap(yyscanner ) )
02132                {
02133                /* Note: because we've taken care in
02134                 * yy_get_next_buffer() to have set up
02135                 * yytext, we can now set up
02136                 * yy_c_buf_p so that if some total
02137                 * hoser (like flex itself) wants to
02138                 * call the scanner after we return the
02139                 * YY_NULL, it'll still work - another
02140                 * YY_NULL will get returned.
02141                 */
02142                yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
02143 
02144                yy_act = YY_STATE_EOF(YY_START);
02145                goto do_action;
02146                }
02147 
02148             else
02149                {
02150                if ( ! yyg->yy_did_buffer_switch_on_eof )
02151                   YY_NEW_FILE;
02152                }
02153             break;
02154             }
02155 
02156          case EOB_ACT_CONTINUE_SCAN:
02157             yyg->yy_c_buf_p =
02158                yyg->yytext_ptr + yy_amount_of_matched_text;
02159 
02160             yy_current_state = yy_get_previous_state( yyscanner );
02161 
02162             yy_cp = yyg->yy_c_buf_p;
02163             yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
02164             goto yy_match;
02165 
02166          case EOB_ACT_LAST_MATCH:
02167             yyg->yy_c_buf_p =
02168             &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
02169 
02170             yy_current_state = yy_get_previous_state( yyscanner );
02171 
02172             yy_cp = yyg->yy_c_buf_p;
02173             yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
02174             goto yy_find_action;
02175          }
02176       break;
02177       }
02178 
02179    default:
02180       YY_FATAL_ERROR(
02181          "fatal flex scanner internal error--no action found" );
02182    } /* end of action switch */
02183       } /* end of scanning one token */
02184 } /* end of ael_yylex */
02185 
02186 /* yy_get_next_buffer - try to read in a new buffer
02187  *
02188  * Returns a code representing an action:
02189  * EOB_ACT_LAST_MATCH -
02190  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
02191  * EOB_ACT_END_OF_FILE - end of file
02192  */
02193 static int yy_get_next_buffer (yyscan_t yyscanner)
02194 {
02195     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02196    register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
02197    register char *source = yyg->yytext_ptr;
02198    register int number_to_move, i;
02199    int ret_val;
02200 
02201    if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
02202       YY_FATAL_ERROR(
02203       "fatal flex scanner internal error--end of buffer missed" );
02204 
02205    if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
02206       { /* Don't try to fill the buffer, so this is an EOF. */
02207       if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
02208          {
02209          /* We matched a single character, the EOB, so
02210           * treat this as a final EOF.
02211           */
02212          return EOB_ACT_END_OF_FILE;
02213          }
02214 
02215       else
02216          {
02217          /* We matched some text prior to the EOB, first
02218           * process it.
02219           */
02220          return EOB_ACT_LAST_MATCH;
02221          }
02222       }
02223 
02224    /* Try to read more data. */
02225 
02226    /* First move last chars to start of buffer. */
02227    number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
02228 
02229    for ( i = 0; i < number_to_move; ++i )
02230       *(dest++) = *(source++);
02231 
02232    if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
02233       /* don't do the read, it's not guaranteed to return an EOF,
02234        * just force an EOF
02235        */
02236       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
02237 
02238    else
02239       {
02240          int num_to_read =
02241          YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
02242 
02243       while ( num_to_read <= 0 )
02244          { /* Not enough room in the buffer - grow it. */
02245 
02246          /* just a shorter name for the current buffer */
02247          YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
02248 
02249          int yy_c_buf_p_offset =
02250             (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
02251 
02252          if ( b->yy_is_our_buffer )
02253             {
02254             int new_size = b->yy_buf_size * 2;
02255 
02256             if ( new_size <= 0 )
02257                b->yy_buf_size += b->yy_buf_size / 8;
02258             else
02259                b->yy_buf_size *= 2;
02260 
02261             b->yy_ch_buf = (char *)
02262                /* Include room in for 2 EOB chars. */
02263                ael_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
02264             }
02265          else
02266             /* Can't grow it, we don't own it. */
02267             b->yy_ch_buf = 0;
02268 
02269          if ( ! b->yy_ch_buf )
02270             YY_FATAL_ERROR(
02271             "fatal error - scanner input buffer overflow" );
02272 
02273          yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
02274 
02275          num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
02276                   number_to_move - 1;
02277 
02278          }
02279 
02280       if ( num_to_read > YY_READ_BUF_SIZE )
02281          num_to_read = YY_READ_BUF_SIZE;
02282 
02283       /* Read in more data. */
02284       YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
02285          yyg->yy_n_chars, (size_t) num_to_read );
02286 
02287       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
02288       }
02289 
02290    if ( yyg->yy_n_chars == 0 )
02291       {
02292       if ( number_to_move == YY_MORE_ADJ )
02293          {
02294          ret_val = EOB_ACT_END_OF_FILE;
02295          ael_yyrestart(yyin  ,yyscanner);
02296          }
02297 
02298       else
02299          {
02300          ret_val = EOB_ACT_LAST_MATCH;
02301          YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
02302             YY_BUFFER_EOF_PENDING;
02303          }
02304       }
02305 
02306    else
02307       ret_val = EOB_ACT_CONTINUE_SCAN;
02308 
02309    if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
02310       /* Extend the array by 50%, plus the number we really need. */
02311       yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
02312       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ael_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
02313       if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
02314          YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
02315    }
02316 
02317    yyg->yy_n_chars += number_to_move;
02318    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
02319    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
02320 
02321    yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
02322 
02323    return ret_val;
02324 }
02325 
02326 /* yy_get_previous_state - get the state just before the EOB char was reached */
02327 
02328     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
02329 {
02330    register yy_state_type yy_current_state;
02331    register char *yy_cp;
02332     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02333 
02334    yy_current_state = yyg->yy_start;
02335 
02336    for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
02337       {
02338       register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
02339       if ( yy_accept[yy_current_state] )
02340          {
02341          yyg->yy_last_accepting_state = yy_current_state;
02342          yyg->yy_last_accepting_cpos = yy_cp;
02343          }
02344       while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02345          {
02346          yy_current_state = (int) yy_def[yy_current_state];
02347          if ( yy_current_state >= 285 )
02348             yy_c = yy_meta[(unsigned int) yy_c];
02349          }
02350       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02351       }
02352 
02353    return yy_current_state;
02354 }
02355 
02356 /* yy_try_NUL_trans - try to make a transition on the NUL character
02357  *
02358  * synopsis
02359  * next_state = yy_try_NUL_trans( current_state );
02360  */
02361     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
02362 {
02363    register int yy_is_jam;
02364     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
02365    register char *yy_cp = yyg->yy_c_buf_p;
02366 
02367    register YY_CHAR yy_c = 1;
02368    if ( yy_accept[yy_current_state] )
02369       {
02370       yyg->yy_last_accepting_state = yy_current_state;
02371       yyg->yy_last_accepting_cpos = yy_cp;
02372       }
02373    while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02374       {
02375       yy_current_state = (int) yy_def[yy_current_state];
02376       if ( yy_current_state >= 285 )
02377          yy_c = yy_meta[(unsigned int) yy_c];
02378       }
02379    yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02380    yy_is_jam = (yy_current_state == 284);
02381 
02382    return yy_is_jam ? 0 : yy_current_state;
02383 }
02384 
02385     static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
02386 {
02387    register char *yy_cp;
02388     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02389 
02390     yy_cp = yyg->yy_c_buf_p;
02391 
02392    /* undo effects of setting up yytext */
02393    *yy_cp = yyg->yy_hold_char;
02394 
02395    if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
02396       { /* need to shift things up to make room */
02397       /* +2 for EOB chars. */
02398       register int number_to_move = yyg->yy_n_chars + 2;
02399       register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
02400                YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
02401       register char *source =
02402             &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
02403 
02404       while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
02405          *--dest = *--source;
02406 
02407       yy_cp += (int) (dest - source);
02408       yy_bp += (int) (dest - source);
02409       YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
02410          yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
02411 
02412       if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
02413          YY_FATAL_ERROR( "flex scanner push-back overflow" );
02414       }
02415 
02416    *--yy_cp = (char) c;
02417 
02418    yyg->yytext_ptr = yy_bp;
02419    yyg->yy_hold_char = *yy_cp;
02420    yyg->yy_c_buf_p = yy_cp;
02421 }
02422 
02423 #ifndef YY_NO_INPUT
02424 #ifdef __cplusplus
02425     static int yyinput (yyscan_t yyscanner)
02426 #else
02427     static int input  (yyscan_t yyscanner)
02428 #endif
02429 
02430 {
02431    int c;
02432     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02433 
02434    *yyg->yy_c_buf_p = yyg->yy_hold_char;
02435 
02436    if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
02437       {
02438       /* yy_c_buf_p now points to the character we want to return.
02439        * If this occurs *before* the EOB characters, then it's a
02440        * valid NUL; if not, then we've hit the end of the buffer.
02441        */
02442       if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
02443          /* This was really a NUL. */
02444          *yyg->yy_c_buf_p = '\0';
02445 
02446       else
02447          { /* need more input */
02448          int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
02449          ++yyg->yy_c_buf_p;
02450 
02451          switch ( yy_get_next_buffer( yyscanner ) )
02452             {
02453             case EOB_ACT_LAST_MATCH:
02454                /* This happens because yy_g_n_b()
02455                 * sees that we've accumulated a
02456                 * token and flags that we need to
02457                 * try matching the token before
02458                 * proceeding.  But for input(),
02459                 * there's no matching to consider.
02460                 * So convert the EOB_ACT_LAST_MATCH
02461                 * to EOB_ACT_END_OF_FILE.
02462                 */
02463 
02464                /* Reset buffer status. */
02465                ael_yyrestart(yyin ,yyscanner);
02466 
02467                /*FALLTHROUGH*/
02468 
02469             case EOB_ACT_END_OF_FILE:
02470                {
02471                if ( ael_yywrap(yyscanner ) )
02472                   return EOF;
02473 
02474                if ( ! yyg->yy_did_buffer_switch_on_eof )
02475                   YY_NEW_FILE;
02476 #ifdef __cplusplus
02477                return yyinput(yyscanner);
02478 #else
02479                return input(yyscanner);
02480 #endif
02481                }
02482 
02483             case EOB_ACT_CONTINUE_SCAN:
02484                yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
02485                break;
02486             }
02487          }
02488       }
02489 
02490    c = *(unsigned char *) yyg->yy_c_buf_p;   /* cast for 8-bit char's */
02491    *yyg->yy_c_buf_p = '\0';   /* preserve yytext */
02492    yyg->yy_hold_char = *++yyg->yy_c_buf_p;
02493 
02494    return c;
02495 }
02496 #endif   /* ifndef YY_NO_INPUT */
02497 
02498 /** Immediately switch to a different input stream.
02499  * @param input_file A readable stream.
02500  * @param yyscanner The scanner object.
02501  * @note This function does not reset the start condition to @c INITIAL .
02502  */
02503     void ael_yyrestart  (FILE * input_file , yyscan_t yyscanner)
02504 {
02505     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02506 
02507    if ( ! YY_CURRENT_BUFFER ){
02508         ael_yyensure_buffer_stack (yyscanner);
02509       YY_CURRENT_BUFFER_LVALUE =
02510             ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
02511    }
02512 
02513    ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
02514    ael_yy_load_buffer_state(yyscanner );
02515 }
02516 
02517 /** Switch to a different input buffer.
02518  * @param new_buffer The new input buffer.
02519  * @param yyscanner The scanner object.
02520  */
02521     void ael_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
02522 {
02523     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02524 
02525    /* TODO. We should be able to replace this entire function body
02526     * with
02527     *    ael_yypop_buffer_state();
02528     *    ael_yypush_buffer_state(new_buffer);
02529      */
02530    ael_yyensure_buffer_stack (yyscanner);
02531    if ( YY_CURRENT_BUFFER == new_buffer )
02532       return;
02533 
02534    if ( YY_CURRENT_BUFFER )
02535       {
02536       /* Flush out information for old buffer. */
02537       *yyg->yy_c_buf_p = yyg->yy_hold_char;
02538       YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
02539       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
02540       }
02541 
02542    YY_CURRENT_BUFFER_LVALUE = new_buffer;
02543    ael_yy_load_buffer_state(yyscanner );
02544 
02545    /* We don't actually know whether we did this switch during
02546     * EOF (ael_yywrap()) processing, but the only time this flag
02547     * is looked at is after ael_yywrap() is called, so it's safe
02548     * to go ahead and always set it.
02549     */
02550    yyg->yy_did_buffer_switch_on_eof = 1;
02551 }
02552 
02553 static void ael_yy_load_buffer_state  (yyscan_t yyscanner)
02554 {
02555     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02556    yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
02557    yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
02558    yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
02559    yyg->yy_hold_char = *yyg->yy_c_buf_p;
02560 }
02561 
02562 /** Allocate and initialize an input buffer state.
02563  * @param file A readable stream.
02564  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
02565  * @param yyscanner The scanner object.
02566  * @return the allocated buffer state.
02567  */
02568     YY_BUFFER_STATE ael_yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
02569 {
02570    YY_BUFFER_STATE b;
02571     
02572    b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
02573    if ( ! b )
02574       YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
02575 
02576    b->yy_buf_size = size;
02577 
02578    /* yy_ch_buf has to be 2 characters longer than the size given because
02579     * we need to put in 2 end-of-buffer characters.
02580     */
02581    b->yy_ch_buf = (char *) ael_yyalloc(b->yy_buf_size + 2 ,yyscanner );
02582    if ( ! b->yy_ch_buf )
02583       YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
02584 
02585    b->yy_is_our_buffer = 1;
02586 
02587    ael_yy_init_buffer(b,file ,yyscanner);
02588 
02589    return b;
02590 }
02591 
02592 /** Destroy the buffer.
02593  * @param b a buffer created with ael_yy_create_buffer()
02594  * @param yyscanner The scanner object.
02595  */
02596     void ael_yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
02597 {
02598     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02599 
02600    if ( ! b )
02601       return;
02602 
02603    if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
02604       YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
02605 
02606    if ( b->yy_is_our_buffer )
02607       ael_yyfree((void *) b->yy_ch_buf ,yyscanner );
02608 
02609    ael_yyfree((void *) b ,yyscanner );
02610 }
02611 
02612 #ifndef __cplusplus
02613 extern int isatty (int );
02614 #endif /* __cplusplus */
02615     
02616 /* Initializes or reinitializes a buffer.
02617  * This function is sometimes called more than once on the same buffer,
02618  * such as during a ael_yyrestart() or at EOF.
02619  */
02620     static void ael_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
02621 
02622 {
02623    int oerrno = errno;
02624     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02625 
02626    ael_yy_flush_buffer(b ,yyscanner);
02627 
02628    b->yy_input_file = file;
02629    b->yy_fill_buffer = 1;
02630 
02631     /* If b is the current buffer, then ael_yy_init_buffer was _probably_
02632      * called from ael_yyrestart() or through yy_get_next_buffer.
02633      * In that case, we don't want to reset the lineno or column.
02634      */
02635     if (b != YY_CURRENT_BUFFER){
02636         b->yy_bs_lineno = 1;
02637         b->yy_bs_column = 0;
02638     }
02639 
02640         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
02641     
02642    errno = oerrno;
02643 }
02644 
02645 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
02646  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
02647  * @param yyscanner The scanner object.
02648  */
02649     void ael_yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
02650 {
02651     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02652    if ( ! b )
02653       return;
02654 
02655    b->yy_n_chars = 0;
02656 
02657    /* We always need two end-of-buffer characters.  The first causes
02658     * a transition to the end-of-buffer state.  The second causes
02659     * a jam in that state.
02660     */
02661    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
02662    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
02663 
02664    b->yy_buf_pos = &b->yy_ch_buf[0];
02665 
02666    b->yy_at_bol = 1;
02667    b->yy_buffer_status = YY_BUFFER_NEW;
02668 
02669    if ( b == YY_CURRENT_BUFFER )
02670       ael_yy_load_buffer_state(yyscanner );
02671 }
02672 
02673 /** Pushes the new state onto the stack. The new state becomes
02674  *  the current state. This function will allocate the stack
02675  *  if necessary.
02676  *  @param new_buffer The new state.
02677  *  @param yyscanner The scanner object.
02678  */
02679 void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
02680 {
02681     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02682    if (new_buffer == NULL)
02683       return;
02684 
02685    ael_yyensure_buffer_stack(yyscanner);
02686 
02687    /* This block is copied from ael_yy_switch_to_buffer. */
02688    if ( YY_CURRENT_BUFFER )
02689       {
02690       /* Flush out information for old buffer. */
02691       *yyg->yy_c_buf_p = yyg->yy_hold_char;
02692       YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
02693       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
02694       }
02695 
02696    /* Only push if top exists. Otherwise, replace top. */
02697    if (YY_CURRENT_BUFFER)
02698       yyg->yy_buffer_stack_top++;
02699    YY_CURRENT_BUFFER_LVALUE = new_buffer;
02700 
02701    /* copied from ael_yy_switch_to_buffer. */
02702    ael_yy_load_buffer_state(yyscanner );
02703    yyg->yy_did_buffer_switch_on_eof = 1;
02704 }
02705 
02706 /** Removes and deletes the top of the stack, if present.
02707  *  The next element becomes the new top.
02708  *  @param yyscanner The scanner object.
02709  */
02710 void ael_yypop_buffer_state (yyscan_t yyscanner)
02711 {
02712     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02713    if (!YY_CURRENT_BUFFER)
02714       return;
02715 
02716    ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
02717    YY_CURRENT_BUFFER_LVALUE = NULL;
02718    if (yyg->yy_buffer_stack_top > 0)
02719       --yyg->yy_buffer_stack_top;
02720 
02721    if (YY_CURRENT_BUFFER) {
02722       ael_yy_load_buffer_state(yyscanner );
02723       yyg->yy_did_buffer_switch_on_eof = 1;
02724    }
02725 }
02726 
02727 /* Allocates the stack if it does not exist.
02728  *  Guarantees space for at least one push.
02729  */
02730 static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
02731 {
02732    int num_to_alloc;
02733     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02734 
02735    if (!yyg->yy_buffer_stack) {
02736 
02737       /* First allocation is just for 2 elements, since we don't know if this
02738        * scanner will even need a stack. We use 2 instead of 1 to avoid an
02739        * immediate realloc on the next call.
02740          */
02741       num_to_alloc = 1;
02742       yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyalloc
02743                         (num_to_alloc * sizeof(struct yy_buffer_state*)
02744                         , yyscanner);
02745       if ( ! yyg->yy_buffer_stack )
02746          YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
02747                           
02748       memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
02749             
02750       yyg->yy_buffer_stack_max = num_to_alloc;
02751       yyg->yy_buffer_stack_top = 0;
02752       return;
02753    }
02754 
02755    if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
02756 
02757       /* Increase the buffer to prepare for a possible push. */
02758       int grow_size = 8 /* arbitrary grow size */;
02759 
02760       num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
02761       yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyrealloc
02762                         (yyg->yy_buffer_stack,
02763                         num_to_alloc * sizeof(struct yy_buffer_state*)
02764                         , yyscanner);
02765       if ( ! yyg->yy_buffer_stack )
02766          YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
02767 
02768       /* zero only the new slots.*/
02769       memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
02770       yyg->yy_buffer_stack_max = num_to_alloc;
02771    }
02772 }
02773 
02774 /** Setup the input buffer state to scan directly from a user-specified character buffer.
02775  * @param base the character buffer
02776  * @param size the size in bytes of the character buffer
02777  * @param yyscanner The scanner object.
02778  * @return the newly allocated buffer state object. 
02779  */
02780 YY_BUFFER_STATE ael_yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
02781 {
02782    YY_BUFFER_STATE b;
02783     
02784    if ( size < 2 ||
02785         base[size-2] != YY_END_OF_BUFFER_CHAR ||
02786         base[size-1] != YY_END_OF_BUFFER_CHAR )
02787       /* They forgot to leave room for the EOB's. */
02788       return 0;
02789 
02790    b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
02791    if ( ! b )
02792       YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_buffer()" );
02793 
02794    b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
02795    b->yy_buf_pos = b->yy_ch_buf = base;
02796    b->yy_is_our_buffer = 0;
02797    b->yy_input_file = 0;
02798    b->yy_n_chars = b->yy_buf_size;
02799    b->yy_is_interactive = 0;
02800    b->yy_at_bol = 1;
02801    b->yy_fill_buffer = 0;
02802    b->yy_buffer_status = YY_BUFFER_NEW;
02803 
02804    ael_yy_switch_to_buffer(b ,yyscanner );
02805 
02806    return b;
02807 }
02808 
02809 /** Setup the input buffer state to scan a string. The next call to ael_yylex() will
02810  * scan from a @e copy of @a str.
02811  * @param yystr a NUL-terminated string to scan
02812  * @param yyscanner The scanner object.
02813  * @return the newly allocated buffer state object.
02814  * @note If you want to scan bytes that may contain NUL values, then use
02815  *       ael_yy_scan_bytes() instead.
02816  */
02817 YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
02818 {
02819     
02820    return ael_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
02821 }
02822 
02823 /** Setup the input buffer state to scan the given bytes. The next call to ael_yylex() will
02824  * scan from a @e copy of @a bytes.
02825  * @param yybytes the byte buffer to scan
02826  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
02827  * @param yyscanner The scanner object.
02828  * @return the newly allocated buffer state object.
02829  */
02830 YY_BUFFER_STATE ael_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
02831 {
02832    YY_BUFFER_STATE b;
02833    char *buf;
02834    yy_size_t n;
02835    int i;
02836     
02837    /* Get memory for full buffer, including space for trailing EOB's. */
02838    n = _yybytes_len + 2;
02839    buf = (char *) ael_yyalloc(n ,yyscanner );
02840    if ( ! buf )
02841       YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_bytes()" );
02842 
02843    for ( i = 0; i < _yybytes_len; ++i )
02844       buf[i] = yybytes[i];
02845 
02846    buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
02847 
02848    b = ael_yy_scan_buffer(buf,n ,yyscanner);
02849    if ( ! b )
02850       YY_FATAL_ERROR( "bad buffer in ael_yy_scan_bytes()" );
02851 
02852    /* It's okay to grow etc. this buffer, and we should throw it
02853     * away when we're done.
02854     */
02855    b->yy_is_our_buffer = 1;
02856 
02857    return b;
02858 }
02859 
02860 #ifndef YY_EXIT_FAILURE
02861 #define YY_EXIT_FAILURE 2
02862 #endif
02863 
02864 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
02865 {
02866       (void) fprintf( stderr, "%s\n", msg );
02867    exit( YY_EXIT_FAILURE );
02868 }
02869 
02870 /* Redefine yyless() so it works in section 3 code. */
02871 
02872 #undef yyless
02873 #define yyless(n) \
02874    do \
02875       { \
02876       /* Undo effects of setting up yytext. */ \
02877         int yyless_macro_arg = (n); \
02878         YY_LESS_LINENO(yyless_macro_arg);\
02879       yytext[yyleng] = yyg->yy_hold_char; \
02880       yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
02881       yyg->yy_hold_char = *yyg->yy_c_buf_p; \
02882       *yyg->yy_c_buf_p = '\0'; \
02883       yyleng = yyless_macro_arg; \
02884       } \
02885    while ( 0 )
02886 
02887 /* Accessor  methods (get/set functions) to struct members. */
02888 
02889 /** Get the user-defined data for this scanner.
02890  * @param yyscanner The scanner object.
02891  */
02892 YY_EXTRA_TYPE ael_yyget_extra  (yyscan_t yyscanner)
02893 {
02894     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02895     return yyextra;
02896 }
02897 
02898 /** Get the current line number.
02899  * @param yyscanner The scanner object.
02900  */
02901 int ael_yyget_lineno  (yyscan_t yyscanner)
02902 {
02903     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02904     
02905         if (! YY_CURRENT_BUFFER)
02906             return 0;
02907     
02908     return yylineno;
02909 }
02910 
02911 /** Get the current column number.
02912  * @param yyscanner The scanner object.
02913  */
02914 int ael_yyget_column  (yyscan_t yyscanner)
02915 {
02916     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02917     
02918         if (! YY_CURRENT_BUFFER)
02919             return 0;
02920     
02921     return yycolumn;
02922 }
02923 
02924 /** Get the input stream.
02925  * @param yyscanner The scanner object.
02926  */
02927 FILE *ael_yyget_in  (yyscan_t yyscanner)
02928 {
02929     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02930     return yyin;
02931 }
02932 
02933 /** Get the output stream.
02934  * @param yyscanner The scanner object.
02935  */
02936 FILE *ael_yyget_out  (yyscan_t yyscanner)
02937 {
02938     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02939     return yyout;
02940 }
02941 
02942 /** Get the length of the current token.
02943  * @param yyscanner The scanner object.
02944  */
02945 int ael_yyget_leng  (yyscan_t yyscanner)
02946 {
02947     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02948     return yyleng;
02949 }
02950 
02951 /** Get the current token.
02952  * @param yyscanner The scanner object.
02953  */
02954 
02955 char *ael_yyget_text  (yyscan_t yyscanner)
02956 {
02957     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02958     return yytext;
02959 }
02960 
02961 /** Set the user-defined data. This data is never touched by the scanner.
02962  * @param user_defined The data to be associated with this scanner.
02963  * @param yyscanner The scanner object.
02964  */
02965 void ael_yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
02966 {
02967     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02968     yyextra = user_defined ;
02969 }
02970 
02971 /** Set the current line number.
02972  * @param line_number
02973  * @param yyscanner The scanner object.
02974  */
02975 void ael_yyset_lineno (int  line_number , yyscan_t yyscanner)
02976 {
02977     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02978 
02979         /* lineno is only valid if an input buffer exists. */
02980         if (! YY_CURRENT_BUFFER )
02981            yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner); 
02982     
02983     yylineno = line_number;
02984 }
02985 
02986 /** Set the current column.
02987  * @param line_number
02988  * @param yyscanner The scanner object.
02989  */
02990 void ael_yyset_column (int  column_no , yyscan_t yyscanner)
02991 {
02992     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02993 
02994         /* column is only valid if an input buffer exists. */
02995         if (! YY_CURRENT_BUFFER )
02996            yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner); 
02997     
02998     yycolumn = column_no;
02999 }
03000 
03001 /** Set the input stream. This does not discard the current
03002  * input buffer.
03003  * @param in_str A readable stream.
03004  * @param yyscanner The scanner object.
03005  * @see ael_yy_switch_to_buffer
03006  */
03007 void ael_yyset_in (FILE *  in_str , yyscan_t yyscanner)
03008 {
03009     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03010     yyin = in_str ;
03011 }
03012 
03013 void ael_yyset_out (FILE *  out_str , yyscan_t yyscanner)
03014 {
03015     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03016     yyout = out_str ;
03017 }
03018 
03019 int ael_yyget_debug  (yyscan_t yyscanner)
03020 {
03021     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03022     return yy_flex_debug;
03023 }
03024 
03025 void ael_yyset_debug (int  bdebug , yyscan_t yyscanner)
03026 {
03027     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03028     yy_flex_debug = bdebug ;
03029 }
03030 
03031 /* Accessor methods for yylval and yylloc */
03032 
03033 YYSTYPE * ael_yyget_lval  (yyscan_t yyscanner)
03034 {
03035     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03036     return yylval;
03037 }
03038 
03039 void ael_yyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
03040 {
03041     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03042     yylval = yylval_param;
03043 }
03044 
03045 YYLTYPE *ael_yyget_lloc  (yyscan_t yyscanner)
03046 {
03047     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03048     return yylloc;
03049 }
03050     
03051 void ael_yyset_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
03052 {
03053     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03054     yylloc = yylloc_param;
03055 }
03056     
03057 /* User-visible API */
03058 
03059 /* ael_yylex_init is special because it creates the scanner itself, so it is
03060  * the ONLY reentrant function that doesn't take the scanner as the last argument.
03061  * That's why we explicitly handle the declaration, instead of using our macros.
03062  */
03063 
03064 int ael_yylex_init(yyscan_t* ptr_yy_globals)
03065 
03066 {
03067     if (ptr_yy_globals == NULL){
03068         errno = EINVAL;
03069         return 1;
03070     }
03071 
03072     *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), NULL );
03073 
03074     if (*ptr_yy_globals == NULL){
03075         errno = ENOMEM;
03076         return 1;
03077     }
03078 
03079     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
03080     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
03081 
03082     return yy_init_globals ( *ptr_yy_globals );
03083 }
03084 
03085 /* ael_yylex_init_extra has the same functionality as ael_yylex_init, but follows the
03086  * convention of taking the scanner as the last argument. Note however, that
03087  * this is a *pointer* to a scanner, as it will be allocated by this call (and
03088  * is the reason, too, why this function also must handle its own declaration).
03089  * The user defined value in the first argument will be available to ael_yyalloc in
03090  * the yyextra field.
03091  */
03092 
03093 int ael_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
03094 
03095 {
03096     struct yyguts_t dummy_yyguts;
03097 
03098     ael_yyset_extra (yy_user_defined, &dummy_yyguts);
03099 
03100     if (ptr_yy_globals == NULL){
03101         errno = EINVAL;
03102         return 1;
03103     }
03104    
03105     *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
03106    
03107     if (*ptr_yy_globals == NULL){
03108         errno = ENOMEM;
03109         return 1;
03110     }
03111     
03112     /* By setting to 0xAA, we expose bugs in
03113     yy_init_globals. Leave at 0x00 for releases. */
03114     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
03115     
03116     ael_yyset_extra (yy_user_defined, *ptr_yy_globals);
03117     
03118     return yy_init_globals ( *ptr_yy_globals );
03119 }
03120 
03121 static int yy_init_globals (yyscan_t yyscanner)
03122 {
03123     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03124     /* Initialization is the same as for the non-reentrant scanner.
03125      * This function is called from ael_yylex_destroy(), so don't allocate here.
03126      */
03127 
03128     yyg->yy_buffer_stack = 0;
03129     yyg->yy_buffer_stack_top = 0;
03130     yyg->yy_buffer_stack_max = 0;
03131     yyg->yy_c_buf_p = (char *) 0;
03132     yyg->yy_init = 0;
03133     yyg->yy_start = 0;
03134 
03135     yyg->yy_start_stack_ptr = 0;
03136     yyg->yy_start_stack_depth = 0;
03137     yyg->yy_start_stack =  NULL;
03138 
03139 /* Defined in main.c */
03140 #ifdef YY_STDINIT
03141     yyin = stdin;
03142     yyout = stdout;
03143 #else
03144     yyin = (FILE *) 0;
03145     yyout = (FILE *) 0;
03146 #endif
03147 
03148     /* For future reference: Set errno on error, since we are called by
03149      * ael_yylex_init()
03150      */
03151     return 0;
03152 }
03153 
03154 /* ael_yylex_destroy is for both reentrant and non-reentrant scanners. */
03155 int ael_yylex_destroy  (yyscan_t yyscanner)
03156 {
03157     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03158 
03159     /* Pop the buffer stack, destroying each element. */
03160    while(YY_CURRENT_BUFFER){
03161       ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
03162       YY_CURRENT_BUFFER_LVALUE = NULL;
03163       ael_yypop_buffer_state(yyscanner);
03164    }
03165 
03166    /* Destroy the stack itself. */
03167    ael_yyfree(yyg->yy_buffer_stack ,yyscanner);
03168    yyg->yy_buffer_stack = NULL;
03169 
03170     /* Destroy the start condition stack. */
03171         ael_yyfree(yyg->yy_start_stack ,yyscanner );
03172         yyg->yy_start_stack = NULL;
03173 
03174     /* Reset the globals. This is important in a non-reentrant scanner so the next time
03175      * ael_yylex() is called, initialization will occur. */
03176     yy_init_globals( yyscanner);
03177 
03178     /* Destroy the main struct (reentrant only). */
03179     ael_yyfree ( yyscanner , yyscanner );
03180     yyscanner = NULL;
03181     return 0;
03182 }
03183 
03184 /*
03185  * Internal utility routines.
03186  */
03187 
03188 #ifndef yytext_ptr
03189 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
03190 {
03191    register int i;
03192    for ( i = 0; i < n; ++i )
03193       s1[i] = s2[i];
03194 }
03195 #endif
03196 
03197 #ifdef YY_NEED_STRLEN
03198 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
03199 {
03200    register int n;
03201    for ( n = 0; s[n]; ++n )
03202       ;
03203 
03204    return n;
03205 }
03206 #endif
03207 
03208 void *ael_yyalloc (yy_size_t  size , yyscan_t yyscanner)
03209 {
03210    return (void *) malloc( size );
03211 }
03212 
03213 void *ael_yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
03214 {
03215    /* The cast to (char *) in the following accommodates both
03216     * implementations that use char* generic pointers, and those
03217     * that use void* generic pointers.  It works with the latter
03218     * because both ANSI C and C++ allow castless assignment from
03219     * any pointer type to void*, and deal with argument conversions
03220     * as though doing an assignment.
03221     */
03222    return (void *) realloc( (char *) ptr, size );
03223 }
03224 
03225 #define YYTABLES_NAME "yytables"
03226 
03227 #line 656 "ael.flex"
03228 
03229 
03230 
03231 static void pbcpush(char x)
03232 {
03233    pbcstack[pbcpos++] = x;
03234 }
03235 
03236 void ael_yyfree(void *ptr, yyscan_t yyscanner)
03237 {
03238    if (ptr)
03239       free( (char*) ptr );
03240 }
03241 
03242 static int pbcpop(char x)
03243 {
03244    if (   ( x == ')' && pbcstack[pbcpos-1] == '(' )
03245       || ( x == ']' && pbcstack[pbcpos-1] == '[' )
03246       || ( x == '}' && pbcstack[pbcpos-1] == '{' )) {
03247       pbcpos--;
03248       return 0;
03249    }
03250    return 1; /* error */
03251 }
03252 
03253 static void pbcpush2(char x)
03254 {
03255    pbcstack2[pbcpos2++] = x;
03256 }
03257 
03258 static int pbcpop2(char x)
03259 {
03260    if (   ( x == ')' && pbcstack2[pbcpos2-1] == '(' )
03261       || ( x == ']' && pbcstack2[pbcpos2-1] == '[' )
03262       || ( x == '}' && pbcstack2[pbcpos2-1] == '{' )) {
03263       pbcpos2--;
03264       return 0;
03265    }
03266    return 1; /* error */
03267 }
03268 
03269 static void pbcpush3(char x)
03270 {
03271    pbcstack3[pbcpos3++] = x;
03272 }
03273 
03274 static int pbcpop3(char x)
03275 {
03276    if (   ( x == ')' && pbcstack3[pbcpos3-1] == '(' )
03277       || ( x == ']' && pbcstack3[pbcpos3-1] == '[' )
03278       || ( x == '}' && pbcstack3[pbcpos3-1] == '{' )) {
03279       pbcpos3--;
03280       return 0;
03281    }
03282    return 1; /* error */
03283 }
03284 
03285 static int c_prevword(void)
03286 {
03287    char *c = prev_word;
03288    if (c == NULL)
03289       return 0;
03290    while ( *c ) {
03291       switch (*c) {
03292       case '{':
03293       case '[':
03294       case '(':
03295          pbcpush(*c);
03296          break;
03297       case '}':
03298       case ']':
03299       case ')':
03300          if (pbcpop(*c))
03301             return 1;
03302          break;
03303       }
03304       c++;
03305    }
03306    return 0;
03307 }
03308 
03309 
03310 /*
03311  * The following three functions, reset_*, are used in the bison
03312  * code to switch context. As a consequence, we need to
03313  * declare them global and add a prototype so that the
03314  * compiler does not complain.
03315  *
03316  * NOTE: yyg is declared because it is used in the BEGIN macros,
03317  * though that should be hidden as the macro changes
03318  * depending on the flex options that we use - in particular,
03319  * %reentrant changes the way the macro is declared;
03320  * without %reentrant, BEGIN uses yystart instead of yyg
03321  */
03322 
03323 void reset_parencount(yyscan_t yyscanner );
03324 void reset_parencount(yyscan_t yyscanner )
03325 {
03326    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03327    parencount = 0;
03328    pbcpos = 0;
03329    pbcpush('(');  /* push '(' so the last pcbpop (parencount= -1) will succeed */
03330    c_prevword();
03331    BEGIN(paren);
03332 }
03333 
03334 void reset_semicount(yyscan_t yyscanner );
03335 void reset_semicount(yyscan_t yyscanner )
03336 {
03337    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03338    pbcpos = 0;
03339    BEGIN(semic);
03340 }
03341 
03342 void reset_argcount(yyscan_t yyscanner );
03343 void reset_argcount(yyscan_t yyscanner )
03344 {
03345    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03346    parencount = 0;
03347    pbcpos = 0;
03348    pbcpush('(');  /* push '(' so the last pcbpop (parencount= -1) will succeed */
03349    c_prevword();
03350    BEGIN(argg);
03351 }
03352 
03353 /* used elsewhere, but some local vars */
03354 struct pval *ael2_parse(char *filename, int *errors)
03355 {
03356    struct pval *pvalue;
03357    struct parse_io *io;
03358    char *buffer;
03359    struct stat stats;
03360    FILE *fin;
03361 
03362    /* extern int ael_yydebug; */
03363 
03364    io = calloc(sizeof(struct parse_io),1);
03365    /* reset the global counters */
03366    prev_word = 0;
03367    my_lineno = 1;
03368    include_stack_index=0;
03369    my_col = 0;
03370    /* ael_yydebug = 1; */
03371    ael_yylex_init(&io->scanner);
03372    fin = fopen(filename,"r");
03373    if ( !fin ) {
03374       ast_log(LOG_ERROR,"File %s could not be opened\n", filename);
03375       *errors = 1;
03376       return 0;
03377    }
03378    if (my_file)
03379       free(my_file);
03380    my_file = strdup(filename);
03381    stat(filename, &stats);
03382    buffer = (char*)malloc(stats.st_size+2);
03383    if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
03384       ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
03385    }        
03386    buffer[stats.st_size]=0;
03387    fclose(fin);
03388 
03389    ael_yy_scan_string (buffer ,io->scanner);
03390    ael_yyset_lineno(1 , io->scanner);
03391 
03392    /* ael_yyset_in (fin , io->scanner);   OLD WAY */
03393 
03394    ael_yyparse(io);
03395 
03396 
03397    pvalue = io->pval;
03398    *errors = io->syntax_error_count;
03399 
03400    ael_yylex_destroy(io->scanner);
03401    free(buffer);
03402    free(io);
03403 
03404    return pvalue;
03405 }
03406 
03407 static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t yyscanner, int create)
03408 {
03409    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03410    int error, i;
03411    FILE *in1;
03412    char fnamebuf[2048];
03413 
03414    if (globbuf && globbuf->gl_pathv && globbuf->gl_pathc > 0)
03415 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
03416          strncpy(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
03417 #else
03418          ast_copy_string(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
03419 #endif
03420    else {
03421       ast_log(LOG_ERROR,"Include file name not present!\n");
03422       return;
03423    }
03424    for (i=0; i<include_stack_index; i++) {
03425       if ( !strcmp(fnamebuf,include_stack[i].fname )) {
03426          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Nice Try!!! But %s has already been included (perhaps by another file), and would cause an infinite loop of file inclusions!!! Include directive ignored\n",
03427             my_file, my_lineno, my_col, fnamebuf);
03428          break;
03429       }
03430    }
03431    error = 1;
03432    if (i == include_stack_index)
03433       error = 0;  /* we can use this file */
03434    if ( !error ) {   /* valid file name */
03435       /* relative vs. absolute */
03436       if (fnamebuf[0] != '/')
03437          snprintf(fnamebuf2, fnamebuf_siz, "%s/%s", ast_config_AST_CONFIG_DIR, fnamebuf);
03438       else
03439 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
03440          strncpy(fnamebuf2, fnamebuf, fnamebuf_siz);
03441 #else
03442          ast_copy_string(fnamebuf2, fnamebuf, fnamebuf_siz);
03443 #endif
03444       in1 = fopen( fnamebuf2, "r" );
03445 
03446       if ( ! in1 ) {
03447          ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf2);
03448       } else {
03449          char *buffer;
03450          struct stat stats;
03451          stat(fnamebuf2, &stats);
03452          buffer = (char*)malloc(stats.st_size+1);
03453          if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
03454             ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
03455          }        
03456          buffer[stats.st_size] = 0;
03457          ast_log(LOG_NOTICE,"  --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
03458          fclose(in1);
03459          if (include_stack[include_stack_index].fname) {
03460                free(include_stack[include_stack_index].fname);
03461             include_stack[include_stack_index].fname = 0;
03462          }
03463          include_stack[include_stack_index].fname = strdup(S_OR(my_file, "<none>"));
03464          include_stack[include_stack_index].lineno = my_lineno;
03465          include_stack[include_stack_index].colno = my_col+yyleng;
03466          if (my_file)
03467             free(my_file);
03468          my_file = strdup(fnamebuf2);
03469          if (create)
03470             include_stack[include_stack_index].globbuf = *globbuf;
03471 
03472          include_stack[include_stack_index].globbuf_pos = 0;
03473 
03474          include_stack[include_stack_index].bufstate = YY_CURRENT_BUFFER;
03475          if (create)
03476             include_stack_index++;
03477          ael_yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
03478          free(buffer);
03479          my_lineno = 1;
03480          my_col = 1;
03481          BEGIN(INITIAL);
03482       }
03483    }
03484 }
03485 

Generated on Thu Oct 11 06:47:02 2012 for Asterisk - the Open Source PBX by  doxygen 1.5.6