source: trunk/tools/cvtasm/lexyy.c@ 10367

Last change on this file since 10367 was 10219, checked in by sandervl, 22 years ago

Header parser and assembly wrapper generator

File size: 37.8 KB
Line 
1/* A lexical scanner generated by flex */
2
3/* Scanner skeleton version:
4 * $Header: /home/ktk/tmp/odin/2007/netlabs.cvs/odin32/tools/cvtasm/lexyy.c,v 1.1 2003-08-08 14:56:11 sandervl Exp $
5 */
6
7#define FLEX_SCANNER
8#define YY_FLEX_MAJOR_VERSION 2
9#define YY_FLEX_MINOR_VERSION 5
10
11#include <stdio.h>
12
13
14/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15#ifdef c_plusplus
16#ifndef __cplusplus
17#define __cplusplus
18#endif
19#endif
20
21
22#ifdef __cplusplus
23
24#include <stdlib.h>
25#include <unistd.h>
26
27/* Use prototypes in function declarations. */
28#define YY_USE_PROTOS
29
30/* The "const" storage-class-modifier is valid. */
31#define YY_USE_CONST
32
33#else /* ! __cplusplus */
34
35#if __STDC__
36
37#define YY_USE_PROTOS
38#define YY_USE_CONST
39
40#endif /* __STDC__ */
41#endif /* ! __cplusplus */
42
43#ifdef __TURBOC__
44 #pragma warn -rch
45 #pragma warn -use
46#include <io.h>
47#include <stdlib.h>
48#define YY_USE_CONST
49#define YY_USE_PROTOS
50#endif
51
52#ifdef YY_USE_CONST
53#define yyconst const
54#else
55#define yyconst
56#endif
57
58
59#ifdef YY_USE_PROTOS
60#define YY_PROTO(proto) proto
61#else
62#define YY_PROTO(proto) ()
63#endif
64
65/* Returned upon end-of-file. */
66#define YY_NULL 0
67
68/* Promotes a possibly negative, possibly signed char to an unsigned
69 * integer for use as an array index. If the signed char is negative,
70 * we want to instead treat it as an 8-bit unsigned char, hence the
71 * double cast.
72 */
73#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
74
75/* Enter a start condition. This macro really ought to take a parameter,
76 * but we do it the disgusting crufty way forced on us by the ()-less
77 * definition of BEGIN.
78 */
79#define BEGIN yy_start = 1 + 2 *
80
81/* Translate the current start state into a value that can be later handed
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
83 * compatibility.
84 */
85#define YY_START ((yy_start - 1) / 2)
86#define YYSTATE YY_START
87
88/* Action number for EOF rule of a given start state. */
89#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
90
91/* Special action meaning "start processing a new file". */
92#define YY_NEW_FILE yyrestart( yyin )
93
94#define YY_END_OF_BUFFER_CHAR 0
95
96/* Size of default input buffer. */
97#define YY_BUF_SIZE 16384
98
99typedef struct yy_buffer_state *YY_BUFFER_STATE;
100
101extern int yyleng;
102extern FILE *yyin, *yyout;
103
104#define EOB_ACT_CONTINUE_SCAN 0
105#define EOB_ACT_END_OF_FILE 1
106#define EOB_ACT_LAST_MATCH 2
107
108/* The funky do-while in the following #define is used to turn the definition
109 * int a single C statement (which needs a semi-colon terminator). This
110 * avoids problems with code like:
111 *
112 * if ( condition_holds )
113 * yyless( 5 );
114 * else
115 * do_something_else();
116 *
117 * Prior to using the do-while the compiler would get upset at the
118 * "else" because it interpreted the "if" statement as being all
119 * done when it reached the ';' after the yyless() call.
120 */
121
122/* Return all but the first 'n' matched characters back to the input stream. */
123
124#define yyless(n) \
125 do \
126 { \
127 /* Undo effects of setting up yytext. */ \
128 *yy_cp = yy_hold_char; \
129 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
130 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
131 } \
132 while ( 0 )
133
134#define unput(c) yyunput( c, yytext_ptr )
135
136/* The following is because we cannot portably get our hands on size_t
137 * (without autoconf's help, which isn't available because we want
138 * flex-generated scanners to compile on their own).
139 */
140typedef unsigned int yy_size_t;
141
142
143struct yy_buffer_state
144 {
145 FILE *yy_input_file;
146
147 char *yy_ch_buf; /* input buffer */
148 char *yy_buf_pos; /* current position in input buffer */
149
150 /* Size of input buffer in bytes, not including room for EOB
151 * characters.
152 */
153 yy_size_t yy_buf_size;
154
155 /* Number of characters read into yy_ch_buf, not including EOB
156 * characters.
157 */
158 int yy_n_chars;
159
160 /* Whether we "own" the buffer - i.e., we know we created it,
161 * and can realloc() it to grow it, and should free() it to
162 * delete it.
163 */
164 int yy_is_our_buffer;
165
166 /* Whether this is an "interactive" input source; if so, and
167 * if we're using stdio for input, then we want to use getc()
168 * instead of fread(), to make sure we stop fetching input after
169 * each newline.
170 */
171 int yy_is_interactive;
172
173 /* Whether we're considered to be at the beginning of a line.
174 * If so, '^' rules will be active on the next match, otherwise
175 * not.
176 */
177 int yy_at_bol;
178
179 /* Whether to try to fill the input buffer when we reach the
180 * end of it.
181 */
182 int yy_fill_buffer;
183
184 int yy_buffer_status;
185#define YY_BUFFER_NEW 0
186#define YY_BUFFER_NORMAL 1
187 /* When an EOF's been seen but there's still some text to process
188 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
189 * shouldn't try reading from the input source any more. We might
190 * still have a bunch of tokens to match, though, because of
191 * possible backing-up.
192 *
193 * When we actually see the EOF, we change the status to "new"
194 * (via yyrestart()), so that the user can continue scanning by
195 * just pointing yyin at a new input file.
196 */
197#define YY_BUFFER_EOF_PENDING 2
198 };
199
200static YY_BUFFER_STATE yy_current_buffer = 0;
201
202/* We provide macros for accessing buffer states in case in the
203 * future we want to put the buffer states in a more general
204 * "scanner state".
205 */
206#define YY_CURRENT_BUFFER yy_current_buffer
207
208
209/* yy_hold_char holds the character lost when yytext is formed. */
210static char yy_hold_char;
211
212static int yy_n_chars; /* number of characters read into yy_ch_buf */
213
214
215int yyleng;
216
217/* Points to current character in buffer. */
218static char *yy_c_buf_p = (char *) 0;
219static int yy_init = 1; /* whether we need to initialize */
220static int yy_start = 0; /* start state number */
221
222/* Flag which is used to allow yywrap()'s to do buffer switches
223 * instead of setting up a fresh yyin. A bit of a hack ...
224 */
225static int yy_did_buffer_switch_on_eof;
226
227void yyrestart YY_PROTO(( FILE *input_file ));
228
229void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
230void yy_load_buffer_state YY_PROTO(( void ));
231YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
232void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
233void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
234void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
236
237YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
238YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
239YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
240
241static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
242static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
243static void yy_flex_free YY_PROTO(( void * ));
244
245#define yy_new_buffer yy_create_buffer
246
247#define yy_set_interactive(is_interactive) \
248 { \
249 if ( ! yy_current_buffer ) \
250 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
251 yy_current_buffer->yy_is_interactive = is_interactive; \
252 }
253
254#define yy_set_bol(at_bol) \
255 { \
256 if ( ! yy_current_buffer ) \
257 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
258 yy_current_buffer->yy_at_bol = at_bol; \
259 }
260
261#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
262
263
264#define yywrap() 1
265#define YY_SKIP_YYWRAP
266typedef unsigned char YY_CHAR;
267FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
268typedef int yy_state_type;
269extern char *yytext;
270#define yytext_ptr yytext
271
272static yy_state_type yy_get_previous_state YY_PROTO(( void ));
273static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
274static int yy_get_next_buffer YY_PROTO(( void ));
275static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
276
277/* Done after the current pattern has been matched and before the
278 * corresponding action - sets up yytext.
279 */
280#define YY_DO_BEFORE_ACTION \
281 yytext_ptr = yy_bp; \
282 yyleng = (int) (yy_cp - yy_bp); \
283 yy_hold_char = *yy_cp; \
284 *yy_cp = '\0'; \
285 yy_c_buf_p = yy_cp;
286
287#define YY_NUM_RULES 17
288#define YY_END_OF_BUFFER 18
289static yyconst short int yy_accept[62] =
290 { 0,
291 0, 0, 18, 17, 1, 17, 4, 5, 8, 7,
292 6, 3, 3, 3, 1, 0, 0, 0, 0, 0,
293 3, 3, 3, 0, 0, 0, 0, 0, 9, 3,
294 3, 0, 0, 0, 0, 0, 0, 0, 3, 3,
295 0, 0, 0, 0, 0, 0, 0, 2, 0, 13,
296 11, 0, 0, 0, 16, 15, 12, 0, 10, 14,
297 0
298 } ;
299
300static yyconst int yy_ec[256] =
301 { 0,
302 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
304 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
305 1, 2, 1, 1, 3, 1, 1, 1, 1, 4,
306 5, 6, 1, 7, 8, 1, 1, 9, 9, 9,
307 9, 9, 9, 9, 9, 9, 9, 1, 10, 1,
308 1, 1, 1, 1, 11, 11, 12, 11, 11, 11,
309 11, 11, 11, 11, 11, 11, 11, 13, 14, 11,
310 11, 11, 15, 16, 11, 11, 11, 11, 11, 11,
311 17, 1, 18, 1, 19, 1, 11, 11, 20, 21,
312
313 22, 23, 11, 11, 24, 11, 11, 25, 11, 26,
314 27, 11, 11, 11, 28, 29, 30, 11, 11, 11,
315 11, 11, 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
322 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323
324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1
330 } ;
331
332static yyconst int yy_meta[31] =
333 { 0,
334 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
335 2, 2, 2, 2, 2, 2, 1, 1, 2, 2,
336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
337 } ;
338
339static yyconst short int yy_base[63] =
340 { 0,
341 0, 0, 79, 80, 76, 10, 80, 80, 60, 80,
342 80, 0, 62, 48, 72, 51, 46, 10, 45, 52,
343 0, 56, 42, 44, 45, 16, 18, 44, 80, 49,
344 35, 38, 37, 38, 38, 33, 33, 34, 39, 25,
345 27, 29, 28, 28, 19, 22, 24, 0, 24, 80,
346 80, 22, 23, 19, 80, 80, 80, 17, 80, 80,
347 80, 33
348 } ;
349
350static yyconst short int yy_def[63] =
351 { 0,
352 61, 1, 61, 61, 61, 61, 61, 61, 61, 61,
353 61, 62, 62, 62, 61, 61, 61, 61, 61, 61,
354 62, 62, 62, 61, 61, 61, 61, 61, 61, 62,
355 62, 61, 61, 61, 61, 61, 61, 61, 62, 62,
356 61, 61, 61, 61, 61, 61, 61, 62, 61, 61,
357 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
358 0, 61
359 } ;
360
361static yyconst short int yy_nxt[111] =
362 { 0,
363 4, 5, 6, 7, 8, 9, 10, 4, 4, 11,
364 12, 13, 12, 12, 12, 12, 4, 4, 12, 14,
365 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
366 16, 17, 26, 18, 21, 27, 34, 36, 60, 19,
367 59, 35, 37, 58, 57, 56, 55, 54, 53, 52,
368 51, 50, 49, 48, 48, 47, 46, 45, 44, 43,
369 42, 41, 40, 39, 38, 33, 32, 31, 30, 29,
370 28, 25, 24, 15, 23, 22, 20, 15, 61, 3,
371 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
372 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
373
374 61, 61, 61, 61, 61, 61, 61, 61, 61, 61
375 } ;
376
377static yyconst short int yy_chk[111] =
378 { 0,
379 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
380 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 6, 6, 18, 6, 62, 18, 26, 27, 58, 6,
383 54, 26, 27, 53, 52, 49, 47, 46, 45, 44,
384 43, 42, 41, 40, 39, 38, 37, 36, 35, 34,
385 33, 32, 31, 30, 28, 25, 24, 23, 22, 20,
386 19, 17, 16, 15, 14, 13, 9, 5, 3, 61,
387 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
388 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
389
390 61, 61, 61, 61, 61, 61, 61, 61, 61, 61
391 } ;
392
393static yy_state_type yy_last_accepting_state;
394static char *yy_last_accepting_cpos;
395
396/* The intent behind this definition is that it'll catch
397 * any uses of REJECT which flex missed.
398 */
399#define REJECT reject_used_but_not_detected
400#define yymore() yymore_used_but_not_detected
401#define YY_MORE_ADJ 0
402char *yytext;
403#line 1 "cvt.l"
404#define INITIAL 0
405#line 2 "cvt.l"
406#include "cvt.tab.h"
407
408extern int fStartProc;
409#line 410 "lexyy.c"
410
411/* Macros after this point can all be overridden by user definitions in
412 * section 1.
413 */
414
415#ifndef YY_SKIP_YYWRAP
416#ifdef __cplusplus
417extern "C" int yywrap YY_PROTO(( void ));
418#else
419extern int yywrap YY_PROTO(( void ));
420#endif
421#endif
422
423#ifndef YY_NO_UNPUT
424static void yyunput YY_PROTO(( int c, char *buf_ptr ));
425#endif
426
427#ifndef yytext_ptr
428static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
429#endif
430
431#ifndef YY_NO_INPUT
432#ifdef __cplusplus
433static int yyinput YY_PROTO(( void ));
434#else
435static int input YY_PROTO(( void ));
436#endif
437#endif
438
439#if YY_STACK_USED
440static int yy_start_stack_ptr = 0;
441static int yy_start_stack_depth = 0;
442static int *yy_start_stack = 0;
443#ifndef YY_NO_PUSH_STATE
444static void yy_push_state YY_PROTO(( int new_state ));
445#endif
446#ifndef YY_NO_POP_STATE
447static void yy_pop_state YY_PROTO(( void ));
448#endif
449#ifndef YY_NO_TOP_STATE
450static int yy_top_state YY_PROTO(( void ));
451#endif
452
453#else
454#define YY_NO_PUSH_STATE 1
455#define YY_NO_POP_STATE 1
456#define YY_NO_TOP_STATE 1
457#endif
458
459#ifdef YY_MALLOC_DECL
460YY_MALLOC_DECL
461#else
462#if __STDC__
463#ifndef __cplusplus
464#include <stdlib.h>
465#endif
466#else
467/* Just try to get by without declaring the routines. This will fail
468 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
469 * or sizeof(void*) != sizeof(int).
470 */
471#endif
472#endif
473
474/* Amount of stuff to slurp up with each read. */
475#ifndef YY_READ_BUF_SIZE
476#define YY_READ_BUF_SIZE 8192
477#endif
478
479/* Copy whatever the last rule matched to the standard output. */
480
481#ifndef ECHO
482/* This used to be an fputs(), but since the string might contain NUL's,
483 * we now use fwrite().
484 */
485#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
486#endif
487
488/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
489 * is returned in "result".
490 */
491#ifndef YY_INPUT
492#define YY_INPUT(buf,result,max_size) \
493 if ( yy_current_buffer->yy_is_interactive ) \
494 { \
495 int c = '*', n; \
496 for ( n = 0; n < max_size && \
497 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
498 buf[n] = (char) c; \
499 if ( c == '\n' ) \
500 buf[n++] = (char) c; \
501 if ( c == EOF && ferror( yyin ) ) \
502 YY_FATAL_ERROR( "input in flex scanner failed" ); \
503 result = n; \
504 } \
505 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
506 && ferror( yyin ) ) \
507 YY_FATAL_ERROR( "input in flex scanner failed" );
508#endif
509
510/* No semi-colon after return; correct usage is to write "yyterminate();" -
511 * we don't want an extra ';' after the "return" because that will cause
512 * some compilers to complain about unreachable statements.
513 */
514#ifndef yyterminate
515#define yyterminate() return YY_NULL
516#endif
517
518/* Number of entries by which start-condition stack grows. */
519#ifndef YY_START_STACK_INCR
520#define YY_START_STACK_INCR 25
521#endif
522
523/* Report a fatal error. */
524#ifndef YY_FATAL_ERROR
525#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
526#endif
527
528/* Default declaration of generated scanner - a define so the user can
529 * easily add parameters.
530 */
531#ifndef YY_DECL
532#define YY_DECL int yylex YY_PROTO(( void ))
533#endif
534
535/* Code executed at the beginning of each rule, after yytext and yyleng
536 * have been set up.
537 */
538#ifndef YY_USER_ACTION
539#define YY_USER_ACTION
540#endif
541
542/* Code executed at the end of each rule. */
543#ifndef YY_BREAK
544#define YY_BREAK break;
545#endif
546
547#define YY_RULE_SETUP \
548 YY_USER_ACTION
549
550YY_DECL
551 {
552 register yy_state_type yy_current_state;
553 register char *yy_cp, *yy_bp;
554 register int yy_act;
555
556#line 30 "cvt.l"
557
558
559#line 560 "lexyy.c"
560
561 if ( yy_init )
562 {
563 yy_init = 0;
564
565#ifdef YY_USER_INIT
566 YY_USER_INIT;
567#endif
568
569 if ( ! yy_start )
570 yy_start = 1; /* first start state */
571
572 if ( ! yyin )
573 yyin = stdin;
574
575 if ( ! yyout )
576 yyout = stdout;
577
578 if ( ! yy_current_buffer )
579 yy_current_buffer =
580 yy_create_buffer( yyin, YY_BUF_SIZE );
581
582 yy_load_buffer_state();
583 }
584
585 while ( 1 ) /* loops until end-of-file is reached */
586 {
587 yy_cp = yy_c_buf_p;
588
589 /* Support of yytext. */
590 *yy_cp = yy_hold_char;
591
592 /* yy_bp points to the position in yy_ch_buf of the start of
593 * the current run.
594 */
595 yy_bp = yy_cp;
596
597 yy_current_state = yy_start;
598yy_match:
599 do
600 {
601 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
602 if ( yy_accept[yy_current_state] )
603 {
604 yy_last_accepting_state = yy_current_state;
605 yy_last_accepting_cpos = yy_cp;
606 }
607 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
608 {
609 yy_current_state = (int) yy_def[yy_current_state];
610 if ( yy_current_state >= 62 )
611 yy_c = yy_meta[(unsigned int) yy_c];
612 }
613 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
614 ++yy_cp;
615 }
616 while ( yy_base[yy_current_state] != 80 );
617
618yy_find_action:
619 yy_act = yy_accept[yy_current_state];
620 if ( yy_act == 0 )
621 { /* have to back up */
622 yy_cp = yy_last_accepting_cpos;
623 yy_current_state = yy_last_accepting_state;
624 yy_act = yy_accept[yy_current_state];
625 }
626
627 YY_DO_BEFORE_ACTION;
628
629
630do_action: /* This label is used only to access EOF actions. */
631
632
633 switch ( yy_act )
634 { /* beginning of action switch */
635 case 0: /* must back up */
636 /* undo the effects of YY_DO_BEFORE_ACTION */
637 *yy_cp = yy_hold_char;
638 yy_cp = yy_last_accepting_cpos;
639 yy_current_state = yy_last_accepting_state;
640 goto yy_find_action;
641
642case 1:
643YY_RULE_SETUP
644#line 32 "cvt.l"
645/* skip blanks and tabs */
646 YY_BREAK
647case 2:
648YY_RULE_SETUP
649#line 34 "cvt.l"
650return CONST;
651 YY_BREAK
652case 3:
653YY_RULE_SETUP
654#line 35 "cvt.l"
655{
656 yylval = (int)strcpy(malloc(strlen(yytext)+1), yytext);
657 return NAME;
658 }
659 YY_BREAK
660case 4:
661YY_RULE_SETUP
662#line 40 "cvt.l"
663return BRACKETOPEN;
664 YY_BREAK
665case 5:
666YY_RULE_SETUP
667#line 41 "cvt.l"
668return BRACKETCLOSE;
669 YY_BREAK
670case 6:
671YY_RULE_SETUP
672#line 42 "cvt.l"
673return ENDOFPROC;
674 YY_BREAK
675case 7:
676YY_RULE_SETUP
677#line 43 "cvt.l"
678return COMMA;
679 YY_BREAK
680case 8:
681YY_RULE_SETUP
682#line 44 "cvt.l"
683return POINTER;
684 YY_BREAK
685case 9:
686YY_RULE_SETUP
687#line 45 "cvt.l"
688return PPOINTER;
689 YY_BREAK
690case 10:
691YY_RULE_SETUP
692#line 46 "cvt.l"
693return STAT_INLINE;
694 YY_BREAK
695case 11:
696YY_RULE_SETUP
697#line 49 "cvt.l"
698return STAT_IFDEF;
699 YY_BREAK
700case 12:
701YY_RULE_SETUP
702#line 50 "cvt.l"
703return STAT_IFNDEF;
704 YY_BREAK
705case 13:
706YY_RULE_SETUP
707#line 51 "cvt.l"
708return STAT_ENDIF;
709 YY_BREAK
710case 14:
711YY_RULE_SETUP
712#line 52 "cvt.l"
713return STAT_INCLUDE;
714 YY_BREAK
715case 15:
716YY_RULE_SETUP
717#line 53 "cvt.l"
718return STAT_DEFINE;
719 YY_BREAK
720case 16:
721YY_RULE_SETUP
722#line 54 "cvt.l"
723return STAT_UNDEF;
724 YY_BREAK
725case 17:
726YY_RULE_SETUP
727#line 57 "cvt.l"
728ECHO;
729 YY_BREAK
730#line 731 "lexyy.c"
731case YY_STATE_EOF(INITIAL):
732 yyterminate();
733
734 case YY_END_OF_BUFFER:
735 {
736 /* Amount of text matched not including the EOB char. */
737 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
738
739 /* Undo the effects of YY_DO_BEFORE_ACTION. */
740 *yy_cp = yy_hold_char;
741
742 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
743 {
744 /* We're scanning a new file or input source. It's
745 * possible that this happened because the user
746 * just pointed yyin at a new source and called
747 * yylex(). If so, then we have to assure
748 * consistency between yy_current_buffer and our
749 * globals. Here is the right place to do so, because
750 * this is the first action (other than possibly a
751 * back-up) that will match for the new input source.
752 */
753 yy_n_chars = yy_current_buffer->yy_n_chars;
754 yy_current_buffer->yy_input_file = yyin;
755 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
756 }
757
758 /* Note that here we test for yy_c_buf_p "<=" to the position
759 * of the first EOB in the buffer, since yy_c_buf_p will
760 * already have been incremented past the NUL character
761 * (since all states make transitions on EOB to the
762 * end-of-buffer state). Contrast this with the test
763 * in input().
764 */
765 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
766 { /* This was really a NUL. */
767 yy_state_type yy_next_state;
768
769 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
770
771 yy_current_state = yy_get_previous_state();
772
773 /* Okay, we're now positioned to make the NUL
774 * transition. We couldn't have
775 * yy_get_previous_state() go ahead and do it
776 * for us because it doesn't know how to deal
777 * with the possibility of jamming (and we don't
778 * want to build jamming into it because then it
779 * will run more slowly).
780 */
781
782 yy_next_state = yy_try_NUL_trans( yy_current_state );
783
784 yy_bp = yytext_ptr + YY_MORE_ADJ;
785
786 if ( yy_next_state )
787 {
788 /* Consume the NUL. */
789 yy_cp = ++yy_c_buf_p;
790 yy_current_state = yy_next_state;
791 goto yy_match;
792 }
793
794 else
795 {
796 yy_cp = yy_c_buf_p;
797 goto yy_find_action;
798 }
799 }
800
801 else switch ( yy_get_next_buffer() )
802 {
803 case EOB_ACT_END_OF_FILE:
804 {
805 yy_did_buffer_switch_on_eof = 0;
806
807 if ( yywrap() )
808 {
809 /* Note: because we've taken care in
810 * yy_get_next_buffer() to have set up
811 * yytext, we can now set up
812 * yy_c_buf_p so that if some total
813 * hoser (like flex itself) wants to
814 * call the scanner after we return the
815 * YY_NULL, it'll still work - another
816 * YY_NULL will get returned.
817 */
818 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
819
820 yy_act = YY_STATE_EOF(YY_START);
821 goto do_action;
822 }
823
824 else
825 {
826 if ( ! yy_did_buffer_switch_on_eof )
827 YY_NEW_FILE;
828 }
829 break;
830 }
831
832 case EOB_ACT_CONTINUE_SCAN:
833 yy_c_buf_p =
834 yytext_ptr + yy_amount_of_matched_text;
835
836 yy_current_state = yy_get_previous_state();
837
838 yy_cp = yy_c_buf_p;
839 yy_bp = yytext_ptr + YY_MORE_ADJ;
840 goto yy_match;
841
842 case EOB_ACT_LAST_MATCH:
843 yy_c_buf_p =
844 &yy_current_buffer->yy_ch_buf[yy_n_chars];
845
846 yy_current_state = yy_get_previous_state();
847
848 yy_cp = yy_c_buf_p;
849 yy_bp = yytext_ptr + YY_MORE_ADJ;
850 goto yy_find_action;
851 }
852 break;
853 }
854
855 default:
856 YY_FATAL_ERROR(
857 "fatal flex scanner internal error--no action found" );
858 } /* end of action switch */
859 } /* end of scanning one token */
860 } /* end of yylex */
861
862
863/* yy_get_next_buffer - try to read in a new buffer
864 *
865 * Returns a code representing an action:
866 * EOB_ACT_LAST_MATCH -
867 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
868 * EOB_ACT_END_OF_FILE - end of file
869 */
870
871static int yy_get_next_buffer()
872 {
873 register char *dest = yy_current_buffer->yy_ch_buf;
874 register char *source = yytext_ptr;
875 register int number_to_move, i;
876 int ret_val;
877
878 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
879 YY_FATAL_ERROR(
880 "fatal flex scanner internal error--end of buffer missed" );
881
882 if ( yy_current_buffer->yy_fill_buffer == 0 )
883 { /* Don't try to fill the buffer, so this is an EOF. */
884 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
885 {
886 /* We matched a singled characater, the EOB, so
887 * treat this as a final EOF.
888 */
889 return EOB_ACT_END_OF_FILE;
890 }
891
892 else
893 {
894 /* We matched some text prior to the EOB, first
895 * process it.
896 */
897 return EOB_ACT_LAST_MATCH;
898 }
899 }
900
901 /* Try to read more data. */
902
903 /* First move last chars to start of buffer. */
904 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
905
906 for ( i = 0; i < number_to_move; ++i )
907 *(dest++) = *(source++);
908
909 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
910 /* don't do the read, it's not guaranteed to return an EOF,
911 * just force an EOF
912 */
913 yy_n_chars = 0;
914
915 else
916 {
917 int num_to_read =
918 yy_current_buffer->yy_buf_size - number_to_move - 1;
919
920 while ( num_to_read <= 0 )
921 { /* Not enough room in the buffer - grow it. */
922#ifdef YY_USES_REJECT
923 YY_FATAL_ERROR(
924"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
925#else
926
927 /* just a shorter name for the current buffer */
928 YY_BUFFER_STATE b = yy_current_buffer;
929
930 int yy_c_buf_p_offset =
931 (int) (yy_c_buf_p - b->yy_ch_buf);
932
933 if ( b->yy_is_our_buffer )
934 {
935 int new_size = b->yy_buf_size * 2;
936
937 if ( new_size <= 0 )
938 b->yy_buf_size += b->yy_buf_size / 8;
939 else
940 b->yy_buf_size *= 2;
941
942 b->yy_ch_buf = (char *)
943 /* Include room in for 2 EOB chars. */
944 yy_flex_realloc( (void *) b->yy_ch_buf,
945 b->yy_buf_size + 2 );
946 }
947 else
948 /* Can't grow it, we don't own it. */
949 b->yy_ch_buf = 0;
950
951 if ( ! b->yy_ch_buf )
952 YY_FATAL_ERROR(
953 "fatal error - scanner input buffer overflow" );
954
955 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
956
957 num_to_read = yy_current_buffer->yy_buf_size -
958 number_to_move - 1;
959#endif
960 }
961
962 if ( num_to_read > YY_READ_BUF_SIZE )
963 num_to_read = YY_READ_BUF_SIZE;
964
965 /* Read in more data. */
966 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
967 yy_n_chars, num_to_read );
968 }
969
970 if ( yy_n_chars == 0 )
971 {
972 if ( number_to_move == YY_MORE_ADJ )
973 {
974 ret_val = EOB_ACT_END_OF_FILE;
975 yyrestart( yyin );
976 }
977
978 else
979 {
980 ret_val = EOB_ACT_LAST_MATCH;
981 yy_current_buffer->yy_buffer_status =
982 YY_BUFFER_EOF_PENDING;
983 }
984 }
985
986 else
987 ret_val = EOB_ACT_CONTINUE_SCAN;
988
989 yy_n_chars += number_to_move;
990 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
991 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
992
993 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
994
995 return ret_val;
996 }
997
998
999/* yy_get_previous_state - get the state just before the EOB char was reached */
1000
1001static yy_state_type yy_get_previous_state()
1002 {
1003 register yy_state_type yy_current_state;
1004 register char *yy_cp;
1005
1006 yy_current_state = yy_start;
1007
1008 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1009 {
1010 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1011 if ( yy_accept[yy_current_state] )
1012 {
1013 yy_last_accepting_state = yy_current_state;
1014 yy_last_accepting_cpos = yy_cp;
1015 }
1016 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1017 {
1018 yy_current_state = (int) yy_def[yy_current_state];
1019 if ( yy_current_state >= 62 )
1020 yy_c = yy_meta[(unsigned int) yy_c];
1021 }
1022 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1023 }
1024
1025 return yy_current_state;
1026 }
1027
1028
1029/* yy_try_NUL_trans - try to make a transition on the NUL character
1030 *
1031 * synopsis
1032 * next_state = yy_try_NUL_trans( current_state );
1033 */
1034
1035#ifdef YY_USE_PROTOS
1036static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1037#else
1038static yy_state_type yy_try_NUL_trans( yy_current_state )
1039yy_state_type yy_current_state;
1040#endif
1041 {
1042 register int yy_is_jam;
1043 register char *yy_cp = yy_c_buf_p;
1044
1045 register YY_CHAR yy_c = 1;
1046 if ( yy_accept[yy_current_state] )
1047 {
1048 yy_last_accepting_state = yy_current_state;
1049 yy_last_accepting_cpos = yy_cp;
1050 }
1051 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1052 {
1053 yy_current_state = (int) yy_def[yy_current_state];
1054 if ( yy_current_state >= 62 )
1055 yy_c = yy_meta[(unsigned int) yy_c];
1056 }
1057 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1058 yy_is_jam = (yy_current_state == 61);
1059
1060 return yy_is_jam ? 0 : yy_current_state;
1061 }
1062
1063
1064#ifndef YY_NO_UNPUT
1065#ifdef YY_USE_PROTOS
1066static void yyunput( int c, register char *yy_bp )
1067#else
1068static void yyunput( c, yy_bp )
1069int c;
1070register char *yy_bp;
1071#endif
1072 {
1073 register char *yy_cp = yy_c_buf_p;
1074
1075 /* undo effects of setting up yytext */
1076 *yy_cp = yy_hold_char;
1077
1078 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1079 { /* need to shift things up to make room */
1080 /* +2 for EOB chars. */
1081 register int number_to_move = yy_n_chars + 2;
1082 register char *dest = &yy_current_buffer->yy_ch_buf[
1083 yy_current_buffer->yy_buf_size + 2];
1084 register char *source =
1085 &yy_current_buffer->yy_ch_buf[number_to_move];
1086
1087 while ( source > yy_current_buffer->yy_ch_buf )
1088 *--dest = *--source;
1089
1090 yy_cp += (int) (dest - source);
1091 yy_bp += (int) (dest - source);
1092 yy_n_chars = yy_current_buffer->yy_buf_size;
1093
1094 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1095 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1096 }
1097
1098 *--yy_cp = (char) c;
1099
1100
1101 yytext_ptr = yy_bp;
1102 yy_hold_char = *yy_cp;
1103 yy_c_buf_p = yy_cp;
1104 }
1105#endif /* ifndef YY_NO_UNPUT */
1106
1107
1108#ifdef __cplusplus
1109static int yyinput()
1110#else
1111static int input()
1112#endif
1113 {
1114 int c;
1115
1116 *yy_c_buf_p = yy_hold_char;
1117
1118 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1119 {
1120 /* yy_c_buf_p now points to the character we want to return.
1121 * If this occurs *before* the EOB characters, then it's a
1122 * valid NUL; if not, then we've hit the end of the buffer.
1123 */
1124 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1125 /* This was really a NUL. */
1126 *yy_c_buf_p = '\0';
1127
1128 else
1129 { /* need more input */
1130 yytext_ptr = yy_c_buf_p;
1131 ++yy_c_buf_p;
1132
1133 switch ( yy_get_next_buffer() )
1134 {
1135 case EOB_ACT_END_OF_FILE:
1136 {
1137 if ( yywrap() )
1138 {
1139 yy_c_buf_p =
1140 yytext_ptr + YY_MORE_ADJ;
1141 return EOF;
1142 }
1143
1144 if ( ! yy_did_buffer_switch_on_eof )
1145 YY_NEW_FILE;
1146#ifdef __cplusplus
1147 return yyinput();
1148#else
1149 return input();
1150#endif
1151 }
1152
1153 case EOB_ACT_CONTINUE_SCAN:
1154 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1155 break;
1156
1157 case EOB_ACT_LAST_MATCH:
1158#ifdef __cplusplus
1159 YY_FATAL_ERROR(
1160 "unexpected last match in yyinput()" );
1161#else
1162 YY_FATAL_ERROR(
1163 "unexpected last match in input()" );
1164#endif
1165 }
1166 }
1167 }
1168
1169 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1170 *yy_c_buf_p = '\0'; /* preserve yytext */
1171 yy_hold_char = *++yy_c_buf_p;
1172
1173
1174 return c;
1175 }
1176
1177
1178#ifdef YY_USE_PROTOS
1179void yyrestart( FILE *input_file )
1180#else
1181void yyrestart( input_file )
1182FILE *input_file;
1183#endif
1184 {
1185 if ( ! yy_current_buffer )
1186 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1187
1188 yy_init_buffer( yy_current_buffer, input_file );
1189 yy_load_buffer_state();
1190 }
1191
1192
1193#ifdef YY_USE_PROTOS
1194void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1195#else
1196void yy_switch_to_buffer( new_buffer )
1197YY_BUFFER_STATE new_buffer;
1198#endif
1199 {
1200 if ( yy_current_buffer == new_buffer )
1201 return;
1202
1203 if ( yy_current_buffer )
1204 {
1205 /* Flush out information for old buffer. */
1206 *yy_c_buf_p = yy_hold_char;
1207 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1208 yy_current_buffer->yy_n_chars = yy_n_chars;
1209 }
1210
1211 yy_current_buffer = new_buffer;
1212 yy_load_buffer_state();
1213
1214 /* We don't actually know whether we did this switch during
1215 * EOF (yywrap()) processing, but the only time this flag
1216 * is looked at is after yywrap() is called, so it's safe
1217 * to go ahead and always set it.
1218 */
1219 yy_did_buffer_switch_on_eof = 1;
1220 }
1221
1222
1223#ifdef YY_USE_PROTOS
1224void yy_load_buffer_state( void )
1225#else
1226void yy_load_buffer_state()
1227#endif
1228 {
1229 yy_n_chars = yy_current_buffer->yy_n_chars;
1230 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1231 yyin = yy_current_buffer->yy_input_file;
1232 yy_hold_char = *yy_c_buf_p;
1233 }
1234
1235
1236#ifdef YY_USE_PROTOS
1237YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1238#else
1239YY_BUFFER_STATE yy_create_buffer( file, size )
1240FILE *file;
1241int size;
1242#endif
1243 {
1244 YY_BUFFER_STATE b;
1245
1246 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1247 if ( ! b )
1248 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1249
1250 b->yy_buf_size = size;
1251
1252 /* yy_ch_buf has to be 2 characters longer than the size given because
1253 * we need to put in 2 end-of-buffer characters.
1254 */
1255 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1256 if ( ! b->yy_ch_buf )
1257 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1258
1259 b->yy_is_our_buffer = 1;
1260
1261 yy_init_buffer( b, file );
1262
1263 return b;
1264 }
1265
1266
1267#ifdef YY_USE_PROTOS
1268void yy_delete_buffer( YY_BUFFER_STATE b )
1269#else
1270void yy_delete_buffer( b )
1271YY_BUFFER_STATE b;
1272#endif
1273 {
1274 if ( ! b )
1275 return;
1276
1277 if ( b == yy_current_buffer )
1278 yy_current_buffer = (YY_BUFFER_STATE) 0;
1279
1280 if ( b->yy_is_our_buffer )
1281 yy_flex_free( (void *) b->yy_ch_buf );
1282
1283 yy_flex_free( (void *) b );
1284 }
1285
1286
1287#ifndef YY_ALWAYS_INTERACTIVE
1288#ifndef YY_NEVER_INTERACTIVE
1289extern int isatty YY_PROTO(( int ));
1290#endif
1291#endif
1292
1293#ifdef YY_USE_PROTOS
1294void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1295#else
1296void yy_init_buffer( b, file )
1297YY_BUFFER_STATE b;
1298FILE *file;
1299#endif
1300
1301
1302 {
1303 yy_flush_buffer( b );
1304
1305 b->yy_input_file = file;
1306 b->yy_fill_buffer = 1;
1307
1308#if YY_ALWAYS_INTERACTIVE
1309 b->yy_is_interactive = 1;
1310#else
1311#if YY_NEVER_INTERACTIVE
1312 b->yy_is_interactive = 0;
1313#else
1314 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1315#endif
1316#endif
1317 }
1318
1319
1320#ifdef YY_USE_PROTOS
1321void yy_flush_buffer( YY_BUFFER_STATE b )
1322#else
1323void yy_flush_buffer( b )
1324YY_BUFFER_STATE b;
1325#endif
1326
1327 {
1328 b->yy_n_chars = 0;
1329
1330 /* We always need two end-of-buffer characters. The first causes
1331 * a transition to the end-of-buffer state. The second causes
1332 * a jam in that state.
1333 */
1334 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1335 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1336
1337 b->yy_buf_pos = &b->yy_ch_buf[0];
1338
1339 b->yy_at_bol = 1;
1340 b->yy_buffer_status = YY_BUFFER_NEW;
1341
1342 if ( b == yy_current_buffer )
1343 yy_load_buffer_state();
1344 }
1345
1346
1347#ifndef YY_NO_SCAN_BUFFER
1348#ifdef YY_USE_PROTOS
1349YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1350#else
1351YY_BUFFER_STATE yy_scan_buffer( base, size )
1352char *base;
1353yy_size_t size;
1354#endif
1355 {
1356 YY_BUFFER_STATE b;
1357
1358 if ( size < 2 ||
1359 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1360 base[size-1] != YY_END_OF_BUFFER_CHAR )
1361 /* They forgot to leave room for the EOB's. */
1362 return 0;
1363
1364 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1365 if ( ! b )
1366 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1367
1368 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1369 b->yy_buf_pos = b->yy_ch_buf = base;
1370 b->yy_is_our_buffer = 0;
1371 b->yy_input_file = 0;
1372 b->yy_n_chars = b->yy_buf_size;
1373 b->yy_is_interactive = 0;
1374 b->yy_at_bol = 1;
1375 b->yy_fill_buffer = 0;
1376 b->yy_buffer_status = YY_BUFFER_NEW;
1377
1378 yy_switch_to_buffer( b );
1379
1380 return b;
1381 }
1382#endif
1383
1384
1385#ifndef YY_NO_SCAN_STRING
1386#ifdef YY_USE_PROTOS
1387YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1388#else
1389YY_BUFFER_STATE yy_scan_string( str )
1390yyconst char *str;
1391#endif
1392 {
1393 int len;
1394 for ( len = 0; str[len]; ++len )
1395 ;
1396
1397 return yy_scan_bytes( str, len );
1398 }
1399#endif
1400
1401
1402#ifndef YY_NO_SCAN_BYTES
1403#ifdef YY_USE_PROTOS
1404YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1405#else
1406YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1407yyconst char *bytes;
1408int len;
1409#endif
1410 {
1411 YY_BUFFER_STATE b;
1412 char *buf;
1413 yy_size_t n;
1414 int i;
1415
1416 /* Get memory for full buffer, including space for trailing EOB's. */
1417 n = len + 2;
1418 buf = (char *) yy_flex_alloc( n );
1419 if ( ! buf )
1420 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1421
1422 for ( i = 0; i < len; ++i )
1423 buf[i] = bytes[i];
1424
1425 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1426
1427 b = yy_scan_buffer( buf, n );
1428 if ( ! b )
1429 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1430
1431 /* It's okay to grow etc. this buffer, and we should throw it
1432 * away when we're done.
1433 */
1434 b->yy_is_our_buffer = 1;
1435
1436 return b;
1437 }
1438#endif
1439
1440
1441#ifndef YY_NO_PUSH_STATE
1442#ifdef YY_USE_PROTOS
1443static void yy_push_state( int new_state )
1444#else
1445static void yy_push_state( new_state )
1446int new_state;
1447#endif
1448 {
1449 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1450 {
1451 yy_size_t new_size;
1452
1453 yy_start_stack_depth += YY_START_STACK_INCR;
1454 new_size = yy_start_stack_depth * sizeof( int );
1455
1456 if ( ! yy_start_stack )
1457 yy_start_stack = (int *) yy_flex_alloc( new_size );
1458
1459 else
1460 yy_start_stack = (int *) yy_flex_realloc(
1461 (void *) yy_start_stack, new_size );
1462
1463 if ( ! yy_start_stack )
1464 YY_FATAL_ERROR(
1465 "out of memory expanding start-condition stack" );
1466 }
1467
1468 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1469
1470 BEGIN(new_state);
1471 }
1472#endif
1473
1474
1475#ifndef YY_NO_POP_STATE
1476static void yy_pop_state()
1477 {
1478 if ( --yy_start_stack_ptr < 0 )
1479 YY_FATAL_ERROR( "start-condition stack underflow" );
1480
1481 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1482 }
1483#endif
1484
1485
1486#ifndef YY_NO_TOP_STATE
1487static int yy_top_state()
1488 {
1489 return yy_start_stack[yy_start_stack_ptr - 1];
1490 }
1491#endif
1492
1493#ifndef YY_EXIT_FAILURE
1494#define YY_EXIT_FAILURE 2
1495#endif
1496
1497#ifdef YY_USE_PROTOS
1498static void yy_fatal_error( yyconst char msg[] )
1499#else
1500static void yy_fatal_error( msg )
1501char msg[];
1502#endif
1503 {
1504 (void) fprintf( stderr, "%s\n", msg );
1505 exit( YY_EXIT_FAILURE );
1506 }
1507
1508
1509
1510/* Redefine yyless() so it works in section 3 code. */
1511
1512#undef yyless
1513#define yyless(n) \
1514 do \
1515 { \
1516 /* Undo effects of setting up yytext. */ \
1517 yytext[yyleng] = yy_hold_char; \
1518 yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
1519 yy_hold_char = *yy_c_buf_p; \
1520 *yy_c_buf_p = '\0'; \
1521 yyleng = n; \
1522 } \
1523 while ( 0 )
1524
1525
1526/* Internal utility routines. */
1527
1528#ifndef yytext_ptr
1529#ifdef YY_USE_PROTOS
1530static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1531#else
1532static void yy_flex_strncpy( s1, s2, n )
1533char *s1;
1534yyconst char *s2;
1535int n;
1536#endif
1537 {
1538 register int i;
1539 for ( i = 0; i < n; ++i )
1540 s1[i] = s2[i];
1541 }
1542#endif
1543
1544
1545#ifdef YY_USE_PROTOS
1546static void *yy_flex_alloc( yy_size_t size )
1547#else
1548static void *yy_flex_alloc( size )
1549yy_size_t size;
1550#endif
1551 {
1552 return (void *) malloc( size );
1553 }
1554
1555#ifdef YY_USE_PROTOS
1556static void *yy_flex_realloc( void *ptr, yy_size_t size )
1557#else
1558static void *yy_flex_realloc( ptr, size )
1559void *ptr;
1560yy_size_t size;
1561#endif
1562 {
1563 /* The cast to (char *) in the following accommodates both
1564 * implementations that use char* generic pointers, and those
1565 * that use void* generic pointers. It works with the latter
1566 * because both ANSI C and C++ allow castless assignment from
1567 * any pointer type to void*, and deal with argument conversions
1568 * as though doing an assignment.
1569 */
1570 return (void *) realloc( (char *) ptr, size );
1571 }
1572
1573#ifdef YY_USE_PROTOS
1574static void yy_flex_free( void *ptr )
1575#else
1576static void yy_flex_free( ptr )
1577void *ptr;
1578#endif
1579 {
1580 free( ptr );
1581 }
1582
1583#if YY_MAIN
1584int main()
1585 {
1586 yylex();
1587 return 0;
1588 }
1589#endif
1590#line 57 "cvt.l"
1591
Note: See TracBrowser for help on using the repository browser.