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