1 #include <IceUtil/ScannerConfig.h>
2 #line 2 "src/IceStorm/Scanner.cpp"
4 #line 4 "src/IceStorm/Scanner.cpp"
6 #define YY_INT_ALIGNED short int
11 #define YY_FLEX_MAJOR_VERSION 2
12 #define YY_FLEX_MINOR_VERSION 5
13 #define YY_FLEX_SUBMINOR_VERSION 37
14 #if YY_FLEX_SUBMINOR_VERSION > 0
35 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
40 #ifndef __STDC_LIMIT_MACROS
41 #define __STDC_LIMIT_MACROS 1
61 #define INT8_MIN (-128)
64 #define INT16_MIN (-32767-1)
67 #define INT32_MIN (-2147483647-1)
70 #define INT8_MAX (127)
73 #define INT16_MAX (32767)
76 #define INT32_MAX (2147483647)
79 #define UINT8_MAX (255U)
82 #define UINT16_MAX (65535U)
85 #define UINT32_MAX (4294967295U)
100 #if defined (__STDC__)
108 #define yyconst const
121 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
127 #define BEGIN (yy_start) = 1 + 2 *
133 #define YY_START (((yy_start) - 1) / 2)
134 #define YYSTATE YY_START
137 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
140 #define YY_NEW_FILE yyrestart(yyin )
142 #define YY_END_OF_BUFFER_CHAR 0
146 #define YY_BUF_SIZE 16384
151 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
153 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
154 #define YY_TYPEDEF_YY_BUFFER_STATE
158 #ifndef YY_TYPEDEF_YY_SIZE_T
159 #define YY_TYPEDEF_YY_SIZE_T
167 #define EOB_ACT_CONTINUE_SCAN 0
168 #define EOB_ACT_END_OF_FILE 1
169 #define EOB_ACT_LAST_MATCH 2
171 #define YY_LESS_LINENO(n)
178 int yyless_macro_arg = (n); \
179 YY_LESS_LINENO(yyless_macro_arg);\
180 *yy_cp = (yy_hold_char); \
181 YY_RESTORE_YY_MORE_OFFSET \
182 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
183 YY_DO_BEFORE_ACTION; \
187 #define unput(c) yyunput( c, (yytext_ptr) )
189 #ifndef YY_STRUCT_YY_BUFFER_STATE
190 #define YY_STRUCT_YY_BUFFER_STATE
237 #define YY_BUFFER_NEW 0
238 #define YY_BUFFER_NORMAL 1
249 #define YY_BUFFER_EOF_PENDING 2
255 static size_t yy_buffer_stack_top = 0;
256 static size_t yy_buffer_stack_max = 0;
265 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
266 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
272 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
275 static char yy_hold_char;
280 static char* yy_c_buf_p = (
char*) 0;
281 static int yy_init = 0;
282 static int yy_start = 0;
287 static int yy_did_buffer_switch_on_eof;
297 static void yyensure_buffer_stack(
void);
298 static void yy_load_buffer_state(
void);
301 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
311 #define yy_new_buffer yy_create_buffer
313 #define yy_set_interactive(is_interactive) \
315 if ( ! YY_CURRENT_BUFFER ){ \
316 yyensure_buffer_stack (); \
317 YY_CURRENT_BUFFER_LVALUE = \
318 yy_create_buffer(yyin,YY_BUF_SIZE ); \
320 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
323 #define yy_set_bol(at_bol) \
325 if ( ! YY_CURRENT_BUFFER ){\
326 yyensure_buffer_stack (); \
327 YY_CURRENT_BUFFER_LVALUE = \
328 yy_create_buffer(yyin,YY_BUF_SIZE ); \
330 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
333 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
338 #define YY_SKIP_YYWRAP
351 #define yytext_ptr yytext
355 static int yy_get_next_buffer(
void);
356 static void yy_fatal_error(
yyconst char msg[]);
361 #define YY_DO_BEFORE_ACTION \
362 (yytext_ptr) = yy_bp; \
363 yyleng = (size_t) (yy_cp - yy_bp); \
364 (yy_hold_char) = *yy_cp; \
366 (yy_c_buf_p) = yy_cp;
368 #define YY_NUM_RULES 8
369 #define YY_END_OF_BUFFER 9
380 3, 3, 9, 7, 3, 4, 5, 6, 7, 4,
381 7, 3, 0, 2, 1, 0, 3, 0
387 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
388 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 2, 1, 4, 1, 1, 1, 1, 5, 1,
391 1, 6, 1, 1, 1, 1, 7, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 8, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 9, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1
426 0, 0, 11, 22, 8, 22, 22, 22, 12, 22,
427 18, 0, 0, 22, 22, 0, 22, 22
433 18, 1, 18, 18, 18, 18, 18, 18, 18, 18,
434 18, 5, 11, 18, 18, 11, 18, 0
440 4, 5, 6, 7, 8, 4, 9, 10, 11, 12,
441 18, 18, 18, 18, 18, 18, 13, 14, 15, 16,
442 17, 3, 18, 18, 18, 18, 18, 18, 18, 18,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
450 3, 0, 0, 0, 0, 0, 5, 9, 9, 11,
451 11, 18, 18, 18, 18, 18, 18, 18, 18, 18,
456 static char* yy_last_accepting_cpos;
464 #define REJECT reject_used_but_not_detected
465 #define yymore() yymore_used_but_not_detected
466 #define YY_MORE_ADJ 0
467 #define YY_RESTORE_YY_MORE_OFFSET
469 #line 1 "src/IceStorm/Scanner.l"
470 #line 2 "src/IceStorm/Scanner.l"
485 #if defined(_MSC_VER) && defined(ICE_64)
490 # pragma warning( 4 : 4267 )
495 # pragma warning( 4 : 4244 )
498 #if defined(_MSC_VER) && defined(ICE_32)
502 # pragma warning( 4 : 4018 )
505 #if defined(__GNUC__)
506 # pragma GCC diagnostic ignored "-Wsign-compare"
518 # define YY_NO_UNISTD_H
527 # pragma error_messages(off,truncwarn)
531 #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
542 #define YY_USER_INIT initScanner();
544 #line 537 "src/IceStorm/Scanner.cpp"
548 #ifndef YY_NO_UNISTD_H
556 #ifndef YY_EXTRA_TYPE
557 #define YY_EXTRA_TYPE void *
560 static int yy_init_globals(
void);
595 #ifndef YY_SKIP_YYWRAP
597 extern "C" int yywrap(
void);
603 static void yyunput(
int c,
char* buf_ptr);
606 static void yy_flex_strncpy(
char*,
yyconst char*,
int);
609 #ifdef YY_NEED_STRLEN
610 static int yy_flex_strlen(
yyconst char*);
616 static int yyinput(
void);
618 static int input(
void);
624 #ifndef YY_READ_BUF_SIZE
625 #define YY_READ_BUF_SIZE 8192
633 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
640 #define YY_INPUT(buf,result,max_size) \
641 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
645 for ( n = 0; n < max_size && \
646 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
649 buf[n++] = (char) c; \
650 if ( c == EOF && ferror( yyin ) ) \
651 YY_FATAL_ERROR( "input in flex scanner failed" ); \
657 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
659 if( errno != EINTR) \
661 YY_FATAL_ERROR( "input in flex scanner failed" ); \
677 #define yyterminate() return YY_NULL
681 #ifndef YY_START_STACK_INCR
682 #define YY_START_STACK_INCR 25
686 #ifndef YY_FATAL_ERROR
687 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
696 #define YY_DECL_IS_OURS 1
698 extern int yylex(
void);
700 #define YY_DECL int yylex (void)
706 #ifndef YY_USER_ACTION
707 #define YY_USER_ACTION
712 #define YY_BREAK break;
715 #define YY_RULE_SETUP \
726 #line 84 "src/IceStorm/Scanner.l"
729 #line 722 "src/IceStorm/Scanner.cpp"
756 yyensure_buffer_stack();
761 yy_load_buffer_state();
766 yy_cp = (yy_c_buf_p);
769 *
yy_cp = (yy_hold_char);
776 yy_current_state = (yy_start);
781 if (yy_accept[yy_current_state])
783 (yy_last_accepting_state) = yy_current_state;
784 (yy_last_accepting_cpos) =
yy_cp;
786 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
788 yy_current_state = (int) yy_def[yy_current_state];
789 if (yy_current_state >= 19)
791 yy_c = yy_meta[(
unsigned int) yy_c];
794 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
797 while (yy_base[yy_current_state] != 22);
800 yy_act = yy_accept[yy_current_state];
804 yy_cp = (yy_last_accepting_cpos);
805 yy_current_state = (yy_last_accepting_state);
806 yy_act = yy_accept[yy_current_state];
818 *
yy_cp = (yy_hold_char);
819 yy_cp = (yy_last_accepting_cpos);
820 yy_current_state = (yy_last_accepting_state);
825 #line 86 "src/IceStorm/Scanner.l"
833 while (
c !=
'\n' &&
c != EOF);
838 #line 96 "src/IceStorm/Scanner.l"
846 int next = yyinput();
867 #line 121 "src/IceStorm/Scanner.l"
869 size_t len = strlen(
yytext);
870 for (
size_t i = 0; i < len; ++i)
882 #line 132 "src/IceStorm/Scanner.l"
889 #line 136 "src/IceStorm/Scanner.l"
895 char c =
static_cast<char>(yyinput());
900 else if (
c ==
static_cast<char>(EOF))
907 char next =
static_cast<char>(yyinput());
930 yylvalp->push_back(
s);
936 #line 180 "src/IceStorm/Scanner.l"
942 char c =
static_cast<char>(yyinput());
947 else if (
c ==
static_cast<char>(EOF))
958 yylvalp->push_back(
s);
964 #line 205 "src/IceStorm/Scanner.l"
971 char c =
static_cast<char>(yyinput());
972 if (
c ==
static_cast<char>(EOF))
976 else if (isspace(
static_cast<unsigned char>(
c)) ||
c ==
';')
986 yylvalp->push_back(
s);
988 StringTokenMap::const_iterator pos = keywordMap.find(
s);
994 #line 232 "src/IceStorm/Scanner.l"
997 #line 979 "src/IceStorm/Scanner.cpp"
1007 *
yy_cp = (yy_hold_char);
1038 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
1040 yy_current_state = yy_get_previous_state();
1051 yy_next_state = yy_try_NUL_trans(yy_current_state);
1058 yy_cp = ++(yy_c_buf_p);
1059 yy_current_state = yy_next_state;
1065 yy_cp = (yy_c_buf_p);
1066 goto yy_find_action;
1070 else switch (yy_get_next_buffer())
1074 (yy_did_buffer_switch_on_eof) = 0;
1095 if (!(yy_did_buffer_switch_on_eof))
1107 yy_current_state = yy_get_previous_state();
1109 yy_cp = (yy_c_buf_p);
1117 yy_current_state = yy_get_previous_state();
1119 yy_cp = (yy_c_buf_p);
1121 goto yy_find_action;
1128 "fatal flex scanner internal error--no action found");
1140 static int yy_get_next_buffer(
void)
1144 int number_to_move, i;
1149 "fatal flex scanner internal error--end of buffer missed");
1174 number_to_move = (int)((yy_c_buf_p) - (
yytext_ptr)) - 1;
1176 for (i = 0; i < number_to_move; ++i)
1194 while (num_to_read <= 0)
1201 int yy_c_buf_p_offset =
1229 "fatal error - scanner input buffer overflow");
1231 (yy_c_buf_p) = &b->
yy_ch_buf[yy_c_buf_p_offset];
1245 (yy_n_chars), num_to_read);
1250 if ((yy_n_chars) == 0)
1274 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1282 (yy_n_chars) += number_to_move;
1298 yy_current_state = (yy_start);
1303 if (yy_accept[yy_current_state])
1305 (yy_last_accepting_state) = yy_current_state;
1306 (yy_last_accepting_cpos) =
yy_cp;
1308 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
1310 yy_current_state = (int) yy_def[yy_current_state];
1311 if (yy_current_state >= 19)
1313 yy_c = yy_meta[(
unsigned int) yy_c];
1316 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1319 return yy_current_state;
1330 char*
yy_cp = (yy_c_buf_p);
1333 if (yy_accept[yy_current_state])
1335 (yy_last_accepting_state) = yy_current_state;
1336 (yy_last_accepting_cpos) =
yy_cp;
1338 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
1340 yy_current_state = (int) yy_def[yy_current_state];
1341 if (yy_current_state >= 19)
1343 yy_c = yy_meta[(
unsigned int) yy_c];
1346 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1347 yy_is_jam = (yy_current_state == 18);
1349 return yy_is_jam ? 0 : yy_current_state;
1352 static void yyunput(
int c,
char*
yy_bp)
1356 yy_cp = (yy_c_buf_p);
1359 *
yy_cp = (yy_hold_char);
1361 if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2)
1365 yy_size_t number_to_move = (yy_n_chars) + 2;
1381 if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2)
1390 (yy_hold_char) = *
yy_cp;
1391 (yy_c_buf_p) =
yy_cp;
1396 static int yyinput(
void)
1398 static int input(
void)
1404 *(yy_c_buf_p) = (yy_hold_char);
1415 *(yy_c_buf_p) =
'\0';
1424 switch (yy_get_next_buffer())
1449 if (!(yy_did_buffer_switch_on_eof))
1467 c = *(
unsigned char*)(yy_c_buf_p);
1468 *(yy_c_buf_p) =
'\0';
1469 (yy_hold_char) = *++(yy_c_buf_p);
1485 yyensure_buffer_stack();
1491 yy_load_buffer_state();
1506 yyensure_buffer_stack();
1515 *(yy_c_buf_p) = (yy_hold_char);
1521 yy_load_buffer_state();
1528 (yy_did_buffer_switch_on_eof) = 1;
1531 static void yy_load_buffer_state(
void)
1536 (yy_hold_char) = *(yy_c_buf_p);
1568 yy_init_buffer(b, file);
1654 yy_load_buffer_state();
1666 if (new_buffer == NULL)
1671 yyensure_buffer_stack();
1677 *(yy_c_buf_p) = (yy_hold_char);
1685 (yy_buffer_stack_top)++;
1690 yy_load_buffer_state();
1691 (yy_did_buffer_switch_on_eof) = 1;
1707 if ((yy_buffer_stack_top) > 0)
1709 --(yy_buffer_stack_top);
1714 yy_load_buffer_state();
1715 (yy_did_buffer_switch_on_eof) = 1;
1722 static void yyensure_buffer_stack(
void)
1726 if (!(yy_buffer_stack))
1737 if (!(yy_buffer_stack))
1739 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()");
1742 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
1744 (yy_buffer_stack_max) = num_to_alloc;
1745 (yy_buffer_stack_top) = 0;
1749 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1)
1755 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1760 if (!(yy_buffer_stack))
1762 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()");
1766 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size *
sizeof(
struct yy_buffer_state*));
1767 (yy_buffer_stack_max) = num_to_alloc;
1839 n = _yybytes_len + 2;
1846 for (i = 0; i < _yybytes_len; ++i)
1848 buf[i] = yybytes[i];
1867 #ifndef YY_EXIT_FAILURE
1868 #define YY_EXIT_FAILURE 2
1871 static void yy_fatal_error(
yyconst char* msg)
1873 (void) fprintf(stderr,
"%s\n", msg);
1884 int yyless_macro_arg = (n); \
1885 YY_LESS_LINENO(yyless_macro_arg);\
1886 yytext[yyleng] = (yy_hold_char); \
1887 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1888 (yy_hold_char) = *(yy_c_buf_p); \
1889 *(yy_c_buf_p) = '\0'; \
1890 yyleng = yyless_macro_arg; \
1974 static int yy_init_globals(
void)
1980 (yy_buffer_stack) = 0;
1981 (yy_buffer_stack_top) = 0;
1982 (yy_buffer_stack_max) = 0;
1983 (yy_c_buf_p) = (
char*) 0;
2015 yyfree((yy_buffer_stack));
2016 (yy_buffer_stack) = NULL;
2030 static void yy_flex_strncpy(
char* s1,
yyconst char* s2,
int n)
2033 for (i = 0; i < n; ++i)
2040 #ifdef YY_NEED_STRLEN
2041 static int yy_flex_strlen(
yyconst char*
s)
2044 for (n = 0;
s[n]; ++n)
2053 return (
void*) malloc(size);
2065 return (
void*) realloc((
char*) ptr, size);
2073 #define YYTABLES_NAME "yytables"
2075 #line 232 "src/IceStorm/Scanner.l"