00001 #line 2 "ael_lex.c"
00002
00003 #line 4 "ael_lex.c"
00004
00005 #define YY_INT_ALIGNED short int
00006
00007
00008
00009 #define FLEX_SCANNER
00010 #define YY_FLEX_MAJOR_VERSION 2
00011 #define YY_FLEX_MINOR_VERSION 5
00012 #define YY_FLEX_SUBMINOR_VERSION 35
00013 #if YY_FLEX_SUBMINOR_VERSION > 0
00014 #define FLEX_BETA
00015 #endif
00016
00017
00018
00019 #include "asterisk.h"
00020
00021 #include <stdio.h>
00022 #include <string.h>
00023 #include <errno.h>
00024 #include <stdlib.h>
00025
00026
00027
00028
00029
00030 #ifndef FLEXINT_H
00031 #define FLEXINT_H
00032
00033
00034
00035 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00036
00037
00038
00039
00040 #ifndef __STDC_LIMIT_MACROS
00041 #define __STDC_LIMIT_MACROS 1
00042 #endif
00043
00044 #include <inttypes.h>
00045 typedef int8_t flex_int8_t;
00046 typedef uint8_t flex_uint8_t;
00047 typedef int16_t flex_int16_t;
00048 typedef uint16_t flex_uint16_t;
00049 typedef int32_t flex_int32_t;
00050 typedef uint32_t flex_uint32_t;
00051 #else
00052 typedef signed char flex_int8_t;
00053 typedef short int flex_int16_t;
00054 typedef int flex_int32_t;
00055 typedef unsigned char flex_uint8_t;
00056 typedef unsigned short int flex_uint16_t;
00057 typedef unsigned int flex_uint32_t;
00058
00059
00060 #ifndef INT8_MIN
00061 #define INT8_MIN (-128)
00062 #endif
00063 #ifndef INT16_MIN
00064 #define INT16_MIN (-32767-1)
00065 #endif
00066 #ifndef INT32_MIN
00067 #define INT32_MIN (-2147483647-1)
00068 #endif
00069 #ifndef INT8_MAX
00070 #define INT8_MAX (127)
00071 #endif
00072 #ifndef INT16_MAX
00073 #define INT16_MAX (32767)
00074 #endif
00075 #ifndef INT32_MAX
00076 #define INT32_MAX (2147483647)
00077 #endif
00078 #ifndef UINT8_MAX
00079 #define UINT8_MAX (255U)
00080 #endif
00081 #ifndef UINT16_MAX
00082 #define UINT16_MAX (65535U)
00083 #endif
00084 #ifndef UINT32_MAX
00085 #define UINT32_MAX (4294967295U)
00086 #endif
00087
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: 201679 $")
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 955 "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 YYSTYPE * ael_yyget_lval (yyscan_t yyscanner );
01058
01059 void ael_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
01060
01061 YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner );
01062
01063 void ael_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
01064
01065
01066
01067
01068
01069 #ifndef YY_SKIP_YYWRAP
01070 #ifdef __cplusplus
01071 extern "C" int ael_yywrap (yyscan_t yyscanner );
01072 #else
01073 extern int ael_yywrap (yyscan_t yyscanner );
01074 #endif
01075 #endif
01076
01077 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
01078
01079 #ifndef yytext_ptr
01080 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
01081 #endif
01082
01083 #ifdef YY_NEED_STRLEN
01084 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
01085 #endif
01086
01087 #ifndef YY_NO_INPUT
01088
01089 #ifdef __cplusplus
01090 static int yyinput (yyscan_t yyscanner );
01091 #else
01092 static int input (yyscan_t yyscanner );
01093 #endif
01094
01095 #endif
01096
01097
01098 #ifndef YY_READ_BUF_SIZE
01099 #define YY_READ_BUF_SIZE 8192
01100 #endif
01101
01102
01103 #ifndef ECHO
01104
01105
01106
01107 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
01108 #endif
01109
01110
01111
01112
01113 #ifndef YY_INPUT
01114 #define YY_INPUT(buf,result,max_size) \
01115 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
01116 { \
01117 int c = '*'; \
01118 size_t n; \
01119 for ( n = 0; n < max_size && \
01120 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
01121 buf[n] = (char) c; \
01122 if ( c == '\n' ) \
01123 buf[n++] = (char) c; \
01124 if ( c == EOF && ferror( yyin ) ) \
01125 YY_FATAL_ERROR( "input in flex scanner failed" ); \
01126 result = n; \
01127 } \
01128 else \
01129 { \
01130 errno=0; \
01131 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
01132 { \
01133 if( errno != EINTR) \
01134 { \
01135 YY_FATAL_ERROR( "input in flex scanner failed" ); \
01136 break; \
01137 } \
01138 errno=0; \
01139 clearerr(yyin); \
01140 } \
01141 }\
01142 \
01143
01144 #endif
01145
01146
01147
01148
01149
01150 #ifndef yyterminate
01151 #define yyterminate() return YY_NULL
01152 #endif
01153
01154
01155 #ifndef YY_START_STACK_INCR
01156 #define YY_START_STACK_INCR 25
01157 #endif
01158
01159
01160 #ifndef YY_FATAL_ERROR
01161 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
01162 #endif
01163
01164
01165
01166
01167
01168
01169 #ifndef YY_DECL
01170 #define YY_DECL_IS_OURS 1
01171
01172 extern int ael_yylex \
01173 (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
01174
01175 #define YY_DECL int ael_yylex \
01176 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
01177 #endif
01178
01179
01180
01181
01182 #ifndef YY_USER_ACTION
01183 #define YY_USER_ACTION
01184 #endif
01185
01186
01187 #ifndef YY_BREAK
01188 #define YY_BREAK break;
01189 #endif
01190
01191 #define YY_RULE_SETUP \
01192 YY_USER_ACTION
01193
01194
01195
01196 YY_DECL
01197 {
01198 register yy_state_type yy_current_state;
01199 register char *yy_cp, *yy_bp;
01200 register int yy_act;
01201 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01202
01203 #line 217 "ael.flex"
01204
01205
01206 #line 1206 "ael_lex.c"
01207
01208 yylval = yylval_param;
01209
01210 yylloc = yylloc_param;
01211
01212 if ( !yyg->yy_init )
01213 {
01214 yyg->yy_init = 1;
01215
01216 #ifdef YY_USER_INIT
01217 YY_USER_INIT;
01218 #endif
01219
01220 if ( ! yyg->yy_start )
01221 yyg->yy_start = 1;
01222
01223 if ( ! yyin )
01224 yyin = stdin;
01225
01226 if ( ! yyout )
01227 yyout = stdout;
01228
01229 if ( ! YY_CURRENT_BUFFER ) {
01230 ael_yyensure_buffer_stack (yyscanner);
01231 YY_CURRENT_BUFFER_LVALUE =
01232 ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
01233 }
01234
01235 ael_yy_load_buffer_state(yyscanner );
01236 }
01237
01238 while ( 1 )
01239 {
01240 yyg->yy_more_len = 0;
01241 if ( yyg->yy_more_flag )
01242 {
01243 yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
01244 yyg->yy_more_flag = 0;
01245 }
01246 yy_cp = yyg->yy_c_buf_p;
01247
01248
01249 *yy_cp = yyg->yy_hold_char;
01250
01251
01252
01253
01254 yy_bp = yy_cp;
01255
01256 yy_current_state = yyg->yy_start;
01257 yy_match:
01258 do
01259 {
01260 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
01261 if ( yy_accept[yy_current_state] )
01262 {
01263 yyg->yy_last_accepting_state = yy_current_state;
01264 yyg->yy_last_accepting_cpos = yy_cp;
01265 }
01266 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01267 {
01268 yy_current_state = (int) yy_def[yy_current_state];
01269 if ( yy_current_state >= 285 )
01270 yy_c = yy_meta[(unsigned int) yy_c];
01271 }
01272 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01273 ++yy_cp;
01274 }
01275 while ( yy_current_state != 284 );
01276 yy_cp = yyg->yy_last_accepting_cpos;
01277 yy_current_state = yyg->yy_last_accepting_state;
01278
01279 yy_find_action:
01280 yy_act = yy_accept[yy_current_state];
01281
01282 YY_DO_BEFORE_ACTION;
01283
01284 do_action:
01285
01286 switch ( yy_act )
01287 {
01288 case 0:
01289
01290 *yy_cp = yyg->yy_hold_char;
01291 yy_cp = yyg->yy_last_accepting_cpos;
01292 yy_current_state = yyg->yy_last_accepting_state;
01293 goto yy_find_action;
01294
01295 case 1:
01296 YY_RULE_SETUP
01297 #line 219 "ael.flex"
01298 { STORE_POS; return LC;}
01299 YY_BREAK
01300 case 2:
01301 YY_RULE_SETUP
01302 #line 220 "ael.flex"
01303 { STORE_POS; return RC;}
01304 YY_BREAK
01305 case 3:
01306 YY_RULE_SETUP
01307 #line 221 "ael.flex"
01308 { STORE_POS; return LP;}
01309 YY_BREAK
01310 case 4:
01311 YY_RULE_SETUP
01312 #line 222 "ael.flex"
01313 { STORE_POS; return RP;}
01314 YY_BREAK
01315 case 5:
01316 YY_RULE_SETUP
01317 #line 223 "ael.flex"
01318 { STORE_POS; return SEMI;}
01319 YY_BREAK
01320 case 6:
01321 YY_RULE_SETUP
01322 #line 224 "ael.flex"
01323 { STORE_POS; return EQ;}
01324 YY_BREAK
01325 case 7:
01326 YY_RULE_SETUP
01327 #line 225 "ael.flex"
01328 { STORE_POS; return COMMA;}
01329 YY_BREAK
01330 case 8:
01331 YY_RULE_SETUP
01332 #line 226 "ael.flex"
01333 { STORE_POS; return COLON;}
01334 YY_BREAK
01335 case 9:
01336 YY_RULE_SETUP
01337 #line 227 "ael.flex"
01338 { STORE_POS; return AMPER;}
01339 YY_BREAK
01340 case 10:
01341 YY_RULE_SETUP
01342 #line 228 "ael.flex"
01343 { STORE_POS; return BAR;}
01344 YY_BREAK
01345 case 11:
01346 YY_RULE_SETUP
01347 #line 229 "ael.flex"
01348 { STORE_POS; return EXTENMARK;}
01349 YY_BREAK
01350 case 12:
01351 YY_RULE_SETUP
01352 #line 230 "ael.flex"
01353 { STORE_POS; return AT;}
01354 YY_BREAK
01355 case 13:
01356 YY_RULE_SETUP
01357 #line 231 "ael.flex"
01358 {}
01359 YY_BREAK
01360 case 14:
01361 YY_RULE_SETUP
01362 #line 232 "ael.flex"
01363 { STORE_POS; return KW_CONTEXT;}
01364 YY_BREAK
01365 case 15:
01366 YY_RULE_SETUP
01367 #line 233 "ael.flex"
01368 { STORE_POS; return KW_ABSTRACT;}
01369 YY_BREAK
01370 case 16:
01371 YY_RULE_SETUP
01372 #line 234 "ael.flex"
01373 { STORE_POS; return KW_EXTEND;}
01374 YY_BREAK
01375 case 17:
01376 YY_RULE_SETUP
01377 #line 235 "ael.flex"
01378 { STORE_POS; return KW_MACRO;};
01379 YY_BREAK
01380 case 18:
01381 YY_RULE_SETUP
01382 #line 236 "ael.flex"
01383 { STORE_POS; return KW_GLOBALS;}
01384 YY_BREAK
01385 case 19:
01386 YY_RULE_SETUP
01387 #line 237 "ael.flex"
01388 { STORE_POS; return KW_LOCAL;}
01389 YY_BREAK
01390 case 20:
01391 YY_RULE_SETUP
01392 #line 238 "ael.flex"
01393 { STORE_POS; return KW_IGNOREPAT;}
01394 YY_BREAK
01395 case 21:
01396 YY_RULE_SETUP
01397 #line 239 "ael.flex"
01398 { STORE_POS; return KW_SWITCH;}
01399 YY_BREAK
01400 case 22:
01401 YY_RULE_SETUP
01402 #line 240 "ael.flex"
01403 { STORE_POS; return KW_IF;}
01404 YY_BREAK
01405 case 23:
01406 YY_RULE_SETUP
01407 #line 241 "ael.flex"
01408 { STORE_POS; return KW_IFTIME;}
01409 YY_BREAK
01410 case 24:
01411 YY_RULE_SETUP
01412 #line 242 "ael.flex"
01413 { STORE_POS; return KW_RANDOM;}
01414 YY_BREAK
01415 case 25:
01416 YY_RULE_SETUP
01417 #line 243 "ael.flex"
01418 { STORE_POS; return KW_REGEXTEN;}
01419 YY_BREAK
01420 case 26:
01421 YY_RULE_SETUP
01422 #line 244 "ael.flex"
01423 { STORE_POS; return KW_HINT;}
01424 YY_BREAK
01425 case 27:
01426 YY_RULE_SETUP
01427 #line 245 "ael.flex"
01428 { STORE_POS; return KW_ELSE;}
01429 YY_BREAK
01430 case 28:
01431 YY_RULE_SETUP
01432 #line 246 "ael.flex"
01433 { STORE_POS; return KW_GOTO;}
01434 YY_BREAK
01435 case 29:
01436 YY_RULE_SETUP
01437 #line 247 "ael.flex"
01438 { STORE_POS; return KW_JUMP;}
01439 YY_BREAK
01440 case 30:
01441 YY_RULE_SETUP
01442 #line 248 "ael.flex"
01443 { STORE_POS; return KW_RETURN;}
01444 YY_BREAK
01445 case 31:
01446 YY_RULE_SETUP
01447 #line 249 "ael.flex"
01448 { STORE_POS; return KW_BREAK;}
01449 YY_BREAK
01450 case 32:
01451 YY_RULE_SETUP
01452 #line 250 "ael.flex"
01453 { STORE_POS; return KW_CONTINUE;}
01454 YY_BREAK
01455 case 33:
01456 YY_RULE_SETUP
01457 #line 251 "ael.flex"
01458 { STORE_POS; return KW_FOR;}
01459 YY_BREAK
01460 case 34:
01461 YY_RULE_SETUP
01462 #line 252 "ael.flex"
01463 { STORE_POS; return KW_WHILE;}
01464 YY_BREAK
01465 case 35:
01466 YY_RULE_SETUP
01467 #line 253 "ael.flex"
01468 { STORE_POS; return KW_CASE;}
01469 YY_BREAK
01470 case 36:
01471 YY_RULE_SETUP
01472 #line 254 "ael.flex"
01473 { STORE_POS; return KW_DEFAULT;}
01474 YY_BREAK
01475 case 37:
01476 YY_RULE_SETUP
01477 #line 255 "ael.flex"
01478 { STORE_POS; return KW_PATTERN;}
01479 YY_BREAK
01480 case 38:
01481 YY_RULE_SETUP
01482 #line 256 "ael.flex"
01483 { STORE_POS; return KW_CATCH;}
01484 YY_BREAK
01485 case 39:
01486 YY_RULE_SETUP
01487 #line 257 "ael.flex"
01488 { STORE_POS; return KW_SWITCHES;}
01489 YY_BREAK
01490 case 40:
01491 YY_RULE_SETUP
01492 #line 258 "ael.flex"
01493 { STORE_POS; return KW_ESWITCHES;}
01494 YY_BREAK
01495 case 41:
01496 YY_RULE_SETUP
01497 #line 259 "ael.flex"
01498 { STORE_POS; return KW_INCLUDES;}
01499 YY_BREAK
01500 case 42:
01501 YY_RULE_SETUP
01502 #line 260 "ael.flex"
01503 { BEGIN(comment); my_col += 2; }
01504 YY_BREAK
01505 case 43:
01506 YY_RULE_SETUP
01507 #line 262 "ael.flex"
01508 { my_col += yyleng; }
01509 YY_BREAK
01510 case 44:
01511
01512 YY_RULE_SETUP
01513 #line 263 "ael.flex"
01514 { ++my_lineno; my_col=1;}
01515 YY_BREAK
01516 case 45:
01517 YY_RULE_SETUP
01518 #line 264 "ael.flex"
01519 { my_col += yyleng; }
01520 YY_BREAK
01521 case 46:
01522
01523 YY_RULE_SETUP
01524 #line 265 "ael.flex"
01525 { ++my_lineno; my_col=1;}
01526 YY_BREAK
01527 case 47:
01528 YY_RULE_SETUP
01529 #line 266 "ael.flex"
01530 { my_col += 2; BEGIN(INITIAL); }
01531 YY_BREAK
01532 case 48:
01533
01534 YY_RULE_SETUP
01535 #line 268 "ael.flex"
01536 { my_lineno++; my_col = 1; }
01537 YY_BREAK
01538 case 49:
01539 YY_RULE_SETUP
01540 #line 269 "ael.flex"
01541 { my_col += yyleng; }
01542 YY_BREAK
01543 case 50:
01544 YY_RULE_SETUP
01545 #line 270 "ael.flex"
01546 { my_col += (yyleng*8)-(my_col%8); }
01547 YY_BREAK
01548 case 51:
01549 YY_RULE_SETUP
01550 #line 272 "ael.flex"
01551 {
01552
01553
01554
01555
01556
01557
01558
01559 if (!strcmp(yytext,"${")) {
01560 parencount2 = 0;
01561 pbcpos2 = 0;
01562 pbcpush2('{');
01563 BEGIN(curlystate);
01564 yymore();
01565 } else if (!strcmp(yytext,"$[")) {
01566 parencount3 = 0;
01567 pbcpos3 = 0;
01568 pbcpush3('[');
01569 BEGIN(brackstate);
01570 yymore();
01571 } else {
01572 BEGIN(wordstate);
01573 yymore();
01574 }
01575 }
01576 YY_BREAK
01577 case 52:
01578 YY_RULE_SETUP
01579 #line 298 "ael.flex"
01580 { yymore(); }
01581 YY_BREAK
01582 case 53:
01583 YY_RULE_SETUP
01584 #line 299 "ael.flex"
01585 { yymore(); }
01586 YY_BREAK
01587 case 54:
01588 YY_RULE_SETUP
01589 #line 300 "ael.flex"
01590 { yymore(); }
01591 YY_BREAK
01592 case 55:
01593 YY_RULE_SETUP
01594 #line 301 "ael.flex"
01595 {
01596 parencount2 = 0;
01597 pbcpos2 = 0;
01598 pbcpush2('{');
01599 BEGIN(curlystate);
01600 yymore();
01601 }
01602 YY_BREAK
01603 case 56:
01604 YY_RULE_SETUP
01605 #line 308 "ael.flex"
01606 {
01607 parencount3 = 0;
01608 pbcpos3 = 0;
01609 pbcpush3('[');
01610 BEGIN(brackstate);
01611 yymore();
01612 }
01613 YY_BREAK
01614 case 57:
01615
01616 YY_RULE_SETUP
01617 #line 315 "ael.flex"
01618 {
01619
01620 char c = yytext[yyleng-1];
01621 STORE_POS;
01622 yylval->str = malloc(yyleng);
01623 strncpy(yylval->str, yytext, yyleng);
01624 yylval->str[yyleng-1] = 0;
01625 unput(c);
01626 BEGIN(0);
01627 return word;
01628 }
01629 YY_BREAK
01630 case 58:
01631
01632 YY_RULE_SETUP
01633 #line 328 "ael.flex"
01634 {
01635 if ( pbcpop2('}') ) {
01636 STORE_LOC;
01637 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
01638 BEGIN(0);
01639 yylval->str = malloc(yyleng+1);
01640 strncpy(yylval->str, yytext, yyleng);
01641 yylval->str[yyleng] = 0;
01642 return word;
01643 }
01644 parencount2--;
01645 if ( parencount2 >= 0) {
01646 yymore();
01647 } else {
01648 BEGIN(wordstate);
01649 yymore();
01650 }
01651 }
01652 YY_BREAK
01653 case 59:
01654
01655 YY_RULE_SETUP
01656 #line 347 "ael.flex"
01657 {
01658 char c = yytext[yyleng-1];
01659 if (c == '{')
01660 parencount2++;
01661 pbcpush2(c);
01662 yymore();
01663 }
01664 YY_BREAK
01665 case 60:
01666
01667 YY_RULE_SETUP
01668 #line 355 "ael.flex"
01669 {
01670 char c = yytext[yyleng-1];
01671 if ( pbcpop2(c)) {
01672 STORE_LOC;
01673 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
01674 my_file, my_lineno, my_col, c);
01675 BEGIN(0);
01676 yylval->str = malloc(yyleng+1);
01677 strncpy(yylval->str, yytext, yyleng);
01678 yylval->str[yyleng] = 0;
01679 return word;
01680 }
01681 yymore();
01682 }
01683 YY_BREAK
01684 case 61:
01685
01686 YY_RULE_SETUP
01687 #line 371 "ael.flex"
01688 {
01689 if ( pbcpop3(']') ) {
01690 STORE_LOC;
01691 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
01692 BEGIN(0);
01693 yylval->str = malloc(yyleng+1);
01694 strncpy(yylval->str, yytext, yyleng);
01695 yylval->str[yyleng] = 0;
01696 return word;
01697 }
01698 parencount3--;
01699 if ( parencount3 >= 0) {
01700 yymore();
01701 } else {
01702 BEGIN(wordstate);
01703 yymore();
01704 }
01705 }
01706 YY_BREAK
01707 case 62:
01708
01709 YY_RULE_SETUP
01710 #line 390 "ael.flex"
01711 {
01712 char c = yytext[yyleng-1];
01713 if (c == '[')
01714 parencount3++;
01715 pbcpush3(c);
01716 yymore();
01717 }
01718 YY_BREAK
01719 case 63:
01720
01721 YY_RULE_SETUP
01722 #line 398 "ael.flex"
01723 {
01724 char c = yytext[yyleng-1];
01725 if ( pbcpop3(c)) {
01726 STORE_LOC;
01727 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
01728 my_file, my_lineno, my_col, c);
01729 BEGIN(0);
01730 yylval->str = malloc(yyleng+1);
01731 strncpy(yylval->str, yytext, yyleng);
01732 yylval->str[yyleng] = 0;
01733 return word;
01734 }
01735 yymore();
01736 }
01737 YY_BREAK
01738
01739
01740
01741
01742
01743
01744
01745 case 64:
01746
01747 YY_RULE_SETUP
01748 #line 421 "ael.flex"
01749 {
01750 if ( pbcpop(')') ) {
01751 STORE_LOC;
01752 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
01753 BEGIN(0);
01754 yylval->str = malloc(yyleng+1);
01755 strncpy(yylval->str, yytext, yyleng);
01756 yylval->str[yyleng] = 0;
01757 prev_word = 0;
01758 return word;
01759 }
01760 parencount--;
01761 if ( parencount >= 0) {
01762 yymore();
01763 } else {
01764 STORE_LOC;
01765 yylval->str = malloc(yyleng);
01766 strncpy(yylval->str, yytext, yyleng);
01767 yylval->str[yyleng-1] = 0;
01768 unput(')');
01769 BEGIN(0);
01770 return word;
01771 }
01772 }
01773 YY_BREAK
01774 case 65:
01775
01776 YY_RULE_SETUP
01777 #line 446 "ael.flex"
01778 {
01779 char c = yytext[yyleng-1];
01780 if (c == '(')
01781 parencount++;
01782 pbcpush(c);
01783 yymore();
01784 }
01785 YY_BREAK
01786 case 66:
01787
01788 YY_RULE_SETUP
01789 #line 454 "ael.flex"
01790 {
01791 char c = yytext[yyleng-1];
01792 if ( pbcpop(c)) {
01793 STORE_LOC;
01794 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
01795 my_file, my_lineno, my_col, c);
01796 BEGIN(0);
01797 yylval->str = malloc(yyleng+1);
01798 strncpy(yylval->str, yytext, yyleng);
01799 yylval->str[yyleng] = 0;
01800 return word;
01801 }
01802 yymore();
01803 }
01804 YY_BREAK
01805
01806
01807
01808
01809
01810
01811
01812
01813 case 67:
01814
01815 YY_RULE_SETUP
01816 #line 478 "ael.flex"
01817 {
01818 char c = yytext[yyleng-1];
01819 if (c == '(')
01820 parencount++;
01821 pbcpush(c);
01822 yymore();
01823 }
01824 YY_BREAK
01825 case 68:
01826
01827 YY_RULE_SETUP
01828 #line 486 "ael.flex"
01829 {
01830 if ( pbcpop(')') ) {
01831 STORE_LOC;
01832 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
01833 BEGIN(0);
01834 yylval->str = malloc(yyleng+1);
01835 strncpy(yylval->str, yytext, yyleng);
01836 yylval->str[yyleng] = 0;
01837 return word;
01838 }
01839
01840 parencount--;
01841 if( parencount >= 0){
01842 yymore();
01843 } else {
01844 STORE_LOC;
01845 BEGIN(0);
01846 if ( !strcmp(yytext, ")") )
01847 return RP;
01848 yylval->str = malloc(yyleng);
01849 strncpy(yylval->str, yytext, yyleng);
01850 yylval->str[yyleng-1] = '\0';
01851 unput(')');
01852 return word;
01853 }
01854 }
01855 YY_BREAK
01856 case 69:
01857
01858 YY_RULE_SETUP
01859 #line 513 "ael.flex"
01860 {
01861 if( parencount != 0) {
01862 yymore();
01863 } else {
01864 STORE_LOC;
01865 if( !strcmp(yytext,"," ) )
01866 return COMMA;
01867 yylval->str = malloc(yyleng);
01868 strncpy(yylval->str, yytext, yyleng);
01869 yylval->str[yyleng-1] = '\0';
01870 unput(',');
01871 return word;
01872 }
01873 }
01874 YY_BREAK
01875 case 70:
01876
01877 YY_RULE_SETUP
01878 #line 528 "ael.flex"
01879 {
01880 char c = yytext[yyleng-1];
01881 if ( pbcpop(c) ) {
01882 STORE_LOC;
01883 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
01884 BEGIN(0);
01885 yylval->str = malloc(yyleng+1);
01886 strncpy(yylval->str, yytext, yyleng);
01887 yylval->str[yyleng] = '\0';
01888 return word;
01889 }
01890 yymore();
01891 }
01892 YY_BREAK
01893
01894
01895
01896
01897
01898 case 71:
01899
01900 YY_RULE_SETUP
01901 #line 547 "ael.flex"
01902 {
01903 char c = yytext[yyleng-1];
01904 yymore();
01905 pbcpush(c);
01906 }
01907 YY_BREAK
01908 case 72:
01909
01910 YY_RULE_SETUP
01911 #line 553 "ael.flex"
01912 {
01913 char c = yytext[yyleng-1];
01914 if ( pbcpop(c) ) {
01915 STORE_LOC;
01916 ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
01917 BEGIN(0);
01918 yylval->str = malloc(yyleng+1);
01919 strncpy(yylval->str, yytext, yyleng);
01920 yylval->str[yyleng] = '\0';
01921 return word;
01922 }
01923 yymore();
01924 }
01925 YY_BREAK
01926 case 73:
01927
01928 YY_RULE_SETUP
01929 #line 567 "ael.flex"
01930 {
01931 STORE_LOC;
01932 yylval->str = malloc(yyleng);
01933 strncpy(yylval->str, yytext, yyleng);
01934 yylval->str[yyleng-1] = '\0';
01935 unput(';');
01936 BEGIN(0);
01937 return word;
01938 }
01939 YY_BREAK
01940 case 74:
01941
01942 YY_RULE_SETUP
01943 #line 577 "ael.flex"
01944 {
01945 char fnamebuf[1024],*p1,*p2;
01946 int glob_ret;
01947 glob_t globbuf;
01948 int globbuf_pos = -1;
01949 globbuf.gl_offs = 0;
01950
01951 p1 = strchr(yytext,'"');
01952 p2 = strrchr(yytext,'"');
01953 if ( include_stack_index >= MAX_INCLUDE_DEPTH ) {
01954 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);
01955 } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) {
01956 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);
01957 } else {
01958 strncpy(fnamebuf, p1+1, p2-p1-1);
01959 fnamebuf[p2-p1-1] = 0;
01960 if (fnamebuf[0] != '/') {
01961 char fnamebuf2[1024];
01962 snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
01963 ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
01964 }
01965 #ifdef SOLARIS
01966 glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
01967 #else
01968 glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
01969 #endif
01970 if (glob_ret == GLOB_NOSPACE) {
01971 ast_log(LOG_WARNING,
01972 "Glob Expansion of pattern '%s' failed: Not enough memory\n", fnamebuf);
01973 } else if (glob_ret == GLOB_ABORTED) {
01974 ast_log(LOG_WARNING,
01975 "Glob Expansion of pattern '%s' failed: Read error\n", fnamebuf);
01976 } else if (glob_ret == GLOB_NOMATCH) {
01977 ast_log(LOG_WARNING,
01978 "Glob Expansion of pattern '%s' failed: No matches!\n", fnamebuf);
01979 } else {
01980 globbuf_pos = 0;
01981 }
01982 }
01983 if (globbuf_pos > -1) {
01984 setup_filestack(fnamebuf, sizeof(fnamebuf), &globbuf, 0, yyscanner, 1);
01985 }
01986 }
01987 YY_BREAK
01988 case YY_STATE_EOF(INITIAL):
01989 case YY_STATE_EOF(paren):
01990 case YY_STATE_EOF(semic):
01991 case YY_STATE_EOF(argg):
01992 case YY_STATE_EOF(comment):
01993 case YY_STATE_EOF(curlystate):
01994 case YY_STATE_EOF(wordstate):
01995 case YY_STATE_EOF(brackstate):
01996 #line 622 "ael.flex"
01997 {
01998 char fnamebuf[2048];
01999 if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
02000 ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner );
02001 include_stack[include_stack_index-1].globbuf_pos++;
02002 setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0);
02003
02004
02005 } else {
02006 if (include_stack[include_stack_index].fname) {
02007 free(include_stack[include_stack_index].fname);
02008 include_stack[include_stack_index].fname = 0;
02009 }
02010 if (my_file) {
02011 free(my_file);
02012 my_file = 0;
02013 }
02014 if ( --include_stack_index < 0 ) {
02015 yyterminate();
02016 } else {
02017 globfree(&include_stack[include_stack_index].globbuf);
02018 include_stack[include_stack_index].globbuf_pos = -1;
02019
02020 ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner );
02021 ael_yy_switch_to_buffer(include_stack[include_stack_index].bufstate,yyscanner );
02022 my_lineno = include_stack[include_stack_index].lineno;
02023 my_col = include_stack[include_stack_index].colno;
02024 my_file = strdup(include_stack[include_stack_index].fname);
02025 }
02026 }
02027 }
02028 YY_BREAK
02029 case 75:
02030
02031 YY_RULE_SETUP
02032 #line 654 "ael.flex"
02033 { ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); }
02034 YY_BREAK
02035 case 76:
02036 YY_RULE_SETUP
02037 #line 656 "ael.flex"
02038 YY_FATAL_ERROR( "flex scanner jammed" );
02039 YY_BREAK
02040 #line 2040 "ael_lex.c"
02041
02042 case YY_END_OF_BUFFER:
02043 {
02044
02045 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
02046
02047
02048 *yy_cp = yyg->yy_hold_char;
02049 YY_RESTORE_YY_MORE_OFFSET
02050
02051 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
02052 {
02053
02054
02055
02056
02057
02058
02059
02060
02061
02062 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
02063 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
02064 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
02065 }
02066
02067
02068
02069
02070
02071
02072
02073
02074 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
02075 {
02076 yy_state_type yy_next_state;
02077
02078 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
02079
02080 yy_current_state = yy_get_previous_state( yyscanner );
02081
02082
02083
02084
02085
02086
02087
02088
02089
02090
02091 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
02092
02093 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
02094
02095 if ( yy_next_state )
02096 {
02097
02098 yy_cp = ++yyg->yy_c_buf_p;
02099 yy_current_state = yy_next_state;
02100 goto yy_match;
02101 }
02102
02103 else
02104 {
02105 yy_cp = yyg->yy_last_accepting_cpos;
02106 yy_current_state = yyg->yy_last_accepting_state;
02107 goto yy_find_action;
02108 }
02109 }
02110
02111 else switch ( yy_get_next_buffer( yyscanner ) )
02112 {
02113 case EOB_ACT_END_OF_FILE:
02114 {
02115 yyg->yy_did_buffer_switch_on_eof = 0;
02116
02117 if ( ael_yywrap(yyscanner ) )
02118 {
02119
02120
02121
02122
02123
02124
02125
02126
02127
02128 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
02129
02130 yy_act = YY_STATE_EOF(YY_START);
02131 goto do_action;
02132 }
02133
02134 else
02135 {
02136 if ( ! yyg->yy_did_buffer_switch_on_eof )
02137 YY_NEW_FILE;
02138 }
02139 break;
02140 }
02141
02142 case EOB_ACT_CONTINUE_SCAN:
02143 yyg->yy_c_buf_p =
02144 yyg->yytext_ptr + yy_amount_of_matched_text;
02145
02146 yy_current_state = yy_get_previous_state( yyscanner );
02147
02148 yy_cp = yyg->yy_c_buf_p;
02149 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
02150 goto yy_match;
02151
02152 case EOB_ACT_LAST_MATCH:
02153 yyg->yy_c_buf_p =
02154 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
02155
02156 yy_current_state = yy_get_previous_state( yyscanner );
02157
02158 yy_cp = yyg->yy_c_buf_p;
02159 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
02160 goto yy_find_action;
02161 }
02162 break;
02163 }
02164
02165 default:
02166 YY_FATAL_ERROR(
02167 "fatal flex scanner internal error--no action found" );
02168 }
02169 }
02170 }
02171
02172
02173
02174
02175
02176
02177
02178
02179 static int yy_get_next_buffer (yyscan_t yyscanner)
02180 {
02181 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02182 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
02183 register char *source = yyg->yytext_ptr;
02184 register int number_to_move, i;
02185 int ret_val;
02186
02187 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
02188 YY_FATAL_ERROR(
02189 "fatal flex scanner internal error--end of buffer missed" );
02190
02191 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
02192 {
02193 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
02194 {
02195
02196
02197
02198 return EOB_ACT_END_OF_FILE;
02199 }
02200
02201 else
02202 {
02203
02204
02205
02206 return EOB_ACT_LAST_MATCH;
02207 }
02208 }
02209
02210
02211
02212
02213 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
02214
02215 for ( i = 0; i < number_to_move; ++i )
02216 *(dest++) = *(source++);
02217
02218 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
02219
02220
02221
02222 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
02223
02224 else
02225 {
02226 int num_to_read =
02227 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
02228
02229 while ( num_to_read <= 0 )
02230 {
02231
02232
02233 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
02234
02235 int yy_c_buf_p_offset =
02236 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
02237
02238 if ( b->yy_is_our_buffer )
02239 {
02240 int new_size = b->yy_buf_size * 2;
02241
02242 if ( new_size <= 0 )
02243 b->yy_buf_size += b->yy_buf_size / 8;
02244 else
02245 b->yy_buf_size *= 2;
02246
02247 b->yy_ch_buf = (char *)
02248
02249 ael_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
02250 }
02251 else
02252
02253 b->yy_ch_buf = 0;
02254
02255 if ( ! b->yy_ch_buf )
02256 YY_FATAL_ERROR(
02257 "fatal error - scanner input buffer overflow" );
02258
02259 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
02260
02261 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
02262 number_to_move - 1;
02263
02264 }
02265
02266 if ( num_to_read > YY_READ_BUF_SIZE )
02267 num_to_read = YY_READ_BUF_SIZE;
02268
02269
02270 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
02271 yyg->yy_n_chars, (size_t) num_to_read );
02272
02273 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
02274 }
02275
02276 if ( yyg->yy_n_chars == 0 )
02277 {
02278 if ( number_to_move == YY_MORE_ADJ )
02279 {
02280 ret_val = EOB_ACT_END_OF_FILE;
02281 ael_yyrestart(yyin ,yyscanner);
02282 }
02283
02284 else
02285 {
02286 ret_val = EOB_ACT_LAST_MATCH;
02287 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
02288 YY_BUFFER_EOF_PENDING;
02289 }
02290 }
02291
02292 else
02293 ret_val = EOB_ACT_CONTINUE_SCAN;
02294
02295 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
02296
02297 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
02298 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ael_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
02299 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
02300 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
02301 }
02302
02303 yyg->yy_n_chars += number_to_move;
02304 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
02305 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
02306
02307 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
02308
02309 return ret_val;
02310 }
02311
02312
02313
02314 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
02315 {
02316 register yy_state_type yy_current_state;
02317 register char *yy_cp;
02318 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02319
02320 yy_current_state = yyg->yy_start;
02321
02322 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
02323 {
02324 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
02325 if ( yy_accept[yy_current_state] )
02326 {
02327 yyg->yy_last_accepting_state = yy_current_state;
02328 yyg->yy_last_accepting_cpos = yy_cp;
02329 }
02330 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02331 {
02332 yy_current_state = (int) yy_def[yy_current_state];
02333 if ( yy_current_state >= 285 )
02334 yy_c = yy_meta[(unsigned int) yy_c];
02335 }
02336 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02337 }
02338
02339 return yy_current_state;
02340 }
02341
02342
02343
02344
02345
02346
02347 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
02348 {
02349 register int yy_is_jam;
02350 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02351 register char *yy_cp = yyg->yy_c_buf_p;
02352
02353 register YY_CHAR yy_c = 1;
02354 if ( yy_accept[yy_current_state] )
02355 {
02356 yyg->yy_last_accepting_state = yy_current_state;
02357 yyg->yy_last_accepting_cpos = yy_cp;
02358 }
02359 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02360 {
02361 yy_current_state = (int) yy_def[yy_current_state];
02362 if ( yy_current_state >= 285 )
02363 yy_c = yy_meta[(unsigned int) yy_c];
02364 }
02365 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02366 yy_is_jam = (yy_current_state == 284);
02367
02368 return yy_is_jam ? 0 : yy_current_state;
02369 }
02370
02371 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
02372 {
02373 register char *yy_cp;
02374 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02375
02376 yy_cp = yyg->yy_c_buf_p;
02377
02378
02379 *yy_cp = yyg->yy_hold_char;
02380
02381 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
02382 {
02383
02384 register int number_to_move = yyg->yy_n_chars + 2;
02385 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
02386 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
02387 register char *source =
02388 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
02389
02390 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
02391 *--dest = *--source;
02392
02393 yy_cp += (int) (dest - source);
02394 yy_bp += (int) (dest - source);
02395 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
02396 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
02397
02398 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
02399 YY_FATAL_ERROR( "flex scanner push-back overflow" );
02400 }
02401
02402 *--yy_cp = (char) c;
02403
02404 yyg->yytext_ptr = yy_bp;
02405 yyg->yy_hold_char = *yy_cp;
02406 yyg->yy_c_buf_p = yy_cp;
02407 }
02408
02409 #ifndef YY_NO_INPUT
02410 #ifdef __cplusplus
02411 static int yyinput (yyscan_t yyscanner)
02412 #else
02413 static int input (yyscan_t yyscanner)
02414 #endif
02415
02416 {
02417 int c;
02418 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02419
02420 *yyg->yy_c_buf_p = yyg->yy_hold_char;
02421
02422 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
02423 {
02424
02425
02426
02427
02428 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
02429
02430 *yyg->yy_c_buf_p = '\0';
02431
02432 else
02433 {
02434 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
02435 ++yyg->yy_c_buf_p;
02436
02437 switch ( yy_get_next_buffer( yyscanner ) )
02438 {
02439 case EOB_ACT_LAST_MATCH:
02440
02441
02442
02443
02444
02445
02446
02447
02448
02449
02450
02451 ael_yyrestart(yyin ,yyscanner);
02452
02453
02454
02455 case EOB_ACT_END_OF_FILE:
02456 {
02457 if ( ael_yywrap(yyscanner ) )
02458 return EOF;
02459
02460 if ( ! yyg->yy_did_buffer_switch_on_eof )
02461 YY_NEW_FILE;
02462 #ifdef __cplusplus
02463 return yyinput(yyscanner);
02464 #else
02465 return input(yyscanner);
02466 #endif
02467 }
02468
02469 case EOB_ACT_CONTINUE_SCAN:
02470 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
02471 break;
02472 }
02473 }
02474 }
02475
02476 c = *(unsigned char *) yyg->yy_c_buf_p;
02477 *yyg->yy_c_buf_p = '\0';
02478 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
02479
02480 return c;
02481 }
02482 #endif
02483
02484
02485
02486
02487
02488
02489 void ael_yyrestart (FILE * input_file , yyscan_t yyscanner)
02490 {
02491 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02492
02493 if ( ! YY_CURRENT_BUFFER ){
02494 ael_yyensure_buffer_stack (yyscanner);
02495 YY_CURRENT_BUFFER_LVALUE =
02496 ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
02497 }
02498
02499 ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
02500 ael_yy_load_buffer_state(yyscanner );
02501 }
02502
02503
02504
02505
02506
02507 void ael_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
02508 {
02509 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02510
02511
02512
02513
02514
02515
02516 ael_yyensure_buffer_stack (yyscanner);
02517 if ( YY_CURRENT_BUFFER == new_buffer )
02518 return;
02519
02520 if ( YY_CURRENT_BUFFER )
02521 {
02522
02523 *yyg->yy_c_buf_p = yyg->yy_hold_char;
02524 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
02525 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
02526 }
02527
02528 YY_CURRENT_BUFFER_LVALUE = new_buffer;
02529 ael_yy_load_buffer_state(yyscanner );
02530
02531
02532
02533
02534
02535
02536 yyg->yy_did_buffer_switch_on_eof = 1;
02537 }
02538
02539 static void ael_yy_load_buffer_state (yyscan_t yyscanner)
02540 {
02541 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02542 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
02543 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
02544 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
02545 yyg->yy_hold_char = *yyg->yy_c_buf_p;
02546 }
02547
02548
02549
02550
02551
02552
02553
02554 YY_BUFFER_STATE ael_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
02555 {
02556 YY_BUFFER_STATE b;
02557
02558 b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
02559 if ( ! b )
02560 YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
02561
02562 b->yy_buf_size = size;
02563
02564
02565
02566
02567 b->yy_ch_buf = (char *) ael_yyalloc(b->yy_buf_size + 2 ,yyscanner );
02568 if ( ! b->yy_ch_buf )
02569 YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
02570
02571 b->yy_is_our_buffer = 1;
02572
02573 ael_yy_init_buffer(b,file ,yyscanner);
02574
02575 return b;
02576 }
02577
02578
02579
02580
02581
02582 void ael_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
02583 {
02584 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02585
02586 if ( ! b )
02587 return;
02588
02589 if ( b == YY_CURRENT_BUFFER )
02590 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
02591
02592 if ( b->yy_is_our_buffer )
02593 ael_yyfree((void *) b->yy_ch_buf ,yyscanner );
02594
02595 ael_yyfree((void *) b ,yyscanner );
02596 }
02597
02598 #ifndef __cplusplus
02599 extern int isatty (int );
02600 #endif
02601
02602
02603
02604
02605
02606 static void ael_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
02607
02608 {
02609 int oerrno = errno;
02610 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02611
02612 ael_yy_flush_buffer(b ,yyscanner);
02613
02614 b->yy_input_file = file;
02615 b->yy_fill_buffer = 1;
02616
02617
02618
02619
02620
02621 if (b != YY_CURRENT_BUFFER){
02622 b->yy_bs_lineno = 1;
02623 b->yy_bs_column = 0;
02624 }
02625
02626 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
02627
02628 errno = oerrno;
02629 }
02630
02631
02632
02633
02634
02635 void ael_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
02636 {
02637 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02638 if ( ! b )
02639 return;
02640
02641 b->yy_n_chars = 0;
02642
02643
02644
02645
02646
02647 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
02648 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
02649
02650 b->yy_buf_pos = &b->yy_ch_buf[0];
02651
02652 b->yy_at_bol = 1;
02653 b->yy_buffer_status = YY_BUFFER_NEW;
02654
02655 if ( b == YY_CURRENT_BUFFER )
02656 ael_yy_load_buffer_state(yyscanner );
02657 }
02658
02659
02660
02661
02662
02663
02664
02665 void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
02666 {
02667 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02668 if (new_buffer == NULL)
02669 return;
02670
02671 ael_yyensure_buffer_stack(yyscanner);
02672
02673
02674 if ( YY_CURRENT_BUFFER )
02675 {
02676
02677 *yyg->yy_c_buf_p = yyg->yy_hold_char;
02678 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
02679 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
02680 }
02681
02682
02683 if (YY_CURRENT_BUFFER)
02684 yyg->yy_buffer_stack_top++;
02685 YY_CURRENT_BUFFER_LVALUE = new_buffer;
02686
02687
02688 ael_yy_load_buffer_state(yyscanner );
02689 yyg->yy_did_buffer_switch_on_eof = 1;
02690 }
02691
02692
02693
02694
02695
02696 void ael_yypop_buffer_state (yyscan_t yyscanner)
02697 {
02698 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02699 if (!YY_CURRENT_BUFFER)
02700 return;
02701
02702 ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
02703 YY_CURRENT_BUFFER_LVALUE = NULL;
02704 if (yyg->yy_buffer_stack_top > 0)
02705 --yyg->yy_buffer_stack_top;
02706
02707 if (YY_CURRENT_BUFFER) {
02708 ael_yy_load_buffer_state(yyscanner );
02709 yyg->yy_did_buffer_switch_on_eof = 1;
02710 }
02711 }
02712
02713
02714
02715
02716 static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
02717 {
02718 int num_to_alloc;
02719 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02720
02721 if (!yyg->yy_buffer_stack) {
02722
02723
02724
02725
02726
02727 num_to_alloc = 1;
02728 yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyalloc
02729 (num_to_alloc * sizeof(struct yy_buffer_state*)
02730 , yyscanner);
02731 if ( ! yyg->yy_buffer_stack )
02732 YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
02733
02734 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
02735
02736 yyg->yy_buffer_stack_max = num_to_alloc;
02737 yyg->yy_buffer_stack_top = 0;
02738 return;
02739 }
02740
02741 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
02742
02743
02744 int grow_size = 8 ;
02745
02746 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
02747 yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyrealloc
02748 (yyg->yy_buffer_stack,
02749 num_to_alloc * sizeof(struct yy_buffer_state*)
02750 , yyscanner);
02751 if ( ! yyg->yy_buffer_stack )
02752 YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
02753
02754
02755 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
02756 yyg->yy_buffer_stack_max = num_to_alloc;
02757 }
02758 }
02759
02760
02761
02762
02763
02764
02765
02766 YY_BUFFER_STATE ael_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
02767 {
02768 YY_BUFFER_STATE b;
02769
02770 if ( size < 2 ||
02771 base[size-2] != YY_END_OF_BUFFER_CHAR ||
02772 base[size-1] != YY_END_OF_BUFFER_CHAR )
02773
02774 return 0;
02775
02776 b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
02777 if ( ! b )
02778 YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_buffer()" );
02779
02780 b->yy_buf_size = size - 2;
02781 b->yy_buf_pos = b->yy_ch_buf = base;
02782 b->yy_is_our_buffer = 0;
02783 b->yy_input_file = 0;
02784 b->yy_n_chars = b->yy_buf_size;
02785 b->yy_is_interactive = 0;
02786 b->yy_at_bol = 1;
02787 b->yy_fill_buffer = 0;
02788 b->yy_buffer_status = YY_BUFFER_NEW;
02789
02790 ael_yy_switch_to_buffer(b ,yyscanner );
02791
02792 return b;
02793 }
02794
02795
02796
02797
02798
02799
02800
02801
02802
02803 YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
02804 {
02805
02806 return ael_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
02807 }
02808
02809
02810
02811
02812
02813
02814
02815
02816 YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
02817 {
02818 YY_BUFFER_STATE b;
02819 char *buf;
02820 yy_size_t n;
02821 int i;
02822
02823
02824 n = _yybytes_len + 2;
02825 buf = (char *) ael_yyalloc(n ,yyscanner );
02826 if ( ! buf )
02827 YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_bytes()" );
02828
02829 for ( i = 0; i < _yybytes_len; ++i )
02830 buf[i] = yybytes[i];
02831
02832 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
02833
02834 b = ael_yy_scan_buffer(buf,n ,yyscanner);
02835 if ( ! b )
02836 YY_FATAL_ERROR( "bad buffer in ael_yy_scan_bytes()" );
02837
02838
02839
02840
02841 b->yy_is_our_buffer = 1;
02842
02843 return b;
02844 }
02845
02846 #ifndef YY_EXIT_FAILURE
02847 #define YY_EXIT_FAILURE 2
02848 #endif
02849
02850 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
02851 {
02852 (void) fprintf( stderr, "%s\n", msg );
02853 exit( YY_EXIT_FAILURE );
02854 }
02855
02856
02857
02858 #undef yyless
02859 #define yyless(n) \
02860 do \
02861 { \
02862 \
02863 int yyless_macro_arg = (n); \
02864 YY_LESS_LINENO(yyless_macro_arg);\
02865 yytext[yyleng] = yyg->yy_hold_char; \
02866 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
02867 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
02868 *yyg->yy_c_buf_p = '\0'; \
02869 yyleng = yyless_macro_arg; \
02870 } \
02871 while ( 0 )
02872
02873
02874
02875
02876
02877
02878 YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner)
02879 {
02880 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02881 return yyextra;
02882 }
02883
02884
02885
02886
02887 int ael_yyget_lineno (yyscan_t yyscanner)
02888 {
02889 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02890
02891 if (! YY_CURRENT_BUFFER)
02892 return 0;
02893
02894 return yylineno;
02895 }
02896
02897
02898
02899
02900 int ael_yyget_column (yyscan_t yyscanner)
02901 {
02902 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02903
02904 if (! YY_CURRENT_BUFFER)
02905 return 0;
02906
02907 return yycolumn;
02908 }
02909
02910
02911
02912
02913 FILE *ael_yyget_in (yyscan_t yyscanner)
02914 {
02915 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02916 return yyin;
02917 }
02918
02919
02920
02921
02922 FILE *ael_yyget_out (yyscan_t yyscanner)
02923 {
02924 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02925 return yyout;
02926 }
02927
02928
02929
02930
02931 int ael_yyget_leng (yyscan_t yyscanner)
02932 {
02933 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02934 return yyleng;
02935 }
02936
02937
02938
02939
02940
02941 char *ael_yyget_text (yyscan_t yyscanner)
02942 {
02943 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02944 return yytext;
02945 }
02946
02947
02948
02949
02950
02951 void ael_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
02952 {
02953 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02954 yyextra = user_defined ;
02955 }
02956
02957
02958
02959
02960
02961 void ael_yyset_lineno (int line_number , yyscan_t yyscanner)
02962 {
02963 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02964
02965
02966 if (! YY_CURRENT_BUFFER )
02967 yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner);
02968
02969 yylineno = line_number;
02970 }
02971
02972
02973
02974
02975
02976 void ael_yyset_column (int column_no , yyscan_t yyscanner)
02977 {
02978 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02979
02980
02981 if (! YY_CURRENT_BUFFER )
02982 yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner);
02983
02984 yycolumn = column_no;
02985 }
02986
02987
02988
02989
02990
02991
02992
02993 void ael_yyset_in (FILE * in_str , yyscan_t yyscanner)
02994 {
02995 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02996 yyin = in_str ;
02997 }
02998
02999 void ael_yyset_out (FILE * out_str , yyscan_t yyscanner)
03000 {
03001 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03002 yyout = out_str ;
03003 }
03004
03005 int ael_yyget_debug (yyscan_t yyscanner)
03006 {
03007 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03008 return yy_flex_debug;
03009 }
03010
03011 void ael_yyset_debug (int bdebug , yyscan_t yyscanner)
03012 {
03013 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03014 yy_flex_debug = bdebug ;
03015 }
03016
03017
03018
03019 YYSTYPE * ael_yyget_lval (yyscan_t yyscanner)
03020 {
03021 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03022 return yylval;
03023 }
03024
03025 void ael_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
03026 {
03027 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03028 yylval = yylval_param;
03029 }
03030
03031 YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner)
03032 {
03033 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03034 return yylloc;
03035 }
03036
03037 void ael_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
03038 {
03039 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03040 yylloc = yylloc_param;
03041 }
03042
03043
03044
03045
03046
03047
03048
03049
03050 int ael_yylex_init(yyscan_t* ptr_yy_globals)
03051
03052 {
03053 if (ptr_yy_globals == NULL){
03054 errno = EINVAL;
03055 return 1;
03056 }
03057
03058 *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), NULL );
03059
03060 if (*ptr_yy_globals == NULL){
03061 errno = ENOMEM;
03062 return 1;
03063 }
03064
03065
03066 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
03067
03068 return yy_init_globals ( *ptr_yy_globals );
03069 }
03070
03071
03072
03073
03074
03075
03076
03077
03078
03079 int ael_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
03080
03081 {
03082 struct yyguts_t dummy_yyguts;
03083
03084 ael_yyset_extra (yy_user_defined, &dummy_yyguts);
03085
03086 if (ptr_yy_globals == NULL){
03087 errno = EINVAL;
03088 return 1;
03089 }
03090
03091 *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
03092
03093 if (*ptr_yy_globals == NULL){
03094 errno = ENOMEM;
03095 return 1;
03096 }
03097
03098
03099
03100 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
03101
03102 ael_yyset_extra (yy_user_defined, *ptr_yy_globals);
03103
03104 return yy_init_globals ( *ptr_yy_globals );
03105 }
03106
03107 static int yy_init_globals (yyscan_t yyscanner)
03108 {
03109 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03110
03111
03112
03113
03114 yyg->yy_buffer_stack = 0;
03115 yyg->yy_buffer_stack_top = 0;
03116 yyg->yy_buffer_stack_max = 0;
03117 yyg->yy_c_buf_p = (char *) 0;
03118 yyg->yy_init = 0;
03119 yyg->yy_start = 0;
03120
03121 yyg->yy_start_stack_ptr = 0;
03122 yyg->yy_start_stack_depth = 0;
03123 yyg->yy_start_stack = NULL;
03124
03125
03126 #ifdef YY_STDINIT
03127 yyin = stdin;
03128 yyout = stdout;
03129 #else
03130 yyin = (FILE *) 0;
03131 yyout = (FILE *) 0;
03132 #endif
03133
03134
03135
03136
03137 return 0;
03138 }
03139
03140
03141 int ael_yylex_destroy (yyscan_t yyscanner)
03142 {
03143 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03144
03145
03146 while(YY_CURRENT_BUFFER){
03147 ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
03148 YY_CURRENT_BUFFER_LVALUE = NULL;
03149 ael_yypop_buffer_state(yyscanner);
03150 }
03151
03152
03153 ael_yyfree(yyg->yy_buffer_stack ,yyscanner);
03154 yyg->yy_buffer_stack = NULL;
03155
03156
03157 ael_yyfree(yyg->yy_start_stack ,yyscanner );
03158 yyg->yy_start_stack = NULL;
03159
03160
03161
03162 yy_init_globals( yyscanner);
03163
03164
03165 ael_yyfree ( yyscanner , yyscanner );
03166 yyscanner = NULL;
03167 return 0;
03168 }
03169
03170
03171
03172
03173
03174 #ifndef yytext_ptr
03175 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
03176 {
03177 register int i;
03178 for ( i = 0; i < n; ++i )
03179 s1[i] = s2[i];
03180 }
03181 #endif
03182
03183 #ifdef YY_NEED_STRLEN
03184 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
03185 {
03186 register int n;
03187 for ( n = 0; s[n]; ++n )
03188 ;
03189
03190 return n;
03191 }
03192 #endif
03193
03194 void *ael_yyalloc (yy_size_t size , yyscan_t yyscanner)
03195 {
03196 return (void *) malloc( size );
03197 }
03198
03199 void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
03200 {
03201
03202
03203
03204
03205
03206
03207
03208 return (void *) realloc( (char *) ptr, size );
03209 }
03210
03211 #define YYTABLES_NAME "yytables"
03212
03213 #line 656 "ael.flex"
03214
03215
03216
03217 static void pbcpush(char x)
03218 {
03219 pbcstack[pbcpos++] = x;
03220 }
03221
03222 void ael_yyfree(void *ptr, yyscan_t yyscanner)
03223 {
03224 free( (char*) ptr );
03225 }
03226
03227 static int pbcpop(char x)
03228 {
03229 if ( ( x == ')' && pbcstack[pbcpos-1] == '(' )
03230 || ( x == ']' && pbcstack[pbcpos-1] == '[' )
03231 || ( x == '}' && pbcstack[pbcpos-1] == '{' )) {
03232 pbcpos--;
03233 return 0;
03234 }
03235 return 1;
03236 }
03237
03238 static void pbcpush2(char x)
03239 {
03240 pbcstack2[pbcpos2++] = x;
03241 }
03242
03243 static int pbcpop2(char x)
03244 {
03245 if ( ( x == ')' && pbcstack2[pbcpos2-1] == '(' )
03246 || ( x == ']' && pbcstack2[pbcpos2-1] == '[' )
03247 || ( x == '}' && pbcstack2[pbcpos2-1] == '{' )) {
03248 pbcpos2--;
03249 return 0;
03250 }
03251 return 1;
03252 }
03253
03254 static void pbcpush3(char x)
03255 {
03256 pbcstack3[pbcpos3++] = x;
03257 }
03258
03259 static int pbcpop3(char x)
03260 {
03261 if ( ( x == ')' && pbcstack3[pbcpos3-1] == '(' )
03262 || ( x == ']' && pbcstack3[pbcpos3-1] == '[' )
03263 || ( x == '}' && pbcstack3[pbcpos3-1] == '{' )) {
03264 pbcpos3--;
03265 return 0;
03266 }
03267 return 1;
03268 }
03269
03270 static int c_prevword(void)
03271 {
03272 char *c = prev_word;
03273 if (c == NULL)
03274 return 0;
03275 while ( *c ) {
03276 switch (*c) {
03277 case '{':
03278 case '[':
03279 case '(':
03280 pbcpush(*c);
03281 break;
03282 case '}':
03283 case ']':
03284 case ')':
03285 if (pbcpop(*c))
03286 return 1;
03287 break;
03288 }
03289 c++;
03290 }
03291 return 0;
03292 }
03293
03294
03295
03296
03297
03298
03299
03300
03301
03302
03303
03304
03305
03306
03307
03308 void reset_parencount(yyscan_t yyscanner );
03309 void reset_parencount(yyscan_t yyscanner )
03310 {
03311 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03312 parencount = 0;
03313 pbcpos = 0;
03314 pbcpush('(');
03315 c_prevword();
03316 BEGIN(paren);
03317 }
03318
03319 void reset_semicount(yyscan_t yyscanner );
03320 void reset_semicount(yyscan_t yyscanner )
03321 {
03322 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03323 pbcpos = 0;
03324 BEGIN(semic);
03325 }
03326
03327 void reset_argcount(yyscan_t yyscanner );
03328 void reset_argcount(yyscan_t yyscanner )
03329 {
03330 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03331 parencount = 0;
03332 pbcpos = 0;
03333 pbcpush('(');
03334 c_prevword();
03335 BEGIN(argg);
03336 }
03337
03338
03339 struct pval *ael2_parse(char *filename, int *errors)
03340 {
03341 struct pval *pvalue;
03342 struct parse_io *io;
03343 char *buffer;
03344 struct stat stats;
03345 FILE *fin;
03346
03347
03348
03349 io = calloc(sizeof(struct parse_io),1);
03350
03351 prev_word = 0;
03352 my_lineno = 1;
03353 include_stack_index=0;
03354 my_col = 0;
03355
03356 ael_yylex_init(&io->scanner);
03357 fin = fopen(filename,"r");
03358 if ( !fin ) {
03359 ast_log(LOG_ERROR,"File %s could not be opened\n", filename);
03360 *errors = 1;
03361 return 0;
03362 }
03363 free(my_file);
03364 my_file = strdup(filename);
03365 stat(filename, &stats);
03366 buffer = (char*)malloc(stats.st_size+2);
03367 if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
03368 ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
03369 }
03370 buffer[stats.st_size]=0;
03371 fclose(fin);
03372
03373 ael_yy_scan_string (buffer ,io->scanner);
03374 ael_yyset_lineno(1 , io->scanner);
03375
03376
03377
03378 ael_yyparse(io);
03379
03380
03381 pvalue = io->pval;
03382 *errors = io->syntax_error_count;
03383
03384 ael_yylex_destroy(io->scanner);
03385 free(buffer);
03386 free(io);
03387
03388 return pvalue;
03389 }
03390
03391 static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t yyscanner, int create)
03392 {
03393 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
03394 int error, i;
03395 FILE *in1;
03396 char fnamebuf[2048];
03397
03398 if (globbuf && globbuf->gl_pathv && globbuf->gl_pathc > 0)
03399 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
03400 strncpy(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
03401 #else
03402 ast_copy_string(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
03403 #endif
03404 else {
03405 ast_log(LOG_ERROR,"Include file name not present!\n");
03406 return;
03407 }
03408 for (i=0; i<include_stack_index; i++) {
03409 if ( !strcmp(fnamebuf,include_stack[i].fname )) {
03410 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",
03411 my_file, my_lineno, my_col, fnamebuf);
03412 break;
03413 }
03414 }
03415 error = 1;
03416 if (i == include_stack_index)
03417 error = 0;
03418 if ( !error ) {
03419
03420 if (fnamebuf[0] != '/')
03421 snprintf(fnamebuf2, fnamebuf_siz, "%s/%s", ast_config_AST_CONFIG_DIR, fnamebuf);
03422 else
03423 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
03424 strncpy(fnamebuf2, fnamebuf, fnamebuf_siz);
03425 #else
03426 ast_copy_string(fnamebuf2, fnamebuf, fnamebuf_siz);
03427 #endif
03428 in1 = fopen( fnamebuf2, "r" );
03429
03430 if ( ! in1 ) {
03431 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);
03432 } else {
03433 char *buffer;
03434 struct stat stats;
03435 stat(fnamebuf2, &stats);
03436 buffer = (char*)malloc(stats.st_size+1);
03437 if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
03438 ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
03439 }
03440 buffer[stats.st_size] = 0;
03441 ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
03442 fclose(in1);
03443 if (include_stack[include_stack_index].fname) {
03444 free(include_stack[include_stack_index].fname);
03445 include_stack[include_stack_index].fname = 0;
03446 }
03447 include_stack[include_stack_index].fname = strdup(my_file);
03448 include_stack[include_stack_index].lineno = my_lineno;
03449 include_stack[include_stack_index].colno = my_col+yyleng;
03450 if (my_file)
03451 free(my_file);
03452 my_file = strdup(fnamebuf2);
03453 if (create)
03454 include_stack[include_stack_index].globbuf = *globbuf;
03455
03456 include_stack[include_stack_index].globbuf_pos = 0;
03457
03458 include_stack[include_stack_index].bufstate = YY_CURRENT_BUFFER;
03459 if (create)
03460 include_stack_index++;
03461 ael_yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
03462 free(buffer);
03463 my_lineno = 1;
03464 my_col = 1;
03465 BEGIN(INITIAL);
03466 }
03467 }
03468 }
03469