/[pearpc]/src/debug/lex.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /src/debug/lex.c

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26