1 #line 2 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.cc"
3 #line 4 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.cc"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
17 /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
18 * following macro. This is required in order to pass the c++-multiple-scanners
19 * test in the regression suite. We get reports that it breaks inheritance.
20 * We will address this in a future release of flex, or omit the C++ scanner
23 #define yyFlexLexer yyFlexLexer
25 /* First, we deal with platform-specific or compiler-specific issues. */
27 /* begin standard C headers. */
29 /* end standard C headers. */
31 /* flex integer type definitions */
36 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
38 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
40 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
41 * if you want the limit (max/min) macros for int types.
43 #ifndef __STDC_LIMIT_MACROS
44 #define __STDC_LIMIT_MACROS 1
48 typedef int8_t flex_int8_t;
49 typedef uint8_t flex_uint8_t;
50 typedef int16_t flex_int16_t;
51 typedef uint16_t flex_uint16_t;
52 typedef int32_t flex_int32_t;
53 typedef uint32_t flex_uint32_t;
55 typedef signed char flex_int8_t;
56 typedef short int flex_int16_t;
57 typedef int flex_int32_t;
58 typedef unsigned char flex_uint8_t;
59 typedef unsigned short int flex_uint16_t;
60 typedef unsigned int flex_uint32_t;
63 /* Limits of integral types. */
65 #define INT8_MIN (-128)
68 #define INT16_MIN (-32767-1)
71 #define INT32_MIN (-2147483647-1)
74 #define INT8_MAX (127)
77 #define INT16_MAX (32767)
80 #define INT32_MAX (2147483647)
83 #define UINT8_MAX (255U)
86 #define UINT16_MAX (65535U)
89 #define UINT32_MAX (4294967295U)
92 #endif /* ! FLEXINT_H */
94 /* begin standard C++ headers. */
99 /* end standard C++ headers. */
103 /* The "const" storage-class-modifier is valid. */
106 #else /* ! __cplusplus */
108 /* C99 requires __STDC__ to be defined as 1. */
109 #if defined (__STDC__)
113 #endif /* defined (__STDC__) */
114 #endif /* ! __cplusplus */
117 #define yyconst const
122 /* Returned upon end-of-file. */
125 /* Promotes a possibly negative, possibly signed char to an unsigned
126 * integer for use as an array index. If the signed char is negative,
127 * we want to instead treat it as an 8-bit unsigned char, hence the
130 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
132 /* Enter a start condition. This macro really ought to take a parameter,
133 * but we do it the disgusting crufty way forced on us by the ()-less
134 * definition of BEGIN.
136 #define BEGIN (yy_start) = 1 + 2 *
138 /* Translate the current start state into a value that can be later handed
139 * to BEGIN to return to the state. The YYSTATE alias is for lex
142 #define YY_START (((yy_start) - 1) / 2)
143 #define YYSTATE YY_START
145 /* Action number for EOF rule of a given start state. */
146 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
148 /* Special action meaning "start processing a new file". */
149 #define YY_NEW_FILE yyrestart( yyin )
151 #define YY_END_OF_BUFFER_CHAR 0
153 /* Size of default input buffer. */
155 #define YY_BUF_SIZE 16384
158 /* The state buf must be large enough to hold one state per character in the main buffer.
160 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
162 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
163 #define YY_TYPEDEF_YY_BUFFER_STATE
164 typedef struct yy_buffer_state *YY_BUFFER_STATE;
169 #define EOB_ACT_CONTINUE_SCAN 0
170 #define EOB_ACT_END_OF_FILE 1
171 #define EOB_ACT_LAST_MATCH 2
173 #define YY_LESS_LINENO(n)
175 /* Return all but the first "n" matched characters back to the input stream. */
179 /* Undo effects of setting up yytext. */ \
180 int yyless_macro_arg = (n); \
181 YY_LESS_LINENO(yyless_macro_arg);\
182 *yy_cp = (yy_hold_char); \
183 YY_RESTORE_YY_MORE_OFFSET \
184 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
185 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
189 #define unput(c) yyunput( c, (yytext_ptr) )
191 #ifndef YY_TYPEDEF_YY_SIZE_T
192 #define YY_TYPEDEF_YY_SIZE_T
193 typedef size_t yy_size_t;
196 #ifndef YY_STRUCT_YY_BUFFER_STATE
197 #define YY_STRUCT_YY_BUFFER_STATE
198 struct yy_buffer_state
201 std::istream* yy_input_file;
203 char *yy_ch_buf; /* input buffer */
204 char *yy_buf_pos; /* current position in input buffer */
206 /* Size of input buffer in bytes, not including room for EOB
209 yy_size_t yy_buf_size;
211 /* Number of characters read into yy_ch_buf, not including EOB
216 /* Whether we "own" the buffer - i.e., we know we created it,
217 * and can realloc() it to grow it, and should free() it to
220 int yy_is_our_buffer;
222 /* Whether this is an "interactive" input source; if so, and
223 * if we're using stdio for input, then we want to use getc()
224 * instead of fread(), to make sure we stop fetching input after
227 int yy_is_interactive;
229 /* Whether we're considered to be at the beginning of a line.
230 * If so, '^' rules will be active on the next match, otherwise
235 int yy_bs_lineno; /**< The line count. */
236 int yy_bs_column; /**< The column count. */
238 /* Whether to try to fill the input buffer when we reach the
243 int yy_buffer_status;
245 #define YY_BUFFER_NEW 0
246 #define YY_BUFFER_NORMAL 1
247 /* When an EOF's been seen but there's still some text to process
248 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
249 * shouldn't try reading from the input source any more. We might
250 * still have a bunch of tokens to match, though, because of
251 * possible backing-up.
253 * When we actually see the EOF, we change the status to "new"
254 * (via yyrestart()), so that the user can continue scanning by
255 * just pointing yyin at a new input file.
257 #define YY_BUFFER_EOF_PENDING 2
260 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
262 /* We provide macros for accessing buffer states in case in the
263 * future we want to put the buffer states in a more general
266 * Returns the top of the stack, or NULL.
268 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
269 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
272 /* Same as previous macro, but useful when we know that the buffer stack is not
273 * NULL or when we need an lvalue. For internal use only.
275 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
277 void *yyalloc (yy_size_t );
278 void *yyrealloc (void *,yy_size_t );
279 void yyfree (void * );
281 #define yy_new_buffer yy_create_buffer
283 #define yy_set_interactive(is_interactive) \
285 if ( ! YY_CURRENT_BUFFER ){ \
286 yyensure_buffer_stack (); \
287 YY_CURRENT_BUFFER_LVALUE = \
288 yy_create_buffer( yyin, YY_BUF_SIZE ); \
290 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
293 #define yy_set_bol(at_bol) \
295 if ( ! YY_CURRENT_BUFFER ){\
296 yyensure_buffer_stack (); \
297 YY_CURRENT_BUFFER_LVALUE = \
298 yy_create_buffer( yyin, YY_BUF_SIZE ); \
300 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
303 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
305 /* Begin user sect3 */
307 typedef unsigned char YY_CHAR;
309 #define yytext_ptr yytext
310 #define YY_INTERACTIVE
312 #include <FlexLexer.h>
314 /* Done after the current pattern has been matched and before the
315 * corresponding action - sets up yytext.
317 #define YY_DO_BEFORE_ACTION \
318 (yytext_ptr) = yy_bp; \
319 yyleng = (size_t) (yy_cp - yy_bp); \
320 (yy_hold_char) = *yy_cp; \
322 (yy_c_buf_p) = yy_cp;
324 #define YY_NUM_RULES 16
325 #define YY_END_OF_BUFFER 17
326 /* This struct is not used in this scanner,
327 but its presence is necessary. */
330 flex_int32_t yy_verify;
333 static yyconst flex_int16_t yy_accept[27] =
335 1, 1, 17, 15, 1, 16, 12, 6, 7, 4,
336 2, 3, 11, 5, 13, 13, 10, 14, 8, 9,
340 static yyconst flex_int32_t yy_ec[256] =
342 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
343 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
344 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
345 1, 2, 1, 1, 1, 1, 1, 4, 1, 5,
346 6, 7, 8, 1, 9, 10, 11, 12, 13, 13,
347 13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
348 14, 1, 1, 1, 15, 15, 15, 15, 15, 15,
349 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
350 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
351 17, 1, 18, 1, 16, 1, 15, 15, 15, 15,
353 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
354 16, 16, 16, 16, 16, 16, 16, 16, 16, 19,
355 16, 16, 1, 1, 1, 1, 1, 1, 1, 1,
356 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
358 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
359 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
362 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
364 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
365 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
367 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
368 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
372 static yyconst flex_int32_t yy_meta[20] =
374 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 2, 2, 1, 3, 4, 1, 1, 5
378 static yyconst flex_int16_t yy_base[30] =
380 0, 0, 35, 36, 32, 36, 36, 36, 36, 36,
381 36, 36, 36, 36, 7, 8, 36, 0, 36, 36,
382 23, 10, 0, 0, 0, 36, 22, 26, 30
385 static yyconst flex_int16_t yy_def[30] =
387 26, 1, 26, 26, 26, 26, 26, 26, 26, 26,
388 26, 26, 26, 26, 27, 26, 26, 28, 26, 26,
389 26, 26, 29, 28, 29, 0, 26, 26, 26
392 static yyconst flex_int16_t yy_nxt[56] =
394 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
395 14, 15, 16, 17, 18, 18, 19, 20, 18, 22,
396 22, 22, 22, 22, 21, 23, 22, 24, 24, 24,
397 24, 25, 25, 21, 26, 3, 26, 26, 26, 26,
398 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
402 static yyconst flex_int16_t yy_chk[56] =
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,
406 16, 22, 22, 27, 21, 15, 27, 28, 28, 28,
407 28, 29, 29, 5, 3, 26, 26, 26, 26, 26,
408 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
412 /* The intent behind this definition is that it'll catch
413 * any uses of REJECT which flex missed.
415 #define REJECT reject_used_but_not_detected
416 #define yymore() yymore_used_but_not_detected
417 #define YY_MORE_ADJ 0
418 #define YY_RESTORE_YY_MORE_OFFSET
419 #line 1 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
420 #line 2 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
422 #include "cmdlexcl.h"
425 static YY_cl_ucsim_parser_STYPE *yylval;
429 #define tok(x) (YY_cl_ucsim_parser_CLASS::x)
430 #define lexer_obj (dynamic_cast<class cl_ucsim_lexer *>(this))
432 #line 433 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.cc"
436 #ifndef YY_NO_UNISTD_H
437 /* Special case for "unistd.h", since it is non-ANSI. We include it way
438 * down here because we want the user's section 1 to have been scanned first.
439 * The user has a chance to override it with an option.
444 #ifndef YY_EXTRA_TYPE
445 #define YY_EXTRA_TYPE void *
449 static void yy_flex_strncpy (char *,yyconst char *,int );
452 #ifdef YY_NEED_STRLEN
453 static int yy_flex_strlen (yyconst char * );
460 /* Amount of stuff to slurp up with each read. */
461 #ifndef YY_READ_BUF_SIZE
462 #define YY_READ_BUF_SIZE 8192
465 /* Copy whatever the last rule matched to the standard output. */
467 #define ECHO LexerOutput( yytext, yyleng )
470 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
471 * is returned in "result".
474 #define YY_INPUT(buf,result,max_size) \
476 if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
477 YY_FATAL_ERROR( "input in flex scanner failed" );
481 /* No semi-colon after return; correct usage is to write "yyterminate();" -
482 * we don't want an extra ';' after the "return" because that will cause
483 * some compilers to complain about unreachable statements.
486 #define yyterminate() return YY_NULL
489 /* Number of entries by which start-condition stack grows. */
490 #ifndef YY_START_STACK_INCR
491 #define YY_START_STACK_INCR 25
494 /* Report a fatal error. */
495 #ifndef YY_FATAL_ERROR
496 #define YY_FATAL_ERROR(msg) LexerError( msg )
499 /* end tables serialization structures and prototypes */
501 /* Default declaration of generated scanner - a define so the user can
502 * easily add parameters.
505 #define YY_DECL_IS_OURS 1
506 #define YY_DECL int yyFlexLexer::yylex()
507 #endif /* !YY_DECL */
509 /* Code executed at the beginning of each rule, after yytext and yyleng
512 #ifndef YY_USER_ACTION
513 #define YY_USER_ACTION
516 /* Code executed at the end of each rule. */
518 #define YY_BREAK break;
521 #define YY_RULE_SETUP \
524 /** The main scanner function which does all the work.
528 register yy_state_type yy_current_state;
529 register char *yy_cp, *yy_bp;
532 #line 15 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
535 #line 536 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.cc"
546 (yy_start) = 1; /* first start state */
554 if ( ! YY_CURRENT_BUFFER ) {
555 yyensure_buffer_stack ();
556 YY_CURRENT_BUFFER_LVALUE =
557 yy_create_buffer( yyin, YY_BUF_SIZE );
560 yy_load_buffer_state( );
563 while ( 1 ) /* loops until end-of-file is reached */
565 yy_cp = (yy_c_buf_p);
567 /* Support of yytext. */
568 *yy_cp = (yy_hold_char);
570 /* yy_bp points to the position in yy_ch_buf of the start of
575 yy_current_state = (yy_start);
579 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
580 if ( yy_accept[yy_current_state] )
582 (yy_last_accepting_state) = yy_current_state;
583 (yy_last_accepting_cpos) = yy_cp;
585 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
587 yy_current_state = (int) yy_def[yy_current_state];
588 if ( yy_current_state >= 27 )
589 yy_c = yy_meta[(unsigned int) yy_c];
591 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
594 while ( yy_base[yy_current_state] != 36 );
597 yy_act = yy_accept[yy_current_state];
599 { /* have to back up */
600 yy_cp = (yy_last_accepting_cpos);
601 yy_current_state = (yy_last_accepting_state);
602 yy_act = yy_accept[yy_current_state];
607 do_action: /* This label is used only to access EOF actions. */
610 { /* beginning of action switch */
611 case 0: /* must back up */
612 /* undo the effects of YY_DO_BEFORE_ACTION */
613 *yy_cp = (yy_hold_char);
614 yy_cp = (yy_last_accepting_cpos);
615 yy_current_state = (yy_last_accepting_state);
620 #line 17 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
625 #line 19 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
626 return(tok(PTOK_PLUS));
630 #line 20 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
631 return(tok(PTOK_MINUS));
635 #line 21 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
636 return(tok(PTOK_ASTERIX));
640 #line 22 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
641 return(tok(PTOK_SLASH));
645 #line 23 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
646 return(tok(PTOK_LEFT_PAREN));
650 #line 24 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
651 return(tok(PTOK_RIGHT_PAREN));
655 #line 25 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
656 return(tok(PTOK_LEFT_BRACKET));
660 #line 26 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
661 return(tok(PTOK_RIGHT_BRACKET));
665 #line 27 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
666 return(tok(PTOK_EQUAL));
670 #line 28 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
671 return(tok(PTOK_DOT));
675 #line 29 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
676 return(tok(PTOK_AMPERSAND));
680 #line 31 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
682 yylval->number= strtol(yytext, 0, 0);
683 return(YY_cl_ucsim_parser_CLASS::PTOK_NUMBER);
688 #line 36 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
689 return(lexer_obj->check_id(yytext));
693 #line 38 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
698 #line 40 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
701 #line 702 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.cc"
702 case YY_STATE_EOF(INITIAL):
705 case YY_END_OF_BUFFER:
707 /* Amount of text matched not including the EOB char. */
708 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
710 /* Undo the effects of YY_DO_BEFORE_ACTION. */
711 *yy_cp = (yy_hold_char);
712 YY_RESTORE_YY_MORE_OFFSET
714 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
716 /* We're scanning a new file or input source. It's
717 * possible that this happened because the user
718 * just pointed yyin at a new source and called
719 * yylex(). If so, then we have to assure
720 * consistency between YY_CURRENT_BUFFER and our
721 * globals. Here is the right place to do so, because
722 * this is the first action (other than possibly a
723 * back-up) that will match for the new input source.
725 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
726 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
727 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
730 /* Note that here we test for yy_c_buf_p "<=" to the position
731 * of the first EOB in the buffer, since yy_c_buf_p will
732 * already have been incremented past the NUL character
733 * (since all states make transitions on EOB to the
734 * end-of-buffer state). Contrast this with the test
737 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
738 { /* This was really a NUL. */
739 yy_state_type yy_next_state;
741 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
743 yy_current_state = yy_get_previous_state( );
745 /* Okay, we're now positioned to make the NUL
746 * transition. We couldn't have
747 * yy_get_previous_state() go ahead and do it
748 * for us because it doesn't know how to deal
749 * with the possibility of jamming (and we don't
750 * want to build jamming into it because then it
751 * will run more slowly).
754 yy_next_state = yy_try_NUL_trans( yy_current_state );
756 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
760 /* Consume the NUL. */
761 yy_cp = ++(yy_c_buf_p);
762 yy_current_state = yy_next_state;
768 yy_cp = (yy_c_buf_p);
773 else switch ( yy_get_next_buffer( ) )
775 case EOB_ACT_END_OF_FILE:
777 (yy_did_buffer_switch_on_eof) = 0;
781 /* Note: because we've taken care in
782 * yy_get_next_buffer() to have set up
783 * yytext, we can now set up
784 * yy_c_buf_p so that if some total
785 * hoser (like flex itself) wants to
786 * call the scanner after we return the
787 * YY_NULL, it'll still work - another
788 * YY_NULL will get returned.
790 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
792 yy_act = YY_STATE_EOF(YY_START);
798 if ( ! (yy_did_buffer_switch_on_eof) )
804 case EOB_ACT_CONTINUE_SCAN:
806 (yytext_ptr) + yy_amount_of_matched_text;
808 yy_current_state = yy_get_previous_state( );
810 yy_cp = (yy_c_buf_p);
811 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
814 case EOB_ACT_LAST_MATCH:
816 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
818 yy_current_state = yy_get_previous_state( );
820 yy_cp = (yy_c_buf_p);
821 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
829 "fatal flex scanner internal error--no action found" );
830 } /* end of action switch */
831 } /* end of scanning one token */
834 /* The contents of this function are C++ specific, so the () macro is not used.
836 yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
844 yylineno = 1; // this will only get updated if %option yylineno
846 yy_did_buffer_switch_on_eof = 0;
848 yy_looking_for_trail_begin = 0;
851 yy_more_offset = yy_prev_more_offset = 0;
853 yy_start_stack_ptr = yy_start_stack_depth = 0;
854 yy_start_stack = NULL;
857 yy_buffer_stack_top = 0;
858 yy_buffer_stack_max = 0;
864 /* The contents of this function are C++ specific, so the () macro is not used.
866 yyFlexLexer::~yyFlexLexer()
868 delete [] yy_state_buf;
869 yyfree(yy_start_stack );
870 yy_delete_buffer( YY_CURRENT_BUFFER );
871 yyfree(yy_buffer_stack );
874 /* The contents of this function are C++ specific, so the () macro is not used.
876 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
880 yy_delete_buffer( YY_CURRENT_BUFFER );
881 yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
888 #ifdef YY_INTERACTIVE
889 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
891 int yyFlexLexer::LexerInput( char* buf, int max_size )
894 if ( yyin->eof() || yyin->fail() )
897 #ifdef YY_INTERACTIVE
909 (void) yyin->read( buf, max_size );
914 return yyin->gcount();
918 void yyFlexLexer::LexerOutput( const char* buf, int size )
920 (void) yyout->write( buf, size );
923 /* yy_get_next_buffer - try to read in a new buffer
925 * Returns a code representing an action:
926 * EOB_ACT_LAST_MATCH -
927 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
928 * EOB_ACT_END_OF_FILE - end of file
930 int yyFlexLexer::yy_get_next_buffer()
932 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
933 register char *source = (yytext_ptr);
934 register int number_to_move, i;
937 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
939 "fatal flex scanner internal error--end of buffer missed" );
941 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
942 { /* Don't try to fill the buffer, so this is an EOF. */
943 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
945 /* We matched a single character, the EOB, so
946 * treat this as a final EOF.
948 return EOB_ACT_END_OF_FILE;
953 /* We matched some text prior to the EOB, first
956 return EOB_ACT_LAST_MATCH;
960 /* Try to read more data. */
962 /* First move last chars to start of buffer. */
963 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
965 for ( i = 0; i < number_to_move; ++i )
966 *(dest++) = *(source++);
968 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
969 /* don't do the read, it's not guaranteed to return an EOF,
972 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
977 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
979 while ( num_to_read <= 0 )
980 { /* Not enough room in the buffer - grow it. */
982 /* just a shorter name for the current buffer */
983 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
985 int yy_c_buf_p_offset =
986 (int) ((yy_c_buf_p) - b->yy_ch_buf);
988 if ( b->yy_is_our_buffer )
990 int new_size = b->yy_buf_size * 2;
993 b->yy_buf_size += b->yy_buf_size / 8;
997 b->yy_ch_buf = (char *)
998 /* Include room in for 2 EOB chars. */
999 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1002 /* Can't grow it, we don't own it. */
1005 if ( ! b->yy_ch_buf )
1007 "fatal error - scanner input buffer overflow" );
1009 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1011 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1016 if ( num_to_read > YY_READ_BUF_SIZE )
1017 num_to_read = YY_READ_BUF_SIZE;
1019 /* Read in more data. */
1020 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1021 (yy_n_chars), (size_t) num_to_read );
1023 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1026 if ( (yy_n_chars) == 0 )
1028 if ( number_to_move == YY_MORE_ADJ )
1030 ret_val = EOB_ACT_END_OF_FILE;
1036 ret_val = EOB_ACT_LAST_MATCH;
1037 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1038 YY_BUFFER_EOF_PENDING;
1043 ret_val = EOB_ACT_CONTINUE_SCAN;
1045 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1046 /* Extend the array by 50%, plus the number we really need. */
1047 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1048 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1049 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1050 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1053 (yy_n_chars) += number_to_move;
1054 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1055 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1057 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1062 /* yy_get_previous_state - get the state just before the EOB char was reached */
1064 yy_state_type yyFlexLexer::yy_get_previous_state()
1066 register yy_state_type yy_current_state;
1067 register char *yy_cp;
1069 yy_current_state = (yy_start);
1071 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1073 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1074 if ( yy_accept[yy_current_state] )
1076 (yy_last_accepting_state) = yy_current_state;
1077 (yy_last_accepting_cpos) = yy_cp;
1079 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1081 yy_current_state = (int) yy_def[yy_current_state];
1082 if ( yy_current_state >= 27 )
1083 yy_c = yy_meta[(unsigned int) yy_c];
1085 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1088 return yy_current_state;
1091 /* yy_try_NUL_trans - try to make a transition on the NUL character
1094 * next_state = yy_try_NUL_trans( current_state );
1096 yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
1098 register int yy_is_jam;
1099 register char *yy_cp = (yy_c_buf_p);
1101 register YY_CHAR yy_c = 1;
1102 if ( yy_accept[yy_current_state] )
1104 (yy_last_accepting_state) = yy_current_state;
1105 (yy_last_accepting_cpos) = yy_cp;
1107 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1109 yy_current_state = (int) yy_def[yy_current_state];
1110 if ( yy_current_state >= 27 )
1111 yy_c = yy_meta[(unsigned int) yy_c];
1113 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1114 yy_is_jam = (yy_current_state == 26);
1116 return yy_is_jam ? 0 : yy_current_state;
1119 void yyFlexLexer::yyunput( int c, register char* yy_bp)
1121 register char *yy_cp;
1123 yy_cp = (yy_c_buf_p);
1125 /* undo effects of setting up yytext */
1126 *yy_cp = (yy_hold_char);
1128 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1129 { /* need to shift things up to make room */
1130 /* +2 for EOB chars. */
1131 register int number_to_move = (yy_n_chars) + 2;
1132 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1133 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1134 register char *source =
1135 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1137 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1138 *--dest = *--source;
1140 yy_cp += (int) (dest - source);
1141 yy_bp += (int) (dest - source);
1142 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1143 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1145 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1146 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1149 *--yy_cp = (char) c;
1151 (yytext_ptr) = yy_bp;
1152 (yy_hold_char) = *yy_cp;
1153 (yy_c_buf_p) = yy_cp;
1156 int yyFlexLexer::yyinput()
1160 *(yy_c_buf_p) = (yy_hold_char);
1162 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1164 /* yy_c_buf_p now points to the character we want to return.
1165 * If this occurs *before* the EOB characters, then it's a
1166 * valid NUL; if not, then we've hit the end of the buffer.
1168 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1169 /* This was really a NUL. */
1170 *(yy_c_buf_p) = '\0';
1173 { /* need more input */
1174 int offset = (yy_c_buf_p) - (yytext_ptr);
1177 switch ( yy_get_next_buffer( ) )
1179 case EOB_ACT_LAST_MATCH:
1180 /* This happens because yy_g_n_b()
1181 * sees that we've accumulated a
1182 * token and flags that we need to
1183 * try matching the token before
1184 * proceeding. But for input(),
1185 * there's no matching to consider.
1186 * So convert the EOB_ACT_LAST_MATCH
1187 * to EOB_ACT_END_OF_FILE.
1190 /* Reset buffer status. */
1195 case EOB_ACT_END_OF_FILE:
1200 if ( ! (yy_did_buffer_switch_on_eof) )
1209 case EOB_ACT_CONTINUE_SCAN:
1210 (yy_c_buf_p) = (yytext_ptr) + offset;
1216 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1217 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1218 (yy_hold_char) = *++(yy_c_buf_p);
1223 /** Immediately switch to a different input stream.
1224 * @param input_file A readable stream.
1226 * @note This function does not reset the start condition to @c INITIAL .
1228 void yyFlexLexer::yyrestart( std::istream* input_file )
1231 if ( ! YY_CURRENT_BUFFER ){
1232 yyensure_buffer_stack ();
1233 YY_CURRENT_BUFFER_LVALUE =
1234 yy_create_buffer( yyin, YY_BUF_SIZE );
1237 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1238 yy_load_buffer_state( );
1241 /** Switch to a different input buffer.
1242 * @param new_buffer The new input buffer.
1245 void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1248 /* TODO. We should be able to replace this entire function body
1250 * yypop_buffer_state();
1251 * yypush_buffer_state(new_buffer);
1253 yyensure_buffer_stack ();
1254 if ( YY_CURRENT_BUFFER == new_buffer )
1257 if ( YY_CURRENT_BUFFER )
1259 /* Flush out information for old buffer. */
1260 *(yy_c_buf_p) = (yy_hold_char);
1261 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1262 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1265 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1266 yy_load_buffer_state( );
1268 /* We don't actually know whether we did this switch during
1269 * EOF (yywrap()) processing, but the only time this flag
1270 * is looked at is after yywrap() is called, so it's safe
1271 * to go ahead and always set it.
1273 (yy_did_buffer_switch_on_eof) = 1;
1276 void yyFlexLexer::yy_load_buffer_state()
1278 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1279 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1280 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1281 (yy_hold_char) = *(yy_c_buf_p);
1284 /** Allocate and initialize an input buffer state.
1285 * @param file A readable stream.
1286 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1288 * @return the allocated buffer state.
1290 YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1294 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1296 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1298 b->yy_buf_size = size;
1300 /* yy_ch_buf has to be 2 characters longer than the size given because
1301 * we need to put in 2 end-of-buffer characters.
1303 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1304 if ( ! b->yy_ch_buf )
1305 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1307 b->yy_is_our_buffer = 1;
1309 yy_init_buffer( b, file );
1314 /** Destroy the buffer.
1315 * @param b a buffer created with yy_create_buffer()
1318 void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1324 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1325 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1327 if ( b->yy_is_our_buffer )
1328 yyfree((void *) b->yy_ch_buf );
1330 yyfree((void *) b );
1333 extern "C" int isatty (int );
1335 /* Initializes or reinitializes a buffer.
1336 * This function is sometimes called more than once on the same buffer,
1337 * such as during a yyrestart() or at EOF.
1339 void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
1344 yy_flush_buffer( b );
1346 b->yy_input_file = file;
1347 b->yy_fill_buffer = 1;
1349 /* If b is the current buffer, then yy_init_buffer was _probably_
1350 * called from yyrestart() or through yy_get_next_buffer.
1351 * In that case, we don't want to reset the lineno or column.
1353 if (b != YY_CURRENT_BUFFER){
1354 b->yy_bs_lineno = 1;
1355 b->yy_bs_column = 0;
1358 b->yy_is_interactive = 0;
1362 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1363 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1366 void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
1373 /* We always need two end-of-buffer characters. The first causes
1374 * a transition to the end-of-buffer state. The second causes
1375 * a jam in that state.
1377 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1378 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1380 b->yy_buf_pos = &b->yy_ch_buf[0];
1383 b->yy_buffer_status = YY_BUFFER_NEW;
1385 if ( b == YY_CURRENT_BUFFER )
1386 yy_load_buffer_state( );
1389 /** Pushes the new state onto the stack. The new state becomes
1390 * the current state. This function will allocate the stack
1392 * @param new_buffer The new state.
1395 void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
1397 if (new_buffer == NULL)
1400 yyensure_buffer_stack();
1402 /* This block is copied from yy_switch_to_buffer. */
1403 if ( YY_CURRENT_BUFFER )
1405 /* Flush out information for old buffer. */
1406 *(yy_c_buf_p) = (yy_hold_char);
1407 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1408 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1411 /* Only push if top exists. Otherwise, replace top. */
1412 if (YY_CURRENT_BUFFER)
1413 (yy_buffer_stack_top)++;
1414 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1416 /* copied from yy_switch_to_buffer. */
1417 yy_load_buffer_state( );
1418 (yy_did_buffer_switch_on_eof) = 1;
1421 /** Removes and deletes the top of the stack, if present.
1422 * The next element becomes the new top.
1425 void yyFlexLexer::yypop_buffer_state (void)
1427 if (!YY_CURRENT_BUFFER)
1430 yy_delete_buffer(YY_CURRENT_BUFFER );
1431 YY_CURRENT_BUFFER_LVALUE = NULL;
1432 if ((yy_buffer_stack_top) > 0)
1433 --(yy_buffer_stack_top);
1435 if (YY_CURRENT_BUFFER) {
1436 yy_load_buffer_state( );
1437 (yy_did_buffer_switch_on_eof) = 1;
1441 /* Allocates the stack if it does not exist.
1442 * Guarantees space for at least one push.
1444 void yyFlexLexer::yyensure_buffer_stack(void)
1448 if (!(yy_buffer_stack)) {
1450 /* First allocation is just for 2 elements, since we don't know if this
1451 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1452 * immediate realloc on the next call.
1455 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1456 (num_to_alloc * sizeof(struct yy_buffer_state*)
1458 if ( ! (yy_buffer_stack) )
1459 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1461 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1463 (yy_buffer_stack_max) = num_to_alloc;
1464 (yy_buffer_stack_top) = 0;
1468 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1470 /* Increase the buffer to prepare for a possible push. */
1471 int grow_size = 8 /* arbitrary grow size */;
1473 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1474 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1476 num_to_alloc * sizeof(struct yy_buffer_state*)
1478 if ( ! (yy_buffer_stack) )
1479 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1481 /* zero only the new slots.*/
1482 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1483 (yy_buffer_stack_max) = num_to_alloc;
1487 void yyFlexLexer::yy_push_state( int new_state )
1489 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
1493 (yy_start_stack_depth) += YY_START_STACK_INCR;
1494 new_size = (yy_start_stack_depth) * sizeof( int );
1496 if ( ! (yy_start_stack) )
1497 (yy_start_stack) = (int *) yyalloc(new_size );
1500 (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size );
1502 if ( ! (yy_start_stack) )
1503 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
1506 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
1511 void yyFlexLexer::yy_pop_state()
1513 if ( --(yy_start_stack_ptr) < 0 )
1514 YY_FATAL_ERROR( "start-condition stack underflow" );
1516 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
1519 int yyFlexLexer::yy_top_state()
1521 return (yy_start_stack)[(yy_start_stack_ptr) - 1];
1524 #ifndef YY_EXIT_FAILURE
1525 #define YY_EXIT_FAILURE 2
1528 void yyFlexLexer::LexerError( yyconst char msg[] )
1530 std::cerr << msg << std::endl;
1531 exit( YY_EXIT_FAILURE );
1534 /* Redefine yyless() so it works in section 3 code. */
1540 /* Undo effects of setting up yytext. */ \
1541 int yyless_macro_arg = (n); \
1542 YY_LESS_LINENO(yyless_macro_arg);\
1543 yytext[yyleng] = (yy_hold_char); \
1544 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1545 (yy_hold_char) = *(yy_c_buf_p); \
1546 *(yy_c_buf_p) = '\0'; \
1547 yyleng = yyless_macro_arg; \
1551 /* Accessor methods (get/set functions) to struct members. */
1554 * Internal utility routines.
1558 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1561 for ( i = 0; i < n; ++i )
1566 #ifdef YY_NEED_STRLEN
1567 static int yy_flex_strlen (yyconst char * s )
1570 for ( n = 0; s[n]; ++n )
1577 void *yyalloc (yy_size_t size )
1579 return (void *) malloc( size );
1582 void *yyrealloc (void * ptr, yy_size_t size )
1584 /* The cast to (char *) in the following accommodates both
1585 * implementations that use char* generic pointers, and those
1586 * that use void* generic pointers. It works with the latter
1587 * because both ANSI C and C++ allow castless assignment from
1588 * any pointer type to void*, and deal with argument conversions
1589 * as though doing an assignment.
1591 return (void *) realloc( (char *) ptr, size );
1594 void yyfree (void * ptr )
1596 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1599 #define YYTABLES_NAME "yytables"
1601 #line 40 "../../../../sdcc/sim/ucsim/cmd.src/cmdlex.l"
1613 #include "cmdlexcl.h"
1614 #include "globals.h"
1617 cl_ucsim_lexer::LexerInput(char *buf, int max_size)
1619 if (!string_to_parse)
1620 return(yyFlexLexer::LexerInput(buf, max_size));
1621 int lrem= strlen(string_ptr);
1623 if (lrem < max_size)
1625 strncpy(buf, string_ptr, n);
1631 cl_ucsim_lexer::activate_lexer_to_parse_into(void *yylv)
1633 yylval= (YY_cl_ucsim_parser_STYPE *)yylv;
1637 cl_ucsim_lexer::check_id(char *token)
1639 class cl_uc *uc= application->get_uc();
1640 //printf("checking id=\"%s\"\n",token);
1644 class cl_memory *mem= uc->memory(token);
1647 yylval->memory_object= mem;
1648 return(tok(PTOK_MEMORY_OBJECT));
1652 bool found= uc->symbol2address(yytext, uc->sfr_tbl(), &addr);
1655 /*yylval->number= addr;
1656 return(tok(PTOK_NUMBER));*/
1657 yylval->memory.memory= uc->address_space(MEM_SFR_ID);
1658 yylval->memory.address= addr;
1659 return(tok(PTOK_MEMORY));
1662 found= uc->symbol2address(yytext, uc->bit_tbl(), &addr);
1667 yylval->bit.memory= uc->bit2mem(addr, &memaddr, &mask);
1668 yylval->bit.mem_address= memaddr;
1669 yylval->bit.bit_address= addr;
1670 yylval->bit.mask= mask;
1671 return(tok(PTOK_BIT));