15 #line 2 "CChemEqParser_lex.cpp"
17 #line 4 "CChemEqParser_lex.cpp"
19 #define YY_INT_ALIGNED short int
24 #define YY_FLEX_MAJOR_VERSION 2
25 #define YY_FLEX_MINOR_VERSION 5
26 #define YY_FLEX_SUBMINOR_VERSION 35
27 #if YY_FLEX_SUBMINOR_VERSION > 0
37 #define yyFlexLexer CChemEqParserFlexLexer
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
78 #define INT8_MIN (-128)
81 #define INT16_MIN (-32767-1)
84 #define INT32_MIN (-2147483647-1)
87 #define INT8_MAX (127)
90 #define INT16_MAX (32767)
93 #define INT32_MAX (2147483647)
96 #define UINT8_MAX (255U)
99 #define UINT16_MAX (65535U)
102 #define UINT32_MAX (4294967295U)
125 #if defined (__STDC__)
133 #define yyconst const
146 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
152 #define BEGIN (yy_start) = 1 + 2 *
158 #define YY_START (((yy_start) - 1) / 2)
159 #define YYSTATE YY_START
162 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
165 #define YY_NEW_FILE yyrestart(yyin)
167 #define YY_END_OF_BUFFER_CHAR 0
176 #define YY_BUF_SIZE 32768
178 #define YY_BUF_SIZE 16384
184 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
186 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
187 #define YY_TYPEDEF_YY_BUFFER_STATE
193 #define EOB_ACT_CONTINUE_SCAN 0
194 #define EOB_ACT_END_OF_FILE 1
195 #define EOB_ACT_LAST_MATCH 2
197 #define YY_LESS_LINENO(n)
204 int yyless_macro_arg = (n); \
205 YY_LESS_LINENO(yyless_macro_arg);\
206 *yy_cp = (yy_hold_char); \
207 YY_RESTORE_YY_MORE_OFFSET \
208 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
209 YY_DO_BEFORE_ACTION; \
213 #define unput(c) yyunput(c, (yytext_ptr))
215 #ifndef YY_TYPEDEF_YY_SIZE_T
216 #define YY_TYPEDEF_YY_SIZE_T
220 #ifndef YY_STRUCT_YY_BUFFER_STATE
221 #define YY_STRUCT_YY_BUFFER_STATE
269 #define YY_BUFFER_NEW 0
270 #define YY_BUFFER_NORMAL 1
281 #define YY_BUFFER_EOF_PENDING 2
291 #define YY_CURRENT_BUFFER ((yy_buffer_stack) \
292 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
298 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
304 #define yy_new_buffer yy_create_buffer
306 #define yy_set_interactive(is_interactive) \
308 if (! YY_CURRENT_BUFFER ){\
309 yyensure_buffer_stack (); \
310 YY_CURRENT_BUFFER_LVALUE = \
311 yy_create_buffer(yyin, YY_BUF_SIZE ); \
313 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
316 #define yy_set_bol(at_bol) \
318 if (! YY_CURRENT_BUFFER ){\
319 yyensure_buffer_stack (); \
320 YY_CURRENT_BUFFER_LVALUE = \
321 yy_create_buffer(yyin, YY_BUF_SIZE ); \
323 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
326 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
332 #define yytext_ptr yytext
339 #define YY_DO_BEFORE_ACTION \
340 (yytext_ptr) = yy_bp; \
341 yyleng = (size_t) (yy_cp - yy_bp); \
342 (yy_hold_char) = *yy_cp; \
344 (yy_c_buf_p) = yy_cp;
346 #define YY_NUM_RULES 12
347 #define YY_END_OF_BUFFER 13
358 0, 0, 13, 9, 9, 9, 10, 11, 3, 2,
359 9, 1, 6, 7, 4, 5, 9, 0, 9, 10,
360 0, 8, 0, 7, 1, 1, 9, 1, 9, 1,
367 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
368 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
369 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
370 1, 4, 1, 5, 1, 1, 1, 1, 1, 1,
371 1, 6, 7, 1, 8, 9, 1, 10, 10, 10,
372 10, 10, 10, 10, 10, 10, 10, 1, 11, 1,
373 12, 13, 1, 1, 1, 1, 1, 1, 14, 1,
374 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 15, 1, 1, 1, 1, 1, 1, 1, 1,
378 16, 1, 1, 1, 1, 1, 1, 1, 1, 1,
379 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
380 1, 1, 17, 1, 18, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 2, 2, 3, 4, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 4, 4
407 0, 0, 63, 51, 17, 0, 0, 17, 50, 49,
408 12, 24, 32, 28, 64, 64, 26, 20, 0, 0,
409 21, 64, 24, 13, 20, 0, 34, 37, 38, 40,
416 31, 1, 31, 32, 32, 5, 33, 34, 32, 32,
417 32, 32, 32, 32, 31, 31, 32, 32, 5, 33,
418 34, 31, 34, 32, 12, 12, 32, 12, 32, 32,
425 4, 5, 6, 7, 8, 9, 10, 11, 4, 12,
426 13, 14, 4, 4, 4, 4, 15, 16, 19, 19,
427 20, 22, 18, 18, 24, 22, 31, 18, 17, 28,
428 18, 23, 25, 26, 18, 23, 18, 27, 18, 27,
429 29, 29, 18, 30, 18, 17, 28, 30, 18, 30,
430 18, 17, 17, 20, 20, 21, 21, 21, 21, 18,
431 18, 18, 31, 3, 31, 31, 31, 31, 31, 31,
432 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 5, 5,
441 5, 8, 11, 24, 11, 21, 23, 5, 25, 25,
442 18, 8, 12, 12, 12, 21, 17, 12, 14, 12,
443 27, 27, 13, 27, 27, 28, 28, 29, 29, 30,
444 30, 32, 32, 33, 33, 34, 34, 34, 34, 10,
445 9, 4, 3, 31, 31, 31, 31, 31, 31, 31,
446 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
453 #define REJECT reject_used_but_not_detected
454 #define yymore() yymore_used_but_not_detected
455 #define YY_MORE_ADJ 0
456 #define YY_RESTORE_YY_MORE_OFFSET
457 #line 1 "model/CChemEqParser.lpp"
459 #line 9 "model/CChemEqParser.lpp"
464 #include "CChemEqParser_yacc.hpp"
470 #define YYERRCODE 256
473 #define YY_USER_INIT \
476 #define COMMON_ACTION \
478 mpData->name = yytext; \
481 #line 463 "CChemEqParser_lex.cpp"
485 #ifndef YY_NO_UNISTD_H
492 #ifndef YY_EXTRA_TYPE
493 #define YY_EXTRA_TYPE void *
497 static void yy_flex_strncpy(
char *,
yyconst char *,
int);
500 #ifdef YY_NEED_STRLEN
501 static int yy_flex_strlen(
yyconst char *);
509 #ifndef YY_READ_BUF_SIZE
512 #define YY_READ_BUF_SIZE 16384
514 #define YY_READ_BUF_SIZE 8192
520 #define ECHO LexerOutput(yytext, yyleng)
527 #define YY_INPUT(buf,result,max_size) \
529 if ((result = LexerInput((char *) buf, max_size )) < 0 ) \
530 YY_FATAL_ERROR("input in flex scanner failed" );
539 #define yyterminate() return YY_NULL
543 #ifndef YY_START_STACK_INCR
544 #define YY_START_STACK_INCR 25
548 #ifndef YY_FATAL_ERROR
549 #define YY_FATAL_ERROR(msg) LexerError(msg)
558 #define YY_DECL_IS_OURS 1
559 #define YY_DECL int yyFlexLexer::yylex()
565 #ifndef YY_USER_ACTION
566 #define YY_USER_ACTION
571 #define YY_BREAK break;
574 #define YY_RULE_SETUP \
582 register char * yy_cp, *yy_bp;
585 #line 36 "model/CChemEqParser.lpp"
587 #line 570 "CChemEqParser_lex.cpp"
608 yyensure_buffer_stack();
613 yy_load_buffer_state();
618 yy_cp = (yy_c_buf_p);
621 *yy_cp = (yy_hold_char);
628 yy_current_state = (yy_start);
633 register YY_CHAR yy_c = yy_ec[
YY_SC_TO_UI(*yy_cp)];
635 if (yy_accept[yy_current_state])
637 (yy_last_accepting_state) = yy_current_state;
638 (yy_last_accepting_cpos) = yy_cp;
641 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
643 yy_current_state = (int) yy_def[yy_current_state];
645 if (yy_current_state >= 32)
646 yy_c = yy_meta[(
unsigned int) yy_c];
649 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
652 while (yy_current_state != 31);
654 yy_cp = (yy_last_accepting_cpos);
655 yy_current_state = (yy_last_accepting_state);
658 yy_act = yy_accept[yy_current_state];
669 *yy_cp = (yy_hold_char);
670 yy_cp = (yy_last_accepting_cpos);
671 yy_current_state = (yy_last_accepting_state);
676 #line 37 "model/CChemEqParser.lpp"
685 #line 42 "model/CChemEqParser.lpp"
694 #line 47 "model/CChemEqParser.lpp"
703 #line 52 "model/CChemEqParser.lpp"
712 #line 57 "model/CChemEqParser.lpp"
721 #line 62 "model/CChemEqParser.lpp"
730 #line 67 "model/CChemEqParser.lpp"
740 #line 72 "model/CChemEqParser.lpp"
751 #line 78 "model/CChemEqParser.lpp"
761 #line 83 "model/CChemEqParser.lpp"
769 #line 87 "model/CChemEqParser.lpp"
775 #line 89 "model/CChemEqParser.lpp"
784 #line 94 "model/CChemEqParser.lpp"
787 #line 749 "CChemEqParser_lex.cpp"
792 int yy_amount_of_matched_text = (int)(yy_cp - (
yytext_ptr)) - 1;
795 *yy_cp = (yy_hold_char);
826 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
828 yy_current_state = yy_get_previous_state();
839 yy_next_state = yy_try_NUL_trans(yy_current_state);
846 yy_cp = ++(yy_c_buf_p);
847 yy_current_state = yy_next_state;
853 yy_cp = (yy_last_accepting_cpos);
854 yy_current_state = (yy_last_accepting_state);
859 else switch (yy_get_next_buffer())
863 (yy_did_buffer_switch_on_eof) = 0;
884 if (!(yy_did_buffer_switch_on_eof))
895 yy_current_state = yy_get_previous_state();
897 yy_cp = (yy_c_buf_p);
905 yy_current_state = yy_get_previous_state();
907 yy_cp = (yy_c_buf_p);
917 "fatal flex scanner internal error--no action found");
975 #ifdef YY_INTERACTIVE
981 if (yyin->eof() || yyin->fail())
984 #ifdef YY_INTERACTIVE
996 (
void) yyin->read(buf, max_size);
1001 return yyin->gcount();
1022 register int number_to_move, i;
1027 "fatal flex scanner internal error--end of buffer missed");
1054 for (i = 0; i < number_to_move; ++i)
1055 *(dest++) = *(source++);
1068 while (num_to_read <= 0)
1075 int yy_c_buf_p_offset =
1097 "fatal error - scanner input buffer overflow");
1158 register char *yy_cp;
1164 register YY_CHAR yy_c = (*yy_cp ? yy_ec[
YY_SC_TO_UI(*yy_cp)] : 1);
1166 if (yy_accept[yy_current_state])
1172 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
1174 yy_current_state = (int) yy_def[yy_current_state];
1176 if (yy_current_state >= 32)
1177 yy_c = yy_meta[(
unsigned int) yy_c];
1180 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1183 return yy_current_state;
1193 register int yy_is_jam;
1196 register YY_CHAR yy_c = 1;
1198 if (yy_accept[yy_current_state])
1204 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
1206 yy_current_state = (int) yy_def[yy_current_state];
1208 if (yy_current_state >= 32)
1209 yy_c = yy_meta[(
unsigned int) yy_c];
1212 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1213 yy_is_jam = (yy_current_state == 31);
1215 return yy_is_jam ? 0 : yy_current_state;
1220 register char *yy_cp;
1227 if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2)
1231 register int number_to_move = (
yy_n_chars) + 2;
1234 register char *source =
1238 *--dest = *--source;
1240 yy_cp += (int)(dest - source);
1241 yy_bp += (int)(dest - source);
1245 if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2)
1249 *--yy_cp = (char) c;
1502 if (new_buffer == NULL)
1569 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()");
1591 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()");
1636 #ifndef YY_EXIT_FAILURE
1637 #define YY_EXIT_FAILURE 2
1642 std::cerr << msg << std::endl;
1653 int yyless_macro_arg = (n); \
1654 YY_LESS_LINENO(yyless_macro_arg);\
1655 yytext[yyleng] = (yy_hold_char); \
1656 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1657 (yy_hold_char) = *(yy_c_buf_p); \
1658 *(yy_c_buf_p) = '\0'; \
1659 yyleng = yyless_macro_arg; \
1670 static void yy_flex_strncpy(
char* s1,
yyconst char * s2,
int n)
1674 for (i = 0; i < n; ++i)
1679 #ifdef YY_NEED_STRLEN
1680 static int yy_flex_strlen(
yyconst char * s)
1684 for (n = 0; s[n]; ++n)
1693 return (
void *) malloc(size);
1705 return (
void *) realloc((
char *) ptr, size);
1713 #define YYTABLES_NAME "yytables"
1715 #line 94 "model/CChemEqParser.lpp"
std::string unQuote(const std::string &name)
void yy_switch_to_buffer(struct yy_buffer_state *new_buffer)
struct yy_buffer_state * YY_BUFFER_STATE
void yypush_buffer_state(struct yy_buffer_state *new_buffer)
#define EOB_ACT_LAST_MATCH
static flex_int32_t yy_ec[256]
void CChemEqParserfree(void *)
static flex_int16_t yy_accept[32]
#define YY_DO_BEFORE_ACTION
void * CChemEqParseralloc(yy_size_t)
void yy_push_state(int new_state)
yy_state_type yy_try_NUL_trans(yy_state_type current_state)
size_t yy_buffer_stack_top
#define EOB_ACT_CONTINUE_SCAN
#define YY_RESTORE_YY_MORE_OFFSET
#define YY_CURRENT_BUFFER
unsigned int flex_uint32_t
#define YY_START_STACK_INCR
yyFlexLexer(std::istream *arg_yyin=0, std::ostream *arg_yyout=0)
yy_state_type * yy_state_buf
void yy_flush_buffer(struct yy_buffer_state *b)
virtual void switch_streams(std::istream *new_in, std::ostream *new_out=0)
#define YY_FATAL_ERROR(msg)
yy_state_type yy_last_accepting_state
void yyunput(int c, char *buf_ptr)
static flex_int16_t yy_def[35]
unsigned char flex_uint8_t
void yypop_buffer_state()
static flex_int16_t yy_nxt[83]
virtual void LexerError(const char *msg)
char * yy_last_accepting_cpos
void yy_load_buffer_state()
struct yy_buffer_state * yy_create_buffer(std::istream *s, int size)
void yyrestart(std::istream *s)
int yy_looking_for_trail_begin
size_t yy_buffer_stack_max
#define YY_END_OF_BUFFER_CHAR
int yy_did_buffer_switch_on_eof
static flex_int16_t yy_base[35]
std::istream * yy_input_file
void yy_init_buffer(struct yy_buffer_state *b, std::istream *s)
struct yy_buffer_state ** yy_buffer_stack
unsigned short int flex_uint16_t
void yyensure_buffer_stack(void)
virtual void LexerOutput(const char *buf, int size)
#define EOB_ACT_END_OF_FILE
virtual int LexerInput(char *buf, int max_size)
void yy_delete_buffer(struct yy_buffer_state *b)
void * CChemEqParserrealloc(void *, yy_size_t)
#define YY_CURRENT_BUFFER_LVALUE
#define YY_BUFFER_EOF_PENDING
static flex_int32_t yy_meta[19]
#define YY_STATE_EOF(state)
yy_state_type yy_get_previous_state()
CChemEqParserBase::Data * mpData
static flex_int16_t yy_chk[83]
#define YY_INPUT(buf, result, max_size)