xref: /netbsd-src/external/bsd/elftosb/dist/elftosb2/elftosb_lexer.cpp (revision 413d532bcc3f62d122e56d92e13ac64825a40baf)
1 #line 2 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
2 
3 #line 4 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
4 
5 #define  YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define FLEX_SCANNER
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
14 #define FLEX_BETA
15 #endif
16 
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
21      * altogether.
22      */
23     #define yyFlexLexer yyFlexLexer
24 
25 /* First, we deal with  platform-specific or compiler-specific issues. */
26 
27 /* begin standard C headers. */
28 
29 /* end standard C headers. */
30 
31 /* flex integer type definitions */
32 
33 #ifndef FLEXINT_H
34 #define FLEXINT_H
35 
36 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
37 
38 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
39 
40 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
41  * if you want the limit (max/min) macros for int types.
42  */
43 #ifndef __STDC_LIMIT_MACROS
44 #define __STDC_LIMIT_MACROS 1
45 #endif
46 
47 #include <inttypes.h>
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;
54 #else
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;
61 #endif /* ! C99 */
62 
63 /* Limits of integral types. */
64 #ifndef INT8_MIN
65 #define INT8_MIN               (-128)
66 #endif
67 #ifndef INT16_MIN
68 #define INT16_MIN              (-32767-1)
69 #endif
70 #ifndef INT32_MIN
71 #define INT32_MIN              (-2147483647-1)
72 #endif
73 #ifndef INT8_MAX
74 #define INT8_MAX               (127)
75 #endif
76 #ifndef INT16_MAX
77 #define INT16_MAX              (32767)
78 #endif
79 #ifndef INT32_MAX
80 #define INT32_MAX              (2147483647)
81 #endif
82 #ifndef UINT8_MAX
83 #define UINT8_MAX              (255U)
84 #endif
85 #ifndef UINT16_MAX
86 #define UINT16_MAX             (65535U)
87 #endif
88 #ifndef UINT32_MAX
89 #define UINT32_MAX             (4294967295U)
90 #endif
91 
92 #endif /* ! FLEXINT_H */
93 
94 /* begin standard C++ headers. */
95 #include <iostream>
96 #include <errno.h>
97 #include <cstdlib>
98 #include <cstring>
99 /* end standard C++ headers. */
100 
101 #ifdef __cplusplus
102 
103 /* The "const" storage-class-modifier is valid. */
104 #define YY_USE_CONST
105 
106 #else	/* ! __cplusplus */
107 
108 /* C99 requires __STDC__ to be defined as 1. */
109 #if defined (__STDC__)
110 
111 #define YY_USE_CONST
112 
113 #endif	/* defined (__STDC__) */
114 #endif	/* ! __cplusplus */
115 
116 #ifdef YY_USE_CONST
117 #define yyconst const
118 #else
119 #define yyconst
120 #endif
121 
122 /* Returned upon end-of-file. */
123 #define YY_NULL 0
124 
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
128  * double cast.
129  */
130 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
131 
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.
135  */
136 #define BEGIN (yy_start) = 1 + 2 *
137 
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
140  * compatibility.
141  */
142 #define YY_START (((yy_start) - 1) / 2)
143 #define YYSTATE YY_START
144 
145 /* Action number for EOF rule of a given start state. */
146 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
147 
148 /* Special action meaning "start processing a new file". */
149 #define YY_NEW_FILE yyrestart( yyin  )
150 
151 #define YY_END_OF_BUFFER_CHAR 0
152 
153 /* Size of default input buffer. */
154 #ifndef YY_BUF_SIZE
155 #define YY_BUF_SIZE 16384
156 #endif
157 
158 /* The state buf must be large enough to hold one state per character in the main buffer.
159  */
160 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
161 
162 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
163 #define YY_TYPEDEF_YY_BUFFER_STATE
164 typedef struct yy_buffer_state *YY_BUFFER_STATE;
165 #endif
166 
167 #ifndef YY_TYPEDEF_YY_SIZE_T
168 #define YY_TYPEDEF_YY_SIZE_T
169 typedef size_t yy_size_t;
170 #endif
171 
172 extern yy_size_t yyleng;
173 
174 #define EOB_ACT_CONTINUE_SCAN 0
175 #define EOB_ACT_END_OF_FILE 1
176 #define EOB_ACT_LAST_MATCH 2
177 
178     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
179      *       access to the local variable yy_act. Since yyless() is a macro, it would break
180      *       existing scanners that call yyless() from OUTSIDE yylex.
181      *       One obvious solution it to make yy_act a global. I tried that, and saw
182      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
183      *       normally declared as a register variable-- so it is not worth it.
184      */
185     #define  YY_LESS_LINENO(n) \
186             do { \
187                 int yyl;\
188                 for ( yyl = n; yyl < yyleng; ++yyl )\
189                     if ( yytext[yyl] == '\n' )\
190                         --yylineno;\
191             }while(0)
192 
193 /* Return all but the first "n" matched characters back to the input stream. */
194 #define yyless(n) \
195 	do \
196 		{ \
197 		/* Undo effects of setting up yytext. */ \
198         int yyless_macro_arg = (n); \
199         YY_LESS_LINENO(yyless_macro_arg);\
200 		*yy_cp = (yy_hold_char); \
201 		YY_RESTORE_YY_MORE_OFFSET \
202 		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
203 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
204 		} \
205 	while ( 0 )
206 
207 #define unput(c) yyunput( c, (yytext_ptr)  )
208 
209 #ifndef YY_STRUCT_YY_BUFFER_STATE
210 #define YY_STRUCT_YY_BUFFER_STATE
211 struct yy_buffer_state
212 	{
213 
214 	std::istream* yy_input_file;
215 
216 	char *yy_ch_buf;		/* input buffer */
217 	char *yy_buf_pos;		/* current position in input buffer */
218 
219 	/* Size of input buffer in bytes, not including room for EOB
220 	 * characters.
221 	 */
222 	yy_size_t yy_buf_size;
223 
224 	/* Number of characters read into yy_ch_buf, not including EOB
225 	 * characters.
226 	 */
227 	yy_size_t yy_n_chars;
228 
229 	/* Whether we "own" the buffer - i.e., we know we created it,
230 	 * and can realloc() it to grow it, and should free() it to
231 	 * delete it.
232 	 */
233 	int yy_is_our_buffer;
234 
235 	/* Whether this is an "interactive" input source; if so, and
236 	 * if we're using stdio for input, then we want to use getc()
237 	 * instead of fread(), to make sure we stop fetching input after
238 	 * each newline.
239 	 */
240 	int yy_is_interactive;
241 
242 	/* Whether we're considered to be at the beginning of a line.
243 	 * If so, '^' rules will be active on the next match, otherwise
244 	 * not.
245 	 */
246 	int yy_at_bol;
247 
248     int yy_bs_lineno; /**< The line count. */
249     int yy_bs_column; /**< The column count. */
250 
251 	/* Whether to try to fill the input buffer when we reach the
252 	 * end of it.
253 	 */
254 	int yy_fill_buffer;
255 
256 	int yy_buffer_status;
257 
258 #define YY_BUFFER_NEW 0
259 #define YY_BUFFER_NORMAL 1
260 	/* When an EOF's been seen but there's still some text to process
261 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
262 	 * shouldn't try reading from the input source any more.  We might
263 	 * still have a bunch of tokens to match, though, because of
264 	 * possible backing-up.
265 	 *
266 	 * When we actually see the EOF, we change the status to "new"
267 	 * (via yyrestart()), so that the user can continue scanning by
268 	 * just pointing yyin at a new input file.
269 	 */
270 #define YY_BUFFER_EOF_PENDING 2
271 
272 	};
273 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
274 
275 /* We provide macros for accessing buffer states in case in the
276  * future we want to put the buffer states in a more general
277  * "scanner state".
278  *
279  * Returns the top of the stack, or NULL.
280  */
281 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
282                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
283                           : NULL)
284 
285 /* Same as previous macro, but useful when we know that the buffer stack is not
286  * NULL or when we need an lvalue. For internal use only.
287  */
288 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
289 
290 void *yyalloc (yy_size_t  );
291 void *yyrealloc (void *,yy_size_t  );
292 void yyfree (void *  );
293 
294 #define yy_new_buffer yy_create_buffer
295 
296 #define yy_set_interactive(is_interactive) \
297 	{ \
298 	if ( ! YY_CURRENT_BUFFER ){ \
299         yyensure_buffer_stack (); \
300 		YY_CURRENT_BUFFER_LVALUE =    \
301             yy_create_buffer( yyin, YY_BUF_SIZE ); \
302 	} \
303 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
304 	}
305 
306 #define yy_set_bol(at_bol) \
307 	{ \
308 	if ( ! YY_CURRENT_BUFFER ){\
309         yyensure_buffer_stack (); \
310 		YY_CURRENT_BUFFER_LVALUE =    \
311             yy_create_buffer( yyin, YY_BUF_SIZE ); \
312 	} \
313 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
314 	}
315 
316 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
317 
318 /* Begin user sect3 */
319 #define YY_SKIP_YYWRAP
320 
321 typedef unsigned char YY_CHAR;
322 
323 #define yytext_ptr yytext
324 
325 #include <FlexLexer.h>
326 
327 int yyFlexLexer::yywrap() { return 1; }
328 int yyFlexLexer::yylex()
329 	{
330 	LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" );
331 	return 0;
332 	}
333 
334 #define YY_DECL int ElftosbLexer::yylex()
335 
336 /* Done after the current pattern has been matched and before the
337  * corresponding action - sets up yytext.
338  */
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; \
343 	*yy_cp = '\0'; \
344 	(yy_c_buf_p) = yy_cp;
345 
346 #define YY_NUM_RULES 74
347 #define YY_END_OF_BUFFER 75
348 /* This struct is not used in this scanner,
349    but its presence is necessary. */
350 struct yy_trans_info
351 	{
352 	flex_int32_t yy_verify;
353 	flex_int32_t yy_nxt;
354 	};
355 static yyconst flex_int16_t yy_accept[218] =
356     {   0,
357         0,    0,    0,    0,    0,    0,   75,   73,   70,   71,
358        71,   64,   73,   73,   73,   49,   54,   73,   34,   35,
359        47,   45,   39,   46,   42,   48,   27,   27,   40,   41,
360        57,   38,   43,   26,   36,   37,   51,   26,   26,   26,
361        26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
362        26,   26,   26,   26,   32,   55,   33,   50,   73,   73,
363        72,   70,   71,   72,   71,   61,    0,   65,    0,    0,
364        69,   29,   62,    0,    0,   56,   44,   30,    0,    0,
365        27,   27,    0,    0,   52,   59,   60,   58,   53,   26,
366        23,   26,   26,   26,   26,   26,   26,   26,   26,   26,
367 
368        26,   26,   13,   26,   26,   26,   26,   26,   25,   26,
369        26,   26,   26,   26,   26,   26,   26,   31,   63,   66,
370        67,   68,    0,    0,   28,    0,    0,   27,   27,   26,
371        26,   20,   26,   26,   26,   26,   26,   26,   26,   21,
372        26,   22,   26,   26,   26,   26,    8,   26,   26,   26,
373        26,   26,   24,    0,    0,   28,    0,    0,    0,   11,
374        26,   26,   14,   26,   26,   26,   26,    7,   16,   10,
375         9,   12,   26,   26,   26,   26,   26,    0,    0,    0,
376         0,   28,    0,   26,   26,   18,   26,   26,   26,   26,
377        26,   26,   26,   28,    0,   28,    0,   26,   26,    6,
378 
379        26,   26,   26,   19,   26,   26,    0,   26,   15,    4,
380         1,    5,    3,   17,   26,    2,    0
381     } ;
382 
383 static yyconst flex_int32_t yy_ec[256] =
384     {   0,
385         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
386         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
387         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
388         1,    2,    5,    6,    7,    8,    9,   10,   11,   12,
389        13,   14,   15,   16,   17,   18,   19,   20,   21,   22,
390        22,   22,   22,   22,   22,   22,   22,   23,   24,   25,
391        26,   27,   28,    1,   29,   29,   30,   29,   31,   29,
392        32,   33,   33,   33,   32,   33,   32,   33,   33,   33,
393        33,   33,   34,   33,   33,   33,   33,   33,   33,   33,
394        35,    1,   36,   37,   33,    1,   38,   39,   40,   41,
395 
396        42,   43,   44,   45,   46,   47,   33,   48,   49,   50,
397        51,   52,   33,   53,   54,   55,   56,   57,   58,   59,
398        60,   61,   62,   63,   64,   65,    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 
407         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
408         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
413     } ;
414 
415 static yyconst flex_int32_t yy_meta[66] =
416     {   0,
417         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
418         1,    1,    1,    3,    1,    1,    3,    3,    1,    4,
419         4,    4,    1,    1,    1,    1,    1,    3,    4,    4,
420         4,    5,    5,    5,    3,    3,    3,    4,    4,    4,
421         4,    4,    4,    5,    5,    5,    5,    5,    5,    5,
422         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
423         5,    1,    1,    1,    1
424     } ;
425 
426 static yyconst flex_int16_t yy_base[231] =
427     {   0,
428         0,    0,   64,  127,   67,   73,  384,  385,  385,  385,
429       380,  356,   66,  378,    0,  385,  370,  348,  385,  385,
430       364,  385,  385,  385,  359,   59,   78,   94,  385,  385,
431        57,  350,   62,    0,  385,  385,  385,  191,   41,   69,
432        60,   74,  337,   75,  318,  322,  321,  320,  318,  331,
433        92,  315,  329,  324,  303,  301,  385,  385,    0,  299,
434       385,  385,  359,  342,  385,  385,  115,  385,  129,  357,
435       385,    0,  385,  111,  128,  385,  385,  385,  356,  121,
436       152,  385,   70,    0,  385,  385,  385,  385,  385,    0,
437       385,  310,  307,  315,  312,  300,  300,  297,  303,  302,
438 
439       298,  309,    0,  304,  291,  296,  306,  302,    0,  287,
440       283,  300,  278,  282,  281,  283,  281,  385,  385,  385,
441       385,  385,  145,  113,  130,  200,  202,  218,  148,  286,
442       279,    0,  286,  289,  279,  287,  274,  272,  277,    0,
443       274,    0,  272,  282,  280,  275,    0,  265,  277,  265,
444       275,  266,    0,  146,  284,  283,  102,  148,  210,    0,
445       258,  262,    0,  258,  257,  267,  266,    0,    0,    0,
446         0,    0,  256,  257,  247,  253,  242,  270,  153,  160,
447       211,  212,  213,  214,  209,    0,  199,  195,  196,  189,
448       194,  194,  185,  385,  200,  198,  151,  162,  148,    0,
449 
450       134,  132,  135,    0,  129,  111,  214,   90,    0,    0,
451         0,    0,    0,    0,   86,    0,  385,  256,  261,  266,
452       271,  274,  279,  281,   97,  286,   70,  291,  296,  301
453     } ;
454 
455 static yyconst flex_int16_t yy_def[231] =
456     {   0,
457       217,    1,  218,  218,  219,  219,  217,  217,  217,  217,
458       217,  217,  220,  221,  222,  217,  217,  223,  217,  217,
459       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
460       217,  217,  217,  224,  217,  217,  217,  224,  224,  224,
461       224,  224,   38,  224,  224,  224,  224,  224,  224,  224,
462       224,  224,   38,  224,  217,  217,  217,  217,  225,  217,
463       217,  217,  217,  217,  217,  217,  220,  217,  220,  221,
464       217,  222,  217,  226,  226,  217,  217,  217,  221,  217,
465       217,  217,  217,  227,  217,  217,  217,  217,  217,  224,
466       217,  224,  224,  224,  224,  224,  224,  224,  224,  224,
467 
468       224,  224,  224,  224,  224,  224,  224,  224,  224,  224,
469       224,  224,  224,  224,  224,  224,  224,  217,  217,  217,
470       217,  217,  220,  228,  228,  228,  228,  217,  227,  224,
471       224,  224,  224,  224,  224,  224,  224,  224,  224,  224,
472       224,  224,  224,  224,  224,  224,  224,  224,  224,  224,
473       224,  224,  224,  220,  229,  229,  229,  229,  230,  224,
474       224,  224,  224,  224,  224,  224,  224,  224,  224,  224,
475       224,  224,  224,  224,  224,  224,  224,  217,  217,  217,
476       228,  228,  228,  224,  224,  224,  224,  224,  224,  224,
477       224,  224,  224,  217,  217,  229,  229,  224,  224,  224,
478 
479       224,  224,  224,  224,  224,  224,  228,  224,  224,  224,
480       224,  224,  224,  224,  224,  224,    0,  217,  217,  217,
481       217,  217,  217,  217,  217,  217,  217,  217,  217,  217
482     } ;
483 
484 static yyconst flex_int16_t yy_nxt[451] =
485     {   0,
486         8,    9,   10,   11,   12,   13,   14,   15,   16,   17,
487        18,   19,   20,   21,   22,   23,   24,   25,   26,   27,
488        28,   28,   29,   30,   31,   32,   33,    8,   34,   34,
489        34,   34,   34,   34,   35,   36,   37,   34,   38,   39,
490        40,   41,   42,   34,   43,   44,   45,   46,   47,   48,
491        49,   34,   50,   51,   52,   34,   34,   53,   34,   54,
492        34,   55,   56,   57,   58,    9,   10,   11,   62,   10,
493        63,   68,   78,  129,   62,   10,   63,   79,   92,   80,
494        64,   85,   86,   59,   59,   59,   64,   88,   89,  128,
495       128,   93,   59,   59,   59,   80,   69,   81,   81,   81,
496 
497       120,   59,   59,   59,   59,   59,   59,   96,   94,   82,
498        95,   99,   97,   81,   81,   81,   83,  103,   98,  100,
499        68,  125,   80,  156,  104,   82,  101,   60,    9,   10,
500        11,  105,  179,  112,   68,  180,   84,  113,  125,  216,
501       156,  126,  114,  157,  215,   69,   59,   59,   59,   80,
502        68,   68,   82,   80,  214,   59,   59,   59,  126,   69,
503       157,  127,  123,  194,   59,   59,   59,   59,   59,   59,
504       194,   81,   81,   81,  154,   69,   69,  181,  179,   82,
505       207,  179,  213,   82,  212,  211,  195,  210,  209,  155,
506        60,   91,   91,   91,   91,   91,   91,   91,   91,   91,
507 
508        91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
509       156,  208,  156,   91,   91,   91,   91,   91,   91,   80,
510       182,  196,  196,  196,  196,   91,   91,   91,  179,  178,
511       157,  159,  157,  158,  206,  205,  204,  128,  128,  203,
512       183,  157,  157,  157,  157,  202,  197,  201,  200,   82,
513       199,  198,   91,   91,   91,   91,    8,    8,    8,    8,
514         8,   61,   61,   61,   61,   61,   67,   67,   67,   67,
515        67,   70,   70,   70,   70,   70,   72,   72,   72,   74,
516       194,   74,   74,   74,   90,   90,  124,  193,  124,  124,
517       124,  155,  192,  155,  155,  155,  178,  191,  178,  178,
518 
519       178,  181,  190,  181,  181,  181,  189,  188,  109,  187,
520       186,  185,  184,  179,  179,  177,  153,  176,  175,  174,
521       173,  172,  171,  170,  169,  168,  167,  166,  165,  164,
522       163,  162,  161,  160,  153,  152,  151,  150,  149,  148,
523       147,  146,  145,  144,  143,  142,  141,  140,  139,  138,
524       137,  136,  135,  134,  133,  132,  131,  130,   71,   71,
525       122,   65,  121,  119,  118,  117,  116,  115,  111,  110,
526       109,  108,  107,  106,  102,   87,   77,   76,   75,   73,
527        71,   66,   65,  217,    7,  217,  217,  217,  217,  217,
528       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
529 
530       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
531       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
532       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
533       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
534       217,  217,  217,  217,  217,  217,  217,  217,  217,  217
535     } ;
536 
537 static yyconst flex_int16_t yy_chk[451] =
538     {   0,
539         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
540         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
541         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
542         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
543         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
544         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
545         1,    1,    1,    1,    1,    3,    3,    3,    5,    5,
546         5,   13,   26,  227,    6,    6,    6,   26,   39,   27,
547         5,   31,   31,    3,    3,    3,    6,   33,   33,   83,
548        83,   39,    3,    3,    3,   28,   13,   27,   27,   27,
549 
550       225,    3,    3,    3,    3,    3,    3,   41,   40,   27,
551        40,   42,   41,   28,   28,   28,   27,   44,   41,   42,
552        67,   74,   80,  124,   44,   28,   42,    3,    4,    4,
553         4,   44,  157,   51,   69,  157,   27,   51,   75,  215,
554       125,   74,   51,  124,  208,   67,    4,    4,    4,  129,
555       123,  154,   80,   81,  206,    4,    4,    4,   75,   69,
556       125,   75,   69,  179,    4,    4,    4,    4,    4,    4,
557       180,   81,   81,   81,  123,  123,  154,  158,  158,  129,
558       197,  197,  205,   81,  203,  202,  179,  201,  199,  180,
559         4,   38,   38,   38,   38,   38,   38,   38,   38,   38,
560 
561        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
562       126,  198,  127,   38,   38,   38,   38,   38,   38,  128,
563       159,  181,  182,  183,  207,   38,   38,   38,  196,  195,
564       126,  127,  127,  126,  193,  192,  191,  128,  128,  190,
565       159,  181,  182,  183,  207,  189,  183,  188,  187,  128,
566       185,  184,   38,   38,   38,   38,  218,  218,  218,  218,
567       218,  219,  219,  219,  219,  219,  220,  220,  220,  220,
568       220,  221,  221,  221,  221,  221,  222,  222,  222,  223,
569       178,  223,  223,  223,  224,  224,  226,  177,  226,  226,
570       226,  228,  176,  228,  228,  228,  229,  175,  229,  229,
571 
572       229,  230,  174,  230,  230,  230,  173,  167,  166,  165,
573       164,  162,  161,  156,  155,  152,  151,  150,  149,  148,
574       146,  145,  144,  143,  141,  139,  138,  137,  136,  135,
575       134,  133,  131,  130,  117,  116,  115,  114,  113,  112,
576       111,  110,  108,  107,  106,  105,  104,  102,  101,  100,
577        99,   98,   97,   96,   95,   94,   93,   92,   79,   70,
578        64,   63,   60,   56,   55,   54,   53,   52,   50,   49,
579        48,   47,   46,   45,   43,   32,   25,   21,   18,   17,
580        14,   12,   11,    7,  217,  217,  217,  217,  217,  217,
581       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
582 
583       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
584       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
585       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
586       217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
587       217,  217,  217,  217,  217,  217,  217,  217,  217,  217
588     } ;
589 
590 /* Table of booleans, true if rule could match eol. */
591 static yyconst flex_int32_t yy_rule_can_match_eol[75] =
592     {   0,
593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
594     0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
595     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
596     0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,     };
597 
598 /* The intent behind this definition is that it'll catch
599  * any uses of REJECT which flex missed.
600  */
601 #define REJECT reject_used_but_not_detected
602 #define yymore() yymore_used_but_not_detected
603 #define YY_MORE_ADJ 0
604 #define YY_RESTORE_YY_MORE_OFFSET
605 #line 1 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
606 /* %option prefix="Elftosb" */
607 #line 10 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
608 #include "ElftosbLexer.h"
609 #include <stdlib.h>
610 #include <limits.h>
611 #include <string>
612 #include "HexValues.h"
613 #include "Value.h"
614 
615 using namespace elftosb;
616 
617 //! Always executed before all other actions when a token is matched.
618 //! This action just assign the first and last lines of the token to
619 //! the current line. In most cases this is correct.
620 #define YY_USER_ACTION	do {									\
621 							m_location.m_firstLine = m_line;		\
622 							m_location.m_lastLine = m_line;		\
623 						} while (0);
624 
625 /* start conditions */
626 
627 #line 628 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
628 
629 #define INITIAL 0
630 #define blob 1
631 #define mlcmt 2
632 
633 #ifndef YY_NO_UNISTD_H
634 /* Special case for "unistd.h", since it is non-ANSI. We include it way
635  * down here because we want the user's section 1 to have been scanned first.
636  * The user has a chance to override it with an option.
637  */
638 #include <unistd.h>
639 #endif
640 
641 #ifndef YY_EXTRA_TYPE
642 #define YY_EXTRA_TYPE void *
643 #endif
644 
645 #ifndef yytext_ptr
646 static void yy_flex_strncpy (char *,yyconst char *,int );
647 #endif
648 
649 #ifdef YY_NEED_STRLEN
650 static int yy_flex_strlen (yyconst char * );
651 #endif
652 
653 #ifndef YY_NO_INPUT
654 
655 #endif
656 
657 /* Amount of stuff to slurp up with each read. */
658 #ifndef YY_READ_BUF_SIZE
659 #define YY_READ_BUF_SIZE 8192
660 #endif
661 
662 /* Copy whatever the last rule matched to the standard output. */
663 #ifndef ECHO
664 #define ECHO LexerOutput( yytext, yyleng )
665 #endif
666 
667 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
668  * is returned in "result".
669  */
670 #ifndef YY_INPUT
671 #define YY_INPUT(buf,result,max_size) \
672 \
673 	if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
674 		YY_FATAL_ERROR( "input in flex scanner failed" );
675 
676 #endif
677 
678 /* No semi-colon after return; correct usage is to write "yyterminate();" -
679  * we don't want an extra ';' after the "return" because that will cause
680  * some compilers to complain about unreachable statements.
681  */
682 #ifndef yyterminate
683 #define yyterminate() return YY_NULL
684 #endif
685 
686 /* Number of entries by which start-condition stack grows. */
687 #ifndef YY_START_STACK_INCR
688 #define YY_START_STACK_INCR 25
689 #endif
690 
691 /* Report a fatal error. */
692 #ifndef YY_FATAL_ERROR
693 #define YY_FATAL_ERROR(msg) LexerError( msg )
694 #endif
695 
696 /* end tables serialization structures and prototypes */
697 
698 /* Default declaration of generated scanner - a define so the user can
699  * easily add parameters.
700  */
701 #ifndef YY_DECL
702 #define YY_DECL_IS_OURS 1
703 #define YY_DECL int yyFlexLexer::yylex()
704 #endif /* !YY_DECL */
705 
706 /* Code executed at the beginning of each rule, after yytext and yyleng
707  * have been set up.
708  */
709 #ifndef YY_USER_ACTION
710 #define YY_USER_ACTION
711 #endif
712 
713 /* Code executed at the end of each rule. */
714 #ifndef YY_BREAK
715 #define YY_BREAK break;
716 #endif
717 
718 #define YY_RULE_SETUP \
719 	YY_USER_ACTION
720 
721 /** The main scanner function which does all the work.
722  */
723 YY_DECL
724 {
725 	register yy_state_type yy_current_state;
726 	register char *yy_cp, *yy_bp;
727 	register int yy_act;
728 
729 #line 38 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
730 
731 
732 #line 733 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
733 
734 	if ( !(yy_init) )
735 		{
736 		(yy_init) = 1;
737 
738 #ifdef YY_USER_INIT
739 		YY_USER_INIT;
740 #endif
741 
742 		if ( ! (yy_start) )
743 			(yy_start) = 1;	/* first start state */
744 
745 		if ( ! yyin )
746 			yyin = & std::cin;
747 
748 		if ( ! yyout )
749 			yyout = & std::cout;
750 
751 		if ( ! YY_CURRENT_BUFFER ) {
752 			yyensure_buffer_stack ();
753 			YY_CURRENT_BUFFER_LVALUE =
754 				yy_create_buffer( yyin, YY_BUF_SIZE );
755 		}
756 
757 		yy_load_buffer_state(  );
758 		}
759 
760 	while ( 1 )		/* loops until end-of-file is reached */
761 		{
762 		yy_cp = (yy_c_buf_p);
763 
764 		/* Support of yytext. */
765 		*yy_cp = (yy_hold_char);
766 
767 		/* yy_bp points to the position in yy_ch_buf of the start of
768 		 * the current run.
769 		 */
770 		yy_bp = yy_cp;
771 
772 		yy_current_state = (yy_start);
773 yy_match:
774 		do
775 			{
776 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
777 			if ( yy_accept[yy_current_state] )
778 				{
779 				(yy_last_accepting_state) = yy_current_state;
780 				(yy_last_accepting_cpos) = yy_cp;
781 				}
782 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
783 				{
784 				yy_current_state = (int) yy_def[yy_current_state];
785 				if ( yy_current_state >= 218 )
786 					yy_c = yy_meta[(unsigned int) yy_c];
787 				}
788 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
789 			++yy_cp;
790 			}
791 		while ( yy_current_state != 217 );
792 		yy_cp = (yy_last_accepting_cpos);
793 		yy_current_state = (yy_last_accepting_state);
794 
795 yy_find_action:
796 		yy_act = yy_accept[yy_current_state];
797 
798 		YY_DO_BEFORE_ACTION;
799 
800 		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
801 			{
802 			int yyl;
803 			for ( yyl = 0; yyl < yyleng; ++yyl )
804 				if ( yytext[yyl] == '\n' )
805 
806     yylineno++;
807 ;
808 			}
809 
810 do_action:	/* This label is used only to access EOF actions. */
811 
812 		switch ( yy_act )
813 	{ /* beginning of action switch */
814 			case 0: /* must back up */
815 			/* undo the effects of YY_DO_BEFORE_ACTION */
816 			*yy_cp = (yy_hold_char);
817 			yy_cp = (yy_last_accepting_cpos);
818 			yy_current_state = (yy_last_accepting_state);
819 			goto yy_find_action;
820 
821 case 1:
822 YY_RULE_SETUP
823 #line 40 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
824 { return TOK_OPTIONS; }
825 	YY_BREAK
826 case 2:
827 YY_RULE_SETUP
828 #line 41 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
829 { return TOK_CONSTANTS; }
830 	YY_BREAK
831 case 3:
832 YY_RULE_SETUP
833 #line 42 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
834 { return TOK_SOURCES; }
835 	YY_BREAK
836 case 4:
837 YY_RULE_SETUP
838 #line 43 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
839 { return TOK_FILTERS; }
840 	YY_BREAK
841 case 5:
842 YY_RULE_SETUP
843 #line 44 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
844 { return TOK_SECTION; }
845 	YY_BREAK
846 case 6:
847 YY_RULE_SETUP
848 #line 45 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
849 { return TOK_EXTERN; }
850 	YY_BREAK
851 case 7:
852 YY_RULE_SETUP
853 #line 46 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
854 { return TOK_FROM; }
855 	YY_BREAK
856 case 8:
857 YY_RULE_SETUP
858 #line 47 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
859 { return TOK_RAW; }
860 	YY_BREAK
861 case 9:
862 YY_RULE_SETUP
863 #line 48 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
864 { return TOK_LOAD; }
865 	YY_BREAK
866 case 10:
867 YY_RULE_SETUP
868 #line 49 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
869 { return TOK_JUMP; }
870 	YY_BREAK
871 case 11:
872 YY_RULE_SETUP
873 #line 50 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
874 { return TOK_CALL; }
875 	YY_BREAK
876 case 12:
877 YY_RULE_SETUP
878 #line 51 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
879 { return TOK_MODE; }
880 	YY_BREAK
881 case 13:
882 YY_RULE_SETUP
883 #line 52 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
884 { return TOK_IF; }
885 	YY_BREAK
886 case 14:
887 YY_RULE_SETUP
888 #line 53 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
889 { return TOK_ELSE; }
890 	YY_BREAK
891 case 15:
892 YY_RULE_SETUP
893 #line 54 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
894 { return TOK_DEFINED; }
895 	YY_BREAK
896 case 16:
897 YY_RULE_SETUP
898 #line 55 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
899 { return TOK_INFO; }
900 	YY_BREAK
901 case 17:
902 YY_RULE_SETUP
903 #line 56 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
904 { return TOK_WARNING; }
905 	YY_BREAK
906 case 18:
907 YY_RULE_SETUP
908 #line 57 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
909 { return TOK_ERROR; }
910 	YY_BREAK
911 case 19:
912 YY_RULE_SETUP
913 #line 58 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
914 { return TOK_SIZEOF; }
915 	YY_BREAK
916 case 20:
917 YY_RULE_SETUP
918 #line 59 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
919 { return TOK_DCD; }
920 	YY_BREAK
921 case 21:
922 YY_RULE_SETUP
923 #line 60 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
924 { return TOK_HAB; }
925 	YY_BREAK
926 case 22:
927 YY_RULE_SETUP
928 #line 61 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
929 { return TOK_IVT; }
930 	YY_BREAK
931 case 23:
932 /* rule 23 can match eol */
933 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
934 (yy_c_buf_p) = yy_cp = yy_bp + 1;
935 YY_DO_BEFORE_ACTION; /* set up yytext again */
936 YY_RULE_SETUP
937 #line 63 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
938 {	// must be followed by any non-ident char
939 										int_size_t theSize;
940 										switch (yytext[0])
941 										{
942 											case 'w':
943 												theSize = kWordSize;
944 												break;
945 											case 'h':
946 												theSize = kHalfWordSize;
947 												break;
948 											case 'b':
949 												theSize = kByteSize;
950 												break;
951 										}
952 										m_symbolValue.m_int = new elftosb::SizedIntegerValue(0, theSize);
953 										return TOK_INT_SIZE;
954 									}
955 	YY_BREAK
956 case 24:
957 YY_RULE_SETUP
958 #line 81 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
959 {
960 										m_symbolValue.m_int = new elftosb::SizedIntegerValue(1, kWordSize);
961 										return TOK_INT_LITERAL;
962 									}
963 	YY_BREAK
964 case 25:
965 YY_RULE_SETUP
966 #line 86 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
967 {
968 										m_symbolValue.m_int = new elftosb::SizedIntegerValue(0, kWordSize);
969 										return TOK_INT_LITERAL;
970 									}
971 	YY_BREAK
972 case 26:
973 YY_RULE_SETUP
974 #line 91 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
975 {
976 										m_symbolValue.m_str = new std::string(yytext);
977 										if (isSourceName(m_symbolValue.m_str))
978 										{
979 											return TOK_SOURCE_NAME;
980 										}
981 										else
982 										{
983 											return TOK_IDENT;
984 										}
985 									}
986 	YY_BREAK
987 case 27:
988 YY_RULE_SETUP
989 #line 103 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
990 {
991 										int base = 0;
992 										uint32_t value;
993 										int mult;
994 
995 										// check for binary number
996 										if (yytext[0] == '0' && yytext[1] == 'b')
997 										{
998 											base = 2;		// this is a binary number
999 											yytext += 2;	// skip over the "0b"
1000 										}
1001 
1002 										// convert value
1003 										value = (uint32_t)strtoul(yytext, NULL, base);
1004 
1005 										// find multiplier
1006 										switch (yytext[strlen(yytext) - 1])
1007 										{
1008 											case 'G':
1009 												mult = 1024 * 1024 * 1024;
1010 												break;
1011 											case 'M':
1012 												mult = 1024 * 1024;
1013 												break;
1014 											case 'K':
1015 												mult = 1024;
1016 												break;
1017 											default:
1018 												mult = 1;
1019 												break;
1020 										}
1021 
1022 										// set resulting symbol value
1023 										m_symbolValue.m_int = new elftosb::SizedIntegerValue(value * mult, kWordSize);
1024 										return TOK_INT_LITERAL;
1025 									}
1026 	YY_BREAK
1027 case 28:
1028 YY_RULE_SETUP
1029 #line 140 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1030 {
1031 										uint32_t value = 0;
1032 										int_size_t theSize;
1033 										int len = strlen(yytext);
1034 										if (len >= 3)
1035 										{
1036 											value = yytext[1];
1037 											theSize = kByteSize;
1038 										}
1039 										if (len >= 4)
1040 										{
1041 											value = (value << 8) | yytext[2];
1042 											theSize = kHalfWordSize;
1043 										}
1044 										if (len >= 6)
1045 										{
1046 											value = (value << 8) | yytext[3];
1047 											value = (value << 8) | yytext[4];
1048 											theSize = kWordSize;
1049 										}
1050 										m_symbolValue.m_int = new elftosb::SizedIntegerValue(value, theSize);
1051 										return TOK_INT_LITERAL;
1052 									}
1053 	YY_BREAK
1054 case 29:
1055 YY_RULE_SETUP
1056 #line 164 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1057 {
1058 										// remove $ from string
1059 										m_symbolValue.m_str = new std::string(&yytext[1]);
1060 										return TOK_SECTION_NAME;
1061 									}
1062 	YY_BREAK
1063 case 30:
1064 YY_RULE_SETUP
1065 #line 171 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1066 { BEGIN(mlcmt); }
1067 	YY_BREAK
1068 case 31:
1069 YY_RULE_SETUP
1070 #line 173 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1071 {
1072 										m_blob = new Blob();
1073 										m_blobFirstLine = yylineno;
1074 										BEGIN(blob);
1075 									}
1076 	YY_BREAK
1077 case 32:
1078 YY_RULE_SETUP
1079 #line 179 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1080 { return '{'; }
1081 	YY_BREAK
1082 case 33:
1083 YY_RULE_SETUP
1084 #line 181 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1085 { return '}'; }
1086 	YY_BREAK
1087 case 34:
1088 YY_RULE_SETUP
1089 #line 183 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1090 { return '('; }
1091 	YY_BREAK
1092 case 35:
1093 YY_RULE_SETUP
1094 #line 185 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1095 { return ')'; }
1096 	YY_BREAK
1097 case 36:
1098 YY_RULE_SETUP
1099 #line 187 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1100 { return '['; }
1101 	YY_BREAK
1102 case 37:
1103 YY_RULE_SETUP
1104 #line 189 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1105 { return ']'; }
1106 	YY_BREAK
1107 case 38:
1108 YY_RULE_SETUP
1109 #line 191 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1110 { return '='; }
1111 	YY_BREAK
1112 case 39:
1113 YY_RULE_SETUP
1114 #line 193 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1115 { return ','; }
1116 	YY_BREAK
1117 case 40:
1118 YY_RULE_SETUP
1119 #line 195 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1120 { return ':'; }
1121 	YY_BREAK
1122 case 41:
1123 YY_RULE_SETUP
1124 #line 197 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1125 { return ';'; }
1126 	YY_BREAK
1127 case 42:
1128 YY_RULE_SETUP
1129 #line 199 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1130 { return '.'; }
1131 	YY_BREAK
1132 case 43:
1133 YY_RULE_SETUP
1134 #line 201 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1135 { return '>'; }
1136 	YY_BREAK
1137 case 44:
1138 YY_RULE_SETUP
1139 #line 203 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1140 { return TOK_DOT_DOT; }
1141 	YY_BREAK
1142 case 45:
1143 YY_RULE_SETUP
1144 #line 205 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1145 { return '+'; }
1146 	YY_BREAK
1147 case 46:
1148 YY_RULE_SETUP
1149 #line 207 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1150 { return '-'; }
1151 	YY_BREAK
1152 case 47:
1153 YY_RULE_SETUP
1154 #line 209 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1155 { return '*'; }
1156 	YY_BREAK
1157 case 48:
1158 YY_RULE_SETUP
1159 #line 211 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1160 { return '/'; }
1161 	YY_BREAK
1162 case 49:
1163 YY_RULE_SETUP
1164 #line 213 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1165 { return '%'; }
1166 	YY_BREAK
1167 case 50:
1168 YY_RULE_SETUP
1169 #line 215 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1170 { return '~'; }
1171 	YY_BREAK
1172 case 51:
1173 YY_RULE_SETUP
1174 #line 217 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1175 { return '^'; }
1176 	YY_BREAK
1177 case 52:
1178 YY_RULE_SETUP
1179 #line 219 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1180 { return TOK_LSHIFT; }
1181 	YY_BREAK
1182 case 53:
1183 YY_RULE_SETUP
1184 #line 221 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1185 { return TOK_RSHIFT; }
1186 	YY_BREAK
1187 case 54:
1188 YY_RULE_SETUP
1189 #line 223 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1190 { return '&'; }
1191 	YY_BREAK
1192 case 55:
1193 YY_RULE_SETUP
1194 #line 225 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1195 { return '|'; }
1196 	YY_BREAK
1197 case 56:
1198 YY_RULE_SETUP
1199 #line 227 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1200 { return TOK_POWER; }
1201 	YY_BREAK
1202 case 57:
1203 YY_RULE_SETUP
1204 #line 229 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1205 { return '<'; }
1206 	YY_BREAK
1207 case 58:
1208 YY_RULE_SETUP
1209 #line 231 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1210 { return TOK_GEQ; }
1211 	YY_BREAK
1212 case 59:
1213 YY_RULE_SETUP
1214 #line 233 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1215 { return TOK_LEQ; }
1216 	YY_BREAK
1217 case 60:
1218 YY_RULE_SETUP
1219 #line 235 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1220 { return TOK_EQ; }
1221 	YY_BREAK
1222 case 61:
1223 YY_RULE_SETUP
1224 #line 237 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1225 { return TOK_NEQ; }
1226 	YY_BREAK
1227 case 62:
1228 YY_RULE_SETUP
1229 #line 239 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1230 { return TOK_AND; }
1231 	YY_BREAK
1232 case 63:
1233 YY_RULE_SETUP
1234 #line 241 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1235 { return TOK_OR; }
1236 	YY_BREAK
1237 case 64:
1238 YY_RULE_SETUP
1239 #line 243 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1240 { return '!'; }
1241 	YY_BREAK
1242 case 65:
1243 /* rule 65 can match eol */
1244 YY_RULE_SETUP
1245 #line 245 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1246 {
1247 										// get rid of quotes
1248 										yytext++;
1249 										yytext[strlen(yytext) - 1] = 0;
1250 //										processStringEscapes(yytext, yytext);
1251 										m_symbolValue.m_str = new std::string(yytext);
1252 										return TOK_STRING_LITERAL;
1253 									}
1254 	YY_BREAK
1255 case 66:
1256 YY_RULE_SETUP
1257 #line 254 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1258 {
1259 										uint8_t x = (hexCharToInt(yytext[0]) << 4) | hexCharToInt(yytext[1]);
1260 										m_blob->append(&x, 1);
1261 									}
1262 	YY_BREAK
1263 case 67:
1264 YY_RULE_SETUP
1265 #line 259 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1266 {
1267 										BEGIN(INITIAL);
1268 										m_symbolValue.m_blob = m_blob;
1269 										m_blob = NULL;
1270 										m_location.m_firstLine = m_blobFirstLine;
1271 										return TOK_BLOB;
1272 									}
1273 	YY_BREAK
1274 case 68:
1275 YY_RULE_SETUP
1276 #line 267 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1277 {
1278                                         // end of multi-line comment, return to initial state
1279                                         BEGIN(INITIAL);
1280                                     }
1281 	YY_BREAK
1282 case 69:
1283 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1284 (yy_c_buf_p) = yy_cp -= 1;
1285 YY_DO_BEFORE_ACTION; /* set up yytext again */
1286 YY_RULE_SETUP
1287 #line 273 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1288 /* absorb single-line comment */
1289 	YY_BREAK
1290 case 70:
1291 YY_RULE_SETUP
1292 #line 275 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1293 /* eat up whitespace in all states */
1294 	YY_BREAK
1295 case 71:
1296 /* rule 71 can match eol */
1297 YY_RULE_SETUP
1298 #line 277 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1299 {
1300 										/* eat up whitespace and count lines in all states */
1301 										m_line++;
1302 									}
1303 	YY_BREAK
1304 case 72:
1305 YY_RULE_SETUP
1306 #line 282 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1307 /* ignore all other chars in a multi-line comment */
1308 	YY_BREAK
1309 case 73:
1310 YY_RULE_SETUP
1311 #line 284 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1312 {
1313 										/* all other chars produce errors */
1314 										char msg[50];
1315 										sprintf(msg, "unexpected character '%c' on line %d", yytext[0], m_line);
1316 										LexerError(msg);
1317 									}
1318 	YY_BREAK
1319 case 74:
1320 YY_RULE_SETUP
1321 #line 291 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
1322 ECHO;
1323 	YY_BREAK
1324 #line 1325 "/Users/creed/projects/fsl/fromsvr/elftosb/build/elftosb.build/Debug/elftosb.build/DerivedSources/elftosb_lexer.cpp"
1325 case YY_STATE_EOF(INITIAL):
1326 case YY_STATE_EOF(blob):
1327 case YY_STATE_EOF(mlcmt):
1328 	yyterminate();
1329 
1330 	case YY_END_OF_BUFFER:
1331 		{
1332 		/* Amount of text matched not including the EOB char. */
1333 		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1334 
1335 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1336 		*yy_cp = (yy_hold_char);
1337 		YY_RESTORE_YY_MORE_OFFSET
1338 
1339 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1340 			{
1341 			/* We're scanning a new file or input source.  It's
1342 			 * possible that this happened because the user
1343 			 * just pointed yyin at a new source and called
1344 			 * yylex().  If so, then we have to assure
1345 			 * consistency between YY_CURRENT_BUFFER and our
1346 			 * globals.  Here is the right place to do so, because
1347 			 * this is the first action (other than possibly a
1348 			 * back-up) that will match for the new input source.
1349 			 */
1350 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1351 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1352 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1353 			}
1354 
1355 		/* Note that here we test for yy_c_buf_p "<=" to the position
1356 		 * of the first EOB in the buffer, since yy_c_buf_p will
1357 		 * already have been incremented past the NUL character
1358 		 * (since all states make transitions on EOB to the
1359 		 * end-of-buffer state).  Contrast this with the test
1360 		 * in input().
1361 		 */
1362 		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1363 			{ /* This was really a NUL. */
1364 			yy_state_type yy_next_state;
1365 
1366 			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1367 
1368 			yy_current_state = yy_get_previous_state(  );
1369 
1370 			/* Okay, we're now positioned to make the NUL
1371 			 * transition.  We couldn't have
1372 			 * yy_get_previous_state() go ahead and do it
1373 			 * for us because it doesn't know how to deal
1374 			 * with the possibility of jamming (and we don't
1375 			 * want to build jamming into it because then it
1376 			 * will run more slowly).
1377 			 */
1378 
1379 			yy_next_state = yy_try_NUL_trans( yy_current_state );
1380 
1381 			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1382 
1383 			if ( yy_next_state )
1384 				{
1385 				/* Consume the NUL. */
1386 				yy_cp = ++(yy_c_buf_p);
1387 				yy_current_state = yy_next_state;
1388 				goto yy_match;
1389 				}
1390 
1391 			else
1392 				{
1393 				yy_cp = (yy_last_accepting_cpos);
1394 				yy_current_state = (yy_last_accepting_state);
1395 				goto yy_find_action;
1396 				}
1397 			}
1398 
1399 		else switch ( yy_get_next_buffer(  ) )
1400 			{
1401 			case EOB_ACT_END_OF_FILE:
1402 				{
1403 				(yy_did_buffer_switch_on_eof) = 0;
1404 
1405 				if ( yywrap(  ) )
1406 					{
1407 					/* Note: because we've taken care in
1408 					 * yy_get_next_buffer() to have set up
1409 					 * yytext, we can now set up
1410 					 * yy_c_buf_p so that if some total
1411 					 * hoser (like flex itself) wants to
1412 					 * call the scanner after we return the
1413 					 * YY_NULL, it'll still work - another
1414 					 * YY_NULL will get returned.
1415 					 */
1416 					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1417 
1418 					yy_act = YY_STATE_EOF(YY_START);
1419 					goto do_action;
1420 					}
1421 
1422 				else
1423 					{
1424 					if ( ! (yy_did_buffer_switch_on_eof) )
1425 						YY_NEW_FILE;
1426 					}
1427 				break;
1428 				}
1429 
1430 			case EOB_ACT_CONTINUE_SCAN:
1431 				(yy_c_buf_p) =
1432 					(yytext_ptr) + yy_amount_of_matched_text;
1433 
1434 				yy_current_state = yy_get_previous_state(  );
1435 
1436 				yy_cp = (yy_c_buf_p);
1437 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1438 				goto yy_match;
1439 
1440 			case EOB_ACT_LAST_MATCH:
1441 				(yy_c_buf_p) =
1442 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1443 
1444 				yy_current_state = yy_get_previous_state(  );
1445 
1446 				yy_cp = (yy_c_buf_p);
1447 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1448 				goto yy_find_action;
1449 			}
1450 		break;
1451 		}
1452 
1453 	default:
1454 		YY_FATAL_ERROR(
1455 			"fatal flex scanner internal error--no action found" );
1456 	} /* end of action switch */
1457 		} /* end of scanning one token */
1458 } /* end of yylex */
1459 
1460 /* The contents of this function are C++ specific, so the () macro is not used.
1461  */
1462 yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
1463 {
1464 	yyin = arg_yyin;
1465 	yyout = arg_yyout;
1466 	yy_c_buf_p = 0;
1467 	yy_init = 0;
1468 	yy_start = 0;
1469 	yy_flex_debug = 0;
1470 	yylineno = 1;	// this will only get updated if %option yylineno
1471 
1472 	yy_did_buffer_switch_on_eof = 0;
1473 
1474 	yy_looking_for_trail_begin = 0;
1475 	yy_more_flag = 0;
1476 	yy_more_len = 0;
1477 	yy_more_offset = yy_prev_more_offset = 0;
1478 
1479 	yy_start_stack_ptr = yy_start_stack_depth = 0;
1480 	yy_start_stack = NULL;
1481 
1482 	yy_buffer_stack = 0;
1483 	yy_buffer_stack_top = 0;
1484 	yy_buffer_stack_max = 0;
1485 
1486 	yy_state_buf = 0;
1487 
1488 }
1489 
1490 /* The contents of this function are C++ specific, so the () macro is not used.
1491  */
1492 yyFlexLexer::~yyFlexLexer()
1493 {
1494 	delete [] yy_state_buf;
1495 	yyfree(yy_start_stack  );
1496 	yy_delete_buffer( YY_CURRENT_BUFFER );
1497 	yyfree(yy_buffer_stack  );
1498 }
1499 
1500 /* The contents of this function are C++ specific, so the () macro is not used.
1501  */
1502 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1503 {
1504 	if ( new_in )
1505 		{
1506 		yy_delete_buffer( YY_CURRENT_BUFFER );
1507 		yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE  ) );
1508 		}
1509 
1510 	if ( new_out )
1511 		yyout = new_out;
1512 }
1513 
1514 #ifdef YY_INTERACTIVE
1515 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1516 #else
1517 int yyFlexLexer::LexerInput( char* buf, int max_size )
1518 #endif
1519 {
1520 	if ( yyin->eof() || yyin->fail() )
1521 		return 0;
1522 
1523 #ifdef YY_INTERACTIVE
1524 	yyin->get( buf[0] );
1525 
1526 	if ( yyin->eof() )
1527 		return 0;
1528 
1529 	if ( yyin->bad() )
1530 		return -1;
1531 
1532 	return 1;
1533 
1534 #else
1535 	(void) yyin->read( buf, max_size );
1536 
1537 	if ( yyin->bad() )
1538 		return -1;
1539 	else
1540 		return yyin->gcount();
1541 #endif
1542 }
1543 
1544 void yyFlexLexer::LexerOutput( const char* buf, int size )
1545 {
1546 	(void) yyout->write( buf, size );
1547 }
1548 
1549 /* yy_get_next_buffer - try to read in a new buffer
1550  *
1551  * Returns a code representing an action:
1552  *	EOB_ACT_LAST_MATCH -
1553  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1554  *	EOB_ACT_END_OF_FILE - end of file
1555  */
1556 int yyFlexLexer::yy_get_next_buffer()
1557 {
1558     	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1559 	register char *source = (yytext_ptr);
1560 	register int number_to_move, i;
1561 	int ret_val;
1562 
1563 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1564 		YY_FATAL_ERROR(
1565 		"fatal flex scanner internal error--end of buffer missed" );
1566 
1567 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1568 		{ /* Don't try to fill the buffer, so this is an EOF. */
1569 		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1570 			{
1571 			/* We matched a single character, the EOB, so
1572 			 * treat this as a final EOF.
1573 			 */
1574 			return EOB_ACT_END_OF_FILE;
1575 			}
1576 
1577 		else
1578 			{
1579 			/* We matched some text prior to the EOB, first
1580 			 * process it.
1581 			 */
1582 			return EOB_ACT_LAST_MATCH;
1583 			}
1584 		}
1585 
1586 	/* Try to read more data. */
1587 
1588 	/* First move last chars to start of buffer. */
1589 	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1590 
1591 	for ( i = 0; i < number_to_move; ++i )
1592 		*(dest++) = *(source++);
1593 
1594 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1595 		/* don't do the read, it's not guaranteed to return an EOF,
1596 		 * just force an EOF
1597 		 */
1598 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1599 
1600 	else
1601 		{
1602 			yy_size_t num_to_read =
1603 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1604 
1605 		while ( num_to_read <= 0 )
1606 			{ /* Not enough room in the buffer - grow it. */
1607 
1608 			/* just a shorter name for the current buffer */
1609 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1610 
1611 			int yy_c_buf_p_offset =
1612 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1613 
1614 			if ( b->yy_is_our_buffer )
1615 				{
1616 				yy_size_t new_size = b->yy_buf_size * 2;
1617 
1618 				if ( new_size <= 0 )
1619 					b->yy_buf_size += b->yy_buf_size / 8;
1620 				else
1621 					b->yy_buf_size *= 2;
1622 
1623 				b->yy_ch_buf = (char *)
1624 					/* Include room in for 2 EOB chars. */
1625 					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1626 				}
1627 			else
1628 				/* Can't grow it, we don't own it. */
1629 				b->yy_ch_buf = 0;
1630 
1631 			if ( ! b->yy_ch_buf )
1632 				YY_FATAL_ERROR(
1633 				"fatal error - scanner input buffer overflow" );
1634 
1635 			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1636 
1637 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1638 						number_to_move - 1;
1639 
1640 			}
1641 
1642 		if ( num_to_read > YY_READ_BUF_SIZE )
1643 			num_to_read = YY_READ_BUF_SIZE;
1644 
1645 		/* Read in more data. */
1646 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1647 			(yy_n_chars), num_to_read );
1648 
1649 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1650 		}
1651 
1652 	if ( (yy_n_chars) == 0 )
1653 		{
1654 		if ( number_to_move == YY_MORE_ADJ )
1655 			{
1656 			ret_val = EOB_ACT_END_OF_FILE;
1657 			yyrestart( yyin  );
1658 			}
1659 
1660 		else
1661 			{
1662 			ret_val = EOB_ACT_LAST_MATCH;
1663 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1664 				YY_BUFFER_EOF_PENDING;
1665 			}
1666 		}
1667 
1668 	else
1669 		ret_val = EOB_ACT_CONTINUE_SCAN;
1670 
1671 	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1672 		/* Extend the array by 50%, plus the number we really need. */
1673 		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1674 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
1675 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1676 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1677 	}
1678 
1679 	(yy_n_chars) += number_to_move;
1680 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1681 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1682 
1683 	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1684 
1685 	return ret_val;
1686 }
1687 
1688 /* yy_get_previous_state - get the state just before the EOB char was reached */
1689 
1690     yy_state_type yyFlexLexer::yy_get_previous_state()
1691 {
1692 	register yy_state_type yy_current_state;
1693 	register char *yy_cp;
1694 
1695 	yy_current_state = (yy_start);
1696 
1697 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1698 		{
1699 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1700 		if ( yy_accept[yy_current_state] )
1701 			{
1702 			(yy_last_accepting_state) = yy_current_state;
1703 			(yy_last_accepting_cpos) = yy_cp;
1704 			}
1705 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1706 			{
1707 			yy_current_state = (int) yy_def[yy_current_state];
1708 			if ( yy_current_state >= 218 )
1709 				yy_c = yy_meta[(unsigned int) yy_c];
1710 			}
1711 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1712 		}
1713 
1714 	return yy_current_state;
1715 }
1716 
1717 /* yy_try_NUL_trans - try to make a transition on the NUL character
1718  *
1719  * synopsis
1720  *	next_state = yy_try_NUL_trans( current_state );
1721  */
1722     yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
1723 {
1724 	register int yy_is_jam;
1725     	register char *yy_cp = (yy_c_buf_p);
1726 
1727 	register YY_CHAR yy_c = 1;
1728 	if ( yy_accept[yy_current_state] )
1729 		{
1730 		(yy_last_accepting_state) = yy_current_state;
1731 		(yy_last_accepting_cpos) = yy_cp;
1732 		}
1733 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1734 		{
1735 		yy_current_state = (int) yy_def[yy_current_state];
1736 		if ( yy_current_state >= 218 )
1737 			yy_c = yy_meta[(unsigned int) yy_c];
1738 		}
1739 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1740 	yy_is_jam = (yy_current_state == 217);
1741 
1742 	return yy_is_jam ? 0 : yy_current_state;
1743 }
1744 
1745     void yyFlexLexer::yyunput( int c, register char* yy_bp)
1746 {
1747 	register char *yy_cp;
1748 
1749     yy_cp = (yy_c_buf_p);
1750 
1751 	/* undo effects of setting up yytext */
1752 	*yy_cp = (yy_hold_char);
1753 
1754 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1755 		{ /* need to shift things up to make room */
1756 		/* +2 for EOB chars. */
1757 		register yy_size_t number_to_move = (yy_n_chars) + 2;
1758 		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1759 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1760 		register char *source =
1761 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1762 
1763 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1764 			*--dest = *--source;
1765 
1766 		yy_cp += (int) (dest - source);
1767 		yy_bp += (int) (dest - source);
1768 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1769 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1770 
1771 		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1772 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1773 		}
1774 
1775 	*--yy_cp = (char) c;
1776 
1777     if ( c == '\n' ){
1778         --yylineno;
1779     }
1780 
1781 	(yytext_ptr) = yy_bp;
1782 	(yy_hold_char) = *yy_cp;
1783 	(yy_c_buf_p) = yy_cp;
1784 }
1785 
1786     int yyFlexLexer::yyinput()
1787 {
1788 	int c;
1789 
1790 	*(yy_c_buf_p) = (yy_hold_char);
1791 
1792 	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1793 		{
1794 		/* yy_c_buf_p now points to the character we want to return.
1795 		 * If this occurs *before* the EOB characters, then it's a
1796 		 * valid NUL; if not, then we've hit the end of the buffer.
1797 		 */
1798 		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1799 			/* This was really a NUL. */
1800 			*(yy_c_buf_p) = '\0';
1801 
1802 		else
1803 			{ /* need more input */
1804 			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1805 			++(yy_c_buf_p);
1806 
1807 			switch ( yy_get_next_buffer(  ) )
1808 				{
1809 				case EOB_ACT_LAST_MATCH:
1810 					/* This happens because yy_g_n_b()
1811 					 * sees that we've accumulated a
1812 					 * token and flags that we need to
1813 					 * try matching the token before
1814 					 * proceeding.  But for input(),
1815 					 * there's no matching to consider.
1816 					 * So convert the EOB_ACT_LAST_MATCH
1817 					 * to EOB_ACT_END_OF_FILE.
1818 					 */
1819 
1820 					/* Reset buffer status. */
1821 					yyrestart( yyin );
1822 
1823 					/*FALLTHROUGH*/
1824 
1825 				case EOB_ACT_END_OF_FILE:
1826 					{
1827 					if ( yywrap(  ) )
1828 						return 0;
1829 
1830 					if ( ! (yy_did_buffer_switch_on_eof) )
1831 						YY_NEW_FILE;
1832 #ifdef __cplusplus
1833 					return yyinput();
1834 #else
1835 					return input();
1836 #endif
1837 					}
1838 
1839 				case EOB_ACT_CONTINUE_SCAN:
1840 					(yy_c_buf_p) = (yytext_ptr) + offset;
1841 					break;
1842 				}
1843 			}
1844 		}
1845 
1846 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
1847 	*(yy_c_buf_p) = '\0';	/* preserve yytext */
1848 	(yy_hold_char) = *++(yy_c_buf_p);
1849 
1850 	if ( c == '\n' )
1851 
1852     yylineno++;
1853 ;
1854 
1855 	return c;
1856 }
1857 
1858 /** Immediately switch to a different input stream.
1859  * @param input_file A readable stream.
1860  *
1861  * @note This function does not reset the start condition to @c INITIAL .
1862  */
1863     void yyFlexLexer::yyrestart( std::istream* input_file )
1864 {
1865 
1866 	if ( ! YY_CURRENT_BUFFER ){
1867         yyensure_buffer_stack ();
1868 		YY_CURRENT_BUFFER_LVALUE =
1869             yy_create_buffer( yyin, YY_BUF_SIZE );
1870 	}
1871 
1872 	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1873 	yy_load_buffer_state(  );
1874 }
1875 
1876 /** Switch to a different input buffer.
1877  * @param new_buffer The new input buffer.
1878  *
1879  */
1880     void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1881 {
1882 
1883 	/* TODO. We should be able to replace this entire function body
1884 	 * with
1885 	 *		yypop_buffer_state();
1886 	 *		yypush_buffer_state(new_buffer);
1887      */
1888 	yyensure_buffer_stack ();
1889 	if ( YY_CURRENT_BUFFER == new_buffer )
1890 		return;
1891 
1892 	if ( YY_CURRENT_BUFFER )
1893 		{
1894 		/* Flush out information for old buffer. */
1895 		*(yy_c_buf_p) = (yy_hold_char);
1896 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1897 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1898 		}
1899 
1900 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1901 	yy_load_buffer_state(  );
1902 
1903 	/* We don't actually know whether we did this switch during
1904 	 * EOF (yywrap()) processing, but the only time this flag
1905 	 * is looked at is after yywrap() is called, so it's safe
1906 	 * to go ahead and always set it.
1907 	 */
1908 	(yy_did_buffer_switch_on_eof) = 1;
1909 }
1910 
1911     void yyFlexLexer::yy_load_buffer_state()
1912 {
1913     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1914 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1915 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1916 	(yy_hold_char) = *(yy_c_buf_p);
1917 }
1918 
1919 /** Allocate and initialize an input buffer state.
1920  * @param file A readable stream.
1921  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1922  *
1923  * @return the allocated buffer state.
1924  */
1925     YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1926 {
1927 	YY_BUFFER_STATE b;
1928 
1929 	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1930 	if ( ! b )
1931 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1932 
1933 	b->yy_buf_size = size;
1934 
1935 	/* yy_ch_buf has to be 2 characters longer than the size given because
1936 	 * we need to put in 2 end-of-buffer characters.
1937 	 */
1938 	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
1939 	if ( ! b->yy_ch_buf )
1940 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1941 
1942 	b->yy_is_our_buffer = 1;
1943 
1944 	yy_init_buffer( b, file );
1945 
1946 	return b;
1947 }
1948 
1949 /** Destroy the buffer.
1950  * @param b a buffer created with yy_create_buffer()
1951  *
1952  */
1953     void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1954 {
1955 
1956 	if ( ! b )
1957 		return;
1958 
1959 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1960 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1961 
1962 	if ( b->yy_is_our_buffer )
1963 		yyfree((void *) b->yy_ch_buf  );
1964 
1965 	yyfree((void *) b  );
1966 }
1967 
1968 /* Initializes or reinitializes a buffer.
1969  * This function is sometimes called more than once on the same buffer,
1970  * such as during a yyrestart() or at EOF.
1971  */
1972     void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
1973 
1974 {
1975 	int oerrno = errno;
1976 
1977 	yy_flush_buffer( b );
1978 
1979 	b->yy_input_file = file;
1980 	b->yy_fill_buffer = 1;
1981 
1982     /* If b is the current buffer, then yy_init_buffer was _probably_
1983      * called from yyrestart() or through yy_get_next_buffer.
1984      * In that case, we don't want to reset the lineno or column.
1985      */
1986     if (b != YY_CURRENT_BUFFER){
1987         b->yy_bs_lineno = 1;
1988         b->yy_bs_column = 0;
1989     }
1990 
1991 	b->yy_is_interactive = 0;
1992 	errno = oerrno;
1993 }
1994 
1995 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1996  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1997  *
1998  */
1999     void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
2000 {
2001     	if ( ! b )
2002 		return;
2003 
2004 	b->yy_n_chars = 0;
2005 
2006 	/* We always need two end-of-buffer characters.  The first causes
2007 	 * a transition to the end-of-buffer state.  The second causes
2008 	 * a jam in that state.
2009 	 */
2010 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2011 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2012 
2013 	b->yy_buf_pos = &b->yy_ch_buf[0];
2014 
2015 	b->yy_at_bol = 1;
2016 	b->yy_buffer_status = YY_BUFFER_NEW;
2017 
2018 	if ( b == YY_CURRENT_BUFFER )
2019 		yy_load_buffer_state(  );
2020 }
2021 
2022 /** Pushes the new state onto the stack. The new state becomes
2023  *  the current state. This function will allocate the stack
2024  *  if necessary.
2025  *  @param new_buffer The new state.
2026  *
2027  */
2028 void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
2029 {
2030     	if (new_buffer == NULL)
2031 		return;
2032 
2033 	yyensure_buffer_stack();
2034 
2035 	/* This block is copied from yy_switch_to_buffer. */
2036 	if ( YY_CURRENT_BUFFER )
2037 		{
2038 		/* Flush out information for old buffer. */
2039 		*(yy_c_buf_p) = (yy_hold_char);
2040 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2041 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2042 		}
2043 
2044 	/* Only push if top exists. Otherwise, replace top. */
2045 	if (YY_CURRENT_BUFFER)
2046 		(yy_buffer_stack_top)++;
2047 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2048 
2049 	/* copied from yy_switch_to_buffer. */
2050 	yy_load_buffer_state(  );
2051 	(yy_did_buffer_switch_on_eof) = 1;
2052 }
2053 
2054 /** Removes and deletes the top of the stack, if present.
2055  *  The next element becomes the new top.
2056  *
2057  */
2058 void yyFlexLexer::yypop_buffer_state (void)
2059 {
2060     	if (!YY_CURRENT_BUFFER)
2061 		return;
2062 
2063 	yy_delete_buffer(YY_CURRENT_BUFFER );
2064 	YY_CURRENT_BUFFER_LVALUE = NULL;
2065 	if ((yy_buffer_stack_top) > 0)
2066 		--(yy_buffer_stack_top);
2067 
2068 	if (YY_CURRENT_BUFFER) {
2069 		yy_load_buffer_state(  );
2070 		(yy_did_buffer_switch_on_eof) = 1;
2071 	}
2072 }
2073 
2074 /* Allocates the stack if it does not exist.
2075  *  Guarantees space for at least one push.
2076  */
2077 void yyFlexLexer::yyensure_buffer_stack(void)
2078 {
2079 	yy_size_t num_to_alloc;
2080 
2081 	if (!(yy_buffer_stack)) {
2082 
2083 		/* First allocation is just for 2 elements, since we don't know if this
2084 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2085 		 * immediate realloc on the next call.
2086          */
2087 		num_to_alloc = 1;
2088 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2089 								(num_to_alloc * sizeof(struct yy_buffer_state*)
2090 								);
2091 		if ( ! (yy_buffer_stack) )
2092 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2093 
2094 		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2095 
2096 		(yy_buffer_stack_max) = num_to_alloc;
2097 		(yy_buffer_stack_top) = 0;
2098 		return;
2099 	}
2100 
2101 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2102 
2103 		/* Increase the buffer to prepare for a possible push. */
2104 		int grow_size = 8 /* arbitrary grow size */;
2105 
2106 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
2107 		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2108 								((yy_buffer_stack),
2109 								num_to_alloc * sizeof(struct yy_buffer_state*)
2110 								);
2111 		if ( ! (yy_buffer_stack) )
2112 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2113 
2114 		/* zero only the new slots.*/
2115 		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2116 		(yy_buffer_stack_max) = num_to_alloc;
2117 	}
2118 }
2119 
2120     void yyFlexLexer::yy_push_state( int new_state )
2121 {
2122     	if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2123 		{
2124 		yy_size_t new_size;
2125 
2126 		(yy_start_stack_depth) += YY_START_STACK_INCR;
2127 		new_size = (yy_start_stack_depth) * sizeof( int );
2128 
2129 		if ( ! (yy_start_stack) )
2130 			(yy_start_stack) = (int *) yyalloc(new_size  );
2131 
2132 		else
2133 			(yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size  );
2134 
2135 		if ( ! (yy_start_stack) )
2136 			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2137 		}
2138 
2139 	(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2140 
2141 	BEGIN(new_state);
2142 }
2143 
2144     void yyFlexLexer::yy_pop_state()
2145 {
2146     	if ( --(yy_start_stack_ptr) < 0 )
2147 		YY_FATAL_ERROR( "start-condition stack underflow" );
2148 
2149 	BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2150 }
2151 
2152     int yyFlexLexer::yy_top_state()
2153 {
2154     	return (yy_start_stack)[(yy_start_stack_ptr) - 1];
2155 }
2156 
2157 #ifndef YY_EXIT_FAILURE
2158 #define YY_EXIT_FAILURE 2
2159 #endif
2160 
2161 void yyFlexLexer::LexerError( yyconst char msg[] )
2162 {
2163     	std::cerr << msg << std::endl;
2164 	exit( YY_EXIT_FAILURE );
2165 }
2166 
2167 /* Redefine yyless() so it works in section 3 code. */
2168 
2169 #undef yyless
2170 #define yyless(n) \
2171 	do \
2172 		{ \
2173 		/* Undo effects of setting up yytext. */ \
2174         int yyless_macro_arg = (n); \
2175         YY_LESS_LINENO(yyless_macro_arg);\
2176 		yytext[yyleng] = (yy_hold_char); \
2177 		(yy_c_buf_p) = yytext + yyless_macro_arg; \
2178 		(yy_hold_char) = *(yy_c_buf_p); \
2179 		*(yy_c_buf_p) = '\0'; \
2180 		yyleng = yyless_macro_arg; \
2181 		} \
2182 	while ( 0 )
2183 
2184 /* Accessor  methods (get/set functions) to struct members. */
2185 
2186 /*
2187  * Internal utility routines.
2188  */
2189 
2190 #ifndef yytext_ptr
2191 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2192 {
2193 	register int i;
2194 	for ( i = 0; i < n; ++i )
2195 		s1[i] = s2[i];
2196 }
2197 #endif
2198 
2199 #ifdef YY_NEED_STRLEN
2200 static int yy_flex_strlen (yyconst char * s )
2201 {
2202 	register int n;
2203 	for ( n = 0; s[n]; ++n )
2204 		;
2205 
2206 	return n;
2207 }
2208 #endif
2209 
2210 void *yyalloc (yy_size_t  size )
2211 {
2212 	return (void *) malloc( size );
2213 }
2214 
2215 void *yyrealloc  (void * ptr, yy_size_t  size )
2216 {
2217 	/* The cast to (char *) in the following accommodates both
2218 	 * implementations that use char* generic pointers, and those
2219 	 * that use void* generic pointers.  It works with the latter
2220 	 * because both ANSI C and C++ allow castless assignment from
2221 	 * any pointer type to void*, and deal with argument conversions
2222 	 * as though doing an assignment.
2223 	 */
2224 	return (void *) realloc( (char *) ptr, size );
2225 }
2226 
2227 void yyfree (void * ptr )
2228 {
2229 	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
2230 }
2231 
2232 #define YYTABLES_NAME "yytables"
2233 
2234 #line 291 "/Users/creed/projects/fsl/fromsvr/elftosb/elftosb2/elftosb_lexer.l"
2235 
2236 
2237 
2238 // verbatim code copied to the bottom of the output
2239 
2240 
2241 
2242