rclex.c revision 104834
1/* A lexical scanner generated by flex */
2
3/* Scanner skeleton version:
4 * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.8.1 2002/08/05 20:43:45 drow 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#include <errno.h>
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#ifndef _WIN32
26#include <unistd.h>
27#endif
28
29/* Use prototypes in function declarations. */
30#define YY_USE_PROTOS
31
32/* The "const" storage-class-modifier is valid. */
33#define YY_USE_CONST
34
35#else	/* ! __cplusplus */
36
37#if __STDC__
38
39#define YY_USE_PROTOS
40#define YY_USE_CONST
41
42#endif	/* __STDC__ */
43#endif	/* ! __cplusplus */
44
45#ifdef __TURBOC__
46 #pragma warn -rch
47 #pragma warn -use
48#include <io.h>
49#include <stdlib.h>
50#define YY_USE_CONST
51#define YY_USE_PROTOS
52#endif
53
54#ifdef YY_USE_CONST
55#define yyconst const
56#else
57#define yyconst
58#endif
59
60
61#ifdef YY_USE_PROTOS
62#define YY_PROTO(proto) proto
63#else
64#define YY_PROTO(proto) ()
65#endif
66
67/* Returned upon end-of-file. */
68#define YY_NULL 0
69
70/* Promotes a possibly negative, possibly signed char to an unsigned
71 * integer for use as an array index.  If the signed char is negative,
72 * we want to instead treat it as an 8-bit unsigned char, hence the
73 * double cast.
74 */
75#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
76
77/* Enter a start condition.  This macro really ought to take a parameter,
78 * but we do it the disgusting crufty way forced on us by the ()-less
79 * definition of BEGIN.
80 */
81#define BEGIN yy_start = 1 + 2 *
82
83/* Translate the current start state into a value that can be later handed
84 * to BEGIN to return to the state.  The YYSTATE alias is for lex
85 * compatibility.
86 */
87#define YY_START ((yy_start - 1) / 2)
88#define YYSTATE YY_START
89
90/* Action number for EOF rule of a given start state. */
91#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
92
93/* Special action meaning "start processing a new file". */
94#define YY_NEW_FILE yyrestart( yyin )
95
96#define YY_END_OF_BUFFER_CHAR 0
97
98/* Size of default input buffer. */
99#define YY_BUF_SIZE 16384
100
101typedef struct yy_buffer_state *YY_BUFFER_STATE;
102
103extern int yyleng;
104extern FILE *yyin, *yyout;
105
106#define EOB_ACT_CONTINUE_SCAN 0
107#define EOB_ACT_END_OF_FILE 1
108#define EOB_ACT_LAST_MATCH 2
109
110/* The funky do-while in the following #define is used to turn the definition
111 * int a single C statement (which needs a semi-colon terminator).  This
112 * avoids problems with code like:
113 *
114 * 	if ( condition_holds )
115 *		yyless( 5 );
116 *	else
117 *		do_something_else();
118 *
119 * Prior to using the do-while the compiler would get upset at the
120 * "else" because it interpreted the "if" statement as being all
121 * done when it reached the ';' after the yyless() call.
122 */
123
124/* Return all but the first 'n' matched characters back to the input stream. */
125
126#define yyless(n) \
127	do \
128		{ \
129		/* Undo effects of setting up yytext. */ \
130		*yy_cp = yy_hold_char; \
131		YY_RESTORE_YY_MORE_OFFSET \
132		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
133		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
134		} \
135	while ( 0 )
136
137#define unput(c) yyunput( c, yytext_ptr )
138
139/* The following is because we cannot portably get our hands on size_t
140 * (without autoconf's help, which isn't available because we want
141 * flex-generated scanners to compile on their own).
142 */
143typedef unsigned int yy_size_t;
144
145
146struct yy_buffer_state
147	{
148	FILE *yy_input_file;
149
150	char *yy_ch_buf;		/* input buffer */
151	char *yy_buf_pos;		/* current position in input buffer */
152
153	/* Size of input buffer in bytes, not including room for EOB
154	 * characters.
155	 */
156	yy_size_t yy_buf_size;
157
158	/* Number of characters read into yy_ch_buf, not including EOB
159	 * characters.
160	 */
161	int yy_n_chars;
162
163	/* Whether we "own" the buffer - i.e., we know we created it,
164	 * and can realloc() it to grow it, and should free() it to
165	 * delete it.
166	 */
167	int yy_is_our_buffer;
168
169	/* Whether this is an "interactive" input source; if so, and
170	 * if we're using stdio for input, then we want to use getc()
171	 * instead of fread(), to make sure we stop fetching input after
172	 * each newline.
173	 */
174	int yy_is_interactive;
175
176	/* Whether we're considered to be at the beginning of a line.
177	 * If so, '^' rules will be active on the next match, otherwise
178	 * not.
179	 */
180	int yy_at_bol;
181
182	/* Whether to try to fill the input buffer when we reach the
183	 * end of it.
184	 */
185	int yy_fill_buffer;
186
187	int yy_buffer_status;
188#define YY_BUFFER_NEW 0
189#define YY_BUFFER_NORMAL 1
190	/* When an EOF's been seen but there's still some text to process
191	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
192	 * shouldn't try reading from the input source any more.  We might
193	 * still have a bunch of tokens to match, though, because of
194	 * possible backing-up.
195	 *
196	 * When we actually see the EOF, we change the status to "new"
197	 * (via yyrestart()), so that the user can continue scanning by
198	 * just pointing yyin at a new input file.
199	 */
200#define YY_BUFFER_EOF_PENDING 2
201	};
202
203static YY_BUFFER_STATE yy_current_buffer = 0;
204
205/* We provide macros for accessing buffer states in case in the
206 * future we want to put the buffer states in a more general
207 * "scanner state".
208 */
209#define YY_CURRENT_BUFFER yy_current_buffer
210
211
212/* yy_hold_char holds the character lost when yytext is formed. */
213static char yy_hold_char;
214
215static int yy_n_chars;		/* number of characters read into yy_ch_buf */
216
217
218int yyleng;
219
220/* Points to current character in buffer. */
221static char *yy_c_buf_p = (char *) 0;
222static int yy_init = 1;		/* whether we need to initialize */
223static int yy_start = 0;	/* start state number */
224
225/* Flag which is used to allow yywrap()'s to do buffer switches
226 * instead of setting up a fresh yyin.  A bit of a hack ...
227 */
228static int yy_did_buffer_switch_on_eof;
229
230void yyrestart YY_PROTO(( FILE *input_file ));
231
232void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
233void yy_load_buffer_state YY_PROTO(( void ));
234YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
235void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
237void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
238#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
239
240YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
241YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
242YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
243
244static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
245static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
246static void yy_flex_free YY_PROTO(( void * ));
247
248#define yy_new_buffer yy_create_buffer
249
250#define yy_set_interactive(is_interactive) \
251	{ \
252	if ( ! yy_current_buffer ) \
253		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
254	yy_current_buffer->yy_is_interactive = is_interactive; \
255	}
256
257#define yy_set_bol(at_bol) \
258	{ \
259	if ( ! yy_current_buffer ) \
260		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
261	yy_current_buffer->yy_at_bol = at_bol; \
262	}
263
264#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
265
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 86
288#define YY_END_OF_BUFFER 87
289static yyconst short int yy_accept[470] =
290    {   0,
291        0,    0,   87,   85,   84,   83,   85,   78,   80,   82,
292       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
293       82,   82,   82,   82,   82,   82,   82,    2,    4,   84,
294        0,   81,   78,   80,   79,   82,   82,   82,   82,   82,
295       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
296       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
297       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
298       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
299       82,   82,   82,   81,    0,   82,   11,   82,   82,   82,
300       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
301
302       82,   82,   82,   82,   82,    3,   82,   82,   82,   82,
303       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
304       82,   82,   82,   82,   82,   82,   76,   82,   82,   82,
305       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
306       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
307       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
308       82,   82,   82,   82,   82,   82,   82,   41,   82,   82,
309       82,   53,   42,   82,   82,   82,   82,   82,   82,   82,
310       46,   82,   82,   82,   82,   82,   82,   71,   82,   82,
311       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
312
313       82,   82,   82,    7,   82,   82,   82,   38,    1,   82,
314       82,   82,   82,   82,   18,   82,   82,   25,   82,   82,
315       82,   82,   82,   82,   82,   82,   82,   82,   82,   70,
316       82,   82,   39,   40,   82,   82,   82,   82,   82,   30,
317       82,   82,   82,   82,   82,   82,   50,   82,   82,   82,
318       82,   82,   34,   82,   82,    9,   82,   82,   19,   82,
319       68,   82,   82,   82,   82,   82,   82,   12,    0,   82,
320       82,   82,   82,   82,   82,   82,   13,   82,   14,   82,
321       82,   82,   82,   65,   82,   82,   82,   52,   82,   72,
322       82,   82,   82,   82,   82,   82,   47,   82,   82,   82,
323
324       82,   82,   82,   82,   82,   82,   58,   82,   82,   36,
325       82,   82,   82,   82,   82,   82,   82,   82,    0,   82,
326        0,   77,   17,   82,   82,   51,   82,   10,   82,   82,
327       82,   82,   16,   82,   82,   82,   82,   82,   82,   82,
328       29,   82,   82,   82,   82,   82,   82,   82,   73,   82,
329       31,   82,   82,   82,   82,   82,   82,   45,    6,   82,
330       82,   82,   82,   77,   82,   23,   24,   82,   15,   82,
331       27,   82,   82,   66,   82,   28,   54,   43,   82,   82,
332       82,   48,   82,   69,    8,   82,   82,   82,   82,   82,
333       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
334
335       64,   82,   82,   82,   82,   56,   82,   82,   82,   82,
336       35,   49,   82,   82,   82,   82,   20,   82,   82,   82,
337       82,   82,   82,   82,   82,   74,   82,   82,   82,   32,
338       82,   82,   37,   82,   82,   82,   82,   82,   82,   75,
339       82,   67,   61,   82,   82,   82,   33,   59,   60,    5,
340       21,   82,   82,   82,   82,   55,   57,   82,   82,   82,
341       26,   63,   82,   82,   82,   62,   22,   44,    0
342    } ;
343
344static yyconst int yy_ec[256] =
345    {   0,
346        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
347        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
348        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
349        1,    2,    1,    5,    6,    1,    1,    1,    1,    1,
350        1,    1,    1,    7,    1,    1,    1,    8,    8,    8,
351        9,    8,    8,    8,    8,    8,    8,    1,    1,    1,
352        1,    1,    1,    1,   10,   11,   12,   13,   14,   15,
353       16,   17,   18,   19,   20,   21,   22,   23,   24,   25,
354       19,   26,   27,   28,   29,   30,   19,   31,   32,   19,
355        1,    1,    1,    1,    1,    1,   33,   33,   33,   33,
356
357       33,   33,   19,   19,   19,   19,   19,   19,   19,   19,
358       19,   19,   19,   19,   19,   19,   19,   19,   19,   33,
359       19,   19,   34,    1,   35,    1,    1,    1,    1,    1,
360        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
361        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
362        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
363        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
364        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
365        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
366        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
367
368        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
369        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
370        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
371        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
372        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
373        1,    1,    1,    1,    1
374    } ;
375
376static yyconst int yy_meta[36] =
377    {   0,
378        1,    2,    3,    2,    1,    4,    2,    5,    5,    5,
379        5,    5,    5,    5,    5,    1,    1,    1,    1,    1,
380        5,    1,    1,    1,    1,    1,    1,    1,    1,    1,
381        1,    1,    5,    1,    1
382    } ;
383
384static yyconst short int yy_base[476] =
385    {   0,
386        0,    0,  515,  516,   34,  516,  509,    0,  492,   25,
387       26,   45,   25,   28,   24,  486,  497,   49,    0,   40,
388       43,  486,   51,   66,   67,  482,   35,  516,  516,   81,
389      503,   84,    0,  486,  516,    0,  494,  477,  492,  475,
390       74,  474,  477,  475,   46,  489,   69,  484,  471,  481,
391       55,  477,  481,  466,   67,  469,   83,   83,  467,  477,
392      464,  478,  464,  459,  475,  470,   74,  453,   81,  457,
393       86,   76,  468,  467,  465,  452,  452,  458,   95,  461,
394      453,  447,  446,  106,  466,  456,    0,  451,  444,  449,
395      448,  443,  452,  435,  436,  449,  433,  448,  430,  426,
396
397      429,  430,  433,  441,  424,    0,  423,  436,  435,  420,
398      415,  417,  427,  419,  420,  424,  412,  428,  423,  410,
399      424,  405,  406,  407,  419,  409,    0,  402,  409,  416,
400      414,  410,  408,  415,  393,  399,  412,  406,  392,  401,
401      397,  391,  387,  388,  386,  392,  394,  103,  383,  387,
402      399,  388,  389,  396,  385,  377,  379,  376,  373,  376,
403      370,  374,  387,  368,  363,   98,  381,    0,  379,  367,
404      363,    0,    0,  362,  363,  360,  358,  375,  361,  356,
405      105,  373,  372,  351,  355,  355,  349,    0,  366,  352,
406      347,  346,  352,  346,  343,  356,  346,  354,  356,  352,
407
408      347,  344,  349,    0,  335,  344,  350,    0,    0,  334,
409      115,  334,  345,  119,    0,  345,  331,    0,  328,  326,
410      336,  325,  336,  328,  327,  320,  317,  313,  330,    0,
411      330,  331,    0,    0,  327,  322,  329,  314,  314,    0,
412      114,  305,  307,  318,  322,  318,    0,  321,  318,  107,
413      318,  318,    0,  306,  316,    0,  316,  308,    0,  294,
414        0,  298,  307,  294,  291,  304,  304,    0,  132,  137,
415      293,  287,  290,  300,  288,  290,    0,  293,  295,  295,
416      276,  292,  295,    0,  293,  278,  276,    0,  277,    0,
417      270,  283,  267,  285,  270,  281,    0,  280,  279,  271,
418
419      265,  277,  261,  257,  259,  257,    0,  274,  256,    0,
420      255,  254,  258,  248,  269,  268,  265,  258,  270,  143,
421      269,  149,    0,  259,  241,    0,  240,    0,  259,  238,
422      258,  239,    0,  250,  237,  250,  236,  231,  247,  246,
423        0,  249,  247,  247,  234,  227,  240,  225,    0,  222,
424        0,  223,  222,  239,  224,  237,  218,  227,    0,  216,
425      215,  222,  217,  235,  213,    0,    0,  209,    0,  226,
426        0,  209,  203,    0,  216,    0,    0,    0,  212,  206,
427      211,    0,  220,    0,    0,  215,  204,  199,  200,  199,
428      213,  199,  199,  197,  206,  208,  207,  199,  188,  194,
429
430      192,  188,  188,  190,  196,    0,  198,  182,  184,  182,
431        0,    0,  184,  181,  188,  176,    0,  177,  171,  172,
432      170,  183,  186,  181,  171,    0,  183,  171,  164,    0,
433      167,  175,    0,  164,  160,  155,  157,  156,  159,    0,
434      155,    0,    0,  160,  165,  156,    0,    0,    0,    0,
435        0,  141,  150,  141,  139,    0,    0,  128,  122,  126,
436        0,    0,  109,   91,   79,    0,    0,    0,  516,  156,
437      161,   65,  166,  171,  176
438    } ;
439
440static yyconst short int yy_def[476] =
441    {   0,
442      469,    1,  469,  469,  469,  469,  470,  471,  472,  473,
443      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
444      473,  473,  473,  473,  473,  473,  473,  469,  469,  469,
445      470,  469,  471,  472,  469,  473,  473,  473,  473,  473,
446      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
447      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
448      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
449      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
450      473,  473,  473,  469,  470,  473,  473,  473,  473,  473,
451      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
452
453      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
454      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
455      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
456      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
457      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
458      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
459      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
460      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
461      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
462      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
463
464      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
465      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
466      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
467      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
468      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
469      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
470      473,  473,  473,  473,  473,  473,  473,  473,  469,  474,
471      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
472      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
473      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
474
475      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
476      473,  473,  473,  473,  473,  473,  473,  473,  475,  474,
477      475,  474,  473,  473,  473,  473,  473,  473,  473,  473,
478      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
479      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
480      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
481      473,  473,  473,  475,  473,  473,  473,  473,  473,  473,
482      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
483      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
484      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
485
486      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
487      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
488      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
489      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
490      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
491      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
492      473,  473,  473,  473,  473,  473,  473,  473,    0,  469,
493      469,  469,  469,  469,  469
494    } ;
495
496static yyconst short int yy_nxt[552] =
497    {   0,
498        4,    5,    6,    5,    7,    8,    4,    9,    9,   10,
499       11,   12,   13,   14,   15,   16,   17,   18,   19,   19,
500       20,   21,   22,   19,   23,   24,   25,   19,   26,   27,
501       19,   19,   19,   28,   29,   30,   37,   30,   50,   41,
502       52,   55,   51,   42,   81,   38,   43,   56,   82,   63,
503       53,   39,   83,   40,   44,   95,   67,   64,   54,   96,
504       59,   45,   60,   65,  103,   46,   68,   66,   47,   34,
505       61,   62,   48,   49,   70,   73,   71,   74,   76,   72,
506       77,  104,   30,   78,   30,   84,   90,  108,   85,   91,
507       98,   99,  111,   75,   79,  113,  123,  109,  126,  129,
508
509      124,  131,  132,  114,  139,  468,  112,   84,  127,  130,
510       85,  205,  225,  467,  206,  241,  269,  269,  242,  270,
511      140,  226,  243,  295,  227,  228,  141,  229,  207,  273,
512      304,  466,  274,  269,  269,  305,  319,  465,  321,  296,
513      321,  322,   36,  321,  321,  464,  321,  322,   36,  321,
514      321,  463,  321,  322,   36,  321,   31,   31,  462,   31,
515       31,   33,   33,  461,   33,   33,   36,  460,  459,   36,
516       36,  320,  320,  458,  320,  320,  321,  321,  457,  456,
517      321,  455,  454,  453,  452,  451,  450,  449,  448,  447,
518      446,  445,  444,  443,  442,  441,  440,  439,  438,  437,
519
520      436,  435,  434,  433,  432,  431,  430,  429,  428,  427,
521      426,  425,  424,  423,  422,  421,  420,  419,  418,  417,
522      416,  415,  414,  413,  412,  411,  410,  409,  408,  407,
523      406,  405,  404,  403,  402,  401,  400,  399,  398,  364,
524      397,  396,  395,  394,  393,  392,  391,  390,  389,  388,
525      387,  386,  385,  384,  383,  382,  381,  380,  379,  378,
526      377,  376,  375,  374,  373,  372,  371,  370,  369,  368,
527      367,  366,  365,  364,  364,  363,  362,  361,  360,  359,
528      358,  357,  356,  355,  354,  353,  352,  351,  350,  349,
529      348,  347,  346,  345,  344,  343,  342,  341,  340,  339,
530
531      338,  337,  336,  335,  334,  333,  332,  331,  330,  329,
532      328,  327,  326,  325,  324,  323,  318,  317,  316,  315,
533      314,  313,  312,  311,  310,  309,  308,  307,  306,  303,
534      302,  301,  300,  299,  298,  297,  294,  293,  292,  291,
535      290,  289,  288,  287,  286,  285,  284,  283,  282,  281,
536      280,  279,  278,  277,  276,  275,  272,  271,  268,  267,
537      266,  265,  264,  263,  262,  261,  260,  259,  258,  257,
538      256,  255,  254,  253,  252,  251,  250,  249,  248,  247,
539      246,  245,  244,  240,  239,  238,  237,  236,  235,  234,
540      233,  232,  231,  230,  224,  223,  222,  221,  220,  219,
541
542      218,  217,  216,  215,  214,  213,  212,  211,  210,  209,
543      208,  204,  203,  202,  201,  200,  199,  198,  197,  196,
544      195,  194,  193,  192,  191,  190,  189,  188,  187,  186,
545      185,  184,  183,  182,  181,  180,  179,  178,  177,  176,
546      175,  174,  173,  172,  171,  170,  169,  168,  167,  166,
547      165,  164,  163,  162,  161,  160,  159,  158,  157,  156,
548      155,  154,  153,  152,  151,  150,  149,  148,  147,  146,
549       32,  145,  144,  143,  142,  138,  137,  136,  135,  134,
550      133,  128,  125,  122,  121,  120,  119,  118,  117,  116,
551      115,  110,  107,  106,  105,  102,  101,  100,   97,   94,
552
553       93,   92,   89,   88,   87,   86,   35,   32,   80,   69,
554       58,   57,   35,   32,  469,    3,  469,  469,  469,  469,
555      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
556      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
557      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
558      469
559    } ;
560
561static yyconst short int yy_chk[552] =
562    {   0,
563        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
564        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
565        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
566        1,    1,    1,    1,    1,    5,   10,    5,   13,   11,
567       14,   15,   13,   11,   27,   10,   11,   15,   27,   20,
568       14,   10,   27,   10,   12,   45,   21,   20,   14,   45,
569       18,   12,   18,   20,   51,   12,   21,   20,   12,  472,
570       18,   18,   12,   12,   23,   24,   23,   24,   25,   23,
571       25,   51,   30,   25,   30,   32,   41,   55,   32,   41,
572       47,   47,   57,   24,   25,   58,   67,   55,   69,   71,
573
574       67,   72,   72,   58,   79,  465,   57,   84,   69,   71,
575       84,  148,  166,  464,  148,  181,  211,  211,  181,  211,
576       79,  166,  181,  241,  166,  166,   79,  166,  148,  214,
577      250,  463,  214,  269,  269,  250,  269,  460,  270,  241,
578      270,  270,  270,  270,  320,  459,  320,  320,  320,  320,
579      322,  458,  322,  322,  322,  322,  470,  470,  455,  470,
580      470,  471,  471,  454,  471,  471,  473,  453,  452,  473,
581      473,  474,  474,  446,  474,  474,  475,  475,  445,  444,
582      475,  441,  439,  438,  437,  436,  435,  434,  432,  431,
583      429,  428,  427,  425,  424,  423,  422,  421,  420,  419,
584
585      418,  416,  415,  414,  413,  410,  409,  408,  407,  405,
586      404,  403,  402,  401,  400,  399,  398,  397,  396,  395,
587      394,  393,  392,  391,  390,  389,  388,  387,  386,  383,
588      381,  380,  379,  375,  373,  372,  370,  368,  365,  364,
589      363,  362,  361,  360,  358,  357,  356,  355,  354,  353,
590      352,  350,  348,  347,  346,  345,  344,  343,  342,  340,
591      339,  338,  337,  336,  335,  334,  332,  331,  330,  329,
592      327,  325,  324,  321,  319,  318,  317,  316,  315,  314,
593      313,  312,  311,  309,  308,  306,  305,  304,  303,  302,
594      301,  300,  299,  298,  296,  295,  294,  293,  292,  291,
595
596      289,  287,  286,  285,  283,  282,  281,  280,  279,  278,
597      276,  275,  274,  273,  272,  271,  267,  266,  265,  264,
598      263,  262,  260,  258,  257,  255,  254,  252,  251,  249,
599      248,  246,  245,  244,  243,  242,  239,  238,  237,  236,
600      235,  232,  231,  229,  228,  227,  226,  225,  224,  223,
601      222,  221,  220,  219,  217,  216,  213,  212,  210,  207,
602      206,  205,  203,  202,  201,  200,  199,  198,  197,  196,
603      195,  194,  193,  192,  191,  190,  189,  187,  186,  185,
604      184,  183,  182,  180,  179,  178,  177,  176,  175,  174,
605      171,  170,  169,  167,  165,  164,  163,  162,  161,  160,
606
607      159,  158,  157,  156,  155,  154,  153,  152,  151,  150,
608      149,  147,  146,  145,  144,  143,  142,  141,  140,  139,
609      138,  137,  136,  135,  134,  133,  132,  131,  130,  129,
610      128,  126,  125,  124,  123,  122,  121,  120,  119,  118,
611      117,  116,  115,  114,  113,  112,  111,  110,  109,  108,
612      107,  105,  104,  103,  102,  101,  100,   99,   98,   97,
613       96,   95,   94,   93,   92,   91,   90,   89,   88,   86,
614       85,   83,   82,   81,   80,   78,   77,   76,   75,   74,
615       73,   70,   68,   66,   65,   64,   63,   62,   61,   60,
616       59,   56,   54,   53,   52,   50,   49,   48,   46,   44,
617
618       43,   42,   40,   39,   38,   37,   34,   31,   26,   22,
619       17,   16,    9,    7,    3,  469,  469,  469,  469,  469,
620      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
621      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
622      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
623      469
624    } ;
625
626static yy_state_type yy_last_accepting_state;
627static char *yy_last_accepting_cpos;
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
636char *yytext;
637#line 1 "rclex.l"
638#define INITIAL 0
639#line 2 "rclex.l"
640/* Copyright 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
641   Written by Ian Lance Taylor, Cygnus Support.
642
643   This file is part of GNU Binutils.
644
645   This program is free software; you can redistribute it and/or modify
646   it under the terms of the GNU General Public License as published by
647   the Free Software Foundation; either version 2 of the License, or
648   (at your option) any later version.
649
650   This program is distributed in the hope that it will be useful,
651   but WITHOUT ANY WARRANTY; without even the implied warranty of
652   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
653   GNU General Public License for more details.
654
655   You should have received a copy of the GNU General Public License
656   along with this program; if not, write to the Free Software
657   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
658   02111-1307, USA.  */
659
660/* This is a lex input file which generates a lexer used by the
661   Windows rc file parser.  It basically just recognized a bunch of
662   keywords.  */
663
664#include "bfd.h"
665#include "bucomm.h"
666#include "libiberty.h"
667#include "safe-ctype.h"
668#include "windres.h"
669#include "rcparse.h"
670
671#include <assert.h>
672
673/* Whether we are in rcdata mode, in which we returns the lengths of
674   strings.  */
675
676static int rcdata_mode;
677
678/* Whether we are supressing lines from cpp (including windows.h or
679   headers from your C sources may bring in externs and typedefs).
680   When active, we return IGNORED_TOKEN, which lets us ignore these
681   outside of resource constructs.  Thus, it isn't required to protect
682   all the non-preprocessor lines in your header files with #ifdef
683   RC_INVOKED.  It also means your RC file can't include other RC
684   files if they're named "*.h".  Sorry.  Name them *.rch or whatever.  */
685
686static int suppress_cpp_data;
687
688#define MAYBE_RETURN(x) return suppress_cpp_data ? IGNORED_TOKEN : (x)
689
690/* The first filename we detect in the cpp output.  We use this to
691   tell included files from the original file.  */
692
693static char *initial_fn;
694
695/* List of allocated strings.  */
696
697struct alloc_string
698{
699  struct alloc_string *next;
700  char *s;
701};
702
703static struct alloc_string *strings;
704
705/* Local functions.  */
706
707static void cpp_line PARAMS ((const char *));
708static char *handle_quotes PARAMS ((const char *, unsigned long *));
709static char *get_string PARAMS ((int));
710
711#line 712 "lex.yy.c"
712
713/* Macros after this point can all be overridden by user definitions in
714 * section 1.
715 */
716
717#ifndef YY_SKIP_YYWRAP
718#ifdef __cplusplus
719extern "C" int yywrap YY_PROTO(( void ));
720#else
721extern int yywrap YY_PROTO(( void ));
722#endif
723#endif
724
725#ifndef YY_NO_UNPUT
726static void yyunput YY_PROTO(( int c, char *buf_ptr ));
727#endif
728
729#ifndef yytext_ptr
730static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
731#endif
732
733#ifdef YY_NEED_STRLEN
734static int yy_flex_strlen YY_PROTO(( yyconst char * ));
735#endif
736
737#ifndef YY_NO_INPUT
738#ifdef __cplusplus
739static int yyinput YY_PROTO(( void ));
740#else
741static int input YY_PROTO(( void ));
742#endif
743#endif
744
745#if YY_STACK_USED
746static int yy_start_stack_ptr = 0;
747static int yy_start_stack_depth = 0;
748static int *yy_start_stack = 0;
749#ifndef YY_NO_PUSH_STATE
750static void yy_push_state YY_PROTO(( int new_state ));
751#endif
752#ifndef YY_NO_POP_STATE
753static void yy_pop_state YY_PROTO(( void ));
754#endif
755#ifndef YY_NO_TOP_STATE
756static int yy_top_state YY_PROTO(( void ));
757#endif
758
759#else
760#define YY_NO_PUSH_STATE 1
761#define YY_NO_POP_STATE 1
762#define YY_NO_TOP_STATE 1
763#endif
764
765#ifdef YY_MALLOC_DECL
766YY_MALLOC_DECL
767#else
768#if __STDC__
769#ifndef __cplusplus
770#include <stdlib.h>
771#endif
772#else
773/* Just try to get by without declaring the routines.  This will fail
774 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
775 * or sizeof(void*) != sizeof(int).
776 */
777#endif
778#endif
779
780/* Amount of stuff to slurp up with each read. */
781#ifndef YY_READ_BUF_SIZE
782#define YY_READ_BUF_SIZE 8192
783#endif
784
785/* Copy whatever the last rule matched to the standard output. */
786
787#ifndef ECHO
788/* This used to be an fputs(), but since the string might contain NUL's,
789 * we now use fwrite().
790 */
791#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
792#endif
793
794/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
795 * is returned in "result".
796 */
797#ifndef YY_INPUT
798#define YY_INPUT(buf,result,max_size) \
799	if ( yy_current_buffer->yy_is_interactive ) \
800		{ \
801		int c = '*', n; \
802		for ( n = 0; n < max_size && \
803			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
804			buf[n] = (char) c; \
805		if ( c == '\n' ) \
806			buf[n++] = (char) c; \
807		if ( c == EOF && ferror( yyin ) ) \
808			YY_FATAL_ERROR( "input in flex scanner failed" ); \
809		result = n; \
810		} \
811	else \
812		{ \
813		errno=0; \
814		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
815			{ \
816			if( errno != EINTR) \
817				{ \
818				YY_FATAL_ERROR( "input in flex scanner failed" ); \
819				break; \
820				} \
821			errno=0; \
822			clearerr(yyin); \
823			} \
824		}
825#endif
826
827/* No semi-colon after return; correct usage is to write "yyterminate();" -
828 * we don't want an extra ';' after the "return" because that will cause
829 * some compilers to complain about unreachable statements.
830 */
831#ifndef yyterminate
832#define yyterminate() return YY_NULL
833#endif
834
835/* Number of entries by which start-condition stack grows. */
836#ifndef YY_START_STACK_INCR
837#define YY_START_STACK_INCR 25
838#endif
839
840/* Report a fatal error. */
841#ifndef YY_FATAL_ERROR
842#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
843#endif
844
845/* Default declaration of generated scanner - a define so the user can
846 * easily add parameters.
847 */
848#ifndef YY_DECL
849#define YY_DECL int yylex YY_PROTO(( void ))
850#endif
851
852/* Code executed at the beginning of each rule, after yytext and yyleng
853 * have been set up.
854 */
855#ifndef YY_USER_ACTION
856#define YY_USER_ACTION
857#endif
858
859/* Code executed at the end of each rule. */
860#ifndef YY_BREAK
861#define YY_BREAK break;
862#endif
863
864#define YY_RULE_SETUP \
865	YY_USER_ACTION
866
867YY_DECL
868	{
869	register yy_state_type yy_current_state;
870	register char *yy_cp, *yy_bp;
871	register int yy_act;
872
873#line 75 "rclex.l"
874
875
876#line 877 "lex.yy.c"
877
878	if ( yy_init )
879		{
880		yy_init = 0;
881
882#ifdef YY_USER_INIT
883		YY_USER_INIT;
884#endif
885
886		if ( ! yy_start )
887			yy_start = 1;	/* first start state */
888
889		if ( ! yyin )
890			yyin = stdin;
891
892		if ( ! yyout )
893			yyout = stdout;
894
895		if ( ! yy_current_buffer )
896			yy_current_buffer =
897				yy_create_buffer( yyin, YY_BUF_SIZE );
898
899		yy_load_buffer_state();
900		}
901
902	while ( 1 )		/* loops until end-of-file is reached */
903		{
904		yy_cp = yy_c_buf_p;
905
906		/* Support of yytext. */
907		*yy_cp = yy_hold_char;
908
909		/* yy_bp points to the position in yy_ch_buf of the start of
910		 * the current run.
911		 */
912		yy_bp = yy_cp;
913
914		yy_current_state = yy_start;
915yy_match:
916		do
917			{
918			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
919			if ( yy_accept[yy_current_state] )
920				{
921				yy_last_accepting_state = yy_current_state;
922				yy_last_accepting_cpos = yy_cp;
923				}
924			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
925				{
926				yy_current_state = (int) yy_def[yy_current_state];
927				if ( yy_current_state >= 470 )
928					yy_c = yy_meta[(unsigned int) yy_c];
929				}
930			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
931			++yy_cp;
932			}
933		while ( yy_base[yy_current_state] != 516 );
934
935yy_find_action:
936		yy_act = yy_accept[yy_current_state];
937		if ( yy_act == 0 )
938			{ /* have to back up */
939			yy_cp = yy_last_accepting_cpos;
940			yy_current_state = yy_last_accepting_state;
941			yy_act = yy_accept[yy_current_state];
942			}
943
944		YY_DO_BEFORE_ACTION;
945
946
947do_action:	/* This label is used only to access EOF actions. */
948
949
950		switch ( yy_act )
951	{ /* beginning of action switch */
952			case 0: /* must back up */
953			/* undo the effects of YY_DO_BEFORE_ACTION */
954			*yy_cp = yy_hold_char;
955			yy_cp = yy_last_accepting_cpos;
956			yy_current_state = yy_last_accepting_state;
957			goto yy_find_action;
958
959case 1:
960YY_RULE_SETUP
961#line 77 "rclex.l"
962{ MAYBE_RETURN (BEG); }
963	YY_BREAK
964case 2:
965YY_RULE_SETUP
966#line 78 "rclex.l"
967{ MAYBE_RETURN (BEG); }
968	YY_BREAK
969case 3:
970YY_RULE_SETUP
971#line 79 "rclex.l"
972{ MAYBE_RETURN (END); }
973	YY_BREAK
974case 4:
975YY_RULE_SETUP
976#line 80 "rclex.l"
977{ MAYBE_RETURN (END); }
978	YY_BREAK
979case 5:
980YY_RULE_SETUP
981#line 81 "rclex.l"
982{ MAYBE_RETURN (ACCELERATORS); }
983	YY_BREAK
984case 6:
985YY_RULE_SETUP
986#line 82 "rclex.l"
987{ MAYBE_RETURN (VIRTKEY); }
988	YY_BREAK
989case 7:
990YY_RULE_SETUP
991#line 83 "rclex.l"
992{ MAYBE_RETURN (ASCII); }
993	YY_BREAK
994case 8:
995YY_RULE_SETUP
996#line 84 "rclex.l"
997{ MAYBE_RETURN (NOINVERT); }
998	YY_BREAK
999case 9:
1000YY_RULE_SETUP
1001#line 85 "rclex.l"
1002{ MAYBE_RETURN (SHIFT); }
1003	YY_BREAK
1004case 10:
1005YY_RULE_SETUP
1006#line 86 "rclex.l"
1007{ MAYBE_RETURN (CONTROL); }
1008	YY_BREAK
1009case 11:
1010YY_RULE_SETUP
1011#line 87 "rclex.l"
1012{ MAYBE_RETURN (ALT); }
1013	YY_BREAK
1014case 12:
1015YY_RULE_SETUP
1016#line 88 "rclex.l"
1017{ MAYBE_RETURN (BITMAP); }
1018	YY_BREAK
1019case 13:
1020YY_RULE_SETUP
1021#line 89 "rclex.l"
1022{ MAYBE_RETURN (CURSOR); }
1023	YY_BREAK
1024case 14:
1025YY_RULE_SETUP
1026#line 90 "rclex.l"
1027{ MAYBE_RETURN (DIALOG); }
1028	YY_BREAK
1029case 15:
1030YY_RULE_SETUP
1031#line 91 "rclex.l"
1032{ MAYBE_RETURN (DIALOGEX); }
1033	YY_BREAK
1034case 16:
1035YY_RULE_SETUP
1036#line 92 "rclex.l"
1037{ MAYBE_RETURN (EXSTYLE); }
1038	YY_BREAK
1039case 17:
1040YY_RULE_SETUP
1041#line 93 "rclex.l"
1042{ MAYBE_RETURN (CAPTION); }
1043	YY_BREAK
1044case 18:
1045YY_RULE_SETUP
1046#line 94 "rclex.l"
1047{ MAYBE_RETURN (CLASS); }
1048	YY_BREAK
1049case 19:
1050YY_RULE_SETUP
1051#line 95 "rclex.l"
1052{ MAYBE_RETURN (STYLE); }
1053	YY_BREAK
1054case 20:
1055YY_RULE_SETUP
1056#line 96 "rclex.l"
1057{ MAYBE_RETURN (AUTO3STATE); }
1058	YY_BREAK
1059case 21:
1060YY_RULE_SETUP
1061#line 97 "rclex.l"
1062{ MAYBE_RETURN (AUTOCHECKBOX); }
1063	YY_BREAK
1064case 22:
1065YY_RULE_SETUP
1066#line 98 "rclex.l"
1067{ MAYBE_RETURN (AUTORADIOBUTTON); }
1068	YY_BREAK
1069case 23:
1070YY_RULE_SETUP
1071#line 99 "rclex.l"
1072{ MAYBE_RETURN (CHECKBOX); }
1073	YY_BREAK
1074case 24:
1075YY_RULE_SETUP
1076#line 100 "rclex.l"
1077{ MAYBE_RETURN (COMBOBOX); }
1078	YY_BREAK
1079case 25:
1080YY_RULE_SETUP
1081#line 101 "rclex.l"
1082{ MAYBE_RETURN (CTEXT); }
1083	YY_BREAK
1084case 26:
1085YY_RULE_SETUP
1086#line 102 "rclex.l"
1087{ MAYBE_RETURN (DEFPUSHBUTTON); }
1088	YY_BREAK
1089case 27:
1090YY_RULE_SETUP
1091#line 103 "rclex.l"
1092{ MAYBE_RETURN (EDITTEXT); }
1093	YY_BREAK
1094case 28:
1095YY_RULE_SETUP
1096#line 104 "rclex.l"
1097{ MAYBE_RETURN (GROUPBOX); }
1098	YY_BREAK
1099case 29:
1100YY_RULE_SETUP
1101#line 105 "rclex.l"
1102{ MAYBE_RETURN (LISTBOX); }
1103	YY_BREAK
1104case 30:
1105YY_RULE_SETUP
1106#line 106 "rclex.l"
1107{ MAYBE_RETURN (LTEXT); }
1108	YY_BREAK
1109case 31:
1110YY_RULE_SETUP
1111#line 107 "rclex.l"
1112{ MAYBE_RETURN (PUSHBOX); }
1113	YY_BREAK
1114case 32:
1115YY_RULE_SETUP
1116#line 108 "rclex.l"
1117{ MAYBE_RETURN (PUSHBUTTON); }
1118	YY_BREAK
1119case 33:
1120YY_RULE_SETUP
1121#line 109 "rclex.l"
1122{ MAYBE_RETURN (RADIOBUTTON); }
1123	YY_BREAK
1124case 34:
1125YY_RULE_SETUP
1126#line 110 "rclex.l"
1127{ MAYBE_RETURN (RTEXT); }
1128	YY_BREAK
1129case 35:
1130YY_RULE_SETUP
1131#line 111 "rclex.l"
1132{ MAYBE_RETURN (SCROLLBAR); }
1133	YY_BREAK
1134case 36:
1135YY_RULE_SETUP
1136#line 112 "rclex.l"
1137{ MAYBE_RETURN (STATE3); }
1138	YY_BREAK
1139case 37:
1140YY_RULE_SETUP
1141#line 113 "rclex.l"
1142{ MAYBE_RETURN (USERBUTTON); }
1143	YY_BREAK
1144case 38:
1145YY_RULE_SETUP
1146#line 114 "rclex.l"
1147{ MAYBE_RETURN (BEDIT); }
1148	YY_BREAK
1149case 39:
1150YY_RULE_SETUP
1151#line 115 "rclex.l"
1152{ MAYBE_RETURN (HEDIT); }
1153	YY_BREAK
1154case 40:
1155YY_RULE_SETUP
1156#line 116 "rclex.l"
1157{ MAYBE_RETURN (IEDIT); }
1158	YY_BREAK
1159case 41:
1160YY_RULE_SETUP
1161#line 117 "rclex.l"
1162{ MAYBE_RETURN (FONT); }
1163	YY_BREAK
1164case 42:
1165YY_RULE_SETUP
1166#line 118 "rclex.l"
1167{ MAYBE_RETURN (ICON); }
1168	YY_BREAK
1169case 43:
1170YY_RULE_SETUP
1171#line 119 "rclex.l"
1172{ MAYBE_RETURN (LANGUAGE); }
1173	YY_BREAK
1174case 44:
1175YY_RULE_SETUP
1176#line 120 "rclex.l"
1177{ MAYBE_RETURN (CHARACTERISTICS); }
1178	YY_BREAK
1179case 45:
1180YY_RULE_SETUP
1181#line 121 "rclex.l"
1182{ MAYBE_RETURN (VERSIONK); }
1183	YY_BREAK
1184case 46:
1185YY_RULE_SETUP
1186#line 122 "rclex.l"
1187{ MAYBE_RETURN (MENU); }
1188	YY_BREAK
1189case 47:
1190YY_RULE_SETUP
1191#line 123 "rclex.l"
1192{ MAYBE_RETURN (MENUEX); }
1193	YY_BREAK
1194case 48:
1195YY_RULE_SETUP
1196#line 124 "rclex.l"
1197{ MAYBE_RETURN (MENUITEM); }
1198	YY_BREAK
1199case 49:
1200YY_RULE_SETUP
1201#line 125 "rclex.l"
1202{ MAYBE_RETURN (SEPARATOR); }
1203	YY_BREAK
1204case 50:
1205YY_RULE_SETUP
1206#line 126 "rclex.l"
1207{ MAYBE_RETURN (POPUP); }
1208	YY_BREAK
1209case 51:
1210YY_RULE_SETUP
1211#line 127 "rclex.l"
1212{ MAYBE_RETURN (CHECKED); }
1213	YY_BREAK
1214case 52:
1215YY_RULE_SETUP
1216#line 128 "rclex.l"
1217{ MAYBE_RETURN (GRAYED); }
1218	YY_BREAK
1219case 53:
1220YY_RULE_SETUP
1221#line 129 "rclex.l"
1222{ MAYBE_RETURN (HELP); }
1223	YY_BREAK
1224case 54:
1225YY_RULE_SETUP
1226#line 130 "rclex.l"
1227{ MAYBE_RETURN (INACTIVE); }
1228	YY_BREAK
1229case 55:
1230YY_RULE_SETUP
1231#line 131 "rclex.l"
1232{ MAYBE_RETURN (MENUBARBREAK); }
1233	YY_BREAK
1234case 56:
1235YY_RULE_SETUP
1236#line 132 "rclex.l"
1237{ MAYBE_RETURN (MENUBREAK); }
1238	YY_BREAK
1239case 57:
1240YY_RULE_SETUP
1241#line 133 "rclex.l"
1242{ MAYBE_RETURN (MESSAGETABLE); }
1243	YY_BREAK
1244case 58:
1245YY_RULE_SETUP
1246#line 134 "rclex.l"
1247{ MAYBE_RETURN (RCDATA); }
1248	YY_BREAK
1249case 59:
1250YY_RULE_SETUP
1251#line 135 "rclex.l"
1252{ MAYBE_RETURN (STRINGTABLE); }
1253	YY_BREAK
1254case 60:
1255YY_RULE_SETUP
1256#line 136 "rclex.l"
1257{ MAYBE_RETURN (VERSIONINFO); }
1258	YY_BREAK
1259case 61:
1260YY_RULE_SETUP
1261#line 137 "rclex.l"
1262{ MAYBE_RETURN (FILEVERSION); }
1263	YY_BREAK
1264case 62:
1265YY_RULE_SETUP
1266#line 138 "rclex.l"
1267{ MAYBE_RETURN (PRODUCTVERSION); }
1268	YY_BREAK
1269case 63:
1270YY_RULE_SETUP
1271#line 139 "rclex.l"
1272{ MAYBE_RETURN (FILEFLAGSMASK); }
1273	YY_BREAK
1274case 64:
1275YY_RULE_SETUP
1276#line 140 "rclex.l"
1277{ MAYBE_RETURN (FILEFLAGS); }
1278	YY_BREAK
1279case 65:
1280YY_RULE_SETUP
1281#line 141 "rclex.l"
1282{ MAYBE_RETURN (FILEOS); }
1283	YY_BREAK
1284case 66:
1285YY_RULE_SETUP
1286#line 142 "rclex.l"
1287{ MAYBE_RETURN (FILETYPE); }
1288	YY_BREAK
1289case 67:
1290YY_RULE_SETUP
1291#line 143 "rclex.l"
1292{ MAYBE_RETURN (FILESUBTYPE); }
1293	YY_BREAK
1294case 68:
1295YY_RULE_SETUP
1296#line 144 "rclex.l"
1297{ MAYBE_RETURN (VALUE); }
1298	YY_BREAK
1299case 69:
1300YY_RULE_SETUP
1301#line 145 "rclex.l"
1302{ MAYBE_RETURN (MOVEABLE); }
1303	YY_BREAK
1304case 70:
1305YY_RULE_SETUP
1306#line 146 "rclex.l"
1307{ MAYBE_RETURN (FIXED); }
1308	YY_BREAK
1309case 71:
1310YY_RULE_SETUP
1311#line 147 "rclex.l"
1312{ MAYBE_RETURN (PURE); }
1313	YY_BREAK
1314case 72:
1315YY_RULE_SETUP
1316#line 148 "rclex.l"
1317{ MAYBE_RETURN (IMPURE); }
1318	YY_BREAK
1319case 73:
1320YY_RULE_SETUP
1321#line 149 "rclex.l"
1322{ MAYBE_RETURN (PRELOAD); }
1323	YY_BREAK
1324case 74:
1325YY_RULE_SETUP
1326#line 150 "rclex.l"
1327{ MAYBE_RETURN (LOADONCALL); }
1328	YY_BREAK
1329case 75:
1330YY_RULE_SETUP
1331#line 151 "rclex.l"
1332{ MAYBE_RETURN (DISCARDABLE); }
1333	YY_BREAK
1334case 76:
1335YY_RULE_SETUP
1336#line 152 "rclex.l"
1337{ MAYBE_RETURN (NOT); }
1338	YY_BREAK
1339case 77:
1340YY_RULE_SETUP
1341#line 154 "rclex.l"
1342{
1343			  char *s, *send;
1344
1345			  /* This is a hack to let us parse version
1346                             information easily.  */
1347
1348			  s = strchr (yytext, '"');
1349			  ++s;
1350			  send = strchr (s, '"');
1351			  if (strncmp (s, "StringFileInfo",
1352				       sizeof "StringFileInfo" - 1) == 0
1353			      && s + sizeof "StringFileInfo" - 1 == send)
1354			    MAYBE_RETURN (BLOCKSTRINGFILEINFO);
1355			  else if (strncmp (s, "VarFileInfo",
1356					    sizeof "VarFileInfo" - 1) == 0
1357				   && s + sizeof "VarFileInfo" - 1 == send)
1358			    MAYBE_RETURN (BLOCKVARFILEINFO);
1359			  else
1360			    {
1361			      char *r;
1362
1363			      r = get_string (send - s + 1);
1364			      strncpy (r, s, send - s);
1365			      r[send - s] = '\0';
1366			      yylval.s = r;
1367			      MAYBE_RETURN (BLOCK);
1368			    }
1369			}
1370	YY_BREAK
1371case 78:
1372YY_RULE_SETUP
1373#line 183 "rclex.l"
1374{
1375			  cpp_line (yytext);
1376			}
1377	YY_BREAK
1378case 79:
1379YY_RULE_SETUP
1380#line 187 "rclex.l"
1381{
1382			  yylval.i.val = strtoul (yytext, 0, 0);
1383			  yylval.i.dword = 1;
1384			  MAYBE_RETURN (NUMBER);
1385			}
1386	YY_BREAK
1387case 80:
1388YY_RULE_SETUP
1389#line 193 "rclex.l"
1390{
1391			  yylval.i.val = strtoul (yytext, 0, 0);
1392			  yylval.i.dword = 0;
1393			  MAYBE_RETURN (NUMBER);
1394			}
1395	YY_BREAK
1396case 81:
1397YY_RULE_SETUP
1398#line 199 "rclex.l"
1399{
1400			  char *s;
1401			  unsigned long length;
1402
1403			  s = handle_quotes (yytext, &length);
1404			  if (! rcdata_mode)
1405			    {
1406			      yylval.s = s;
1407			      MAYBE_RETURN (QUOTEDSTRING);
1408			    }
1409			  else
1410			    {
1411			      yylval.ss.length = length;
1412			      yylval.ss.s = s;
1413			      MAYBE_RETURN (SIZEDSTRING);
1414			    }
1415			}
1416	YY_BREAK
1417case 82:
1418YY_RULE_SETUP
1419#line 217 "rclex.l"
1420{
1421			  char *s;
1422
1423			  /* I rejected comma in a string in order to
1424			     handle VIRTKEY, CONTROL in an accelerator
1425			     resource.  This means that an unquoted
1426			     file name can not contain a comma.  I
1427			     don't know what rc permits.  */
1428
1429			  s = get_string (strlen (yytext) + 1);
1430			  strcpy (s, yytext);
1431			  yylval.s = s;
1432			  MAYBE_RETURN (STRING);
1433			}
1434	YY_BREAK
1435case 83:
1436YY_RULE_SETUP
1437#line 232 "rclex.l"
1438{ ++rc_lineno; }
1439	YY_BREAK
1440case 84:
1441YY_RULE_SETUP
1442#line 233 "rclex.l"
1443{ /* ignore whitespace */ }
1444	YY_BREAK
1445case 85:
1446YY_RULE_SETUP
1447#line 234 "rclex.l"
1448{ MAYBE_RETURN (*yytext); }
1449	YY_BREAK
1450case 86:
1451YY_RULE_SETUP
1452#line 236 "rclex.l"
1453ECHO;
1454	YY_BREAK
1455#line 1456 "lex.yy.c"
1456case YY_STATE_EOF(INITIAL):
1457	yyterminate();
1458
1459	case YY_END_OF_BUFFER:
1460		{
1461		/* Amount of text matched not including the EOB char. */
1462		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1463
1464		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1465		*yy_cp = yy_hold_char;
1466		YY_RESTORE_YY_MORE_OFFSET
1467
1468		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1469			{
1470			/* We're scanning a new file or input source.  It's
1471			 * possible that this happened because the user
1472			 * just pointed yyin at a new source and called
1473			 * yylex().  If so, then we have to assure
1474			 * consistency between yy_current_buffer and our
1475			 * globals.  Here is the right place to do so, because
1476			 * this is the first action (other than possibly a
1477			 * back-up) that will match for the new input source.
1478			 */
1479			yy_n_chars = yy_current_buffer->yy_n_chars;
1480			yy_current_buffer->yy_input_file = yyin;
1481			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1482			}
1483
1484		/* Note that here we test for yy_c_buf_p "<=" to the position
1485		 * of the first EOB in the buffer, since yy_c_buf_p will
1486		 * already have been incremented past the NUL character
1487		 * (since all states make transitions on EOB to the
1488		 * end-of-buffer state).  Contrast this with the test
1489		 * in input().
1490		 */
1491		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1492			{ /* This was really a NUL. */
1493			yy_state_type yy_next_state;
1494
1495			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1496
1497			yy_current_state = yy_get_previous_state();
1498
1499			/* Okay, we're now positioned to make the NUL
1500			 * transition.  We couldn't have
1501			 * yy_get_previous_state() go ahead and do it
1502			 * for us because it doesn't know how to deal
1503			 * with the possibility of jamming (and we don't
1504			 * want to build jamming into it because then it
1505			 * will run more slowly).
1506			 */
1507
1508			yy_next_state = yy_try_NUL_trans( yy_current_state );
1509
1510			yy_bp = yytext_ptr + YY_MORE_ADJ;
1511
1512			if ( yy_next_state )
1513				{
1514				/* Consume the NUL. */
1515				yy_cp = ++yy_c_buf_p;
1516				yy_current_state = yy_next_state;
1517				goto yy_match;
1518				}
1519
1520			else
1521				{
1522				yy_cp = yy_c_buf_p;
1523				goto yy_find_action;
1524				}
1525			}
1526
1527		else switch ( yy_get_next_buffer() )
1528			{
1529			case EOB_ACT_END_OF_FILE:
1530				{
1531				yy_did_buffer_switch_on_eof = 0;
1532
1533				if ( yywrap() )
1534					{
1535					/* Note: because we've taken care in
1536					 * yy_get_next_buffer() to have set up
1537					 * yytext, we can now set up
1538					 * yy_c_buf_p so that if some total
1539					 * hoser (like flex itself) wants to
1540					 * call the scanner after we return the
1541					 * YY_NULL, it'll still work - another
1542					 * YY_NULL will get returned.
1543					 */
1544					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1545
1546					yy_act = YY_STATE_EOF(YY_START);
1547					goto do_action;
1548					}
1549
1550				else
1551					{
1552					if ( ! yy_did_buffer_switch_on_eof )
1553						YY_NEW_FILE;
1554					}
1555				break;
1556				}
1557
1558			case EOB_ACT_CONTINUE_SCAN:
1559				yy_c_buf_p =
1560					yytext_ptr + yy_amount_of_matched_text;
1561
1562				yy_current_state = yy_get_previous_state();
1563
1564				yy_cp = yy_c_buf_p;
1565				yy_bp = yytext_ptr + YY_MORE_ADJ;
1566				goto yy_match;
1567
1568			case EOB_ACT_LAST_MATCH:
1569				yy_c_buf_p =
1570				&yy_current_buffer->yy_ch_buf[yy_n_chars];
1571
1572				yy_current_state = yy_get_previous_state();
1573
1574				yy_cp = yy_c_buf_p;
1575				yy_bp = yytext_ptr + YY_MORE_ADJ;
1576				goto yy_find_action;
1577			}
1578		break;
1579		}
1580
1581	default:
1582		YY_FATAL_ERROR(
1583			"fatal flex scanner internal error--no action found" );
1584	} /* end of action switch */
1585		} /* end of scanning one token */
1586	} /* end of yylex */
1587
1588
1589/* yy_get_next_buffer - try to read in a new buffer
1590 *
1591 * Returns a code representing an action:
1592 *	EOB_ACT_LAST_MATCH -
1593 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1594 *	EOB_ACT_END_OF_FILE - end of file
1595 */
1596
1597static int yy_get_next_buffer()
1598	{
1599	register char *dest = yy_current_buffer->yy_ch_buf;
1600	register char *source = yytext_ptr;
1601	register int number_to_move, i;
1602	int ret_val;
1603
1604	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1605		YY_FATAL_ERROR(
1606		"fatal flex scanner internal error--end of buffer missed" );
1607
1608	if ( yy_current_buffer->yy_fill_buffer == 0 )
1609		{ /* Don't try to fill the buffer, so this is an EOF. */
1610		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1611			{
1612			/* We matched a single character, the EOB, so
1613			 * treat this as a final EOF.
1614			 */
1615			return EOB_ACT_END_OF_FILE;
1616			}
1617
1618		else
1619			{
1620			/* We matched some text prior to the EOB, first
1621			 * process it.
1622			 */
1623			return EOB_ACT_LAST_MATCH;
1624			}
1625		}
1626
1627	/* Try to read more data. */
1628
1629	/* First move last chars to start of buffer. */
1630	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1631
1632	for ( i = 0; i < number_to_move; ++i )
1633		*(dest++) = *(source++);
1634
1635	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1636		/* don't do the read, it's not guaranteed to return an EOF,
1637		 * just force an EOF
1638		 */
1639		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1640
1641	else
1642		{
1643		int num_to_read =
1644			yy_current_buffer->yy_buf_size - number_to_move - 1;
1645
1646		while ( num_to_read <= 0 )
1647			{ /* Not enough room in the buffer - grow it. */
1648#ifdef YY_USES_REJECT
1649			YY_FATAL_ERROR(
1650"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1651#else
1652
1653			/* just a shorter name for the current buffer */
1654			YY_BUFFER_STATE b = yy_current_buffer;
1655
1656			int yy_c_buf_p_offset =
1657				(int) (yy_c_buf_p - b->yy_ch_buf);
1658
1659			if ( b->yy_is_our_buffer )
1660				{
1661				int new_size = b->yy_buf_size * 2;
1662
1663				if ( new_size <= 0 )
1664					b->yy_buf_size += b->yy_buf_size / 8;
1665				else
1666					b->yy_buf_size *= 2;
1667
1668				b->yy_ch_buf = (char *)
1669					/* Include room in for 2 EOB chars. */
1670					yy_flex_realloc( (void *) b->yy_ch_buf,
1671							 b->yy_buf_size + 2 );
1672				}
1673			else
1674				/* Can't grow it, we don't own it. */
1675				b->yy_ch_buf = 0;
1676
1677			if ( ! b->yy_ch_buf )
1678				YY_FATAL_ERROR(
1679				"fatal error - scanner input buffer overflow" );
1680
1681			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1682
1683			num_to_read = yy_current_buffer->yy_buf_size -
1684						number_to_move - 1;
1685#endif
1686			}
1687
1688		if ( num_to_read > YY_READ_BUF_SIZE )
1689			num_to_read = YY_READ_BUF_SIZE;
1690
1691		/* Read in more data. */
1692		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1693			yy_n_chars, num_to_read );
1694
1695		yy_current_buffer->yy_n_chars = yy_n_chars;
1696		}
1697
1698	if ( yy_n_chars == 0 )
1699		{
1700		if ( number_to_move == YY_MORE_ADJ )
1701			{
1702			ret_val = EOB_ACT_END_OF_FILE;
1703			yyrestart( yyin );
1704			}
1705
1706		else
1707			{
1708			ret_val = EOB_ACT_LAST_MATCH;
1709			yy_current_buffer->yy_buffer_status =
1710				YY_BUFFER_EOF_PENDING;
1711			}
1712		}
1713
1714	else
1715		ret_val = EOB_ACT_CONTINUE_SCAN;
1716
1717	yy_n_chars += number_to_move;
1718	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1719	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1720
1721	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1722
1723	return ret_val;
1724	}
1725
1726
1727/* yy_get_previous_state - get the state just before the EOB char was reached */
1728
1729static yy_state_type yy_get_previous_state()
1730	{
1731	register yy_state_type yy_current_state;
1732	register char *yy_cp;
1733
1734	yy_current_state = yy_start;
1735
1736	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1737		{
1738		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1739		if ( yy_accept[yy_current_state] )
1740			{
1741			yy_last_accepting_state = yy_current_state;
1742			yy_last_accepting_cpos = yy_cp;
1743			}
1744		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1745			{
1746			yy_current_state = (int) yy_def[yy_current_state];
1747			if ( yy_current_state >= 470 )
1748				yy_c = yy_meta[(unsigned int) yy_c];
1749			}
1750		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1751		}
1752
1753	return yy_current_state;
1754	}
1755
1756
1757/* yy_try_NUL_trans - try to make a transition on the NUL character
1758 *
1759 * synopsis
1760 *	next_state = yy_try_NUL_trans( current_state );
1761 */
1762
1763#ifdef YY_USE_PROTOS
1764static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1765#else
1766static yy_state_type yy_try_NUL_trans( yy_current_state )
1767yy_state_type yy_current_state;
1768#endif
1769	{
1770	register int yy_is_jam;
1771	register char *yy_cp = yy_c_buf_p;
1772
1773	register YY_CHAR yy_c = 1;
1774	if ( yy_accept[yy_current_state] )
1775		{
1776		yy_last_accepting_state = yy_current_state;
1777		yy_last_accepting_cpos = yy_cp;
1778		}
1779	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1780		{
1781		yy_current_state = (int) yy_def[yy_current_state];
1782		if ( yy_current_state >= 470 )
1783			yy_c = yy_meta[(unsigned int) yy_c];
1784		}
1785	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1786	yy_is_jam = (yy_current_state == 469);
1787
1788	return yy_is_jam ? 0 : yy_current_state;
1789	}
1790
1791
1792#ifndef YY_NO_UNPUT
1793#ifdef YY_USE_PROTOS
1794static void yyunput( int c, register char *yy_bp )
1795#else
1796static void yyunput( c, yy_bp )
1797int c;
1798register char *yy_bp;
1799#endif
1800	{
1801	register char *yy_cp = yy_c_buf_p;
1802
1803	/* undo effects of setting up yytext */
1804	*yy_cp = yy_hold_char;
1805
1806	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1807		{ /* need to shift things up to make room */
1808		/* +2 for EOB chars. */
1809		register int number_to_move = yy_n_chars + 2;
1810		register char *dest = &yy_current_buffer->yy_ch_buf[
1811					yy_current_buffer->yy_buf_size + 2];
1812		register char *source =
1813				&yy_current_buffer->yy_ch_buf[number_to_move];
1814
1815		while ( source > yy_current_buffer->yy_ch_buf )
1816			*--dest = *--source;
1817
1818		yy_cp += (int) (dest - source);
1819		yy_bp += (int) (dest - source);
1820		yy_current_buffer->yy_n_chars =
1821			yy_n_chars = yy_current_buffer->yy_buf_size;
1822
1823		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1824			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1825		}
1826
1827	*--yy_cp = (char) c;
1828
1829
1830	yytext_ptr = yy_bp;
1831	yy_hold_char = *yy_cp;
1832	yy_c_buf_p = yy_cp;
1833	}
1834#endif	/* ifndef YY_NO_UNPUT */
1835
1836
1837#ifdef __cplusplus
1838static int yyinput()
1839#else
1840static int input()
1841#endif
1842	{
1843	int c;
1844
1845	*yy_c_buf_p = yy_hold_char;
1846
1847	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1848		{
1849		/* yy_c_buf_p now points to the character we want to return.
1850		 * If this occurs *before* the EOB characters, then it's a
1851		 * valid NUL; if not, then we've hit the end of the buffer.
1852		 */
1853		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1854			/* This was really a NUL. */
1855			*yy_c_buf_p = '\0';
1856
1857		else
1858			{ /* need more input */
1859			int offset = yy_c_buf_p - yytext_ptr;
1860			++yy_c_buf_p;
1861
1862			switch ( yy_get_next_buffer() )
1863				{
1864				case EOB_ACT_LAST_MATCH:
1865					/* This happens because yy_g_n_b()
1866					 * sees that we've accumulated a
1867					 * token and flags that we need to
1868					 * try matching the token before
1869					 * proceeding.  But for input(),
1870					 * there's no matching to consider.
1871					 * So convert the EOB_ACT_LAST_MATCH
1872					 * to EOB_ACT_END_OF_FILE.
1873					 */
1874
1875					/* Reset buffer status. */
1876					yyrestart( yyin );
1877
1878					/* fall through */
1879
1880				case EOB_ACT_END_OF_FILE:
1881					{
1882					if ( yywrap() )
1883						return EOF;
1884
1885					if ( ! yy_did_buffer_switch_on_eof )
1886						YY_NEW_FILE;
1887#ifdef __cplusplus
1888					return yyinput();
1889#else
1890					return input();
1891#endif
1892					}
1893
1894				case EOB_ACT_CONTINUE_SCAN:
1895					yy_c_buf_p = yytext_ptr + offset;
1896					break;
1897				}
1898			}
1899		}
1900
1901	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
1902	*yy_c_buf_p = '\0';	/* preserve yytext */
1903	yy_hold_char = *++yy_c_buf_p;
1904
1905
1906	return c;
1907	}
1908
1909
1910#ifdef YY_USE_PROTOS
1911void yyrestart( FILE *input_file )
1912#else
1913void yyrestart( input_file )
1914FILE *input_file;
1915#endif
1916	{
1917	if ( ! yy_current_buffer )
1918		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1919
1920	yy_init_buffer( yy_current_buffer, input_file );
1921	yy_load_buffer_state();
1922	}
1923
1924
1925#ifdef YY_USE_PROTOS
1926void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1927#else
1928void yy_switch_to_buffer( new_buffer )
1929YY_BUFFER_STATE new_buffer;
1930#endif
1931	{
1932	if ( yy_current_buffer == new_buffer )
1933		return;
1934
1935	if ( yy_current_buffer )
1936		{
1937		/* Flush out information for old buffer. */
1938		*yy_c_buf_p = yy_hold_char;
1939		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1940		yy_current_buffer->yy_n_chars = yy_n_chars;
1941		}
1942
1943	yy_current_buffer = new_buffer;
1944	yy_load_buffer_state();
1945
1946	/* We don't actually know whether we did this switch during
1947	 * EOF (yywrap()) processing, but the only time this flag
1948	 * is looked at is after yywrap() is called, so it's safe
1949	 * to go ahead and always set it.
1950	 */
1951	yy_did_buffer_switch_on_eof = 1;
1952	}
1953
1954
1955#ifdef YY_USE_PROTOS
1956void yy_load_buffer_state( void )
1957#else
1958void yy_load_buffer_state()
1959#endif
1960	{
1961	yy_n_chars = yy_current_buffer->yy_n_chars;
1962	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1963	yyin = yy_current_buffer->yy_input_file;
1964	yy_hold_char = *yy_c_buf_p;
1965	}
1966
1967
1968#ifdef YY_USE_PROTOS
1969YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1970#else
1971YY_BUFFER_STATE yy_create_buffer( file, size )
1972FILE *file;
1973int size;
1974#endif
1975	{
1976	YY_BUFFER_STATE b;
1977
1978	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1979	if ( ! b )
1980		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1981
1982	b->yy_buf_size = size;
1983
1984	/* yy_ch_buf has to be 2 characters longer than the size given because
1985	 * we need to put in 2 end-of-buffer characters.
1986	 */
1987	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1988	if ( ! b->yy_ch_buf )
1989		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1990
1991	b->yy_is_our_buffer = 1;
1992
1993	yy_init_buffer( b, file );
1994
1995	return b;
1996	}
1997
1998
1999#ifdef YY_USE_PROTOS
2000void yy_delete_buffer( YY_BUFFER_STATE b )
2001#else
2002void yy_delete_buffer( b )
2003YY_BUFFER_STATE b;
2004#endif
2005	{
2006	if ( ! b )
2007		return;
2008
2009	if ( b == yy_current_buffer )
2010		yy_current_buffer = (YY_BUFFER_STATE) 0;
2011
2012	if ( b->yy_is_our_buffer )
2013		yy_flex_free( (void *) b->yy_ch_buf );
2014
2015	yy_flex_free( (void *) b );
2016	}
2017
2018
2019#ifndef _WIN32
2020#include <unistd.h>
2021#else
2022#ifndef YY_ALWAYS_INTERACTIVE
2023#ifndef YY_NEVER_INTERACTIVE
2024extern int isatty YY_PROTO(( int ));
2025#endif
2026#endif
2027#endif
2028
2029#ifdef YY_USE_PROTOS
2030void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2031#else
2032void yy_init_buffer( b, file )
2033YY_BUFFER_STATE b;
2034FILE *file;
2035#endif
2036
2037
2038	{
2039	yy_flush_buffer( b );
2040
2041	b->yy_input_file = file;
2042	b->yy_fill_buffer = 1;
2043
2044#if YY_ALWAYS_INTERACTIVE
2045	b->yy_is_interactive = 1;
2046#else
2047#if YY_NEVER_INTERACTIVE
2048	b->yy_is_interactive = 0;
2049#else
2050	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2051#endif
2052#endif
2053	}
2054
2055
2056#ifdef YY_USE_PROTOS
2057void yy_flush_buffer( YY_BUFFER_STATE b )
2058#else
2059void yy_flush_buffer( b )
2060YY_BUFFER_STATE b;
2061#endif
2062
2063	{
2064	if ( ! b )
2065		return;
2066
2067	b->yy_n_chars = 0;
2068
2069	/* We always need two end-of-buffer characters.  The first causes
2070	 * a transition to the end-of-buffer state.  The second causes
2071	 * a jam in that state.
2072	 */
2073	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2074	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2075
2076	b->yy_buf_pos = &b->yy_ch_buf[0];
2077
2078	b->yy_at_bol = 1;
2079	b->yy_buffer_status = YY_BUFFER_NEW;
2080
2081	if ( b == yy_current_buffer )
2082		yy_load_buffer_state();
2083	}
2084
2085
2086#ifndef YY_NO_SCAN_BUFFER
2087#ifdef YY_USE_PROTOS
2088YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2089#else
2090YY_BUFFER_STATE yy_scan_buffer( base, size )
2091char *base;
2092yy_size_t size;
2093#endif
2094	{
2095	YY_BUFFER_STATE b;
2096
2097	if ( size < 2 ||
2098	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
2099	     base[size-1] != YY_END_OF_BUFFER_CHAR )
2100		/* They forgot to leave room for the EOB's. */
2101		return 0;
2102
2103	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2104	if ( ! b )
2105		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2106
2107	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
2108	b->yy_buf_pos = b->yy_ch_buf = base;
2109	b->yy_is_our_buffer = 0;
2110	b->yy_input_file = 0;
2111	b->yy_n_chars = b->yy_buf_size;
2112	b->yy_is_interactive = 0;
2113	b->yy_at_bol = 1;
2114	b->yy_fill_buffer = 0;
2115	b->yy_buffer_status = YY_BUFFER_NEW;
2116
2117	yy_switch_to_buffer( b );
2118
2119	return b;
2120	}
2121#endif
2122
2123
2124#ifndef YY_NO_SCAN_STRING
2125#ifdef YY_USE_PROTOS
2126YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2127#else
2128YY_BUFFER_STATE yy_scan_string( yy_str )
2129yyconst char *yy_str;
2130#endif
2131	{
2132	int len;
2133	for ( len = 0; yy_str[len]; ++len )
2134		;
2135
2136	return yy_scan_bytes( yy_str, len );
2137	}
2138#endif
2139
2140
2141#ifndef YY_NO_SCAN_BYTES
2142#ifdef YY_USE_PROTOS
2143YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2144#else
2145YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2146yyconst char *bytes;
2147int len;
2148#endif
2149	{
2150	YY_BUFFER_STATE b;
2151	char *buf;
2152	yy_size_t n;
2153	int i;
2154
2155	/* Get memory for full buffer, including space for trailing EOB's. */
2156	n = len + 2;
2157	buf = (char *) yy_flex_alloc( n );
2158	if ( ! buf )
2159		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2160
2161	for ( i = 0; i < len; ++i )
2162		buf[i] = bytes[i];
2163
2164	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2165
2166	b = yy_scan_buffer( buf, n );
2167	if ( ! b )
2168		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2169
2170	/* It's okay to grow etc. this buffer, and we should throw it
2171	 * away when we're done.
2172	 */
2173	b->yy_is_our_buffer = 1;
2174
2175	return b;
2176	}
2177#endif
2178
2179
2180#ifndef YY_NO_PUSH_STATE
2181#ifdef YY_USE_PROTOS
2182static void yy_push_state( int new_state )
2183#else
2184static void yy_push_state( new_state )
2185int new_state;
2186#endif
2187	{
2188	if ( yy_start_stack_ptr >= yy_start_stack_depth )
2189		{
2190		yy_size_t new_size;
2191
2192		yy_start_stack_depth += YY_START_STACK_INCR;
2193		new_size = yy_start_stack_depth * sizeof( int );
2194
2195		if ( ! yy_start_stack )
2196			yy_start_stack = (int *) yy_flex_alloc( new_size );
2197
2198		else
2199			yy_start_stack = (int *) yy_flex_realloc(
2200					(void *) yy_start_stack, new_size );
2201
2202		if ( ! yy_start_stack )
2203			YY_FATAL_ERROR(
2204			"out of memory expanding start-condition stack" );
2205		}
2206
2207	yy_start_stack[yy_start_stack_ptr++] = YY_START;
2208
2209	BEGIN(new_state);
2210	}
2211#endif
2212
2213
2214#ifndef YY_NO_POP_STATE
2215static void yy_pop_state()
2216	{
2217	if ( --yy_start_stack_ptr < 0 )
2218		YY_FATAL_ERROR( "start-condition stack underflow" );
2219
2220	BEGIN(yy_start_stack[yy_start_stack_ptr]);
2221	}
2222#endif
2223
2224
2225#ifndef YY_NO_TOP_STATE
2226static int yy_top_state()
2227	{
2228	return yy_start_stack[yy_start_stack_ptr - 1];
2229	}
2230#endif
2231
2232#ifndef YY_EXIT_FAILURE
2233#define YY_EXIT_FAILURE 2
2234#endif
2235
2236#ifdef YY_USE_PROTOS
2237static void yy_fatal_error( yyconst char msg[] )
2238#else
2239static void yy_fatal_error( msg )
2240char msg[];
2241#endif
2242	{
2243	(void) fprintf( stderr, "%s\n", msg );
2244	exit( YY_EXIT_FAILURE );
2245	}
2246
2247
2248
2249/* Redefine yyless() so it works in section 3 code. */
2250
2251#undef yyless
2252#define yyless(n) \
2253	do \
2254		{ \
2255		/* Undo effects of setting up yytext. */ \
2256		yytext[yyleng] = yy_hold_char; \
2257		yy_c_buf_p = yytext + n; \
2258		yy_hold_char = *yy_c_buf_p; \
2259		*yy_c_buf_p = '\0'; \
2260		yyleng = n; \
2261		} \
2262	while ( 0 )
2263
2264
2265/* Internal utility routines. */
2266
2267#ifndef yytext_ptr
2268#ifdef YY_USE_PROTOS
2269static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2270#else
2271static void yy_flex_strncpy( s1, s2, n )
2272char *s1;
2273yyconst char *s2;
2274int n;
2275#endif
2276	{
2277	register int i;
2278	for ( i = 0; i < n; ++i )
2279		s1[i] = s2[i];
2280	}
2281#endif
2282
2283#ifdef YY_NEED_STRLEN
2284#ifdef YY_USE_PROTOS
2285static int yy_flex_strlen( yyconst char *s )
2286#else
2287static int yy_flex_strlen( s )
2288yyconst char *s;
2289#endif
2290	{
2291	register int n;
2292	for ( n = 0; s[n]; ++n )
2293		;
2294
2295	return n;
2296	}
2297#endif
2298
2299
2300#ifdef YY_USE_PROTOS
2301static void *yy_flex_alloc( yy_size_t size )
2302#else
2303static void *yy_flex_alloc( size )
2304yy_size_t size;
2305#endif
2306	{
2307	return (void *) malloc( size );
2308	}
2309
2310#ifdef YY_USE_PROTOS
2311static void *yy_flex_realloc( void *ptr, yy_size_t size )
2312#else
2313static void *yy_flex_realloc( ptr, size )
2314void *ptr;
2315yy_size_t size;
2316#endif
2317	{
2318	/* The cast to (char *) in the following accommodates both
2319	 * implementations that use char* generic pointers, and those
2320	 * that use void* generic pointers.  It works with the latter
2321	 * because both ANSI C and C++ allow castless assignment from
2322	 * any pointer type to void*, and deal with argument conversions
2323	 * as though doing an assignment.
2324	 */
2325	return (void *) realloc( (char *) ptr, size );
2326	}
2327
2328#ifdef YY_USE_PROTOS
2329static void yy_flex_free( void *ptr )
2330#else
2331static void yy_flex_free( ptr )
2332void *ptr;
2333#endif
2334	{
2335	free( ptr );
2336	}
2337
2338#if YY_MAIN
2339int main()
2340	{
2341	yylex();
2342	return 0;
2343	}
2344#endif
2345#line 236 "rclex.l"
2346
2347#ifndef yywrap
2348/* This is needed for some versions of lex.  */
2349int yywrap ()
2350{
2351  return 1;
2352}
2353#endif
2354
2355/* Handle a C preprocessor line.  */
2356
2357static void
2358cpp_line (s)
2359     const char *s;
2360{
2361  int line;
2362  char *send, *fn;
2363
2364  ++s;
2365  while (ISSPACE (*s))
2366    ++s;
2367
2368  line = strtol (s, &send, 0);
2369  if (*send != '\0' && ! ISSPACE (*send))
2370    return;
2371
2372  /* Subtract 1 because we are about to count the newline.  */
2373  rc_lineno = line - 1;
2374
2375  s = send;
2376  while (ISSPACE (*s))
2377    ++s;
2378
2379  if (*s != '"')
2380    return;
2381
2382  ++s;
2383  send = strchr (s, '"');
2384  if (send == NULL)
2385    return;
2386
2387  fn = (char *) xmalloc (send - s + 1);
2388  strncpy (fn, s, send - s);
2389  fn[send - s] = '\0';
2390
2391  free (rc_filename);
2392  rc_filename = fn;
2393
2394  if (!initial_fn)
2395    {
2396      initial_fn = xmalloc (strlen (fn) + 1);
2397      strcpy (initial_fn, fn);
2398    }
2399
2400  /* Allow the initial file, regardless of name.  Suppress all other
2401     files if they end in ".h" (this allows included "*.rc").  */
2402  if (strcmp (initial_fn, fn) == 0
2403      || strcmp (fn + strlen (fn) - 2, ".h") != 0)
2404    suppress_cpp_data = 0;
2405  else
2406    suppress_cpp_data = 1;
2407}
2408
2409/* Handle a quoted string.  The quotes are stripped.  A pair of quotes
2410   in a string are turned into a single quote.  Adjacent strings are
2411   merged separated by whitespace are merged, as in C.  */
2412
2413static char *
2414handle_quotes (input, len)
2415     const char *input;
2416     unsigned long *len;
2417{
2418  char *ret, *s;
2419  const char *t;
2420  int ch;
2421
2422  ret = get_string (strlen (input) + 1);
2423
2424  s = ret;
2425  t = input;
2426  if (*t == '"')
2427    ++t;
2428  while (*t != '\0')
2429    {
2430      if (*t == '\\')
2431	{
2432	  ++t;
2433	  switch (*t)
2434	    {
2435	    case '\0':
2436	      rcparse_warning ("backslash at end of string");
2437	      break;
2438
2439	    case '\"':
2440	      rcparse_warning ("use \"\" to put \" in a string");
2441	      break;
2442
2443	    case 'a':
2444	      *s++ = ESCAPE_B; /* Strange, but true...  */
2445	      ++t;
2446	      break;
2447
2448	    case 'b':
2449	      *s++ = ESCAPE_B;
2450	      ++t;
2451	      break;
2452
2453	    case 'f':
2454	      *s++ = ESCAPE_F;
2455	      ++t;
2456	      break;
2457
2458	    case 'n':
2459	      *s++ = ESCAPE_N;
2460	      ++t;
2461	      break;
2462
2463	    case 'r':
2464	      *s++ = ESCAPE_R;
2465	      ++t;
2466	      break;
2467
2468	    case 't':
2469	      *s++ = ESCAPE_T;
2470	      ++t;
2471	      break;
2472
2473	    case 'v':
2474	      *s++ = ESCAPE_V;
2475	      ++t;
2476	      break;
2477
2478	    case '\\':
2479	      *s++ = *t++;
2480	      break;
2481
2482	    case '0': case '1': case '2': case '3':
2483	    case '4': case '5': case '6': case '7':
2484	      ch = *t - '0';
2485	      ++t;
2486	      if (*t >= '0' && *t <= '7')
2487		{
2488		  ch = (ch << 3) | (*t - '0');
2489		  ++t;
2490		  if (*t >= '0' && *t <= '7')
2491		    {
2492		      ch = (ch << 3) | (*t - '0');
2493		      ++t;
2494		    }
2495		}
2496	      *s++ = ch;
2497	      break;
2498
2499	    case 'x':
2500	      ++t;
2501	      ch = 0;
2502	      while (1)
2503		{
2504		  if (*t >= '0' && *t <= '9')
2505		    ch = (ch << 4) | (*t - '0');
2506		  else if (*t >= 'a' && *t <= 'f')
2507		    ch = (ch << 4) | (*t - 'a' + 10);
2508		  else if (*t >= 'A' && *t <= 'F')
2509		    ch = (ch << 4) | (*t - 'A' + 10);
2510		  else
2511		    break;
2512		  ++t;
2513		}
2514	      *s++ = ch;
2515	      break;
2516
2517	    default:
2518	      rcparse_warning ("unrecognized escape sequence");
2519	      *s++ = '\\';
2520	      *s++ = *t++;
2521	      break;
2522	    }
2523	}
2524      else if (*t != '"')
2525	*s++ = *t++;
2526      else if (t[1] == '\0')
2527	break;
2528      else if (t[1] == '"')
2529	{
2530	  *s++ = '"';
2531	  t += 2;
2532	}
2533      else
2534	{
2535	  ++t;
2536	  assert (ISSPACE (*t));
2537	  while (ISSPACE (*t))
2538	    ++t;
2539	  if (*t == '\0')
2540	    break;
2541	  assert (*t == '"');
2542	  ++t;
2543	}
2544    }
2545
2546  *s = '\0';
2547
2548  *len = s - ret;
2549
2550  return ret;
2551}
2552
2553/* Allocate a string of a given length.  */
2554
2555static char *
2556get_string (len)
2557     int len;
2558{
2559  struct alloc_string *as;
2560
2561  as = (struct alloc_string *) xmalloc (sizeof *as);
2562  as->s = xmalloc (len);
2563
2564  as->next = strings;
2565  strings = as;
2566
2567  return as->s;
2568}
2569
2570/* Discard all the strings we have allocated.  The parser calls this
2571   when it no longer needs them.  */
2572
2573void
2574rcparse_discard_strings ()
2575{
2576  struct alloc_string *as;
2577
2578  as = strings;
2579  while (as != NULL)
2580    {
2581      struct alloc_string *n;
2582
2583      free (as->s);
2584      n = as->next;
2585      free (as);
2586      as = n;
2587    }
2588
2589  strings = NULL;
2590}
2591
2592/* Enter rcdata mode.  */
2593
2594void
2595rcparse_rcdata ()
2596{
2597  rcdata_mode = 1;
2598}
2599
2600/* Go back to normal mode from rcdata mode.  */
2601
2602void
2603rcparse_normal ()
2604{
2605  rcdata_mode = 0;
2606}
2607