1 #define ASTMM_LIBC ASTMM_REDIRECT
8 #define YY_INT_ALIGNED short int
13 #define YY_FLEX_MAJOR_VERSION 2
14 #define YY_FLEX_MINOR_VERSION 5
15 #define YY_FLEX_SUBMINOR_VERSION 35
16 #if YY_FLEX_SUBMINOR_VERSION > 0
37 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
42 #ifndef __STDC_LIMIT_MACROS
43 #define __STDC_LIMIT_MACROS 1
47 typedef int8_t flex_int8_t;
48 typedef uint8_t flex_uint8_t;
49 typedef int16_t flex_int16_t;
50 typedef uint16_t flex_uint16_t;
51 typedef int32_t flex_int32_t;
52 typedef uint32_t flex_uint32_t;
54 typedef signed char flex_int8_t;
55 typedef short int flex_int16_t;
56 typedef int flex_int32_t;
57 typedef unsigned char flex_uint8_t;
58 typedef unsigned short int flex_uint16_t;
59 typedef unsigned int flex_uint32_t;
64 #define INT8_MIN (-128)
67 #define INT16_MIN (-32767-1)
70 #define INT32_MIN (-2147483647-1)
73 #define INT8_MAX (127)
76 #define INT16_MAX (32767)
79 #define INT32_MAX (2147483647)
82 #define UINT8_MAX (255U)
85 #define UINT16_MAX (65535U)
88 #define UINT32_MAX (4294967295U)
101 #if defined (__STDC__)
109 #define yyconst const
122 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
125 #ifndef YY_TYPEDEF_YY_SCANNER_T
126 #define YY_TYPEDEF_YY_SCANNER_T
127 typedef void* yyscan_t;
132 #define yyin yyg->yyin_r
133 #define yyout yyg->yyout_r
134 #define yyextra yyg->yyextra_r
135 #define yyleng yyg->yyleng_r
136 #define yytext yyg->yytext_r
137 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
138 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
139 #define yy_flex_debug yyg->yy_flex_debug_r
145 #define BEGIN yyg->yy_start = 1 + 2 *
151 #define YY_START ((yyg->yy_start - 1) / 2)
152 #define YYSTATE YY_START
155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
158 #define YY_NEW_FILE ael_yyrestart(yyin ,yyscanner )
160 #define YY_END_OF_BUFFER_CHAR 0
164 #define YY_BUF_SIZE 16384
169 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
171 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
172 #define YY_TYPEDEF_YY_BUFFER_STATE
176 #define EOB_ACT_CONTINUE_SCAN 0
177 #define EOB_ACT_END_OF_FILE 1
178 #define EOB_ACT_LAST_MATCH 2
180 #define YY_LESS_LINENO(n)
187 int yyless_macro_arg = (n); \
188 YY_LESS_LINENO(yyless_macro_arg);\
189 *yy_cp = yyg->yy_hold_char; \
190 YY_RESTORE_YY_MORE_OFFSET \
191 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
192 YY_DO_BEFORE_ACTION; \
196 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
198 #ifndef YY_TYPEDEF_YY_SIZE_T
199 #define YY_TYPEDEF_YY_SIZE_T
200 typedef size_t yy_size_t;
203 #ifndef YY_STRUCT_YY_BUFFER_STATE
204 #define YY_STRUCT_YY_BUFFER_STATE
215 yy_size_t yy_buf_size;
226 int yy_is_our_buffer;
233 int yy_is_interactive;
249 int yy_buffer_status;
251 #define YY_BUFFER_NEW 0
252 #define YY_BUFFER_NORMAL 1
263 #define YY_BUFFER_EOF_PENDING 2
274 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
275 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
281 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
291 static void ael_yyensure_buffer_stack (yyscan_t yyscanner );
292 static void ael_yy_load_buffer_state (yyscan_t yyscanner );
293 static void ael_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
295 #define YY_FLUSH_BUFFER ael_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
299 YY_BUFFER_STATE
ael_yy_scan_bytes (yyconst
char *bytes,
int len ,yyscan_t yyscanner );
301 void *ael_yyalloc (yy_size_t ,yyscan_t yyscanner );
302 void *ael_yyrealloc (
void *,yy_size_t ,yyscan_t yyscanner );
303 void ael_yyfree (
void * ,yyscan_t yyscanner );
305 #define yy_new_buffer ael_yy_create_buffer
307 #define yy_set_interactive(is_interactive) \
309 if ( ! YY_CURRENT_BUFFER ){ \
310 ael_yyensure_buffer_stack (yyscanner); \
311 YY_CURRENT_BUFFER_LVALUE = \
312 ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
314 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
317 #define yy_set_bol(at_bol) \
319 if ( ! YY_CURRENT_BUFFER ){\
320 ael_yyensure_buffer_stack (yyscanner); \
321 YY_CURRENT_BUFFER_LVALUE = \
322 ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
324 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
327 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
331 #define ael_yywrap(n) 1
332 #define YY_SKIP_YYWRAP
334 typedef unsigned char YY_CHAR;
336 typedef int yy_state_type;
338 #define yytext_ptr yytext_r
340 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
341 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
342 static int yy_get_next_buffer (yyscan_t yyscanner );
343 static void yy_fatal_error (yyconst
char msg[] ,yyscan_t yyscanner );
348 #define YY_DO_BEFORE_ACTION \
349 yyg->yytext_ptr = yy_bp; \
350 yyg->yytext_ptr -= yyg->yy_more_len; \
351 yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \
352 yyg->yy_hold_char = *yy_cp; \
354 yyg->yy_c_buf_p = yy_cp;
356 #define YY_NUM_RULES 76
357 #define YY_END_OF_BUFFER 77
362 flex_int32_t yy_verify;
365 static yyconst flex_int16_t yy_accept[285] =
367 0, 0, 0, 0, 0, 0, 0, 0, 43, 43,
368 0, 0, 0, 0, 0, 0, 77, 75, 50, 48,
369 49, 51, 51, 51, 9, 3, 4, 7, 51, 8,
370 5, 6, 12, 75, 51, 51, 51, 51, 51, 51,
371 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
372 1, 10, 2, 75, 65, 64, 75, 66, 75, 71,
373 72, 73, 75, 75, 67, 68, 69, 75, 70, 43,
374 44, 45, 75, 59, 60, 75, 58, 57, 52, 52,
375 57, 53, 75, 62, 63, 75, 61, 50, 49, 0,
376 51, 42, 13, 11, 0, 0, 0, 0, 0, 0,
378 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
379 0, 0, 0, 0, 0, 0, 0, 0, 65, 64,
380 0, 66, 65, 64, 66, 0, 71, 72, 73, 0,
381 71, 72, 73, 0, 67, 68, 69, 0, 70, 67,
382 68, 69, 70, 43, 44, 45, 46, 45, 47, 0,
383 59, 60, 0, 58, 59, 60, 58, 56, 55, 54,
384 0, 62, 63, 0, 61, 62, 63, 61, 0, 13,
385 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,
386 0, 0, 0, 51, 0, 0, 0, 0, 0, 0,
387 0, 0, 0, 0, 0, 0, 0, 0, 35, 0,
389 0, 0, 27, 0, 0, 0, 28, 26, 0, 0,
390 0, 29, 0, 0, 0, 0, 0, 0, 0, 0,
391 0, 0, 31, 38, 0, 0, 0, 0, 0, 0,
392 0, 0, 0, 19, 17, 0, 0, 0, 0, 0,
393 34, 0, 0, 0, 0, 0, 0, 16, 0, 23,
394 0, 0, 0, 24, 0, 30, 21, 0, 0, 14,
395 0, 36, 0, 18, 0, 0, 37, 0, 51, 0,
396 15, 32, 0, 0, 41, 25, 39, 0, 40, 20,
400 static yyconst flex_int32_t yy_ec[256] =
402 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 4, 5, 6, 7, 8, 1, 9, 5, 10,
406 11, 12, 5, 13, 5, 5, 14, 5, 5, 5,
407 5, 5, 5, 5, 5, 5, 5, 15, 16, 5,
408 17, 18, 1, 19, 5, 5, 5, 5, 5, 5,
409 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
410 5, 5, 5, 20, 5, 5, 5, 5, 5, 5,
411 21, 22, 23, 1, 5, 1, 24, 25, 26, 27,
413 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
414 38, 39, 5, 40, 41, 42, 43, 5, 44, 45,
415 5, 5, 46, 47, 48, 1, 1, 49, 49, 49,
416 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
417 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
418 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
419 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
420 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
421 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
422 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
424 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
425 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
426 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
427 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
428 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
432 static yyconst flex_int32_t yy_meta[50] =
434 1, 1, 2, 1, 3, 4, 3, 3, 1, 1,
435 1, 5, 1, 3, 1, 1, 1, 3, 1, 3,
436 3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
437 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
438 3, 3, 3, 3, 3, 1, 1, 1, 1
441 static yyconst flex_int16_t yy_base[304] =
443 0, 0, 40, 43, 82, 121, 160, 199, 55, 56,
444 60, 74, 247, 296, 90, 104, 432, 1023, 429, 1023,
445 426, 1023, 397, 31, 1023, 1023, 1023, 1023, 43, 1023,
446 1023, 410, 1023, 0, 401, 382, 36, 389, 34, 378,
447 38, 380, 80, 368, 372, 385, 381, 66, 357, 369,
448 1023, 1023, 1023, 138, 1023, 1023, 143, 1023, 336, 1023,
449 1023, 1023, 375, 414, 1023, 1023, 1023, 453, 1023, 396,
450 1023, 104, 177, 1023, 1023, 182, 1023, 1023, 1023, 78,
451 0, 1023, 231, 1023, 1023, 262, 1023, 393, 390, 356,
452 1023, 1023, 0, 1023, 348, 360, 92, 350, 354, 337,
454 333, 333, 333, 334, 329, 333, 344, 326, 335, 320,
455 327, 322, 299, 303, 93, 302, 301, 280, 1023, 1023,
456 314, 1023, 328, 344, 358, 492, 1023, 1023, 1023, 531,
457 570, 609, 648, 687, 1023, 1023, 1023, 726, 1023, 765,
458 804, 843, 882, 329, 1023, 143, 1023, 144, 1023, 392,
459 1023, 1023, 397, 1023, 431, 436, 470, 1023, 1023, 1023,
460 475, 1023, 1023, 484, 1023, 514, 523, 553, 305, 0,
461 288, 305, 299, 297, 280, 297, 292, 287, 289, 0,
462 291, 276, 250, 257, 250, 252, 247, 258, 241, 238,
463 251, 248, 232, 232, 236, 235, 228, 233, 0, 234,
465 113, 218, 0, 217, 209, 220, 0, 0, 207, 200,
466 196, 0, 203, 199, 208, 197, 189, 193, 206, 203,
467 186, 203, 0, 0, 181, 187, 184, 192, 190, 181,
468 187, 186, 186, 0, 0, 171, 171, 160, 164, 166,
469 0, 169, 169, 152, 147, 143, 149, 0, 138, 0,
470 139, 149, 138, 0, 140, 0, 135, 134, 109, 0,
471 112, 0, 111, 0, 105, 80, 0, 82, 61, 76,
472 0, 0, 46, 30, 0, 0, 0, 170, 0, 0,
473 0, 50, 1023, 1023, 930, 935, 940, 945, 950, 955,
474 960, 965, 970, 975, 980, 985, 989, 994, 999, 1004,
479 static yyconst flex_int16_t yy_def[304] =
481 284, 1, 285, 285, 286, 286, 287, 287, 288, 288,
482 289, 289, 290, 290, 291, 291, 284, 284, 284, 284,
483 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
484 284, 284, 284, 292, 284, 284, 284, 284, 284, 284,
485 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
486 284, 284, 284, 293, 284, 284, 293, 284, 294, 284,
487 284, 284, 294, 295, 284, 284, 284, 295, 284, 296,
488 284, 297, 298, 284, 284, 298, 284, 284, 284, 284,
489 299, 284, 300, 284, 284, 300, 284, 284, 284, 284,
490 284, 284, 301, 284, 284, 284, 284, 284, 284, 284,
492 284, 284, 284, 284, 284, 284, 302, 284, 284, 284,
493 284, 284, 284, 284, 284, 284, 284, 293, 284, 284,
494 293, 284, 293, 293, 293, 294, 284, 284, 284, 294,
495 294, 294, 294, 295, 284, 284, 284, 295, 284, 295,
496 295, 295, 295, 296, 284, 297, 284, 297, 284, 298,
497 284, 284, 298, 284, 298, 298, 298, 284, 284, 284,
498 300, 284, 284, 300, 284, 300, 300, 300, 284, 301,
499 284, 284, 284, 284, 284, 284, 284, 284, 284, 302,
500 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
501 284, 284, 284, 284, 284, 284, 284, 284, 302, 284,
503 284, 284, 302, 284, 284, 284, 302, 302, 284, 284,
504 284, 302, 284, 284, 284, 284, 284, 284, 284, 284,
505 284, 284, 302, 302, 284, 284, 284, 284, 284, 284,
506 284, 284, 284, 302, 302, 284, 284, 284, 284, 284,
507 302, 284, 284, 284, 284, 284, 284, 302, 284, 302,
508 284, 284, 284, 302, 284, 302, 302, 284, 284, 302,
509 284, 302, 284, 302, 284, 284, 302, 284, 284, 284,
510 302, 302, 284, 284, 302, 302, 302, 284, 302, 302,
511 303, 303, 284, 0, 284, 284, 284, 284, 284, 284,
512 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
517 static yyconst flex_int16_t yy_nxt[1073] =
519 18, 19, 20, 21, 22, 22, 23, 24, 25, 26,
520 27, 22, 28, 29, 30, 31, 32, 22, 33, 22,
521 22, 34, 22, 35, 36, 37, 38, 39, 40, 41,
522 42, 43, 44, 22, 45, 46, 22, 22, 47, 48,
523 49, 22, 22, 50, 22, 51, 52, 53, 22, 55,
524 56, 91, 55, 56, 92, 283, 93, 71, 71, 97,
525 55, 57, 58, 55, 57, 58, 72, 72, 100, 74,
526 75, 280, 104, 98, 101, 105, 91, 278, 102, 278,
527 74, 76, 75, 74, 75, 55, 279, 58, 55, 114,
528 58, 60, 61, 115, 74, 76, 75, 62, 158, 84,
530 85, 277, 60, 63, 61, 74, 147, 77, 107, 108,
531 84, 86, 87, 84, 85, 148, 109, 149, 276, 74,
532 275, 77, 192, 159, 84, 86, 87, 60, 274, 61,
533 60, 61, 173, 174, 193, 84, 62, 85, 273, 272,
534 225, 60, 63, 61, 226, 147, 147, 119, 120, 84,
535 271, 85, 123, 124, 284, 148, 284, 284, 119, 121,
536 122, 270, 269, 123, 121, 125, 60, 268, 61, 65,
537 66, 278, 67, 278, 267, 281, 266, 265, 264, 263,
538 65, 68, 69, 119, 262, 122, 151, 152, 123, 261,
539 125, 155, 156, 260, 259, 258, 257, 151, 153, 152,
541 256, 255, 155, 153, 156, 65, 254, 69, 65, 66,
542 253, 67, 252, 251, 250, 249, 248, 247, 246, 65,
543 68, 69, 151, 245, 154, 244, 243, 155, 242, 157,
544 241, 240, 239, 238, 237, 236, 235, 234, 233, 232,
545 162, 163, 231, 230, 65, 229, 69, 78, 78, 78,
546 78, 162, 164, 165, 80, 78, 78, 78, 228, 78,
547 227, 78, 78, 78, 224, 78, 223, 222, 81, 221,
548 220, 166, 167, 219, 218, 217, 162, 216, 163, 215,
549 214, 213, 166, 164, 168, 212, 211, 210, 209, 119,
550 120, 208, 78, 78, 78, 82, 78, 78, 78, 78,
552 119, 121, 122, 80, 78, 78, 78, 166, 78, 167,
553 78, 78, 78, 207, 78, 206, 205, 81, 204, 203,
554 202, 201, 200, 123, 124, 119, 199, 122, 198, 197,
555 196, 145, 195, 194, 123, 121, 125, 119, 120, 191,
556 190, 78, 78, 78, 82, 127, 128, 189, 119, 121,
557 122, 129, 188, 119, 120, 187, 127, 130, 128, 123,
558 186, 125, 185, 184, 119, 121, 122, 119, 120, 183,
559 182, 181, 180, 119, 179, 122, 178, 177, 119, 121,
560 122, 127, 176, 128, 131, 132, 175, 172, 171, 119,
561 133, 122, 169, 89, 88, 131, 130, 132, 145, 117,
563 116, 151, 152, 119, 113, 122, 155, 156, 112, 111,
564 110, 106, 151, 153, 152, 103, 99, 155, 153, 156,
565 131, 96, 132, 135, 136, 95, 137, 94, 90, 89,
566 88, 284, 284, 284, 135, 138, 139, 151, 284, 154,
567 151, 152, 155, 284, 157, 151, 152, 284, 284, 284,
568 284, 151, 153, 152, 284, 284, 151, 153, 152, 135,
569 284, 139, 140, 141, 284, 142, 284, 284, 284, 284,
570 284, 284, 284, 140, 138, 143, 151, 284, 154, 151,
571 152, 151, 284, 154, 162, 163, 284, 284, 284, 284,
572 151, 153, 152, 166, 167, 162, 164, 165, 140, 284,
574 143, 127, 128, 284, 166, 164, 168, 129, 284, 284,
575 284, 284, 127, 130, 128, 151, 284, 154, 284, 284,
576 162, 284, 163, 162, 163, 284, 284, 284, 284, 166,
577 284, 167, 162, 163, 162, 164, 165, 127, 284, 128,
578 131, 132, 284, 162, 164, 165, 133, 284, 284, 284,
579 284, 131, 130, 132, 284, 284, 284, 284, 284, 162,
580 284, 163, 162, 163, 284, 284, 284, 284, 162, 284,
581 163, 284, 284, 162, 164, 165, 131, 284, 132, 127,
582 128, 284, 284, 284, 284, 129, 284, 284, 284, 284,
583 127, 130, 128, 284, 284, 284, 284, 284, 162, 284,
585 163, 284, 284, 284, 284, 284, 284, 284, 284, 284,
586 284, 284, 284, 284, 284, 127, 284, 128, 127, 128,
587 284, 284, 284, 284, 129, 284, 284, 284, 284, 127,
588 130, 128, 284, 284, 284, 284, 284, 284, 284, 284,
589 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
590 284, 284, 284, 284, 127, 284, 128, 127, 128, 284,
591 284, 284, 284, 129, 284, 284, 284, 284, 127, 130,
592 128, 284, 284, 284, 284, 284, 284, 284, 284, 284,
593 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
594 284, 284, 284, 127, 284, 128, 135, 136, 284, 137,
596 284, 284, 284, 284, 284, 284, 284, 135, 138, 139,
597 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
598 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
599 284, 284, 135, 284, 139, 140, 141, 284, 142, 284,
600 284, 284, 284, 284, 284, 284, 140, 138, 143, 284,
601 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
602 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
603 284, 140, 284, 143, 135, 136, 284, 137, 284, 284,
604 284, 284, 284, 284, 284, 135, 138, 139, 284, 284,
605 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
607 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
608 135, 284, 139, 135, 136, 284, 137, 284, 284, 284,
609 284, 284, 284, 284, 135, 138, 139, 284, 284, 284,
610 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
611 284, 284, 284, 284, 284, 284, 284, 284, 284, 135,
612 284, 139, 135, 136, 284, 137, 284, 284, 284, 284,
613 284, 284, 284, 135, 138, 139, 284, 284, 284, 284,
614 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
615 284, 284, 284, 284, 284, 284, 284, 284, 135, 284,
616 139, 135, 136, 284, 137, 284, 284, 284, 284, 284,
618 284, 284, 135, 138, 139, 284, 284, 284, 284, 284,
619 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
620 284, 284, 284, 284, 284, 284, 284, 135, 284, 139,
621 54, 54, 54, 54, 54, 59, 59, 59, 59, 59,
622 64, 64, 64, 64, 64, 70, 70, 70, 70, 70,
623 73, 73, 73, 73, 73, 79, 79, 79, 79, 79,
624 83, 83, 83, 83, 83, 91, 284, 91, 91, 91,
625 118, 118, 118, 118, 118, 126, 126, 126, 126, 126,
626 134, 134, 134, 134, 134, 144, 144, 144, 144, 146,
627 146, 146, 146, 146, 150, 150, 150, 150, 150, 160,
629 284, 160, 160, 160, 161, 161, 161, 161, 161, 170,
630 284, 170, 170, 170, 91, 91, 91, 282, 282, 282,
631 284, 282, 17, 284, 284, 284, 284, 284, 284, 284,
632 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
633 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
634 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
635 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
639 static yyconst flex_int16_t yy_chk[1073] =
641 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
642 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
643 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
646 3, 24, 4, 4, 29, 282, 29, 9, 10, 37,
647 3, 3, 3, 4, 4, 4, 9, 10, 39, 11,
648 11, 274, 41, 37, 39, 41, 24, 270, 39, 270,
649 11, 11, 11, 12, 12, 3, 273, 3, 4, 48,
650 4, 5, 5, 48, 12, 12, 12, 5, 80, 15,
652 15, 269, 5, 5, 5, 11, 72, 11, 43, 43,
653 15, 15, 15, 16, 16, 72, 43, 72, 268, 12,
654 266, 12, 115, 80, 16, 16, 16, 5, 265, 5,
655 6, 6, 97, 97, 115, 15, 6, 15, 263, 261,
656 201, 6, 6, 6, 201, 146, 148, 54, 54, 16,
657 259, 16, 57, 57, 146, 148, 146, 148, 54, 54,
658 54, 258, 257, 57, 57, 57, 6, 255, 6, 7,
659 7, 278, 7, 278, 253, 278, 252, 251, 249, 247,
660 7, 7, 7, 54, 246, 54, 73, 73, 57, 245,
661 57, 76, 76, 244, 243, 242, 240, 73, 73, 73,
663 239, 238, 76, 76, 76, 7, 237, 7, 8, 8,
664 236, 8, 233, 232, 231, 230, 229, 228, 227, 8,
665 8, 8, 73, 226, 73, 225, 222, 76, 221, 76,
666 220, 219, 218, 217, 216, 215, 214, 213, 211, 210,
667 83, 83, 209, 206, 8, 205, 8, 13, 13, 13,
668 13, 83, 83, 83, 13, 13, 13, 13, 204, 13,
669 202, 13, 13, 13, 200, 13, 198, 197, 13, 196,
670 195, 86, 86, 194, 193, 192, 83, 191, 83, 190,
671 189, 188, 86, 86, 86, 187, 186, 185, 184, 118,
672 118, 183, 13, 13, 13, 13, 14, 14, 14, 14,
674 118, 118, 118, 14, 14, 14, 14, 86, 14, 86,
675 14, 14, 14, 182, 14, 181, 179, 14, 178, 177,
676 176, 175, 174, 121, 121, 118, 173, 118, 172, 171,
677 169, 144, 117, 116, 121, 121, 121, 123, 123, 114,
678 113, 14, 14, 14, 14, 59, 59, 112, 123, 123,
679 123, 59, 111, 124, 124, 110, 59, 59, 59, 121,
680 109, 121, 108, 107, 124, 124, 124, 125, 125, 106,
681 105, 104, 103, 123, 102, 123, 101, 100, 125, 125,
682 125, 59, 99, 59, 63, 63, 98, 96, 95, 124,
683 63, 124, 90, 89, 88, 63, 63, 63, 70, 50,
685 49, 150, 150, 125, 47, 125, 153, 153, 46, 45,
686 44, 42, 150, 150, 150, 40, 38, 153, 153, 153,
687 63, 36, 63, 64, 64, 35, 64, 32, 23, 21,
688 19, 17, 0, 0, 64, 64, 64, 150, 0, 150,
689 155, 155, 153, 0, 153, 156, 156, 0, 0, 0,
690 0, 155, 155, 155, 0, 0, 156, 156, 156, 64,
691 0, 64, 68, 68, 0, 68, 0, 0, 0, 0,
692 0, 0, 0, 68, 68, 68, 155, 0, 155, 157,
693 157, 156, 0, 156, 161, 161, 0, 0, 0, 0,
694 157, 157, 157, 164, 164, 161, 161, 161, 68, 0,
696 68, 126, 126, 0, 164, 164, 164, 126, 0, 0,
697 0, 0, 126, 126, 126, 157, 0, 157, 0, 0,
698 161, 0, 161, 166, 166, 0, 0, 0, 0, 164,
699 0, 164, 167, 167, 166, 166, 166, 126, 0, 126,
700 130, 130, 0, 167, 167, 167, 130, 0, 0, 0,
701 0, 130, 130, 130, 0, 0, 0, 0, 0, 166,
702 0, 166, 168, 168, 0, 0, 0, 0, 167, 0,
703 167, 0, 0, 168, 168, 168, 130, 0, 130, 131,
704 131, 0, 0, 0, 0, 131, 0, 0, 0, 0,
705 131, 131, 131, 0, 0, 0, 0, 0, 168, 0,
707 168, 0, 0, 0, 0, 0, 0, 0, 0, 0,
708 0, 0, 0, 0, 0, 131, 0, 131, 132, 132,
709 0, 0, 0, 0, 132, 0, 0, 0, 0, 132,
710 132, 132, 0, 0, 0, 0, 0, 0, 0, 0,
711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
712 0, 0, 0, 0, 132, 0, 132, 133, 133, 0,
713 0, 0, 0, 133, 0, 0, 0, 0, 133, 133,
714 133, 0, 0, 0, 0, 0, 0, 0, 0, 0,
715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
716 0, 0, 0, 133, 0, 133, 134, 134, 0, 134,
718 0, 0, 0, 0, 0, 0, 0, 134, 134, 134,
719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
721 0, 0, 134, 0, 134, 138, 138, 0, 138, 0,
722 0, 0, 0, 0, 0, 0, 138, 138, 138, 0,
723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
725 0, 138, 0, 138, 140, 140, 0, 140, 0, 0,
726 0, 0, 0, 0, 0, 140, 140, 140, 0, 0,
727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
730 140, 0, 140, 141, 141, 0, 141, 0, 0, 0,
731 0, 0, 0, 0, 141, 141, 141, 0, 0, 0,
732 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
733 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
734 0, 141, 142, 142, 0, 142, 0, 0, 0, 0,
735 0, 0, 0, 142, 142, 142, 0, 0, 0, 0,
736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
737 0, 0, 0, 0, 0, 0, 0, 0, 142, 0,
738 142, 143, 143, 0, 143, 0, 0, 0, 0, 0,
740 0, 0, 143, 143, 143, 0, 0, 0, 0, 0,
741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
742 0, 0, 0, 0, 0, 0, 0, 143, 0, 143,
743 285, 285, 285, 285, 285, 286, 286, 286, 286, 286,
744 287, 287, 287, 287, 287, 288, 288, 288, 288, 288,
745 289, 289, 289, 289, 289, 290, 290, 290, 290, 290,
746 291, 291, 291, 291, 291, 292, 0, 292, 292, 292,
747 293, 293, 293, 293, 293, 294, 294, 294, 294, 294,
748 295, 295, 295, 295, 295, 296, 296, 296, 296, 297,
749 297, 297, 297, 297, 298, 298, 298, 298, 298, 299,
751 0, 299, 299, 299, 300, 300, 300, 300, 300, 301,
752 0, 301, 301, 301, 302, 302, 302, 303, 303, 303,
753 0, 303, 284, 284, 284, 284, 284, 284, 284, 284,
754 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
755 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
756 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
757 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
764 #define REJECT reject_used_but_not_detected
765 #define yymore() (yyg->yy_more_flag = 1)
766 #define YY_MORE_ADJ yyg->yy_more_len
767 #define YY_RESTORE_YY_MORE_OFFSET
822 #include <sys/types.h>
823 #include <sys/stat.h>
827 #if !defined(GLOB_ABORTED)
828 #define GLOB_ABORTED GLOB_ABEND
830 #if !defined(GLOB_BRACE)
833 #if !defined(GLOB_NOMAGIC)
834 #define GLOB_NOMAGIC 0
841 #include "ael/ael.tab.h"
847 static char pbcstack[400];
848 static int pbcpos = 0;
849 static void pbcpush(
char x);
850 static int pbcpop(
char x);
851 static int parencount = 0;
856 static char pbcstack2[400];
857 static int pbcpos2 = 0;
858 static void pbcpush2(
char x);
859 static int pbcpop2(
char x);
860 static int parencount2 = 0;
865 static char pbcstack3[400];
866 static int pbcpos3 = 0;
867 static void pbcpush3(
char x);
868 static int pbcpop3(
char x);
869 static int parencount3 = 0;
875 static int my_lineno = 1;
876 static int my_col = 1;
880 #define MAX_INCLUDE_DEPTH 50
891 int ael_yyparse (
struct parse_io *);
904 YY_BUFFER_STATE bufstate;
907 static struct stackelement include_stack[MAX_INCLUDE_DEPTH];
908 static int include_stack_index = 0;
909 static void setup_filestack(
char *fnamebuf,
int fnamebuf_siz, glob_t *globbuf,
int globpos, yyscan_t xscan,
int create);
923 static void pbcwhere(
const char *text,
int *line,
int *col )
925 int loc_line = *line;
928 while ( (c = *text++) ) {
930 loc_col += 8 - (loc_col % 8);
931 }
else if ( c ==
'\n' ) {
941 #define STORE_POS do { \
942 yylloc->first_line = yylloc->last_line = my_lineno; \
943 yylloc->first_column=my_col; \
944 yylloc->last_column=my_col+yyleng-1; \
948 #define STORE_LOC do { \
949 yylloc->first_line = my_lineno; \
950 yylloc->first_column=my_col; \
951 pbcwhere(yytext, &my_lineno, &my_col); \
952 yylloc->last_line = my_lineno; \
953 yylloc->last_column = my_col - 1; \
959 #line 957 "ael_lex.c"
970 #ifndef YY_NO_UNISTD_H
978 #ifndef YY_EXTRA_TYPE
979 #define YY_EXTRA_TYPE void *
987 YY_EXTRA_TYPE yyextra_r;
990 FILE *yyin_r, *yyout_r;
1000 int yy_did_buffer_switch_on_eof;
1001 int yy_start_stack_ptr;
1002 int yy_start_stack_depth;
1003 int *yy_start_stack;
1004 yy_state_type yy_last_accepting_state;
1005 char* yy_last_accepting_cpos;
1008 int yy_flex_debug_r;
1020 static int yy_init_globals (yyscan_t yyscanner );
1024 # define yylval yyg->yylval_r
1026 # define yylloc yyg->yylloc_r
1028 int ael_yylex_init (yyscan_t* scanner);
1030 int ael_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
1035 int ael_yylex_destroy (yyscan_t yyscanner );
1037 int ael_yyget_debug (yyscan_t yyscanner );
1039 void ael_yyset_debug (
int debug_flag ,yyscan_t yyscanner );
1043 void ael_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1047 void ael_yyset_in (FILE * in_str ,yyscan_t yyscanner );
1051 void ael_yyset_out (FILE * out_str ,yyscan_t yyscanner );
1061 YYSTYPE * ael_yyget_lval (yyscan_t yyscanner );
1063 void ael_yyset_lval (
YYSTYPE * yylval_param ,yyscan_t yyscanner );
1065 YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner );
1067 void ael_yyset_lloc (
YYLTYPE * yylloc_param ,yyscan_t yyscanner );
1073 #ifndef YY_SKIP_YYWRAP
1075 extern "C" int ael_yywrap (yyscan_t yyscanner );
1077 extern int ael_yywrap (yyscan_t yyscanner );
1081 static void yyunput (
int c,
char *buf_ptr ,yyscan_t yyscanner);
1084 static void yy_flex_strncpy (
char *,yyconst
char *,
int ,yyscan_t yyscanner);
1087 #ifdef YY_NEED_STRLEN
1088 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner);
1094 static int yyinput (yyscan_t yyscanner );
1096 static int input (yyscan_t yyscanner );
1102 #ifndef YY_READ_BUF_SIZE
1103 #define YY_READ_BUF_SIZE 8192
1111 #define ECHO fwrite( yytext, yyleng, 1, yyout )
1118 #define YY_INPUT(buf,result,max_size) \
1119 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1123 for ( n = 0; n < max_size && \
1124 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1125 buf[n] = (char) c; \
1127 buf[n++] = (char) c; \
1128 if ( c == EOF && ferror( yyin ) ) \
1129 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1135 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1137 if( errno != EINTR) \
1139 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1155 #define yyterminate() return YY_NULL
1159 #ifndef YY_START_STACK_INCR
1160 #define YY_START_STACK_INCR 25
1164 #ifndef YY_FATAL_ERROR
1165 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1174 #define YY_DECL_IS_OURS 1
1176 extern int ael_yylex \
1177 (
YYSTYPE * yylval_param,
YYLTYPE * yylloc_param ,yyscan_t yyscanner);
1179 #define YY_DECL int ael_yylex \
1180 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1186 #ifndef YY_USER_ACTION
1187 #define YY_USER_ACTION
1192 #define YY_BREAK break;
1195 #define YY_RULE_SETUP \
1202 register yy_state_type yy_current_state;
1203 register char *yy_cp, *yy_bp;
1204 register int yy_act;
1207 #line 220 "ael.flex"
1210 #line 1208 "ael_lex.c"
1212 yylval = yylval_param;
1214 yylloc = yylloc_param;
1216 if ( !yyg->yy_init )
1224 if ( ! yyg->yy_start )
1233 if ( ! YY_CURRENT_BUFFER ) {
1234 ael_yyensure_buffer_stack (yyscanner);
1235 YY_CURRENT_BUFFER_LVALUE =
1239 ael_yy_load_buffer_state(yyscanner );
1244 yyg->yy_more_len = 0;
1245 if ( yyg->yy_more_flag )
1247 yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
1248 yyg->yy_more_flag = 0;
1250 yy_cp = yyg->yy_c_buf_p;
1253 *yy_cp = yyg->yy_hold_char;
1260 yy_current_state = yyg->yy_start;
1264 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1265 if ( yy_accept[yy_current_state] )
1267 yyg->yy_last_accepting_state = yy_current_state;
1268 yyg->yy_last_accepting_cpos = yy_cp;
1270 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1272 yy_current_state = (int) yy_def[yy_current_state];
1273 if ( yy_current_state >= 285 )
1274 yy_c = yy_meta[(
unsigned int) yy_c];
1276 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1279 while ( yy_current_state != 284 );
1280 yy_cp = yyg->yy_last_accepting_cpos;
1281 yy_current_state = yyg->yy_last_accepting_state;
1284 yy_act = yy_accept[yy_current_state];
1286 YY_DO_BEFORE_ACTION;
1294 *yy_cp = yyg->yy_hold_char;
1295 yy_cp = yyg->yy_last_accepting_cpos;
1296 yy_current_state = yyg->yy_last_accepting_state;
1297 goto yy_find_action;
1301 #line 222 "ael.flex"
1302 { STORE_POS;
return LC;}
1306 #line 223 "ael.flex"
1307 { STORE_POS;
return RC;}
1311 #line 224 "ael.flex"
1312 { STORE_POS;
return LP;}
1316 #line 225 "ael.flex"
1317 { STORE_POS;
return RP;}
1321 #line 226 "ael.flex"
1322 { STORE_POS;
return SEMI;}
1326 #line 227 "ael.flex"
1327 { STORE_POS;
return EQ;}
1331 #line 228 "ael.flex"
1332 { STORE_POS;
return COMMA;}
1336 #line 229 "ael.flex"
1337 { STORE_POS;
return COLON;}
1341 #line 230 "ael.flex"
1342 { STORE_POS;
return AMPER;}
1346 #line 231 "ael.flex"
1347 { STORE_POS;
return BAR;}
1351 #line 232 "ael.flex"
1352 { STORE_POS;
return EXTENMARK;}
1356 #line 233 "ael.flex"
1357 { STORE_POS;
return AT;}
1361 #line 234 "ael.flex"
1366 #line 235 "ael.flex"
1367 { STORE_POS;
return KW_CONTEXT;}
1371 #line 236 "ael.flex"
1372 { STORE_POS;
return KW_ABSTRACT;}
1376 #line 237 "ael.flex"
1377 { STORE_POS;
return KW_EXTEND;}
1381 #line 238 "ael.flex"
1382 { STORE_POS;
return KW_MACRO;};
1386 #line 239 "ael.flex"
1387 { STORE_POS;
return KW_GLOBALS;}
1391 #line 240 "ael.flex"
1392 { STORE_POS;
return KW_LOCAL;}
1396 #line 241 "ael.flex"
1397 { STORE_POS;
return KW_IGNOREPAT;}
1401 #line 242 "ael.flex"
1402 { STORE_POS;
return KW_SWITCH;}
1406 #line 243 "ael.flex"
1407 { STORE_POS;
return KW_IF;}
1411 #line 244 "ael.flex"
1412 { STORE_POS;
return KW_IFTIME;}
1416 #line 245 "ael.flex"
1417 { STORE_POS;
return KW_RANDOM;}
1421 #line 246 "ael.flex"
1422 { STORE_POS;
return KW_REGEXTEN;}
1426 #line 247 "ael.flex"
1427 { STORE_POS;
return KW_HINT;}
1431 #line 248 "ael.flex"
1432 { STORE_POS;
return KW_ELSE;}
1436 #line 249 "ael.flex"
1437 { STORE_POS;
return KW_GOTO;}
1441 #line 250 "ael.flex"
1442 { STORE_POS;
return KW_JUMP;}
1446 #line 251 "ael.flex"
1447 { STORE_POS;
return KW_RETURN;}
1451 #line 252 "ael.flex"
1452 { STORE_POS;
return KW_BREAK;}
1456 #line 253 "ael.flex"
1457 { STORE_POS;
return KW_CONTINUE;}
1461 #line 254 "ael.flex"
1462 { STORE_POS;
return KW_FOR;}
1466 #line 255 "ael.flex"
1467 { STORE_POS;
return KW_WHILE;}
1471 #line 256 "ael.flex"
1472 { STORE_POS;
return KW_CASE;}
1476 #line 257 "ael.flex"
1477 { STORE_POS;
return KW_DEFAULT;}
1481 #line 258 "ael.flex"
1482 { STORE_POS;
return KW_PATTERN;}
1486 #line 259 "ael.flex"
1487 { STORE_POS;
return KW_CATCH;}
1491 #line 260 "ael.flex"
1492 { STORE_POS;
return KW_SWITCHES;}
1496 #line 261 "ael.flex"
1497 { STORE_POS;
return KW_ESWITCHES;}
1501 #line 262 "ael.flex"
1502 { STORE_POS;
return KW_INCLUDES;}
1506 #line 263 "ael.flex"
1507 { BEGIN(comment); my_col += 2; }
1511 #line 265 "ael.flex"
1512 { my_col += yyleng; }
1517 #line 266 "ael.flex"
1518 { ++my_lineno; my_col=1;}
1522 #line 267 "ael.flex"
1523 { my_col += yyleng; }
1528 #line 268 "ael.flex"
1529 { ++my_lineno; my_col=1;}
1533 #line 269 "ael.flex"
1534 { my_col += 2; BEGIN(INITIAL); }
1539 #line 271 "ael.flex"
1540 { my_lineno++; my_col = 1; }
1544 #line 272 "ael.flex"
1545 { my_col += yyleng; }
1549 #line 273 "ael.flex"
1550 { my_col += (yyleng*8)-(my_col%8); }
1554 #line 275 "ael.flex"
1563 if (!strcmp(yytext,
"${")) {
1569 }
else if (!strcmp(yytext,
"$[")) {
1583 #line 301 "ael.flex"
1588 #line 302 "ael.flex"
1593 #line 303 "ael.flex"
1598 #line 304 "ael.flex"
1609 #line 311 "ael.flex"
1621 #line 318 "ael.flex"
1624 char c = yytext[yyleng-1];
1626 yylval->str = malloc(yyleng);
1627 strncpy(yylval->str, yytext, yyleng);
1628 yylval->str[yyleng-1] = 0;
1637 #line 331 "ael.flex"
1639 if ( pbcpop2(
'}') ) {
1641 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1643 yylval->str = malloc(yyleng+1);
1644 strncpy(yylval->str, yytext, yyleng);
1645 yylval->str[yyleng] = 0;
1649 if ( parencount2 >= 0) {
1660 #line 350 "ael.flex"
1662 char c = yytext[yyleng-1];
1672 #line 358 "ael.flex"
1674 char c = yytext[yyleng-1];
1677 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1678 my_file, my_lineno, my_col, c);
1680 yylval->str = malloc(yyleng+1);
1681 strncpy(yylval->str, yytext, yyleng);
1682 yylval->str[yyleng] = 0;
1691 #line 374 "ael.flex"
1693 if ( pbcpop3(
']') ) {
1695 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1697 yylval->str = malloc(yyleng+1);
1698 strncpy(yylval->str, yytext, yyleng);
1699 yylval->str[yyleng] = 0;
1703 if ( parencount3 >= 0) {
1714 #line 393 "ael.flex"
1716 char c = yytext[yyleng-1];
1726 #line 401 "ael.flex"
1728 char c = yytext[yyleng-1];
1731 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1732 my_file, my_lineno, my_col, c);
1734 yylval->str = malloc(yyleng+1);
1735 strncpy(yylval->str, yytext, yyleng);
1736 yylval->str[yyleng] = 0;
1752 #line 424 "ael.flex"
1754 if ( pbcpop(
')') ) {
1756 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1758 yylval->str = malloc(yyleng+1);
1759 strncpy(yylval->str, yytext, yyleng);
1760 yylval->str[yyleng] = 0;
1765 if ( parencount >= 0) {
1769 yylval->str = malloc(yyleng);
1770 strncpy(yylval->str, yytext, yyleng);
1771 yylval->str[yyleng-1] = 0;
1781 #line 449 "ael.flex"
1783 char c = yytext[yyleng-1];
1793 #line 457 "ael.flex"
1795 char c = yytext[yyleng-1];
1798 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1799 my_file, my_lineno, my_col, c);
1801 yylval->str = malloc(yyleng+1);
1802 strncpy(yylval->str, yytext, yyleng);
1803 yylval->str[yyleng] = 0;
1820 #line 481 "ael.flex"
1822 char c = yytext[yyleng-1];
1832 #line 489 "ael.flex"
1834 if ( pbcpop(
')') ) {
1836 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
1838 yylval->str = malloc(yyleng+1);
1839 strncpy(yylval->str, yytext, yyleng);
1840 yylval->str[yyleng] = 0;
1845 if( parencount >= 0){
1850 if ( !strcmp(yytext,
")") )
1852 yylval->str = malloc(yyleng);
1853 strncpy(yylval->str, yytext, yyleng);
1854 yylval->str[yyleng-1] =
'\0';
1863 #line 516 "ael.flex"
1865 if( parencount != 0) {
1869 if( !strcmp(yytext,
"," ) )
1871 yylval->str = malloc(yyleng);
1872 strncpy(yylval->str, yytext, yyleng);
1873 yylval->str[yyleng-1] =
'\0';
1882 #line 531 "ael.flex"
1884 char c = yytext[yyleng-1];
1887 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
1889 yylval->str = malloc(yyleng+1);
1890 strncpy(yylval->str, yytext, yyleng);
1891 yylval->str[yyleng] =
'\0';
1905 #line 550 "ael.flex"
1907 char c = yytext[yyleng-1];
1915 #line 556 "ael.flex"
1917 char c = yytext[yyleng-1];
1920 ast_log(LOG_ERROR,
"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
1922 yylval->str = malloc(yyleng+1);
1923 strncpy(yylval->str, yytext, yyleng);
1924 yylval->str[yyleng] =
'\0';
1933 #line 570 "ael.flex"
1936 yylval->str = malloc(yyleng);
1937 strncpy(yylval->str, yytext, yyleng);
1938 yylval->str[yyleng-1] =
'\0';
1947 #line 580 "ael.flex"
1949 char fnamebuf[1024],*p1,*p2;
1952 int globbuf_pos = -1;
1953 globbuf.gl_offs = 0;
1955 p1 = strchr(yytext,
'"');
1956 p2 = strrchr(yytext,
'"');
1957 if ( include_stack_index >= MAX_INCLUDE_DEPTH ) {
1958 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);
1959 }
else if ( (
int)(p2-p1) >
sizeof(fnamebuf) - 1 ) {
1960 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);
1962 strncpy(fnamebuf, p1+1, p2-p1-1);
1963 fnamebuf[p2-p1-1] = 0;
1964 if (fnamebuf[0] !=
'/') {
1965 char fnamebuf2[1024];
1966 snprintf(fnamebuf2,
sizeof(fnamebuf2),
"%s/%s", (
char *)ast_config_AST_CONFIG_DIR, fnamebuf);
1970 glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
1972 glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
1974 if (glob_ret == GLOB_NOSPACE) {
1975 ast_log(LOG_WARNING,
1976 "Glob Expansion of pattern '%s' failed: Not enough memory\n", fnamebuf);
1977 }
else if (glob_ret == GLOB_ABORTED) {
1978 ast_log(LOG_WARNING,
1979 "Glob Expansion of pattern '%s' failed: Read error\n", fnamebuf);
1980 }
else if (glob_ret == GLOB_NOMATCH) {
1981 ast_log(LOG_WARNING,
1982 "Glob Expansion of pattern '%s' failed: No matches!\n", fnamebuf);
1987 if (globbuf_pos > -1) {
1988 setup_filestack(fnamebuf,
sizeof(fnamebuf), &globbuf, 0, yyscanner, 1);
1992 case YY_STATE_EOF(INITIAL):
1993 case YY_STATE_EOF(paren):
1994 case YY_STATE_EOF(semic):
1995 case YY_STATE_EOF(argg):
1996 case YY_STATE_EOF(comment):
1997 case YY_STATE_EOF(curlystate):
1998 case YY_STATE_EOF(wordstate):
1999 case YY_STATE_EOF(brackstate):
2000 #line 625 "ael.flex"
2002 char fnamebuf[2048];
2003 if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
2005 include_stack[include_stack_index-1].globbuf_pos++;
2006 setup_filestack(fnamebuf,
sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0);
2010 if (include_stack[include_stack_index].fname) {
2011 free(include_stack[include_stack_index].fname);
2012 include_stack[include_stack_index].fname = 0;
2018 if ( --include_stack_index < 0 ) {
2021 globfree(&include_stack[include_stack_index].globbuf);
2022 include_stack[include_stack_index].globbuf_pos = -1;
2026 my_lineno = include_stack[include_stack_index].lineno;
2027 my_col = include_stack[include_stack_index].colno;
2028 my_file = strdup(include_stack[include_stack_index].fname);
2036 #line 657 "ael.flex"
2037 { ast_log(LOG_ERROR,
"Unhandled char(s): %s\n", yytext); }
2041 #line 659 "ael.flex"
2042 YY_FATAL_ERROR(
"flex scanner jammed" );
2044 #line 2042 "ael_lex.c"
2046 case YY_END_OF_BUFFER:
2049 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2052 *yy_cp = yyg->yy_hold_char;
2053 YY_RESTORE_YY_MORE_OFFSET
2055 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2066 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2067 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2068 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2078 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2080 yy_state_type yy_next_state;
2082 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2084 yy_current_state = yy_get_previous_state( yyscanner );
2095 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2097 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2099 if ( yy_next_state )
2102 yy_cp = ++yyg->yy_c_buf_p;
2103 yy_current_state = yy_next_state;
2109 yy_cp = yyg->yy_last_accepting_cpos;
2110 yy_current_state = yyg->yy_last_accepting_state;
2111 goto yy_find_action;
2115 else switch ( yy_get_next_buffer( yyscanner ) )
2117 case EOB_ACT_END_OF_FILE:
2119 yyg->yy_did_buffer_switch_on_eof = 0;
2121 if ( ael_yywrap(yyscanner ) )
2132 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2134 yy_act = YY_STATE_EOF(YY_START);
2140 if ( ! yyg->yy_did_buffer_switch_on_eof )
2146 case EOB_ACT_CONTINUE_SCAN:
2148 yyg->yytext_ptr + yy_amount_of_matched_text;
2150 yy_current_state = yy_get_previous_state( yyscanner );
2152 yy_cp = yyg->yy_c_buf_p;
2153 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2156 case EOB_ACT_LAST_MATCH:
2158 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2160 yy_current_state = yy_get_previous_state( yyscanner );
2162 yy_cp = yyg->yy_c_buf_p;
2163 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2164 goto yy_find_action;
2171 "fatal flex scanner internal error--no action found" );
2183 static int yy_get_next_buffer (yyscan_t yyscanner)
2186 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2187 register char *source = yyg->yytext_ptr;
2188 register int number_to_move, i;
2191 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2193 "fatal flex scanner internal error--end of buffer missed" );
2195 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2197 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2202 return EOB_ACT_END_OF_FILE;
2210 return EOB_ACT_LAST_MATCH;
2217 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
2219 for ( i = 0; i < number_to_move; ++i )
2220 *(dest++) = *(source++);
2222 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2226 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2231 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2233 while ( num_to_read <= 0 )
2237 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2239 int yy_c_buf_p_offset =
2240 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2242 if ( b->yy_is_our_buffer )
2244 int new_size = b->yy_buf_size * 2;
2246 if ( new_size <= 0 )
2247 b->yy_buf_size += b->yy_buf_size / 8;
2249 b->yy_buf_size *= 2;
2251 b->yy_ch_buf = (
char *)
2253 ael_yyrealloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
2259 if ( ! b->yy_ch_buf )
2261 "fatal error - scanner input buffer overflow" );
2263 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2265 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2270 if ( num_to_read > YY_READ_BUF_SIZE )
2271 num_to_read = YY_READ_BUF_SIZE;
2274 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2275 yyg->yy_n_chars, (
size_t) num_to_read );
2277 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2280 if ( yyg->yy_n_chars == 0 )
2282 if ( number_to_move == YY_MORE_ADJ )
2284 ret_val = EOB_ACT_END_OF_FILE;
2290 ret_val = EOB_ACT_LAST_MATCH;
2291 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2292 YY_BUFFER_EOF_PENDING;
2297 ret_val = EOB_ACT_CONTINUE_SCAN;
2299 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2301 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2302 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) ael_yyrealloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
2303 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2304 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
2307 yyg->yy_n_chars += number_to_move;
2308 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2309 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2311 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2318 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2320 register yy_state_type yy_current_state;
2321 register char *yy_cp;
2324 yy_current_state = yyg->yy_start;
2326 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2328 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2329 if ( yy_accept[yy_current_state] )
2331 yyg->yy_last_accepting_state = yy_current_state;
2332 yyg->yy_last_accepting_cpos = yy_cp;
2334 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2336 yy_current_state = (int) yy_def[yy_current_state];
2337 if ( yy_current_state >= 285 )
2338 yy_c = yy_meta[(
unsigned int) yy_c];
2340 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
2343 return yy_current_state;
2351 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2353 register int yy_is_jam;
2355 register char *yy_cp = yyg->yy_c_buf_p;
2357 register YY_CHAR yy_c = 1;
2358 if ( yy_accept[yy_current_state] )
2360 yyg->yy_last_accepting_state = yy_current_state;
2361 yyg->yy_last_accepting_cpos = yy_cp;
2363 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2365 yy_current_state = (int) yy_def[yy_current_state];
2366 if ( yy_current_state >= 285 )
2367 yy_c = yy_meta[(
unsigned int) yy_c];
2369 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
2370 yy_is_jam = (yy_current_state == 284);
2372 return yy_is_jam ? 0 : yy_current_state;
2375 static void yyunput (
int c,
register char * yy_bp , yyscan_t yyscanner)
2377 register char *yy_cp;
2380 yy_cp = yyg->yy_c_buf_p;
2383 *yy_cp = yyg->yy_hold_char;
2385 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2388 register int number_to_move = yyg->yy_n_chars + 2;
2389 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2390 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2391 register char *source =
2392 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2394 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2395 *--dest = *--source;
2397 yy_cp += (int) (dest - source);
2398 yy_bp += (int) (dest - source);
2399 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2400 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2402 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2403 YY_FATAL_ERROR(
"flex scanner push-back overflow" );
2406 *--yy_cp = (char) c;
2408 yyg->yytext_ptr = yy_bp;
2409 yyg->yy_hold_char = *yy_cp;
2410 yyg->yy_c_buf_p = yy_cp;
2415 static int yyinput (yyscan_t yyscanner)
2417 static int input (yyscan_t yyscanner)
2424 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2426 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2432 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2434 *yyg->yy_c_buf_p =
'\0';
2438 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2441 switch ( yy_get_next_buffer( yyscanner ) )
2443 case EOB_ACT_LAST_MATCH:
2459 case EOB_ACT_END_OF_FILE:
2461 if ( ael_yywrap(yyscanner ) )
2464 if ( ! yyg->yy_did_buffer_switch_on_eof )
2467 return yyinput(yyscanner);
2469 return input(yyscanner);
2473 case EOB_ACT_CONTINUE_SCAN:
2474 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2480 c = *(
unsigned char *) yyg->yy_c_buf_p;
2481 *yyg->yy_c_buf_p =
'\0';
2482 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2497 if ( ! YY_CURRENT_BUFFER ){
2498 ael_yyensure_buffer_stack (yyscanner);
2499 YY_CURRENT_BUFFER_LVALUE =
2503 ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2504 ael_yy_load_buffer_state(yyscanner );
2520 ael_yyensure_buffer_stack (yyscanner);
2521 if ( YY_CURRENT_BUFFER == new_buffer )
2524 if ( YY_CURRENT_BUFFER )
2527 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2528 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2529 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2532 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2533 ael_yy_load_buffer_state(yyscanner );
2540 yyg->yy_did_buffer_switch_on_eof = 1;
2543 static void ael_yy_load_buffer_state (yyscan_t yyscanner)
2546 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2547 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2548 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2549 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2562 b = (YY_BUFFER_STATE) ael_yyalloc(
sizeof(
struct yy_buffer_state ) ,yyscanner );
2564 YY_FATAL_ERROR(
"out of dynamic memory in ael_yy_create_buffer()" );
2566 b->yy_buf_size = size;
2571 b->yy_ch_buf = (
char *) ael_yyalloc(b->yy_buf_size + 2 ,yyscanner );
2572 if ( ! b->yy_ch_buf )
2573 YY_FATAL_ERROR(
"out of dynamic memory in ael_yy_create_buffer()" );
2575 b->yy_is_our_buffer = 1;
2577 ael_yy_init_buffer(b,file ,yyscanner);
2593 if ( b == YY_CURRENT_BUFFER )
2594 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2596 if ( b->yy_is_our_buffer )
2597 ael_yyfree((
void *) b->yy_ch_buf ,yyscanner );
2599 ael_yyfree((
void *) b ,yyscanner );
2603 extern int isatty (
int );
2610 static void ael_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2618 b->yy_input_file = file;
2619 b->yy_fill_buffer = 1;
2625 if (b != YY_CURRENT_BUFFER){
2630 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2651 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2652 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2654 b->yy_buf_pos = &b->yy_ch_buf[0];
2657 b->yy_buffer_status = YY_BUFFER_NEW;
2659 if ( b == YY_CURRENT_BUFFER )
2660 ael_yy_load_buffer_state(yyscanner );
2672 if (new_buffer == NULL)
2675 ael_yyensure_buffer_stack(yyscanner);
2678 if ( YY_CURRENT_BUFFER )
2681 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2682 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2683 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2687 if (YY_CURRENT_BUFFER)
2689 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2692 ael_yy_load_buffer_state(yyscanner );
2693 yyg->yy_did_buffer_switch_on_eof = 1;
2703 if (!YY_CURRENT_BUFFER)
2707 YY_CURRENT_BUFFER_LVALUE = NULL;
2711 if (YY_CURRENT_BUFFER) {
2712 ael_yy_load_buffer_state(yyscanner );
2713 yyg->yy_did_buffer_switch_on_eof = 1;
2720 static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
2736 YY_FATAL_ERROR(
"out of dynamic memory in ael_yyensure_buffer_stack()" );
2756 YY_FATAL_ERROR(
"out of dynamic memory in ael_yyensure_buffer_stack()" );
2775 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2776 base[size-1] != YY_END_OF_BUFFER_CHAR )
2780 b = (YY_BUFFER_STATE) ael_yyalloc(
sizeof(
struct yy_buffer_state ) ,yyscanner );
2782 YY_FATAL_ERROR(
"out of dynamic memory in ael_yy_scan_buffer()" );
2784 b->yy_buf_size = size - 2;
2785 b->yy_buf_pos = b->yy_ch_buf = base;
2786 b->yy_is_our_buffer = 0;
2787 b->yy_input_file = 0;
2788 b->yy_n_chars = b->yy_buf_size;
2789 b->yy_is_interactive = 0;
2791 b->yy_fill_buffer = 0;
2792 b->yy_buffer_status = YY_BUFFER_NEW;
2828 n = _yybytes_len + 2;
2829 buf = (
char *) ael_yyalloc(n ,yyscanner );
2831 YY_FATAL_ERROR(
"out of dynamic memory in ael_yy_scan_bytes()" );
2833 for ( i = 0; i < _yybytes_len; ++i )
2834 buf[i] = yybytes[i];
2836 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2840 YY_FATAL_ERROR(
"bad buffer in ael_yy_scan_bytes()" );
2845 b->yy_is_our_buffer = 1;
2850 #ifndef YY_EXIT_FAILURE
2851 #define YY_EXIT_FAILURE 2
2854 static void yy_fatal_error (yyconst
char* msg , yyscan_t yyscanner)
2856 (void) fprintf( stderr,
"%s\n", msg );
2857 exit( YY_EXIT_FAILURE );
2867 int yyless_macro_arg = (n); \
2868 YY_LESS_LINENO(yyless_macro_arg);\
2869 yytext[yyleng] = yyg->yy_hold_char; \
2870 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2871 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2872 *yyg->yy_c_buf_p = '\0'; \
2873 yyleng = yyless_macro_arg; \
2895 if (! YY_CURRENT_BUFFER)
2908 if (! YY_CURRENT_BUFFER)
2958 yyextra = user_defined ;
2970 if (! YY_CURRENT_BUFFER )
2971 yy_fatal_error(
"ael_yyset_lineno called with no buffer" , yyscanner);
2973 yylineno = line_number;
2985 if (! YY_CURRENT_BUFFER )
2986 yy_fatal_error(
"ael_yyset_column called with no buffer" , yyscanner);
2988 yycolumn = column_no;
3003 void ael_yyset_out (FILE * out_str , yyscan_t yyscanner)
3009 int ael_yyget_debug (yyscan_t yyscanner)
3012 return yy_flex_debug;
3015 void ael_yyset_debug (
int bdebug , yyscan_t yyscanner)
3018 yy_flex_debug = bdebug ;
3023 YYSTYPE * ael_yyget_lval (yyscan_t yyscanner)
3029 void ael_yyset_lval (
YYSTYPE * yylval_param , yyscan_t yyscanner)
3032 yylval = yylval_param;
3035 YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner)
3041 void ael_yyset_lloc (
YYLTYPE * yylloc_param , yyscan_t yyscanner)
3044 yylloc = yylloc_param;
3054 int ael_yylex_init(yyscan_t* ptr_yy_globals)
3057 if (ptr_yy_globals == NULL){
3062 *ptr_yy_globals = (yyscan_t) ael_yyalloc (
sizeof(
struct yyguts_t ), NULL );
3064 if (*ptr_yy_globals == NULL){
3070 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
3072 return yy_init_globals ( *ptr_yy_globals );
3083 int ael_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
3090 if (ptr_yy_globals == NULL){
3095 *ptr_yy_globals = (yyscan_t) ael_yyalloc (
sizeof(
struct yyguts_t ), &dummy_yyguts );
3097 if (*ptr_yy_globals == NULL){
3104 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
3108 return yy_init_globals ( *ptr_yy_globals );
3111 static int yy_init_globals (yyscan_t yyscanner)
3121 yyg->yy_c_buf_p = (
char *) 0;
3125 yyg->yy_start_stack_ptr = 0;
3126 yyg->yy_start_stack_depth = 0;
3127 yyg->yy_start_stack = NULL;
3145 int ael_yylex_destroy (yyscan_t yyscanner)
3150 while(YY_CURRENT_BUFFER){
3152 YY_CURRENT_BUFFER_LVALUE = NULL;
3161 ael_yyfree(yyg->yy_start_stack ,yyscanner );
3162 yyg->yy_start_stack = NULL;
3166 yy_init_globals( yyscanner);
3169 ael_yyfree ( yyscanner , yyscanner );
3179 static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n , yyscan_t yyscanner)
3182 for ( i = 0; i < n; ++i )
3187 #ifdef YY_NEED_STRLEN
3188 static int yy_flex_strlen (yyconst
char * s , yyscan_t yyscanner)
3191 for ( n = 0; s[n]; ++n )
3198 void *ael_yyalloc (yy_size_t size , yyscan_t yyscanner)
3200 return (
void *) malloc( size );
3203 void *ael_yyrealloc (
void * ptr, yy_size_t size , yyscan_t yyscanner)
3212 return (
void *) realloc( (
char *) ptr, size );
3215 #define YYTABLES_NAME "yytables"
3217 #line 659 "ael.flex"
3221 static void pbcpush(
char x)
3223 pbcstack[pbcpos++] = x;
3226 void ael_yyfree(
void *ptr, yyscan_t yyscanner)
3229 free( (
char*) ptr );
3232 static int pbcpop(
char x)
3234 if ( ( x ==
')' && pbcstack[pbcpos-1] ==
'(' )
3235 || ( x ==
']' && pbcstack[pbcpos-1] ==
'[' )
3236 || ( x ==
'}' && pbcstack[pbcpos-1] ==
'{' )) {
3243 static void pbcpush2(
char x)
3245 pbcstack2[pbcpos2++] = x;
3248 static int pbcpop2(
char x)
3250 if ( ( x ==
')' && pbcstack2[pbcpos2-1] ==
'(' )
3251 || ( x ==
']' && pbcstack2[pbcpos2-1] ==
'[' )
3252 || ( x ==
'}' && pbcstack2[pbcpos2-1] ==
'{' )) {
3259 static void pbcpush3(
char x)
3261 pbcstack3[pbcpos3++] = x;
3264 static int pbcpop3(
char x)
3266 if ( ( x ==
')' && pbcstack3[pbcpos3-1] ==
'(' )
3267 || ( x ==
']' && pbcstack3[pbcpos3-1] ==
'[' )
3268 || ( x ==
'}' && pbcstack3[pbcpos3-1] ==
'{' )) {
3275 static int c_prevword(
void)
3277 char *c = prev_word;
3313 void reset_parencount(yyscan_t yyscanner );
3314 void reset_parencount(yyscan_t yyscanner )
3324 void reset_semicount(yyscan_t yyscanner );
3325 void reset_semicount(yyscan_t yyscanner )
3332 void reset_argcount(yyscan_t yyscanner );
3333 void reset_argcount(yyscan_t yyscanner )
3344 struct pval *ael2_parse(
char *filename,
int *errors)
3346 struct pval *pvalue;
3354 io = calloc(
sizeof(
struct parse_io),1);
3358 include_stack_index=0;
3361 ael_yylex_init(&io->scanner);
3362 fin = fopen(filename,
"r");
3364 ast_log(LOG_ERROR,
"File %s could not be opened\n", filename);
3370 my_file = strdup(filename);
3371 if (stat(filename, &stats)) {
3372 ast_log(LOG_WARNING,
"failed to populate stats from file '%s'\n", filename);
3374 buffer = (
char*)malloc(stats.st_size+2);
3375 if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
3376 ast_log(LOG_ERROR,
"fread() failed: %s\n", strerror(errno));
3378 buffer[stats.st_size]=0;
3390 *errors = io->syntax_error_count;
3392 ael_yylex_destroy(io->scanner);
3399 static void setup_filestack(
char *fnamebuf2,
int fnamebuf_siz, glob_t *globbuf,
int globpos, yyscan_t yyscanner,
int create)
3404 char fnamebuf[2048];
3406 if (globbuf && globbuf->gl_pathv && globbuf->gl_pathc > 0)
3407 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
3408 strncpy(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
3413 ast_log(LOG_ERROR,
"Include file name not present!\n");
3416 for (i=0; i<include_stack_index; i++) {
3417 if ( !strcmp(fnamebuf,include_stack[i].fname )) {
3418 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",
3419 my_file, my_lineno, my_col, fnamebuf);
3424 if (i == include_stack_index)
3428 if (fnamebuf[0] !=
'/')
3429 snprintf(fnamebuf2, fnamebuf_siz,
"%s/%s", ast_config_AST_CONFIG_DIR, fnamebuf);
3431 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
3432 strncpy(fnamebuf2, fnamebuf, fnamebuf_siz);
3436 in1 = fopen( fnamebuf2,
"r" );
3439 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);
3443 if (stat(fnamebuf2, &stats)) {
3444 ast_log(LOG_WARNING,
"Failed to populate stats from file '%s'\n", fnamebuf2);
3446 buffer = (
char*)malloc(stats.st_size+1);
3447 if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
3448 ast_log(LOG_ERROR,
"fread() failed: %s\n", strerror(errno));
3450 buffer[stats.st_size] = 0;
3451 ast_log(LOG_DEBUG,
" --Read in included file %s, %d chars\n",fnamebuf2, (
int)stats.st_size);
3453 if (include_stack[include_stack_index].fname) {
3454 free(include_stack[include_stack_index].fname);
3455 include_stack[include_stack_index].fname = 0;
3457 include_stack[include_stack_index].fname = strdup(
S_OR(my_file,
"<none>"));
3458 include_stack[include_stack_index].lineno = my_lineno;
3459 include_stack[include_stack_index].colno = my_col+yyleng;
3462 my_file = strdup(fnamebuf2);
3464 include_stack[include_stack_index].globbuf = *globbuf;
3466 include_stack[include_stack_index].globbuf_pos = 0;
3468 include_stack[include_stack_index].bufstate = YY_CURRENT_BUFFER;
3470 include_stack_index++;
YY_BUFFER_STATE ael_yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner)
void ael_yypop_buffer_state(yyscan_t yyscanner)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
YY_BUFFER_STATE ael_yy_scan_string(yyconst char *yy_str, yyscan_t yyscanner)
void ael_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
YY_BUFFER_STATE ael_yy_create_buffer(FILE *file, int size, yyscan_t yyscanner)
int ael_yyget_leng(yyscan_t yyscanner)
Generic (perhaps overly so) hashtable implementation Hash Table support in Asterisk.
void ael_yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
YY_BUFFER_STATE * yy_buffer_stack
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
void ael_yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
FILE * ael_yyget_in(yyscan_t yyscanner)
void ael_yyset_lineno(int line_number, yyscan_t yyscanner)
void ael_yyset_column(int column_no, yyscan_t yyscanner)
FILE * ael_yyget_out(yyscan_t yyscanner)
void ael_yyrestart(FILE *input_file, yyscan_t yyscanner)
int ael_yyget_lineno(yyscan_t yyscanner)
Structures for AEL - the Asterisk extension language.
Support for logging to various files, console and syslog Configuration in file logger.conf.
YY_BUFFER_STATE ael_yy_scan_bytes(yyconst char *bytes, int len, yyscan_t yyscanner)
void ael_yyset_in(FILE *in_str, yyscan_t yyscanner)
int ael_yyget_column(yyscan_t yyscanner)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
YY_EXTRA_TYPE ael_yyget_extra(yyscan_t yyscanner)
void ael_yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
size_t yy_buffer_stack_max
char * ael_yyget_text(yyscan_t yyscanner)
size_t yy_buffer_stack_top