1 #line 2 "scan_touchstone.cpp"
3 #line 4 "scan_touchstone.cpp"
5 #define YY_INT_ALIGNED short int
9 #define yy_create_buffer touchstone__create_buffer
10 #define yy_delete_buffer touchstone__delete_buffer
11 #define yy_flex_debug touchstone__flex_debug
12 #define yy_init_buffer touchstone__init_buffer
13 #define yy_flush_buffer touchstone__flush_buffer
14 #define yy_load_buffer_state touchstone__load_buffer_state
15 #define yy_switch_to_buffer touchstone__switch_to_buffer
16 #define yyin touchstone_in
17 #define yyleng touchstone_leng
18 #define yylex touchstone_lex
19 #define yylineno touchstone_lineno
20 #define yyout touchstone_out
21 #define yyrestart touchstone_restart
22 #define yytext touchstone_text
23 #define yywrap touchstone_wrap
24 #define yyalloc touchstone_alloc
25 #define yyrealloc touchstone_realloc
26 #define yyfree touchstone_free
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 35
32 #if YY_FLEX_SUBMINOR_VERSION > 0
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
118 #if defined (__STDC__)
126 #define yyconst const
139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
145 #define BEGIN (yy_start) = 1 + 2 *
151 #define YY_START (((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 touchstone_restart(touchstone_in )
160 #define YY_END_OF_BUFFER_CHAR 0
169 #define YY_BUF_SIZE 32768
171 #define YY_BUF_SIZE 16384
177 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
180 #define YY_TYPEDEF_YY_BUFFER_STATE
188 #define EOB_ACT_CONTINUE_SCAN 0
189 #define EOB_ACT_END_OF_FILE 1
190 #define EOB_ACT_LAST_MATCH 2
199 #define YY_LESS_LINENO(n) \
202 for ( yyl = n; yyl < touchstone_leng; ++yyl )\
203 if ( touchstone_text[yyl] == '\n' )\
204 --touchstone_lineno;\
212 int yyless_macro_arg = (n); \
213 YY_LESS_LINENO(yyless_macro_arg);\
214 *yy_cp = (yy_hold_char); \
215 YY_RESTORE_YY_MORE_OFFSET \
216 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
217 YY_DO_BEFORE_ACTION; \
221 #define unput(c) yyunput( c, (yytext_ptr) )
223 #ifndef YY_TYPEDEF_YY_SIZE_T
224 #define YY_TYPEDEF_YY_SIZE_T
228 #ifndef YY_STRUCT_YY_BUFFER_STATE
229 #define YY_STRUCT_YY_BUFFER_STATE
276 #define YY_BUFFER_NEW 0
277 #define YY_BUFFER_NORMAL 1
288 #define YY_BUFFER_EOF_PENDING 2
294 static size_t yy_buffer_stack_top = 0;
295 static size_t yy_buffer_stack_max = 0;
296 static YY_BUFFER_STATE * yy_buffer_stack = 0;
304 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
305 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
311 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
314 static char yy_hold_char;
315 static int yy_n_chars;
319 static char *yy_c_buf_p = (
char *) 0;
320 static int yy_init = 0;
321 static int yy_start = 0;
326 static int yy_did_buffer_switch_on_eof;
336 static void touchstone_ensure_buffer_stack (
void );
337 static void touchstone__load_buffer_state (
void );
338 static void touchstone__init_buffer (YY_BUFFER_STATE
b,FILE *file );
340 #define YY_FLUSH_BUFFER touchstone__flush_buffer(YY_CURRENT_BUFFER )
350 #define yy_new_buffer touchstone__create_buffer
352 #define yy_set_interactive(is_interactive) \
354 if ( ! YY_CURRENT_BUFFER ){ \
355 touchstone_ensure_buffer_stack (); \
356 YY_CURRENT_BUFFER_LVALUE = \
357 touchstone__create_buffer(touchstone_in,YY_BUF_SIZE ); \
359 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
362 #define yy_set_bol(at_bol) \
364 if ( ! YY_CURRENT_BUFFER ){\
365 touchstone_ensure_buffer_stack (); \
366 YY_CURRENT_BUFFER_LVALUE = \
367 touchstone__create_buffer(touchstone_in,YY_BUF_SIZE ); \
369 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
372 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
376 #define touchstone_wrap(n) 1
377 #define YY_SKIP_YYWRAP
387 int touchstone_lineno = 1;
390 #define yytext_ptr touchstone_text
392 static yy_state_type yy_get_previous_state (
void );
393 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
394 static int yy_get_next_buffer (
void );
395 static void yy_fatal_error (
yyconst char msg[] );
400 #define YY_DO_BEFORE_ACTION \
401 (yytext_ptr) = yy_bp; \
402 touchstone_leng = (size_t) (yy_cp - yy_bp); \
403 (yy_hold_char) = *yy_cp; \
405 (yy_c_buf_p) = yy_cp;
407 #define YY_NUM_RULES 11
408 #define YY_END_OF_BUFFER 12
418 0, 0, 0, 0, 12, 8, 4, 3, 8, 7,
419 8, 8, 6, 5, 1, 2, 9, 4, 10, 9,
420 3, 0, 6, 6, 0, 5, 10, 0, 0, 6,
426 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
427 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 2, 5, 1, 6, 1, 1, 1, 1, 1,
430 1, 1, 7, 1, 7, 8, 1, 9, 9, 9,
431 9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
432 1, 1, 1, 1, 10, 10, 10, 10, 11, 10,
433 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
434 10, 12, 10, 10, 10, 10, 10, 10, 10, 10,
435 1, 1, 1, 1, 10, 1, 10, 10, 10, 10,
437 11, 10, 10, 10, 10, 10, 10, 10, 10, 10,
438 10, 10, 10, 12, 10, 10, 10, 10, 10, 10,
439 10, 10, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
464 0, 34, 11, 14, 39, 41, 41, 41, 35, 41,
465 11, 28, 25, 0, 0, 41, 41, 41, 41, 32,
466 41, 25, 0, 12, 17, 0, 41, 20, 24, 23,
472 33, 1, 34, 34, 33, 33, 33, 33, 33, 33,
473 33, 33, 11, 35, 35, 33, 33, 33, 33, 33,
474 33, 33, 13, 33, 33, 35, 33, 33, 33, 33,
480 6, 7, 8, 9, 10, 6, 11, 12, 13, 14,
481 14, 15, 18, 19, 20, 18, 19, 20, 22, 23,
482 24, 26, 28, 29, 32, 30, 31, 32, 32, 17,
483 17, 30, 30, 24, 27, 25, 24, 21, 33, 16,
484 5, 33, 33, 33, 33, 33, 33, 33, 33, 33,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 3, 3, 3, 4, 4, 4, 11, 11,
492 24, 35, 24, 25, 32, 25, 28, 31, 28, 34,
493 34, 30, 29, 22, 20, 13, 12, 9, 5, 2,
494 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
501 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, };
503 static yy_state_type yy_last_accepting_state;
504 static char *yy_last_accepting_cpos;
507 int touchstone__flex_debug = 0;
512 #define REJECT reject_used_but_not_detected
513 #define yymore() yymore_used_but_not_detected
514 #define YY_MORE_ADJ 0
515 #define YY_RESTORE_YY_MORE_OFFSET
517 #line 1 "scan_touchstone.l"
519 #line 4 "scan_touchstone.l"
570 #line 571 "scan_touchstone.cpp"
575 #ifndef YY_EXTRA_TYPE
576 #define YY_EXTRA_TYPE void *
579 static int yy_init_globals (
void );
614 #ifndef YY_SKIP_YYWRAP
623 static void yy_flex_strncpy (
char *,
yyconst char *,
int );
626 #ifdef YY_NEED_STRLEN
627 static int yy_flex_strlen (
yyconst char * );
633 static int yyinput (
void );
635 static int input (
void );
641 #ifndef YY_READ_BUF_SIZE
644 #define YY_READ_BUF_SIZE 16384
646 #define YY_READ_BUF_SIZE 8192
655 #define ECHO do { if (fwrite( touchstone_text, touchstone_leng, 1, touchstone_out )) {} } while (0)
662 #define YY_INPUT(buf,result,max_size) \
663 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
667 for ( n = 0; n < max_size && \
668 (c = getc( touchstone_in )) != EOF && c != '\n'; ++n ) \
671 buf[n++] = (char) c; \
672 if ( c == EOF && ferror( touchstone_in ) ) \
673 YY_FATAL_ERROR( "input in flex scanner failed" ); \
679 while ( (result = fread(buf, 1, max_size, touchstone_in))==0 && ferror(touchstone_in)) \
681 if( errno != EINTR) \
683 YY_FATAL_ERROR( "input in flex scanner failed" ); \
687 clearerr(touchstone_in); \
699 #define yyterminate() return YY_NULL
703 #ifndef YY_START_STACK_INCR
704 #define YY_START_STACK_INCR 25
708 #ifndef YY_FATAL_ERROR
709 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
718 #define YY_DECL_IS_OURS 1
722 #define YY_DECL int touchstone_lex (void)
728 #ifndef YY_USER_ACTION
729 #define YY_USER_ACTION
734 #define YY_BREAK break;
737 #define YY_RULE_SETUP \
738 if ( touchstone_leng > 0 ) \
739 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
740 (touchstone_text[touchstone_leng - 1] == '\n'); \
747 register yy_state_type yy_current_state;
751 #line 67 "scan_touchstone.l"
754 #line 755 "scan_touchstone.cpp"
774 touchstone_ensure_buffer_stack ();
779 touchstone__load_buffer_state( );
784 yy_cp = (yy_c_buf_p);
787 *yy_cp = (yy_hold_char);
794 yy_current_state = (yy_start);
800 if ( yy_accept[yy_current_state] )
802 (yy_last_accepting_state) = yy_current_state;
803 (yy_last_accepting_cpos) = yy_cp;
805 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
807 yy_current_state = (int) yy_def[yy_current_state];
808 if ( yy_current_state >= 34 )
809 yy_c = yy_meta[(
unsigned int) yy_c];
811 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
814 while ( yy_base[yy_current_state] != 41 );
817 yy_act = yy_accept[yy_current_state];
820 yy_cp = (yy_last_accepting_cpos);
821 yy_current_state = (yy_last_accepting_state);
822 yy_act = yy_accept[yy_current_state];
831 if ( touchstone_text[yyl] ==
'\n' )
843 *yy_cp = (yy_hold_char);
844 yy_cp = (yy_last_accepting_cpos);
845 yy_current_state = (yy_last_accepting_state);
850 #line 69 "scan_touchstone.l"
855 #line 70 "scan_touchstone.l"
861 #line 71 "scan_touchstone.l"
866 #line 73 "scan_touchstone.l"
871 #line 75 "scan_touchstone.l"
879 #line 80 "scan_touchstone.l"
887 #line 85 "scan_touchstone.l"
894 #line 89 "scan_touchstone.l"
897 "line %d: syntax error, unrecognized character: `%s'\n",
898 touchstone_lineno, touchstone_text);
904 #line 96 "scan_touchstone.l"
910 #line 97 "scan_touchstone.l"
915 #line 99 "scan_touchstone.l"
918 #line 919 "scan_touchstone.cpp"
926 int yy_amount_of_matched_text = (int) (yy_cp - (
yytext_ptr)) - 1;
929 *yy_cp = (yy_hold_char);
957 yy_state_type yy_next_state;
959 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
961 yy_current_state = yy_get_previous_state( );
972 yy_next_state = yy_try_NUL_trans( yy_current_state );
979 yy_cp = ++(yy_c_buf_p);
980 yy_current_state = yy_next_state;
986 yy_cp = (yy_c_buf_p);
991 else switch ( yy_get_next_buffer( ) )
995 (yy_did_buffer_switch_on_eof) = 0;
1016 if ( ! (yy_did_buffer_switch_on_eof) )
1026 yy_current_state = yy_get_previous_state( );
1028 yy_cp = (yy_c_buf_p);
1036 yy_current_state = yy_get_previous_state( );
1038 yy_cp = (yy_c_buf_p);
1040 goto yy_find_action;
1047 "fatal flex scanner internal error--no action found" );
1059 static int yy_get_next_buffer (
void)
1063 register int number_to_move,
i;
1068 "fatal flex scanner internal error--end of buffer missed" );
1092 number_to_move = (int) ((yy_c_buf_p) - (
yytext_ptr)) - 1;
1094 for ( i = 0; i < number_to_move; ++
i )
1095 *(dest++) = *(source++);
1108 while ( num_to_read <= 0 )
1114 int yy_c_buf_p_offset =
1121 if ( new_size <= 0 )
1136 "fatal error - scanner input buffer overflow" );
1138 (yy_c_buf_p) = &b->
yy_ch_buf[yy_c_buf_p_offset];
1150 (yy_n_chars), (
size_t) num_to_read );
1155 if ( (yy_n_chars) == 0 )
1176 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1179 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1182 (yy_n_chars) += number_to_move;
1193 static yy_state_type yy_get_previous_state (
void)
1195 register yy_state_type yy_current_state;
1196 register char *
yy_cp;
1198 yy_current_state = (yy_start);
1204 if ( yy_accept[yy_current_state] )
1206 (yy_last_accepting_state) = yy_current_state;
1207 (yy_last_accepting_cpos) = yy_cp;
1209 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1211 yy_current_state = (int) yy_def[yy_current_state];
1212 if ( yy_current_state >= 34 )
1213 yy_c = yy_meta[(
unsigned int) yy_c];
1215 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1218 return yy_current_state;
1226 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1228 register int yy_is_jam;
1229 register char *yy_cp = (yy_c_buf_p);
1232 if ( yy_accept[yy_current_state] )
1234 (yy_last_accepting_state) = yy_current_state;
1235 (yy_last_accepting_cpos) = yy_cp;
1237 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1239 yy_current_state = (int) yy_def[yy_current_state];
1240 if ( yy_current_state >= 34 )
1241 yy_c = yy_meta[(
unsigned int) yy_c];
1243 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1244 yy_is_jam = (yy_current_state == 33);
1246 return yy_is_jam ? 0 : yy_current_state;
1251 static int yyinput (
void)
1253 static int input (
void)
1259 *(yy_c_buf_p) = (yy_hold_char);
1269 *(yy_c_buf_p) =
'\0';
1276 switch ( yy_get_next_buffer( ) )
1299 if ( ! (yy_did_buffer_switch_on_eof) )
1315 c = *(
unsigned char *) (yy_c_buf_p);
1316 *(yy_c_buf_p) =
'\0';
1317 (yy_hold_char) = *++(yy_c_buf_p);
1322 touchstone_lineno++;
1338 touchstone_ensure_buffer_stack ();
1344 touchstone__load_buffer_state( );
1359 touchstone_ensure_buffer_stack ();
1366 *(yy_c_buf_p) = (yy_hold_char);
1372 touchstone__load_buffer_state( );
1379 (yy_did_buffer_switch_on_eof) = 1;
1382 static void touchstone__load_buffer_state (
void)
1387 (yy_hold_char) = *(yy_c_buf_p);
1402 YY_FATAL_ERROR(
"out of dynamic memory in touchstone__create_buffer()" );
1411 YY_FATAL_ERROR(
"out of dynamic memory in touchstone__create_buffer()" );
1415 touchstone__init_buffer(b,file );
1440 extern int isatty (
int );
1447 static void touchstone__init_buffer (YY_BUFFER_STATE b, FILE * file )
1495 touchstone__load_buffer_state( );
1506 if (new_buffer == NULL)
1509 touchstone_ensure_buffer_stack();
1515 *(yy_c_buf_p) = (yy_hold_char);
1522 (yy_buffer_stack_top)++;
1526 touchstone__load_buffer_state( );
1527 (yy_did_buffer_switch_on_eof) = 1;
1541 if ((yy_buffer_stack_top) > 0)
1542 --(yy_buffer_stack_top);
1545 touchstone__load_buffer_state( );
1546 (yy_did_buffer_switch_on_eof) = 1;
1553 static void touchstone_ensure_buffer_stack (
void)
1557 if (!(yy_buffer_stack)) {
1567 if ( ! (yy_buffer_stack) )
1568 YY_FATAL_ERROR(
"out of dynamic memory in touchstone_ensure_buffer_stack()" );
1570 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
1572 (yy_buffer_stack_max) = num_to_alloc;
1573 (yy_buffer_stack_top) = 0;
1577 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1582 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1587 if ( ! (yy_buffer_stack) )
1588 YY_FATAL_ERROR(
"out of dynamic memory in touchstone_ensure_buffer_stack()" );
1591 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size *
sizeof(
struct yy_buffer_state*));
1592 (yy_buffer_stack_max) = num_to_alloc;
1614 YY_FATAL_ERROR(
"out of dynamic memory in touchstone__scan_buffer()" );
1660 n = _yybytes_len + 2;
1663 YY_FATAL_ERROR(
"out of dynamic memory in touchstone__scan_bytes()" );
1665 for ( i = 0; i < _yybytes_len; ++
i )
1666 buf[i] = yybytes[i];
1682 #ifndef YY_EXIT_FAILURE
1683 #define YY_EXIT_FAILURE 2
1686 static void yy_fatal_error (
yyconst char* msg )
1688 (void)
fprintf( stderr,
"%s\n", msg );
1699 int yyless_macro_arg = (n); \
1700 YY_LESS_LINENO(yyless_macro_arg);\
1701 touchstone_text[touchstone_leng] = (yy_hold_char); \
1702 (yy_c_buf_p) = touchstone_text + yyless_macro_arg; \
1703 (yy_hold_char) = *(yy_c_buf_p); \
1704 *(yy_c_buf_p) = '\0'; \
1705 touchstone_leng = yyless_macro_arg; \
1760 touchstone_lineno = line_number;
1786 touchstone__flex_debug = bdebug ;
1789 static int yy_init_globals (
void)
1796 touchstone_lineno = 1;
1798 (yy_buffer_stack) = 0;
1799 (yy_buffer_stack_top) = 0;
1800 (yy_buffer_stack_max) = 0;
1801 (yy_c_buf_p) = (
char *) 0;
1833 (yy_buffer_stack) = NULL;
1847 static void yy_flex_strncpy (
char* s1,
yyconst char * s2,
int n )
1850 for ( i = 0; i <
n; ++
i )
1855 #ifdef YY_NEED_STRLEN
1856 static int yy_flex_strlen (
yyconst char *
s )
1859 for ( n = 0; s[
n]; ++
n )
1868 return (
void *) malloc( size );
1880 return (
void *) realloc( (
char *) ptr, size );
1885 free( (
char *) ptr );
1888 #define YYTABLES_NAME "yytables"
1890 #line 99 "scan_touchstone.l"