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