blob: 2a176988d468bb10d05fcf605f8b4302eeaddc12 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#line 2 "scripts/genksyms/lex.c"
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
Sam Ravnborg70f75242007-09-01 10:26:32 +02003#line 4 "scripts/genksyms/lex.c"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
9#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
Sam Ravnborg70f75242007-09-01 10:26:32 +020012#define YY_FLEX_SUBMINOR_VERSION 33
13#if YY_FLEX_SUBMINOR_VERSION > 0
14#define FLEX_BETA
15#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Sam Ravnborg70f75242007-09-01 10:26:32 +020017/* %if-c++-only */
18/* %endif */
19
20/* %if-c-only */
21
22/* %endif */
23
24/* %if-c-only */
25
26/* %endif */
27
28/* First, we deal with platform-specific or compiler-specific issues. */
29
30/* begin standard C headers. */
31/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#include <stdio.h>
Sam Ravnborg70f75242007-09-01 10:26:32 +020033#include <string.h>
34#include <errno.h>
35#include <stdlib.h>
36/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Sam Ravnborg70f75242007-09-01 10:26:32 +020038/* %if-tables-serialization */
39/* %endif */
40/* end standard C headers. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
Sam Ravnborg70f75242007-09-01 10:26:32 +020042/* %if-c-or-c++ */
43/* flex integer type definitions */
44
45#ifndef FLEXINT_H
46#define FLEXINT_H
47
48/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
49
50#if __STDC_VERSION__ >= 199901L
51
52/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
53 * if you want the limit (max/min) macros for int types.
54 */
55#ifndef __STDC_LIMIT_MACROS
56#define __STDC_LIMIT_MACROS 1
Linus Torvalds1da177e2005-04-16 15:20:36 -070057#endif
58
Sam Ravnborg70f75242007-09-01 10:26:32 +020059#include <inttypes.h>
60typedef int8_t flex_int8_t;
61typedef uint8_t flex_uint8_t;
62typedef int16_t flex_int16_t;
63typedef uint16_t flex_uint16_t;
64typedef int32_t flex_int32_t;
65typedef uint32_t flex_uint32_t;
66#else
67typedef signed char flex_int8_t;
68typedef short int flex_int16_t;
69typedef int flex_int32_t;
70typedef unsigned char flex_uint8_t;
71typedef unsigned short int flex_uint16_t;
72typedef unsigned int flex_uint32_t;
73#endif /* ! C99 */
74
75/* Limits of integral types. */
76#ifndef INT8_MIN
77#define INT8_MIN (-128)
78#endif
79#ifndef INT16_MIN
80#define INT16_MIN (-32767-1)
81#endif
82#ifndef INT32_MIN
83#define INT32_MIN (-2147483647-1)
84#endif
85#ifndef INT8_MAX
86#define INT8_MAX (127)
87#endif
88#ifndef INT16_MAX
89#define INT16_MAX (32767)
90#endif
91#ifndef INT32_MAX
92#define INT32_MAX (2147483647)
93#endif
94#ifndef UINT8_MAX
95#define UINT8_MAX (255U)
96#endif
97#ifndef UINT16_MAX
98#define UINT16_MAX (65535U)
99#endif
100#ifndef UINT32_MAX
101#define UINT32_MAX (4294967295U)
102#endif
103
104#endif /* ! FLEXINT_H */
105
106/* %endif */
107
108/* %if-c++-only */
109/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110
111#ifdef __cplusplus
112
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113/* The "const" storage-class-modifier is valid. */
114#define YY_USE_CONST
115
116#else /* ! __cplusplus */
117
118#if __STDC__
119
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120#define YY_USE_CONST
121
122#endif /* __STDC__ */
123#endif /* ! __cplusplus */
124
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125#ifdef YY_USE_CONST
126#define yyconst const
127#else
128#define yyconst
129#endif
130
Sam Ravnborg70f75242007-09-01 10:26:32 +0200131/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132
133/* Returned upon end-of-file. */
134#define YY_NULL 0
Sam Ravnborg70f75242007-09-01 10:26:32 +0200135/* %ok-for-header */
136
137/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138
139/* Promotes a possibly negative, possibly signed char to an unsigned
140 * integer for use as an array index. If the signed char is negative,
141 * we want to instead treat it as an 8-bit unsigned char, hence the
142 * double cast.
143 */
144#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
Sam Ravnborg70f75242007-09-01 10:26:32 +0200145/* %ok-for-header */
146
147/* %if-reentrant */
148/* %endif */
149
150/* %if-not-reentrant */
151
152/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700153
154/* Enter a start condition. This macro really ought to take a parameter,
155 * but we do it the disgusting crufty way forced on us by the ()-less
156 * definition of BEGIN.
157 */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200158#define BEGIN (yy_start) = 1 + 2 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159
160/* Translate the current start state into a value that can be later handed
161 * to BEGIN to return to the state. The YYSTATE alias is for lex
162 * compatibility.
163 */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200164#define YY_START (((yy_start) - 1) / 2)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165#define YYSTATE YY_START
166
167/* Action number for EOF rule of a given start state. */
168#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
169
170/* Special action meaning "start processing a new file". */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200171#define YY_NEW_FILE yyrestart(yyin )
Linus Torvalds1da177e2005-04-16 15:20:36 -0700172
173#define YY_END_OF_BUFFER_CHAR 0
174
175/* Size of default input buffer. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200176#ifndef YY_BUF_SIZE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700177#define YY_BUF_SIZE 16384
Sam Ravnborg70f75242007-09-01 10:26:32 +0200178#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700179
Sam Ravnborg70f75242007-09-01 10:26:32 +0200180/* The state buf must be large enough to hold one state per character in the main buffer.
181 */
182#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
183
184#ifndef YY_TYPEDEF_YY_BUFFER_STATE
185#define YY_TYPEDEF_YY_BUFFER_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700186typedef struct yy_buffer_state *YY_BUFFER_STATE;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200187#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188
Sam Ravnborg70f75242007-09-01 10:26:32 +0200189/* %if-not-reentrant */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700190extern int yyleng;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200191/* %endif */
192
193/* %if-c-only */
194/* %if-not-reentrant */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700195extern FILE *yyin, *yyout;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200196/* %endif */
197/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198
199#define EOB_ACT_CONTINUE_SCAN 0
200#define EOB_ACT_END_OF_FILE 1
201#define EOB_ACT_LAST_MATCH 2
202
Sam Ravnborg70f75242007-09-01 10:26:32 +0200203 #define YY_LESS_LINENO(n)
204
205/* Return all but the first "n" matched characters back to the input stream. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206#define yyless(n) \
207 do \
208 { \
209 /* Undo effects of setting up yytext. */ \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200210 int yyless_macro_arg = (n); \
211 YY_LESS_LINENO(yyless_macro_arg);\
212 *yy_cp = (yy_hold_char); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213 YY_RESTORE_YY_MORE_OFFSET \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200214 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
216 } \
217 while ( 0 )
218
Sam Ravnborg70f75242007-09-01 10:26:32 +0200219#define unput(c) yyunput( c, (yytext_ptr) )
Linus Torvalds1da177e2005-04-16 15:20:36 -0700220
221/* The following is because we cannot portably get our hands on size_t
222 * (without autoconf's help, which isn't available because we want
223 * flex-generated scanners to compile on their own).
224 */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200225
226#ifndef YY_TYPEDEF_YY_SIZE_T
227#define YY_TYPEDEF_YY_SIZE_T
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228typedef unsigned int yy_size_t;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200229#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700230
Sam Ravnborg70f75242007-09-01 10:26:32 +0200231#ifndef YY_STRUCT_YY_BUFFER_STATE
232#define YY_STRUCT_YY_BUFFER_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233struct yy_buffer_state
234 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200235/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236 FILE *yy_input_file;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200237/* %endif */
238
239/* %if-c++-only */
240/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241
242 char *yy_ch_buf; /* input buffer */
243 char *yy_buf_pos; /* current position in input buffer */
244
245 /* Size of input buffer in bytes, not including room for EOB
246 * characters.
247 */
248 yy_size_t yy_buf_size;
249
250 /* Number of characters read into yy_ch_buf, not including EOB
251 * characters.
252 */
253 int yy_n_chars;
254
255 /* Whether we "own" the buffer - i.e., we know we created it,
256 * and can realloc() it to grow it, and should free() it to
257 * delete it.
258 */
259 int yy_is_our_buffer;
260
261 /* Whether this is an "interactive" input source; if so, and
262 * if we're using stdio for input, then we want to use getc()
263 * instead of fread(), to make sure we stop fetching input after
264 * each newline.
265 */
266 int yy_is_interactive;
267
268 /* Whether we're considered to be at the beginning of a line.
269 * If so, '^' rules will be active on the next match, otherwise
270 * not.
271 */
272 int yy_at_bol;
273
Sam Ravnborg70f75242007-09-01 10:26:32 +0200274 int yy_bs_lineno; /**< The line count. */
275 int yy_bs_column; /**< The column count. */
276
Linus Torvalds1da177e2005-04-16 15:20:36 -0700277 /* Whether to try to fill the input buffer when we reach the
278 * end of it.
279 */
280 int yy_fill_buffer;
281
282 int yy_buffer_status;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200283
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284#define YY_BUFFER_NEW 0
285#define YY_BUFFER_NORMAL 1
286 /* When an EOF's been seen but there's still some text to process
287 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
288 * shouldn't try reading from the input source any more. We might
289 * still have a bunch of tokens to match, though, because of
290 * possible backing-up.
291 *
292 * When we actually see the EOF, we change the status to "new"
293 * (via yyrestart()), so that the user can continue scanning by
294 * just pointing yyin at a new input file.
295 */
296#define YY_BUFFER_EOF_PENDING 2
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297
Sam Ravnborg70f75242007-09-01 10:26:32 +0200298 };
299#endif /* !YY_STRUCT_YY_BUFFER_STATE */
300
301/* %if-c-only Standard (non-C++) definition */
302/* %not-for-header */
303
304/* %if-not-reentrant */
305
306/* Stack of input buffers. */
307static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
308static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
309static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
310/* %endif */
311/* %ok-for-header */
312
313/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700314
315/* We provide macros for accessing buffer states in case in the
316 * future we want to put the buffer states in a more general
317 * "scanner state".
Sam Ravnborg70f75242007-09-01 10:26:32 +0200318 *
319 * Returns the top of the stack, or NULL.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700320 */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200321#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
322 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
323 : NULL)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700324
Sam Ravnborg70f75242007-09-01 10:26:32 +0200325/* Same as previous macro, but useful when we know that the buffer stack is not
326 * NULL or when we need an lvalue. For internal use only.
327 */
328#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
329
330/* %if-c-only Standard (non-C++) definition */
331
332/* %if-not-reentrant */
333/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700334
335/* yy_hold_char holds the character lost when yytext is formed. */
336static char yy_hold_char;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700337static int yy_n_chars; /* number of characters read into yy_ch_buf */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338int yyleng;
339
340/* Points to current character in buffer. */
341static char *yy_c_buf_p = (char *) 0;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200342static int yy_init = 0; /* whether we need to initialize */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343static int yy_start = 0; /* start state number */
344
345/* Flag which is used to allow yywrap()'s to do buffer switches
346 * instead of setting up a fresh yyin. A bit of a hack ...
347 */
348static int yy_did_buffer_switch_on_eof;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200349/* %ok-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700350
Sam Ravnborg70f75242007-09-01 10:26:32 +0200351/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700352
Sam Ravnborg70f75242007-09-01 10:26:32 +0200353void yyrestart (FILE *input_file );
354void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
355YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
356void yy_delete_buffer (YY_BUFFER_STATE b );
357void yy_flush_buffer (YY_BUFFER_STATE b );
358void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
359void yypop_buffer_state (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360
Sam Ravnborg70f75242007-09-01 10:26:32 +0200361static void yyensure_buffer_stack (void );
362static void yy_load_buffer_state (void );
363static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700364
Sam Ravnborg70f75242007-09-01 10:26:32 +0200365#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
366
367YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
368YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
369YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
370
371/* %endif */
372
373void *yyalloc (yy_size_t );
374void *yyrealloc (void *,yy_size_t );
375void yyfree (void * );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700376
377#define yy_new_buffer yy_create_buffer
378
379#define yy_set_interactive(is_interactive) \
380 { \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200381 if ( ! YY_CURRENT_BUFFER ){ \
382 yyensure_buffer_stack (); \
383 YY_CURRENT_BUFFER_LVALUE = \
384 yy_create_buffer(yyin,YY_BUF_SIZE ); \
385 } \
386 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700387 }
388
389#define yy_set_bol(at_bol) \
390 { \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200391 if ( ! YY_CURRENT_BUFFER ){\
392 yyensure_buffer_stack (); \
393 YY_CURRENT_BUFFER_LVALUE = \
394 yy_create_buffer(yyin,YY_BUF_SIZE ); \
395 } \
396 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700397 }
398
Sam Ravnborg70f75242007-09-01 10:26:32 +0200399#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700400
Sam Ravnborg70f75242007-09-01 10:26:32 +0200401/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
402/* Begin user sect3 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700403
404#define yywrap() 1
405#define YY_SKIP_YYWRAP
406
407#define FLEX_DEBUG
Sam Ravnborg70f75242007-09-01 10:26:32 +0200408
Linus Torvalds1da177e2005-04-16 15:20:36 -0700409typedef unsigned char YY_CHAR;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200410
Linus Torvalds1da177e2005-04-16 15:20:36 -0700411FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200412
Linus Torvalds1da177e2005-04-16 15:20:36 -0700413typedef int yy_state_type;
414
Sam Ravnborg70f75242007-09-01 10:26:32 +0200415extern int yylineno;
416
417int yylineno = 1;
418
Linus Torvalds1da177e2005-04-16 15:20:36 -0700419extern char *yytext;
420#define yytext_ptr yytext
421
Sam Ravnborg70f75242007-09-01 10:26:32 +0200422/* %if-c-only Standard (non-C++) definition */
423
424static yy_state_type yy_get_previous_state (void );
425static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
426static int yy_get_next_buffer (void );
427static void yy_fatal_error (yyconst char msg[] );
428
429/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430
431/* Done after the current pattern has been matched and before the
432 * corresponding action - sets up yytext.
433 */
434#define YY_DO_BEFORE_ACTION \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200435 (yytext_ptr) = yy_bp; \
436/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
437 yyleng = (size_t) (yy_cp - yy_bp); \
438 (yy_hold_char) = *yy_cp; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439 *yy_cp = '\0'; \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200440/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
441 (yy_c_buf_p) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700442
Sam Ravnborg70f75242007-09-01 10:26:32 +0200443/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444#define YY_NUM_RULES 13
445#define YY_END_OF_BUFFER 14
Sam Ravnborg70f75242007-09-01 10:26:32 +0200446/* This struct is not used in this scanner,
447 but its presence is necessary. */
448struct yy_trans_info
449 {
450 flex_int32_t yy_verify;
451 flex_int32_t yy_nxt;
452 };
453static yyconst flex_int16_t yy_accept[76] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700454 { 0,
455 0, 0, 0, 0, 14, 12, 4, 3, 12, 7,
456 12, 12, 7, 12, 12, 12, 12, 12, 9, 9,
457 12, 12, 12, 4, 0, 5, 0, 7, 0, 6,
458 0, 0, 0, 0, 0, 0, 2, 8, 10, 10,
459 9, 0, 0, 9, 9, 0, 9, 0, 0, 11,
460 0, 0, 0, 10, 0, 10, 9, 9, 0, 0,
461 0, 0, 0, 0, 0, 10, 10, 0, 0, 0,
462 0, 0, 0, 1, 0
463 } ;
464
Sam Ravnborg70f75242007-09-01 10:26:32 +0200465static yyconst flex_int32_t yy_ec[256] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700466 { 0,
467 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
468 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 2, 1, 5, 6, 7, 8, 9, 10, 1,
471 1, 8, 11, 1, 12, 13, 8, 14, 15, 15,
472 15, 15, 15, 15, 15, 16, 16, 1, 1, 17,
473 18, 19, 1, 1, 20, 20, 20, 20, 21, 22,
474 7, 7, 7, 7, 7, 23, 7, 7, 7, 7,
475 7, 7, 7, 7, 24, 7, 7, 25, 7, 7,
476 1, 26, 1, 8, 7, 1, 20, 20, 20, 20,
477
478 21, 22, 7, 7, 7, 7, 7, 27, 7, 7,
479 7, 7, 7, 7, 7, 7, 24, 7, 7, 25,
480 7, 7, 1, 28, 1, 8, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
488
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
492 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
493 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
494 1, 1, 1, 1, 1
495 } ;
496
Sam Ravnborg70f75242007-09-01 10:26:32 +0200497static yyconst flex_int32_t yy_meta[29] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700498 { 0,
499 1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
500 4, 4, 5, 6, 6, 6, 1, 1, 1, 7,
501 8, 7, 3, 3, 3, 1, 3, 1
502 } ;
503
Sam Ravnborg70f75242007-09-01 10:26:32 +0200504static yyconst flex_int16_t yy_base[88] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505 { 0,
506 0, 147, 21, 140, 145, 284, 39, 284, 26, 0,
507 32, 126, 40, 44, 115, 35, 36, 46, 50, 53,
508 39, 61, 54, 79, 65, 284, 0, 0, 66, 284,
509 0, 119, 79, 75, 123, 104, 284, 284, 107, 0,
510 79, 73, 76, 76, 66, 0, 0, 85, 86, 284,
511 133, 83, 91, 284, 99, 147, 284, 114, 122, 70,
512 107, 141, 172, 151, 135, 181, 284, 137, 114, 157,
513 149, 48, 45, 284, 284, 208, 214, 222, 230, 238,
514 246, 250, 255, 256, 261, 267, 275
515 } ;
516
Sam Ravnborg70f75242007-09-01 10:26:32 +0200517static yyconst flex_int16_t yy_def[88] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700518 { 0,
519 75, 1, 1, 3, 75, 75, 75, 75, 76, 77,
520 78, 75, 77, 79, 75, 75, 75, 75, 75, 19,
521 75, 75, 75, 75, 76, 75, 80, 77, 78, 75,
522 81, 75, 76, 78, 79, 79, 75, 75, 75, 39,
523 19, 82, 83, 75, 75, 84, 20, 76, 78, 75,
524 79, 51, 85, 75, 75, 75, 75, 84, 79, 51,
525 79, 79, 79, 51, 75, 75, 75, 86, 79, 63,
526 86, 87, 87, 75, 0, 75, 75, 75, 75, 75,
527 75, 75, 75, 75, 75, 75, 75
528 } ;
529
Sam Ravnborg70f75242007-09-01 10:26:32 +0200530static yyconst flex_int16_t yy_nxt[313] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700531 { 0,
532 6, 7, 8, 7, 9, 6, 10, 6, 6, 11,
533 6, 6, 12, 6, 6, 6, 6, 6, 6, 10,
534 10, 10, 13, 10, 10, 6, 10, 6, 15, 16,
535 26, 15, 17, 18, 19, 20, 20, 21, 15, 22,
536 24, 30, 24, 38, 33, 36, 37, 74, 23, 34,
537 74, 27, 38, 38, 38, 38, 38, 31, 32, 39,
538 39, 39, 40, 41, 41, 42, 47, 47, 47, 26,
539 43, 38, 44, 45, 46, 30, 44, 75, 38, 38,
540 24, 38, 24, 26, 30, 40, 55, 55, 57, 26,
541 27, 31, 57, 43, 35, 30, 64, 64, 64, 57,
542
543 31, 65, 65, 75, 27, 36, 37, 35, 59, 37,
544 27, 31, 56, 56, 56, 59, 37, 51, 52, 52,
545 39, 39, 39, 59, 37, 37, 68, 53, 54, 54,
546 69, 50, 38, 54, 59, 37, 44, 45, 32, 37,
547 44, 35, 59, 37, 75, 14, 60, 60, 66, 66,
548 66, 37, 14, 72, 75, 61, 62, 63, 59, 61,
549 56, 56, 56, 69, 64, 64, 64, 69, 67, 67,
550 75, 75, 75, 67, 37, 35, 75, 75, 75, 61,
551 62, 75, 75, 61, 75, 70, 70, 70, 75, 75,
552 75, 70, 70, 70, 66, 66, 66, 75, 75, 75,
553
554 75, 75, 54, 54, 75, 75, 75, 54, 25, 25,
555 25, 25, 25, 25, 25, 25, 28, 75, 75, 28,
556 28, 28, 29, 29, 29, 29, 29, 29, 29, 29,
557 35, 35, 35, 35, 35, 35, 35, 35, 48, 75,
558 48, 48, 48, 48, 48, 48, 49, 75, 49, 49,
559 49, 49, 49, 49, 42, 42, 75, 42, 56, 75,
560 56, 58, 58, 58, 66, 75, 66, 71, 71, 71,
561 71, 71, 71, 71, 71, 73, 73, 73, 73, 73,
562 73, 73, 73, 5, 75, 75, 75, 75, 75, 75,
563 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
564
565 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
566 75, 75
567 } ;
568
Sam Ravnborg70f75242007-09-01 10:26:32 +0200569static yyconst flex_int16_t yy_chk[313] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570 { 0,
571 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
573 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
574 9, 3, 3, 3, 3, 3, 3, 3, 3, 3,
575 7, 11, 7, 16, 13, 14, 14, 73, 3, 13,
576 72, 9, 16, 17, 17, 21, 21, 11, 18, 18,
577 18, 18, 19, 19, 19, 19, 20, 20, 20, 25,
578 19, 23, 19, 19, 19, 29, 19, 20, 22, 22,
579 24, 23, 24, 33, 34, 42, 43, 43, 45, 48,
580 25, 29, 45, 42, 60, 49, 52, 52, 52, 44,
581
582 34, 53, 53, 41, 33, 36, 36, 52, 61, 61,
583 48, 49, 55, 55, 55, 69, 69, 36, 36, 36,
584 39, 39, 39, 59, 59, 35, 59, 39, 39, 39,
585 61, 32, 15, 39, 51, 51, 58, 58, 12, 68,
586 58, 68, 62, 62, 5, 4, 51, 51, 65, 65,
587 65, 71, 2, 71, 0, 51, 51, 51, 70, 51,
588 56, 56, 56, 62, 64, 64, 64, 62, 56, 56,
589 0, 0, 0, 56, 63, 64, 0, 0, 0, 70,
590 70, 0, 0, 70, 0, 63, 63, 63, 0, 0,
591 0, 63, 63, 63, 66, 66, 66, 0, 0, 0,
592
593 0, 0, 66, 66, 0, 0, 0, 66, 76, 76,
594 76, 76, 76, 76, 76, 76, 77, 0, 0, 77,
595 77, 77, 78, 78, 78, 78, 78, 78, 78, 78,
596 79, 79, 79, 79, 79, 79, 79, 79, 80, 0,
597 80, 80, 80, 80, 80, 80, 81, 0, 81, 81,
598 81, 81, 81, 81, 82, 82, 0, 82, 83, 0,
599 83, 84, 84, 84, 85, 0, 85, 86, 86, 86,
600 86, 86, 86, 86, 86, 87, 87, 87, 87, 87,
601 87, 87, 87, 75, 75, 75, 75, 75, 75, 75,
602 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
603
604 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
605 75, 75
606 } ;
607
608static yy_state_type yy_last_accepting_state;
609static char *yy_last_accepting_cpos;
610
611extern int yy_flex_debug;
612int yy_flex_debug = 1;
613
Sam Ravnborg70f75242007-09-01 10:26:32 +0200614static yyconst flex_int16_t yy_rule_linenum[13] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700615 { 0,
616 69, 70, 71, 74, 77, 78, 79, 85, 86, 87,
617 89, 92
618 } ;
619
620/* The intent behind this definition is that it'll catch
621 * any uses of REJECT which flex missed.
622 */
623#define REJECT reject_used_but_not_detected
624#define yymore() yymore_used_but_not_detected
625#define YY_MORE_ADJ 0
626#define YY_RESTORE_YY_MORE_OFFSET
627char *yytext;
628#line 1 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629/* Lexical analysis for genksyms.
630 Copyright 1996, 1997 Linux International.
631
632 New implementation contributed by Richard Henderson <rth@tamu.edu>
633 Based on original work by Bjorn Ekwall <bj0rn@blox.se>
634
635 Taken from Linux modutils 2.4.22.
636
637 This program is free software; you can redistribute it and/or modify it
638 under the terms of the GNU General Public License as published by the
639 Free Software Foundation; either version 2 of the License, or (at your
640 option) any later version.
641
642 This program is distributed in the hope that it will be useful, but
643 WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
645 General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program; if not, write to the Free Software Foundation,
649 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
650#line 25 "scripts/genksyms/lex.l"
651
652#include <limits.h>
653#include <stdlib.h>
654#include <string.h>
655#include <ctype.h>
656
657#include "genksyms.h"
658#include "parse.h"
659
660/* We've got a two-level lexer here. We let flex do basic tokenization
661 and then we categorize those basic tokens in the second stage. */
662#define YY_DECL static int yylex1(void)
663
664/* Version 2 checksumming does proper tokenization; version 1 wasn't
665 quite so pedantic. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666
667/* We don't do multiple input files. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200668#line 669 "scripts/genksyms/lex.c"
669
670#define INITIAL 0
671#define V2_TOKENS 1
672
673#ifndef YY_NO_UNISTD_H
674/* Special case for "unistd.h", since it is non-ANSI. We include it way
675 * down here because we want the user's section 1 to have been scanned first.
676 * The user has a chance to override it with an option.
677 */
678/* %if-c-only */
679#include <unistd.h>
680/* %endif */
681/* %if-c++-only */
682/* %endif */
683#endif
684
685#ifndef YY_EXTRA_TYPE
686#define YY_EXTRA_TYPE void *
687#endif
688
689/* %if-c-only Reentrant structure and macros (non-C++). */
690/* %if-reentrant */
691/* %if-c-only */
692
693static int yy_init_globals (void );
694
695/* %endif */
696/* %if-reentrant */
697/* %endif */
698/* %if-bison-bridge */
699/* %endif */
700/* %endif End reentrant structures and macros. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701
702/* Macros after this point can all be overridden by user definitions in
703 * section 1.
704 */
705
706#ifndef YY_SKIP_YYWRAP
707#ifdef __cplusplus
Sam Ravnborg70f75242007-09-01 10:26:32 +0200708extern "C" int yywrap (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700709#else
Sam Ravnborg70f75242007-09-01 10:26:32 +0200710extern int yywrap (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700711#endif
712#endif
713
Sam Ravnborg70f75242007-09-01 10:26:32 +0200714/* %not-for-header */
715
716 static void yyunput (int c,char *buf_ptr );
717
718/* %ok-for-header */
719
720/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700721
722#ifndef yytext_ptr
Sam Ravnborg70f75242007-09-01 10:26:32 +0200723static void yy_flex_strncpy (char *,yyconst char *,int );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700724#endif
725
726#ifdef YY_NEED_STRLEN
Sam Ravnborg70f75242007-09-01 10:26:32 +0200727static int yy_flex_strlen (yyconst char * );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700728#endif
729
730#ifndef YY_NO_INPUT
Sam Ravnborg70f75242007-09-01 10:26:32 +0200731/* %if-c-only Standard (non-C++) definition */
732/* %not-for-header */
733
Linus Torvalds1da177e2005-04-16 15:20:36 -0700734#ifdef __cplusplus
Sam Ravnborg70f75242007-09-01 10:26:32 +0200735static int yyinput (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736#else
Sam Ravnborg70f75242007-09-01 10:26:32 +0200737static int input (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700738#endif
Sam Ravnborg70f75242007-09-01 10:26:32 +0200739/* %ok-for-header */
740
741/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700742#endif
743
Sam Ravnborg70f75242007-09-01 10:26:32 +0200744/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700745
Sam Ravnborg70f75242007-09-01 10:26:32 +0200746/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700747
748/* Amount of stuff to slurp up with each read. */
749#ifndef YY_READ_BUF_SIZE
750#define YY_READ_BUF_SIZE 8192
751#endif
752
753/* Copy whatever the last rule matched to the standard output. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700754#ifndef ECHO
Sam Ravnborg70f75242007-09-01 10:26:32 +0200755/* %if-c-only Standard (non-C++) definition */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700756/* This used to be an fputs(), but since the string might contain NUL's,
757 * we now use fwrite().
758 */
759#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200760/* %endif */
761/* %if-c++-only C++ definition */
762/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763#endif
764
765/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
766 * is returned in "result".
767 */
768#ifndef YY_INPUT
769#define YY_INPUT(buf,result,max_size) \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200770/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
771 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772 { \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200773 int c = '*'; \
774 size_t n; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700775 for ( n = 0; n < max_size && \
776 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
777 buf[n] = (char) c; \
778 if ( c == '\n' ) \
779 buf[n++] = (char) c; \
780 if ( c == EOF && ferror( yyin ) ) \
781 YY_FATAL_ERROR( "input in flex scanner failed" ); \
782 result = n; \
783 } \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200784 else \
785 { \
786 errno=0; \
787 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
788 { \
789 if( errno != EINTR) \
790 { \
791 YY_FATAL_ERROR( "input in flex scanner failed" ); \
792 break; \
793 } \
794 errno=0; \
795 clearerr(yyin); \
796 } \
797 }\
798\
799/* %if-c++-only C++ definition \ */\
800/* %endif */
801
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802#endif
803
804/* No semi-colon after return; correct usage is to write "yyterminate();" -
805 * we don't want an extra ';' after the "return" because that will cause
806 * some compilers to complain about unreachable statements.
807 */
808#ifndef yyterminate
809#define yyterminate() return YY_NULL
810#endif
811
812/* Number of entries by which start-condition stack grows. */
813#ifndef YY_START_STACK_INCR
814#define YY_START_STACK_INCR 25
815#endif
816
817/* Report a fatal error. */
818#ifndef YY_FATAL_ERROR
Sam Ravnborg70f75242007-09-01 10:26:32 +0200819/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700820#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200821/* %endif */
822/* %if-c++-only */
823/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700824#endif
825
Sam Ravnborg70f75242007-09-01 10:26:32 +0200826/* %if-tables-serialization structures and prototypes */
827/* %not-for-header */
828
829/* %ok-for-header */
830
831/* %not-for-header */
832
833/* %tables-yydmap generated elements */
834/* %endif */
835/* end tables serialization structures and prototypes */
836
837/* %ok-for-header */
838
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839/* Default declaration of generated scanner - a define so the user can
840 * easily add parameters.
841 */
842#ifndef YY_DECL
Sam Ravnborg70f75242007-09-01 10:26:32 +0200843#define YY_DECL_IS_OURS 1
844/* %if-c-only Standard (non-C++) definition */
845
846extern int yylex (void);
847
848#define YY_DECL int yylex (void)
849/* %endif */
850/* %if-c++-only C++ definition */
851/* %endif */
852#endif /* !YY_DECL */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700853
854/* Code executed at the beginning of each rule, after yytext and yyleng
855 * have been set up.
856 */
857#ifndef YY_USER_ACTION
858#define YY_USER_ACTION
859#endif
860
861/* Code executed at the end of each rule. */
862#ifndef YY_BREAK
863#define YY_BREAK break;
864#endif
865
Sam Ravnborg70f75242007-09-01 10:26:32 +0200866/* %% [6.0] YY_RULE_SETUP definition goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700867#define YY_RULE_SETUP \
868 if ( yyleng > 0 ) \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200869 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700870 (yytext[yyleng - 1] == '\n'); \
871 YY_USER_ACTION
872
Sam Ravnborg70f75242007-09-01 10:26:32 +0200873/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700874
Sam Ravnborg70f75242007-09-01 10:26:32 +0200875/** The main scanner function which does all the work.
876 */
877YY_DECL
878{
879 register yy_state_type yy_current_state;
880 register char *yy_cp, *yy_bp;
881 register int yy_act;
882
883/* %% [7.0] user's declarations go here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700884#line 65 "scripts/genksyms/lex.l"
885
886
887
888 /* Keep track of our location in the original source files. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200889#line 890 "scripts/genksyms/lex.c"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700890
Sam Ravnborg70f75242007-09-01 10:26:32 +0200891 if ( !(yy_init) )
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200893 (yy_init) = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700894
895#ifdef YY_USER_INIT
896 YY_USER_INIT;
897#endif
898
Sam Ravnborg70f75242007-09-01 10:26:32 +0200899 if ( ! (yy_start) )
900 (yy_start) = 1; /* first start state */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700901
902 if ( ! yyin )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200903/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700904 yyin = stdin;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200905/* %endif */
906/* %if-c++-only */
907/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700908
909 if ( ! yyout )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200910/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700911 yyout = stdout;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200912/* %endif */
913/* %if-c++-only */
914/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700915
Sam Ravnborg70f75242007-09-01 10:26:32 +0200916 if ( ! YY_CURRENT_BUFFER ) {
917 yyensure_buffer_stack ();
918 YY_CURRENT_BUFFER_LVALUE =
919 yy_create_buffer(yyin,YY_BUF_SIZE );
920 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700921
Sam Ravnborg70f75242007-09-01 10:26:32 +0200922 yy_load_buffer_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923 }
924
925 while ( 1 ) /* loops until end-of-file is reached */
926 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200927/* %% [8.0] yymore()-related code goes here */
928 yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700929
930 /* Support of yytext. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200931 *yy_cp = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932
933 /* yy_bp points to the position in yy_ch_buf of the start of
934 * the current run.
935 */
936 yy_bp = yy_cp;
937
Sam Ravnborg70f75242007-09-01 10:26:32 +0200938/* %% [9.0] code to set up and find next match goes here */
939 yy_current_state = (yy_start);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 yy_current_state += YY_AT_BOL();
941yy_match:
942 do
943 {
944 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
945 if ( yy_accept[yy_current_state] )
946 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200947 (yy_last_accepting_state) = yy_current_state;
948 (yy_last_accepting_cpos) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 }
950 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
951 {
952 yy_current_state = (int) yy_def[yy_current_state];
953 if ( yy_current_state >= 76 )
954 yy_c = yy_meta[(unsigned int) yy_c];
955 }
956 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
957 ++yy_cp;
958 }
959 while ( yy_base[yy_current_state] != 284 );
960
961yy_find_action:
Sam Ravnborg70f75242007-09-01 10:26:32 +0200962/* %% [10.0] code to find the action number goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700963 yy_act = yy_accept[yy_current_state];
964 if ( yy_act == 0 )
965 { /* have to back up */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200966 yy_cp = (yy_last_accepting_cpos);
967 yy_current_state = (yy_last_accepting_state);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700968 yy_act = yy_accept[yy_current_state];
969 }
970
971 YY_DO_BEFORE_ACTION;
972
Sam Ravnborg70f75242007-09-01 10:26:32 +0200973/* %% [11.0] code for yylineno update goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700974
975do_action: /* This label is used only to access EOF actions. */
976
Sam Ravnborg70f75242007-09-01 10:26:32 +0200977/* %% [12.0] debug code goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700978 if ( yy_flex_debug )
979 {
980 if ( yy_act == 0 )
981 fprintf( stderr, "--scanner backing up\n" );
982 else if ( yy_act < 13 )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200983 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
984 (long)yy_rule_linenum[yy_act], yytext );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 else if ( yy_act == 13 )
986 fprintf( stderr, "--accepting default rule (\"%s\")\n",
987 yytext );
988 else if ( yy_act == 14 )
989 fprintf( stderr, "--(end of buffer or a NUL)\n" );
990 else
991 fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
992 }
993
994 switch ( yy_act )
995 { /* beginning of action switch */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200996/* %% [13.0] actions go here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700997 case 0: /* must back up */
998 /* undo the effects of YY_DO_BEFORE_ACTION */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200999 *yy_cp = (yy_hold_char);
1000 yy_cp = (yy_last_accepting_cpos);
1001 yy_current_state = (yy_last_accepting_state);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001002 goto yy_find_action;
1003
1004case 1:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001005/* rule 1 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006YY_RULE_SETUP
1007#line 69 "scripts/genksyms/lex.l"
1008return FILENAME;
1009 YY_BREAK
1010case 2:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001011/* rule 2 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001012YY_RULE_SETUP
1013#line 70 "scripts/genksyms/lex.l"
1014cur_line++;
1015 YY_BREAK
1016case 3:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001017/* rule 3 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001018YY_RULE_SETUP
1019#line 71 "scripts/genksyms/lex.l"
1020cur_line++;
1021 YY_BREAK
1022/* Ignore all other whitespace. */
1023case 4:
1024YY_RULE_SETUP
1025#line 74 "scripts/genksyms/lex.l"
1026;
1027 YY_BREAK
1028case 5:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001029/* rule 5 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001030YY_RULE_SETUP
1031#line 77 "scripts/genksyms/lex.l"
1032return STRING;
1033 YY_BREAK
1034case 6:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001035/* rule 6 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001036YY_RULE_SETUP
1037#line 78 "scripts/genksyms/lex.l"
1038return CHAR;
1039 YY_BREAK
1040case 7:
1041YY_RULE_SETUP
1042#line 79 "scripts/genksyms/lex.l"
1043return IDENT;
1044 YY_BREAK
1045/* The Pedant requires that the other C multi-character tokens be
1046 recognized as tokens. We don't actually use them since we don't
1047 parse expressions, but we do want whitespace to be arranged
1048 around them properly. */
1049case 8:
1050YY_RULE_SETUP
1051#line 85 "scripts/genksyms/lex.l"
1052return OTHER;
1053 YY_BREAK
1054case 9:
1055YY_RULE_SETUP
1056#line 86 "scripts/genksyms/lex.l"
1057return INT;
1058 YY_BREAK
1059case 10:
1060YY_RULE_SETUP
1061#line 87 "scripts/genksyms/lex.l"
1062return REAL;
1063 YY_BREAK
1064case 11:
1065YY_RULE_SETUP
1066#line 89 "scripts/genksyms/lex.l"
1067return DOTS;
1068 YY_BREAK
1069/* All other tokens are single characters. */
1070case 12:
1071YY_RULE_SETUP
1072#line 92 "scripts/genksyms/lex.l"
1073return yytext[0];
1074 YY_BREAK
1075case 13:
1076YY_RULE_SETUP
1077#line 95 "scripts/genksyms/lex.l"
1078ECHO;
1079 YY_BREAK
Sam Ravnborg70f75242007-09-01 10:26:32 +02001080#line 1081 "scripts/genksyms/lex.c"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001081case YY_STATE_EOF(INITIAL):
1082case YY_STATE_EOF(V2_TOKENS):
1083 yyterminate();
1084
1085 case YY_END_OF_BUFFER:
1086 {
1087 /* Amount of text matched not including the EOB char. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001088 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001089
1090 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001091 *yy_cp = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001092 YY_RESTORE_YY_MORE_OFFSET
1093
Sam Ravnborg70f75242007-09-01 10:26:32 +02001094 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001095 {
1096 /* We're scanning a new file or input source. It's
1097 * possible that this happened because the user
1098 * just pointed yyin at a new source and called
1099 * yylex(). If so, then we have to assure
Sam Ravnborg70f75242007-09-01 10:26:32 +02001100 * consistency between YY_CURRENT_BUFFER and our
Linus Torvalds1da177e2005-04-16 15:20:36 -07001101 * globals. Here is the right place to do so, because
1102 * this is the first action (other than possibly a
1103 * back-up) that will match for the new input source.
1104 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001105 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1106 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1107 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 }
1109
1110 /* Note that here we test for yy_c_buf_p "<=" to the position
1111 * of the first EOB in the buffer, since yy_c_buf_p will
1112 * already have been incremented past the NUL character
1113 * (since all states make transitions on EOB to the
1114 * end-of-buffer state). Contrast this with the test
1115 * in input().
1116 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001117 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001118 { /* This was really a NUL. */
1119 yy_state_type yy_next_state;
1120
Sam Ravnborg70f75242007-09-01 10:26:32 +02001121 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001122
Sam Ravnborg70f75242007-09-01 10:26:32 +02001123 yy_current_state = yy_get_previous_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001124
1125 /* Okay, we're now positioned to make the NUL
1126 * transition. We couldn't have
1127 * yy_get_previous_state() go ahead and do it
1128 * for us because it doesn't know how to deal
1129 * with the possibility of jamming (and we don't
1130 * want to build jamming into it because then it
1131 * will run more slowly).
1132 */
1133
1134 yy_next_state = yy_try_NUL_trans( yy_current_state );
1135
Sam Ravnborg70f75242007-09-01 10:26:32 +02001136 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001137
1138 if ( yy_next_state )
1139 {
1140 /* Consume the NUL. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001141 yy_cp = ++(yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001142 yy_current_state = yy_next_state;
1143 goto yy_match;
1144 }
1145
1146 else
1147 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001148/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1149 yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001150 goto yy_find_action;
1151 }
1152 }
1153
Sam Ravnborg70f75242007-09-01 10:26:32 +02001154 else switch ( yy_get_next_buffer( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 {
1156 case EOB_ACT_END_OF_FILE:
1157 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001158 (yy_did_buffer_switch_on_eof) = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159
Sam Ravnborg70f75242007-09-01 10:26:32 +02001160 if ( yywrap( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001161 {
1162 /* Note: because we've taken care in
1163 * yy_get_next_buffer() to have set up
1164 * yytext, we can now set up
1165 * yy_c_buf_p so that if some total
1166 * hoser (like flex itself) wants to
1167 * call the scanner after we return the
1168 * YY_NULL, it'll still work - another
1169 * YY_NULL will get returned.
1170 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001171 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172
1173 yy_act = YY_STATE_EOF(YY_START);
1174 goto do_action;
1175 }
1176
1177 else
1178 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001179 if ( ! (yy_did_buffer_switch_on_eof) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001180 YY_NEW_FILE;
1181 }
1182 break;
1183 }
1184
1185 case EOB_ACT_CONTINUE_SCAN:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001186 (yy_c_buf_p) =
1187 (yytext_ptr) + yy_amount_of_matched_text;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001188
Sam Ravnborg70f75242007-09-01 10:26:32 +02001189 yy_current_state = yy_get_previous_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001190
Sam Ravnborg70f75242007-09-01 10:26:32 +02001191 yy_cp = (yy_c_buf_p);
1192 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 goto yy_match;
1194
1195 case EOB_ACT_LAST_MATCH:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001196 (yy_c_buf_p) =
1197 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001198
Sam Ravnborg70f75242007-09-01 10:26:32 +02001199 yy_current_state = yy_get_previous_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001200
Sam Ravnborg70f75242007-09-01 10:26:32 +02001201 yy_cp = (yy_c_buf_p);
1202 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001203 goto yy_find_action;
1204 }
1205 break;
1206 }
1207
1208 default:
1209 YY_FATAL_ERROR(
1210 "fatal flex scanner internal error--no action found" );
1211 } /* end of action switch */
1212 } /* end of scanning one token */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001213} /* end of yylex */
1214/* %ok-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001215
Sam Ravnborg70f75242007-09-01 10:26:32 +02001216/* %if-c++-only */
1217/* %not-for-header */
1218
1219/* %ok-for-header */
1220
1221/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222
1223/* yy_get_next_buffer - try to read in a new buffer
1224 *
1225 * Returns a code representing an action:
1226 * EOB_ACT_LAST_MATCH -
1227 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1228 * EOB_ACT_END_OF_FILE - end of file
1229 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001230/* %if-c-only */
1231static int yy_get_next_buffer (void)
1232/* %endif */
1233/* %if-c++-only */
1234/* %endif */
1235{
1236 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1237 register char *source = (yytext_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001238 register int number_to_move, i;
1239 int ret_val;
1240
Sam Ravnborg70f75242007-09-01 10:26:32 +02001241 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001242 YY_FATAL_ERROR(
1243 "fatal flex scanner internal error--end of buffer missed" );
1244
Sam Ravnborg70f75242007-09-01 10:26:32 +02001245 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001246 { /* Don't try to fill the buffer, so this is an EOF. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001247 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001248 {
1249 /* We matched a single character, the EOB, so
1250 * treat this as a final EOF.
1251 */
1252 return EOB_ACT_END_OF_FILE;
1253 }
1254
1255 else
1256 {
1257 /* We matched some text prior to the EOB, first
1258 * process it.
1259 */
1260 return EOB_ACT_LAST_MATCH;
1261 }
1262 }
1263
1264 /* Try to read more data. */
1265
1266 /* First move last chars to start of buffer. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001267 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001268
1269 for ( i = 0; i < number_to_move; ++i )
1270 *(dest++) = *(source++);
1271
Sam Ravnborg70f75242007-09-01 10:26:32 +02001272 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001273 /* don't do the read, it's not guaranteed to return an EOF,
1274 * just force an EOF
1275 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001276 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001277
1278 else
1279 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001280 int num_to_read =
1281 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282
1283 while ( num_to_read <= 0 )
1284 { /* Not enough room in the buffer - grow it. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001285
1286 /* just a shorter name for the current buffer */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001287 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001288
1289 int yy_c_buf_p_offset =
Sam Ravnborg70f75242007-09-01 10:26:32 +02001290 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001291
1292 if ( b->yy_is_our_buffer )
1293 {
1294 int new_size = b->yy_buf_size * 2;
1295
1296 if ( new_size <= 0 )
1297 b->yy_buf_size += b->yy_buf_size / 8;
1298 else
1299 b->yy_buf_size *= 2;
1300
1301 b->yy_ch_buf = (char *)
1302 /* Include room in for 2 EOB chars. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001303 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001304 }
1305 else
1306 /* Can't grow it, we don't own it. */
1307 b->yy_ch_buf = 0;
1308
1309 if ( ! b->yy_ch_buf )
1310 YY_FATAL_ERROR(
1311 "fatal error - scanner input buffer overflow" );
1312
Sam Ravnborg70f75242007-09-01 10:26:32 +02001313 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314
Sam Ravnborg70f75242007-09-01 10:26:32 +02001315 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Linus Torvalds1da177e2005-04-16 15:20:36 -07001316 number_to_move - 1;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001317
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318 }
1319
1320 if ( num_to_read > YY_READ_BUF_SIZE )
1321 num_to_read = YY_READ_BUF_SIZE;
1322
1323 /* Read in more data. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001324 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1325 (yy_n_chars), (size_t) num_to_read );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001326
Sam Ravnborg70f75242007-09-01 10:26:32 +02001327 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 }
1329
Sam Ravnborg70f75242007-09-01 10:26:32 +02001330 if ( (yy_n_chars) == 0 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001331 {
1332 if ( number_to_move == YY_MORE_ADJ )
1333 {
1334 ret_val = EOB_ACT_END_OF_FILE;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001335 yyrestart(yyin );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001336 }
1337
1338 else
1339 {
1340 ret_val = EOB_ACT_LAST_MATCH;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001341 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Linus Torvalds1da177e2005-04-16 15:20:36 -07001342 YY_BUFFER_EOF_PENDING;
1343 }
1344 }
1345
1346 else
1347 ret_val = EOB_ACT_CONTINUE_SCAN;
1348
Sam Ravnborg70f75242007-09-01 10:26:32 +02001349 (yy_n_chars) += number_to_move;
1350 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1351 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001352
Sam Ravnborg70f75242007-09-01 10:26:32 +02001353 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001354
1355 return ret_val;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001356}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001357
1358/* yy_get_previous_state - get the state just before the EOB char was reached */
1359
Sam Ravnborg70f75242007-09-01 10:26:32 +02001360/* %if-c-only */
1361/* %not-for-header */
1362
1363 static yy_state_type yy_get_previous_state (void)
1364/* %endif */
1365/* %if-c++-only */
1366/* %endif */
1367{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001368 register yy_state_type yy_current_state;
1369 register char *yy_cp;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001370
1371/* %% [15.0] code to get the start state into yy_current_state goes here */
1372 yy_current_state = (yy_start);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001373 yy_current_state += YY_AT_BOL();
1374
Sam Ravnborg70f75242007-09-01 10:26:32 +02001375 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001376 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001377/* %% [16.0] code to find the next state goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001378 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1379 if ( yy_accept[yy_current_state] )
1380 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001381 (yy_last_accepting_state) = yy_current_state;
1382 (yy_last_accepting_cpos) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001383 }
1384 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1385 {
1386 yy_current_state = (int) yy_def[yy_current_state];
1387 if ( yy_current_state >= 76 )
1388 yy_c = yy_meta[(unsigned int) yy_c];
1389 }
1390 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1391 }
1392
1393 return yy_current_state;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001394}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001395
1396/* yy_try_NUL_trans - try to make a transition on the NUL character
1397 *
1398 * synopsis
1399 * next_state = yy_try_NUL_trans( current_state );
1400 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001401/* %if-c-only */
1402 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1403/* %endif */
1404/* %if-c++-only */
1405/* %endif */
1406{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001407 register int yy_is_jam;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001408 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
1409 register char *yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001410
1411 register YY_CHAR yy_c = 1;
1412 if ( yy_accept[yy_current_state] )
1413 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001414 (yy_last_accepting_state) = yy_current_state;
1415 (yy_last_accepting_cpos) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001416 }
1417 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1418 {
1419 yy_current_state = (int) yy_def[yy_current_state];
1420 if ( yy_current_state >= 76 )
1421 yy_c = yy_meta[(unsigned int) yy_c];
1422 }
1423 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1424 yy_is_jam = (yy_current_state == 75);
1425
1426 return yy_is_jam ? 0 : yy_current_state;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001427}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001428
Sam Ravnborg70f75242007-09-01 10:26:32 +02001429/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001430
Sam Ravnborg70f75242007-09-01 10:26:32 +02001431 static void yyunput (int c, register char * yy_bp )
1432/* %endif */
1433/* %if-c++-only */
1434/* %endif */
1435{
1436 register char *yy_cp;
1437
1438 yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001439
1440 /* undo effects of setting up yytext */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001441 *yy_cp = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001442
Sam Ravnborg70f75242007-09-01 10:26:32 +02001443 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001444 { /* need to shift things up to make room */
1445 /* +2 for EOB chars. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001446 register int number_to_move = (yy_n_chars) + 2;
1447 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1448 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001449 register char *source =
Sam Ravnborg70f75242007-09-01 10:26:32 +02001450 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001451
Sam Ravnborg70f75242007-09-01 10:26:32 +02001452 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001453 *--dest = *--source;
1454
1455 yy_cp += (int) (dest - source);
1456 yy_bp += (int) (dest - source);
Sam Ravnborg70f75242007-09-01 10:26:32 +02001457 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1458 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001459
Sam Ravnborg70f75242007-09-01 10:26:32 +02001460 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001461 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1462 }
1463
1464 *--yy_cp = (char) c;
1465
Sam Ravnborg70f75242007-09-01 10:26:32 +02001466/* %% [18.0] update yylineno here */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001467
Sam Ravnborg70f75242007-09-01 10:26:32 +02001468 (yytext_ptr) = yy_bp;
1469 (yy_hold_char) = *yy_cp;
1470 (yy_c_buf_p) = yy_cp;
1471}
1472/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001473
Sam Ravnborg70f75242007-09-01 10:26:32 +02001474/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001475
Sam Ravnborg70f75242007-09-01 10:26:32 +02001476/* %if-c-only */
1477#ifndef YY_NO_INPUT
Linus Torvalds1da177e2005-04-16 15:20:36 -07001478#ifdef __cplusplus
Sam Ravnborg70f75242007-09-01 10:26:32 +02001479 static int yyinput (void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001480#else
Sam Ravnborg70f75242007-09-01 10:26:32 +02001481 static int input (void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001482#endif
Sam Ravnborg70f75242007-09-01 10:26:32 +02001483
1484/* %endif */
1485/* %if-c++-only */
1486/* %endif */
1487{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001488 int c;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001489
1490 *(yy_c_buf_p) = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001491
Sam Ravnborg70f75242007-09-01 10:26:32 +02001492 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001493 {
1494 /* yy_c_buf_p now points to the character we want to return.
1495 * If this occurs *before* the EOB characters, then it's a
1496 * valid NUL; if not, then we've hit the end of the buffer.
1497 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001498 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001499 /* This was really a NUL. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001500 *(yy_c_buf_p) = '\0';
Linus Torvalds1da177e2005-04-16 15:20:36 -07001501
1502 else
1503 { /* need more input */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001504 int offset = (yy_c_buf_p) - (yytext_ptr);
1505 ++(yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001506
Sam Ravnborg70f75242007-09-01 10:26:32 +02001507 switch ( yy_get_next_buffer( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001508 {
1509 case EOB_ACT_LAST_MATCH:
1510 /* This happens because yy_g_n_b()
1511 * sees that we've accumulated a
1512 * token and flags that we need to
1513 * try matching the token before
1514 * proceeding. But for input(),
1515 * there's no matching to consider.
1516 * So convert the EOB_ACT_LAST_MATCH
1517 * to EOB_ACT_END_OF_FILE.
1518 */
1519
1520 /* Reset buffer status. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001521 yyrestart(yyin );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001522
Sam Ravnborg70f75242007-09-01 10:26:32 +02001523 /*FALLTHROUGH*/
Linus Torvalds1da177e2005-04-16 15:20:36 -07001524
1525 case EOB_ACT_END_OF_FILE:
1526 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001527 if ( yywrap( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001528 return EOF;
1529
Sam Ravnborg70f75242007-09-01 10:26:32 +02001530 if ( ! (yy_did_buffer_switch_on_eof) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001531 YY_NEW_FILE;
1532#ifdef __cplusplus
1533 return yyinput();
1534#else
1535 return input();
1536#endif
1537 }
1538
1539 case EOB_ACT_CONTINUE_SCAN:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001540 (yy_c_buf_p) = (yytext_ptr) + offset;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001541 break;
1542 }
1543 }
1544 }
1545
Sam Ravnborg70f75242007-09-01 10:26:32 +02001546 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1547 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1548 (yy_hold_char) = *++(yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001549
Sam Ravnborg70f75242007-09-01 10:26:32 +02001550/* %% [19.0] update BOL and yylineno */
1551 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
Linus Torvalds1da177e2005-04-16 15:20:36 -07001552
1553 return c;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001554}
1555/* %if-c-only */
1556#endif /* ifndef YY_NO_INPUT */
1557/* %endif */
1558
1559/** Immediately switch to a different input stream.
1560 * @param input_file A readable stream.
1561 *
1562 * @note This function does not reset the start condition to @c INITIAL .
1563 */
1564/* %if-c-only */
1565 void yyrestart (FILE * input_file )
1566/* %endif */
1567/* %if-c++-only */
1568/* %endif */
1569{
1570
1571 if ( ! YY_CURRENT_BUFFER ){
1572 yyensure_buffer_stack ();
1573 YY_CURRENT_BUFFER_LVALUE =
1574 yy_create_buffer(yyin,YY_BUF_SIZE );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001575 }
1576
Sam Ravnborg70f75242007-09-01 10:26:32 +02001577 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1578 yy_load_buffer_state( );
1579}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001580
Sam Ravnborg70f75242007-09-01 10:26:32 +02001581/** Switch to a different input buffer.
1582 * @param new_buffer The new input buffer.
1583 *
1584 */
1585/* %if-c-only */
1586 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1587/* %endif */
1588/* %if-c++-only */
1589/* %endif */
1590{
1591
1592 /* TODO. We should be able to replace this entire function body
1593 * with
1594 * yypop_buffer_state();
1595 * yypush_buffer_state(new_buffer);
1596 */
1597 yyensure_buffer_stack ();
1598 if ( YY_CURRENT_BUFFER == new_buffer )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001599 return;
1600
Sam Ravnborg70f75242007-09-01 10:26:32 +02001601 if ( YY_CURRENT_BUFFER )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001602 {
1603 /* Flush out information for old buffer. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001604 *(yy_c_buf_p) = (yy_hold_char);
1605 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1606 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001607 }
1608
Sam Ravnborg70f75242007-09-01 10:26:32 +02001609 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1610 yy_load_buffer_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001611
1612 /* We don't actually know whether we did this switch during
1613 * EOF (yywrap()) processing, but the only time this flag
1614 * is looked at is after yywrap() is called, so it's safe
1615 * to go ahead and always set it.
1616 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001617 (yy_did_buffer_switch_on_eof) = 1;
1618}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001619
Sam Ravnborg70f75242007-09-01 10:26:32 +02001620/* %if-c-only */
1621static void yy_load_buffer_state (void)
1622/* %endif */
1623/* %if-c++-only */
1624/* %endif */
1625{
1626 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1627 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1628 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1629 (yy_hold_char) = *(yy_c_buf_p);
1630}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001631
Sam Ravnborg70f75242007-09-01 10:26:32 +02001632/** Allocate and initialize an input buffer state.
1633 * @param file A readable stream.
1634 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1635 *
1636 * @return the allocated buffer state.
1637 */
1638/* %if-c-only */
1639 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1640/* %endif */
1641/* %if-c++-only */
1642/* %endif */
1643{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001644 YY_BUFFER_STATE b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001645
1646 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001647 if ( ! b )
1648 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1649
1650 b->yy_buf_size = size;
1651
1652 /* yy_ch_buf has to be 2 characters longer than the size given because
1653 * we need to put in 2 end-of-buffer characters.
1654 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001655 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001656 if ( ! b->yy_ch_buf )
1657 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1658
1659 b->yy_is_our_buffer = 1;
1660
Sam Ravnborg70f75242007-09-01 10:26:32 +02001661 yy_init_buffer(b,file );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001662
1663 return b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001664}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001665
Sam Ravnborg70f75242007-09-01 10:26:32 +02001666/** Destroy the buffer.
1667 * @param b a buffer created with yy_create_buffer()
1668 *
1669 */
1670/* %if-c-only */
1671 void yy_delete_buffer (YY_BUFFER_STATE b )
1672/* %endif */
1673/* %if-c++-only */
1674/* %endif */
1675{
1676
Linus Torvalds1da177e2005-04-16 15:20:36 -07001677 if ( ! b )
1678 return;
1679
Sam Ravnborg70f75242007-09-01 10:26:32 +02001680 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1681 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001682
1683 if ( b->yy_is_our_buffer )
Sam Ravnborg70f75242007-09-01 10:26:32 +02001684 yyfree((void *) b->yy_ch_buf );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001685
Sam Ravnborg70f75242007-09-01 10:26:32 +02001686 yyfree((void *) b );
1687}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001688
Sam Ravnborg70f75242007-09-01 10:26:32 +02001689/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001690
Sam Ravnborg70f75242007-09-01 10:26:32 +02001691#ifndef __cplusplus
1692extern int isatty (int );
1693#endif /* __cplusplus */
1694
1695/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001696
Sam Ravnborg70f75242007-09-01 10:26:32 +02001697/* %if-c++-only */
1698/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001699
Sam Ravnborg70f75242007-09-01 10:26:32 +02001700/* Initializes or reinitializes a buffer.
1701 * This function is sometimes called more than once on the same buffer,
1702 * such as during a yyrestart() or at EOF.
1703 */
1704/* %if-c-only */
1705 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1706/* %endif */
1707/* %if-c++-only */
1708/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001709
Sam Ravnborg70f75242007-09-01 10:26:32 +02001710{
1711 int oerrno = errno;
1712
1713 yy_flush_buffer(b );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001714
1715 b->yy_input_file = file;
1716 b->yy_fill_buffer = 1;
1717
Sam Ravnborg70f75242007-09-01 10:26:32 +02001718 /* If b is the current buffer, then yy_init_buffer was _probably_
1719 * called from yyrestart() or through yy_get_next_buffer.
1720 * In that case, we don't want to reset the lineno or column.
1721 */
1722 if (b != YY_CURRENT_BUFFER){
1723 b->yy_bs_lineno = 1;
1724 b->yy_bs_column = 0;
1725 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001726
Sam Ravnborg70f75242007-09-01 10:26:32 +02001727/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001728
Sam Ravnborg70f75242007-09-01 10:26:32 +02001729 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1730
1731/* %endif */
1732/* %if-c++-only */
1733/* %endif */
1734 errno = oerrno;
1735}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001736
Sam Ravnborg70f75242007-09-01 10:26:32 +02001737/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1738 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1739 *
1740 */
1741/* %if-c-only */
1742 void yy_flush_buffer (YY_BUFFER_STATE b )
1743/* %endif */
1744/* %if-c++-only */
1745/* %endif */
1746{
1747 if ( ! b )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001748 return;
1749
1750 b->yy_n_chars = 0;
1751
1752 /* We always need two end-of-buffer characters. The first causes
1753 * a transition to the end-of-buffer state. The second causes
1754 * a jam in that state.
1755 */
1756 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1757 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1758
1759 b->yy_buf_pos = &b->yy_ch_buf[0];
1760
1761 b->yy_at_bol = 1;
1762 b->yy_buffer_status = YY_BUFFER_NEW;
1763
Sam Ravnborg70f75242007-09-01 10:26:32 +02001764 if ( b == YY_CURRENT_BUFFER )
1765 yy_load_buffer_state( );
1766}
1767
1768/* %if-c-or-c++ */
1769/** Pushes the new state onto the stack. The new state becomes
1770 * the current state. This function will allocate the stack
1771 * if necessary.
1772 * @param new_buffer The new state.
1773 *
1774 */
1775/* %if-c-only */
1776void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1777/* %endif */
1778/* %if-c++-only */
1779/* %endif */
1780{
1781 if (new_buffer == NULL)
1782 return;
1783
1784 yyensure_buffer_stack();
1785
1786 /* This block is copied from yy_switch_to_buffer. */
1787 if ( YY_CURRENT_BUFFER )
1788 {
1789 /* Flush out information for old buffer. */
1790 *(yy_c_buf_p) = (yy_hold_char);
1791 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1792 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1793 }
1794
1795 /* Only push if top exists. Otherwise, replace top. */
1796 if (YY_CURRENT_BUFFER)
1797 (yy_buffer_stack_top)++;
1798 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1799
1800 /* copied from yy_switch_to_buffer. */
1801 yy_load_buffer_state( );
1802 (yy_did_buffer_switch_on_eof) = 1;
1803}
1804/* %endif */
1805
1806/* %if-c-or-c++ */
1807/** Removes and deletes the top of the stack, if present.
1808 * The next element becomes the new top.
1809 *
1810 */
1811/* %if-c-only */
1812void yypop_buffer_state (void)
1813/* %endif */
1814/* %if-c++-only */
1815/* %endif */
1816{
1817 if (!YY_CURRENT_BUFFER)
1818 return;
1819
1820 yy_delete_buffer(YY_CURRENT_BUFFER );
1821 YY_CURRENT_BUFFER_LVALUE = NULL;
1822 if ((yy_buffer_stack_top) > 0)
1823 --(yy_buffer_stack_top);
1824
1825 if (YY_CURRENT_BUFFER) {
1826 yy_load_buffer_state( );
1827 (yy_did_buffer_switch_on_eof) = 1;
1828 }
1829}
1830/* %endif */
1831
1832/* %if-c-or-c++ */
1833/* Allocates the stack if it does not exist.
1834 * Guarantees space for at least one push.
1835 */
1836/* %if-c-only */
1837static void yyensure_buffer_stack (void)
1838/* %endif */
1839/* %if-c++-only */
1840/* %endif */
1841{
1842 int num_to_alloc;
1843
1844 if (!(yy_buffer_stack)) {
1845
1846 /* First allocation is just for 2 elements, since we don't know if this
1847 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1848 * immediate realloc on the next call.
1849 */
1850 num_to_alloc = 1;
1851 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1852 (num_to_alloc * sizeof(struct yy_buffer_state*)
1853 );
1854
1855 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1856
1857 (yy_buffer_stack_max) = num_to_alloc;
1858 (yy_buffer_stack_top) = 0;
1859 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001860 }
1861
Sam Ravnborg70f75242007-09-01 10:26:32 +02001862 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Linus Torvalds1da177e2005-04-16 15:20:36 -07001863
Sam Ravnborg70f75242007-09-01 10:26:32 +02001864 /* Increase the buffer to prepare for a possible push. */
1865 int grow_size = 8 /* arbitrary grow size */;
1866
1867 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1868 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1869 ((yy_buffer_stack),
1870 num_to_alloc * sizeof(struct yy_buffer_state*)
1871 );
1872
1873 /* zero only the new slots.*/
1874 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1875 (yy_buffer_stack_max) = num_to_alloc;
1876 }
1877}
1878/* %endif */
1879
1880/* %if-c-only */
1881/** Setup the input buffer state to scan directly from a user-specified character buffer.
1882 * @param base the character buffer
1883 * @param size the size in bytes of the character buffer
1884 *
1885 * @return the newly allocated buffer state object.
1886 */
1887YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1888{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001889 YY_BUFFER_STATE b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001890
Linus Torvalds1da177e2005-04-16 15:20:36 -07001891 if ( size < 2 ||
1892 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1893 base[size-1] != YY_END_OF_BUFFER_CHAR )
1894 /* They forgot to leave room for the EOB's. */
1895 return 0;
1896
Sam Ravnborg70f75242007-09-01 10:26:32 +02001897 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001898 if ( ! b )
1899 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1900
1901 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1902 b->yy_buf_pos = b->yy_ch_buf = base;
1903 b->yy_is_our_buffer = 0;
1904 b->yy_input_file = 0;
1905 b->yy_n_chars = b->yy_buf_size;
1906 b->yy_is_interactive = 0;
1907 b->yy_at_bol = 1;
1908 b->yy_fill_buffer = 0;
1909 b->yy_buffer_status = YY_BUFFER_NEW;
1910
Sam Ravnborg70f75242007-09-01 10:26:32 +02001911 yy_switch_to_buffer(b );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001912
1913 return b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001914}
1915/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001916
Sam Ravnborg70f75242007-09-01 10:26:32 +02001917/* %if-c-only */
1918/** Setup the input buffer state to scan a string. The next call to yylex() will
1919 * scan from a @e copy of @a str.
1920 * @param yystr a NUL-terminated string to scan
1921 *
1922 * @return the newly allocated buffer state object.
1923 * @note If you want to scan bytes that may contain NUL values, then use
1924 * yy_scan_bytes() instead.
1925 */
1926YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1927{
1928
1929 return yy_scan_bytes(yystr,strlen(yystr) );
1930}
1931/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001932
Sam Ravnborg70f75242007-09-01 10:26:32 +02001933/* %if-c-only */
1934/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1935 * scan from a @e copy of @a bytes.
1936 * @param bytes the byte buffer to scan
1937 * @param len the number of bytes in the buffer pointed to by @a bytes.
1938 *
1939 * @return the newly allocated buffer state object.
1940 */
1941YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1942{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001943 YY_BUFFER_STATE b;
1944 char *buf;
1945 yy_size_t n;
1946 int i;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001947
Linus Torvalds1da177e2005-04-16 15:20:36 -07001948 /* Get memory for full buffer, including space for trailing EOB's. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001949 n = _yybytes_len + 2;
1950 buf = (char *) yyalloc(n );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001951 if ( ! buf )
1952 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1953
Sam Ravnborg70f75242007-09-01 10:26:32 +02001954 for ( i = 0; i < _yybytes_len; ++i )
1955 buf[i] = yybytes[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001956
Sam Ravnborg70f75242007-09-01 10:26:32 +02001957 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001958
Sam Ravnborg70f75242007-09-01 10:26:32 +02001959 b = yy_scan_buffer(buf,n );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001960 if ( ! b )
1961 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1962
1963 /* It's okay to grow etc. this buffer, and we should throw it
1964 * away when we're done.
1965 */
1966 b->yy_is_our_buffer = 1;
1967
1968 return b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001969}
1970/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001971
1972#ifndef YY_EXIT_FAILURE
1973#define YY_EXIT_FAILURE 2
1974#endif
1975
Sam Ravnborg70f75242007-09-01 10:26:32 +02001976/* %if-c-only */
1977static void yy_fatal_error (yyconst char* msg )
1978{
1979 (void) fprintf( stderr, "%s\n", msg );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001980 exit( YY_EXIT_FAILURE );
Sam Ravnborg70f75242007-09-01 10:26:32 +02001981}
1982/* %endif */
1983/* %if-c++-only */
1984/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001985
1986/* Redefine yyless() so it works in section 3 code. */
1987
1988#undef yyless
1989#define yyless(n) \
1990 do \
1991 { \
1992 /* Undo effects of setting up yytext. */ \
Sam Ravnborg70f75242007-09-01 10:26:32 +02001993 int yyless_macro_arg = (n); \
1994 YY_LESS_LINENO(yyless_macro_arg);\
1995 yytext[yyleng] = (yy_hold_char); \
1996 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1997 (yy_hold_char) = *(yy_c_buf_p); \
1998 *(yy_c_buf_p) = '\0'; \
1999 yyleng = yyless_macro_arg; \
Linus Torvalds1da177e2005-04-16 15:20:36 -07002000 } \
2001 while ( 0 )
2002
Sam Ravnborg70f75242007-09-01 10:26:32 +02002003/* Accessor methods (get/set functions) to struct members. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002004
Sam Ravnborg70f75242007-09-01 10:26:32 +02002005/* %if-c-only */
2006/* %if-reentrant */
2007/* %endif */
2008
2009/** Get the current line number.
2010 *
2011 */
2012int yyget_lineno (void)
2013{
2014
2015 return yylineno;
2016}
2017
2018/** Get the input stream.
2019 *
2020 */
2021FILE *yyget_in (void)
2022{
2023 return yyin;
2024}
2025
2026/** Get the output stream.
2027 *
2028 */
2029FILE *yyget_out (void)
2030{
2031 return yyout;
2032}
2033
2034/** Get the length of the current token.
2035 *
2036 */
2037int yyget_leng (void)
2038{
2039 return yyleng;
2040}
2041
2042/** Get the current token.
2043 *
2044 */
2045
2046char *yyget_text (void)
2047{
2048 return yytext;
2049}
2050
2051/* %if-reentrant */
2052/* %endif */
2053
2054/** Set the current line number.
2055 * @param line_number
2056 *
2057 */
2058void yyset_lineno (int line_number )
2059{
2060
2061 yylineno = line_number;
2062}
2063
2064/** Set the input stream. This does not discard the current
2065 * input buffer.
2066 * @param in_str A readable stream.
2067 *
2068 * @see yy_switch_to_buffer
2069 */
2070void yyset_in (FILE * in_str )
2071{
2072 yyin = in_str ;
2073}
2074
2075void yyset_out (FILE * out_str )
2076{
2077 yyout = out_str ;
2078}
2079
2080int yyget_debug (void)
2081{
2082 return yy_flex_debug;
2083}
2084
2085void yyset_debug (int bdebug )
2086{
2087 yy_flex_debug = bdebug ;
2088}
2089
2090/* %endif */
2091
2092/* %if-reentrant */
2093/* %if-bison-bridge */
2094/* %endif */
2095/* %endif */
2096
2097/* %if-c-only */
2098static int yy_init_globals (void)
2099{
2100 /* Initialization is the same as for the non-reentrant scanner.
2101 * This function is called from yylex_destroy(), so don't allocate here.
2102 */
2103
2104 (yy_buffer_stack) = 0;
2105 (yy_buffer_stack_top) = 0;
2106 (yy_buffer_stack_max) = 0;
2107 (yy_c_buf_p) = (char *) 0;
2108 (yy_init) = 0;
2109 (yy_start) = 0;
2110
2111/* Defined in main.c */
2112#ifdef YY_STDINIT
2113 yyin = stdin;
2114 yyout = stdout;
2115#else
2116 yyin = (FILE *) 0;
2117 yyout = (FILE *) 0;
2118#endif
2119
2120 /* For future reference: Set errno on error, since we are called by
2121 * yylex_init()
2122 */
2123 return 0;
2124}
2125/* %endif */
2126
2127/* %if-c-or-c++ */
2128/* %if-c-only */
2129/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2130int yylex_destroy (void)
2131/* %endif */
2132/* %if-c++-only */
2133/* %endif */
2134{
2135
2136 /* Pop the buffer stack, destroying each element. */
2137 while(YY_CURRENT_BUFFER){
2138 yy_delete_buffer(YY_CURRENT_BUFFER );
2139 YY_CURRENT_BUFFER_LVALUE = NULL;
2140 yypop_buffer_state();
2141 }
2142
2143 /* Destroy the stack itself. */
2144 yyfree((yy_buffer_stack) );
2145 (yy_buffer_stack) = NULL;
2146
2147/* %if-c++-only */
2148/* %endif */
2149
2150/* %if-c-only */
2151
2152 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2153 * yylex() is called, initialization will occur. */
2154 yy_init_globals( );
2155
2156/* %if-reentrant */
2157/* %endif */
2158 return 0;
2159/* %endif */
2160}
2161/* %endif */
2162
2163/*
2164 * Internal utility routines.
2165 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002166
2167#ifndef yytext_ptr
Sam Ravnborg70f75242007-09-01 10:26:32 +02002168static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2169{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002170 register int i;
2171 for ( i = 0; i < n; ++i )
2172 s1[i] = s2[i];
Sam Ravnborg70f75242007-09-01 10:26:32 +02002173}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002174#endif
2175
2176#ifdef YY_NEED_STRLEN
Sam Ravnborg70f75242007-09-01 10:26:32 +02002177static int yy_flex_strlen (yyconst char * s )
2178{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002179 register int n;
2180 for ( n = 0; s[n]; ++n )
2181 ;
2182
2183 return n;
Sam Ravnborg70f75242007-09-01 10:26:32 +02002184}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002185#endif
2186
Sam Ravnborg70f75242007-09-01 10:26:32 +02002187void *yyalloc (yy_size_t size )
2188{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002189 return (void *) malloc( size );
Sam Ravnborg70f75242007-09-01 10:26:32 +02002190}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002191
Sam Ravnborg70f75242007-09-01 10:26:32 +02002192void *yyrealloc (void * ptr, yy_size_t size )
2193{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002194 /* The cast to (char *) in the following accommodates both
2195 * implementations that use char* generic pointers, and those
2196 * that use void* generic pointers. It works with the latter
2197 * because both ANSI C and C++ allow castless assignment from
2198 * any pointer type to void*, and deal with argument conversions
2199 * as though doing an assignment.
2200 */
2201 return (void *) realloc( (char *) ptr, size );
Sam Ravnborg70f75242007-09-01 10:26:32 +02002202}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002203
Sam Ravnborg70f75242007-09-01 10:26:32 +02002204void yyfree (void * ptr )
2205{
2206 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2207}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002208
Sam Ravnborg70f75242007-09-01 10:26:32 +02002209/* %if-tables-serialization definitions */
2210/* %define-yytables The name for this specific scanner's tables. */
2211#define YYTABLES_NAME "yytables"
2212/* %endif */
2213
2214/* %ok-for-header */
2215
Linus Torvalds1da177e2005-04-16 15:20:36 -07002216#line 95 "scripts/genksyms/lex.l"
2217
2218
Sam Ravnborg70f75242007-09-01 10:26:32 +02002219
Linus Torvalds1da177e2005-04-16 15:20:36 -07002220/* Bring in the keyword recognizer. */
2221
2222#include "keywords.c"
2223
2224
2225/* Macros to append to our phrase collection list. */
2226
2227#define _APP(T,L) do { \
2228 cur_node = next_node; \
2229 next_node = xmalloc(sizeof(*next_node)); \
2230 next_node->next = cur_node; \
2231 cur_node->string = memcpy(xmalloc(L+1), T, L+1); \
2232 cur_node->tag = SYM_NORMAL; \
2233 } while (0)
2234
2235#define APP _APP(yytext, yyleng)
2236
2237
2238/* The second stage lexer. Here we incorporate knowledge of the state
2239 of the parser to tailor the tokens that are returned. */
2240
2241int
2242yylex(void)
2243{
2244 static enum {
2245 ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE,
2246 ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4,
2247 ST_TABLE_5, ST_TABLE_6
2248 } lexstate = ST_NOTSTARTED;
2249
2250 static int suppress_type_lookup, dont_want_brace_phrase;
2251 static struct string_list *next_node;
2252
2253 int token, count = 0;
2254 struct string_list *cur_node;
2255
2256 if (lexstate == ST_NOTSTARTED)
2257 {
2258 BEGIN(V2_TOKENS);
2259 next_node = xmalloc(sizeof(*next_node));
2260 next_node->next = NULL;
2261 lexstate = ST_NORMAL;
2262 }
2263
2264repeat:
2265 token = yylex1();
2266
2267 if (token == 0)
2268 return 0;
2269 else if (token == FILENAME)
2270 {
2271 char *file, *e;
2272
2273 /* Save the filename and line number for later error messages. */
2274
2275 if (cur_filename)
2276 free(cur_filename);
2277
2278 file = strchr(yytext, '\"')+1;
2279 e = strchr(file, '\"');
2280 *e = '\0';
2281 cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1);
2282 cur_line = atoi(yytext+2);
2283
2284 goto repeat;
2285 }
2286
2287 switch (lexstate)
2288 {
2289 case ST_NORMAL:
2290 switch (token)
2291 {
2292 case IDENT:
2293 APP;
2294 {
2295 const struct resword *r = is_reserved_word(yytext, yyleng);
2296 if (r)
2297 {
2298 switch (token = r->token)
2299 {
2300 case ATTRIBUTE_KEYW:
2301 lexstate = ST_ATTRIBUTE;
2302 count = 0;
2303 goto repeat;
2304 case ASM_KEYW:
2305 lexstate = ST_ASM;
2306 count = 0;
2307 goto repeat;
2308
2309 case STRUCT_KEYW:
2310 case UNION_KEYW:
2311 dont_want_brace_phrase = 3;
2312 case ENUM_KEYW:
2313 suppress_type_lookup = 2;
2314 goto fini;
2315
2316 case EXPORT_SYMBOL_KEYW:
2317 goto fini;
2318 }
2319 }
2320 if (!suppress_type_lookup)
2321 {
2322 struct symbol *sym = find_symbol(yytext, SYM_TYPEDEF);
2323 if (sym && sym->type == SYM_TYPEDEF)
2324 token = TYPE;
2325 }
2326 }
2327 break;
2328
2329 case '[':
2330 APP;
2331 lexstate = ST_BRACKET;
2332 count = 1;
2333 goto repeat;
2334
2335 case '{':
2336 APP;
2337 if (dont_want_brace_phrase)
2338 break;
2339 lexstate = ST_BRACE;
2340 count = 1;
2341 goto repeat;
2342
2343 case '=': case ':':
2344 APP;
2345 lexstate = ST_EXPRESSION;
2346 break;
2347
2348 case DOTS:
2349 default:
2350 APP;
2351 break;
2352 }
2353 break;
2354
2355 case ST_ATTRIBUTE:
2356 APP;
2357 switch (token)
2358 {
2359 case '(':
2360 ++count;
2361 goto repeat;
2362 case ')':
2363 if (--count == 0)
2364 {
2365 lexstate = ST_NORMAL;
2366 token = ATTRIBUTE_PHRASE;
2367 break;
2368 }
2369 goto repeat;
2370 default:
2371 goto repeat;
2372 }
2373 break;
2374
2375 case ST_ASM:
2376 APP;
2377 switch (token)
2378 {
2379 case '(':
2380 ++count;
2381 goto repeat;
2382 case ')':
2383 if (--count == 0)
2384 {
2385 lexstate = ST_NORMAL;
2386 token = ASM_PHRASE;
2387 break;
2388 }
2389 goto repeat;
2390 default:
2391 goto repeat;
2392 }
2393 break;
2394
2395 case ST_BRACKET:
2396 APP;
2397 switch (token)
2398 {
2399 case '[':
2400 ++count;
2401 goto repeat;
2402 case ']':
2403 if (--count == 0)
2404 {
2405 lexstate = ST_NORMAL;
2406 token = BRACKET_PHRASE;
2407 break;
2408 }
2409 goto repeat;
2410 default:
2411 goto repeat;
2412 }
2413 break;
2414
2415 case ST_BRACE:
2416 APP;
2417 switch (token)
2418 {
2419 case '{':
2420 ++count;
2421 goto repeat;
2422 case '}':
2423 if (--count == 0)
2424 {
2425 lexstate = ST_NORMAL;
2426 token = BRACE_PHRASE;
2427 break;
2428 }
2429 goto repeat;
2430 default:
2431 goto repeat;
2432 }
2433 break;
2434
2435 case ST_EXPRESSION:
2436 switch (token)
2437 {
2438 case '(': case '[': case '{':
2439 ++count;
2440 APP;
2441 goto repeat;
2442 case ')': case ']': case '}':
2443 --count;
2444 APP;
2445 goto repeat;
2446 case ',': case ';':
2447 if (count == 0)
2448 {
2449 /* Put back the token we just read so's we can find it again
2450 after registering the expression. */
2451 unput(token);
2452
2453 lexstate = ST_NORMAL;
2454 token = EXPRESSION_PHRASE;
2455 break;
2456 }
2457 APP;
2458 goto repeat;
2459 default:
2460 APP;
2461 goto repeat;
2462 }
2463 break;
2464
2465 case ST_TABLE_1:
2466 goto repeat;
2467
2468 case ST_TABLE_2:
2469 if (token == IDENT && yyleng == 1 && yytext[0] == 'X')
2470 {
2471 token = EXPORT_SYMBOL_KEYW;
2472 lexstate = ST_TABLE_5;
2473 APP;
2474 break;
2475 }
2476 lexstate = ST_TABLE_6;
2477 /* FALLTHRU */
2478
2479 case ST_TABLE_6:
2480 switch (token)
2481 {
2482 case '{': case '[': case '(':
2483 ++count;
2484 break;
2485 case '}': case ']': case ')':
2486 --count;
2487 break;
2488 case ',':
2489 if (count == 0)
2490 lexstate = ST_TABLE_2;
2491 break;
2492 };
2493 goto repeat;
2494
2495 case ST_TABLE_3:
2496 goto repeat;
2497
2498 case ST_TABLE_4:
2499 if (token == ';')
2500 lexstate = ST_NORMAL;
2501 goto repeat;
2502
2503 case ST_TABLE_5:
2504 switch (token)
2505 {
2506 case ',':
2507 token = ';';
2508 lexstate = ST_TABLE_2;
2509 APP;
2510 break;
2511 default:
2512 APP;
2513 break;
2514 }
2515 break;
2516
2517 default:
Sam Ravnborg6803dc02006-06-24 23:46:54 +02002518 exit(1);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002519 }
2520fini:
2521
2522 if (suppress_type_lookup > 0)
2523 --suppress_type_lookup;
2524 if (dont_want_brace_phrase > 0)
2525 --dont_want_brace_phrase;
2526
2527 yylval = &next_node->next;
2528
2529 return token;
2530}
Sam Ravnborg70f75242007-09-01 10:26:32 +02002531/* A Bison parser, made by GNU Bison 2.3. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002532
Sam Ravnborg70f75242007-09-01 10:26:32 +02002533/* Skeleton interface for Bison's Yacc-like parsers in C
2534
2535 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
2536 Free Software Foundation, Inc.
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002537
2538 This program is free software; you can redistribute it and/or modify
2539 it under the terms of the GNU General Public License as published by
2540 the Free Software Foundation; either version 2, or (at your option)
2541 any later version.
2542
2543 This program is distributed in the hope that it will be useful,
2544 but WITHOUT ANY WARRANTY; without even the implied warranty of
2545 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2546 GNU General Public License for more details.
2547
2548 You should have received a copy of the GNU General Public License
2549 along with this program; if not, write to the Free Software
Sam Ravnborg70f75242007-09-01 10:26:32 +02002550 Foundation, Inc., 51 Franklin Street, Fifth Floor,
2551 Boston, MA 02110-1301, USA. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002552
Sam Ravnborg70f75242007-09-01 10:26:32 +02002553/* As a special exception, you may create a larger work that contains
2554 part or all of the Bison parser skeleton and distribute that work
2555 under terms of your choice, so long as that work isn't itself a
2556 parser generator using the skeleton or a modified version thereof
2557 as a parser skeleton. Alternatively, if you modify or redistribute
2558 the parser skeleton itself, you may (at your option) remove this
2559 special exception, which will cause the skeleton and the resulting
2560 Bison output files to be licensed under the GNU General Public
2561 License without this special exception.
2562
2563 This special exception was added by the Free Software Foundation in
2564 version 2.2 of Bison. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002565
2566/* Tokens. */
2567#ifndef YYTOKENTYPE
2568# define YYTOKENTYPE
2569 /* Put the tokens into the symbol table, so that GDB and other debuggers
2570 know about them. */
2571 enum yytokentype {
2572 ASM_KEYW = 258,
2573 ATTRIBUTE_KEYW = 259,
2574 AUTO_KEYW = 260,
2575 BOOL_KEYW = 261,
2576 CHAR_KEYW = 262,
2577 CONST_KEYW = 263,
2578 DOUBLE_KEYW = 264,
2579 ENUM_KEYW = 265,
2580 EXTERN_KEYW = 266,
Sam Ravnborg70f75242007-09-01 10:26:32 +02002581 EXTENSION_KEYW = 267,
2582 FLOAT_KEYW = 268,
2583 INLINE_KEYW = 269,
2584 INT_KEYW = 270,
2585 LONG_KEYW = 271,
2586 REGISTER_KEYW = 272,
2587 RESTRICT_KEYW = 273,
2588 SHORT_KEYW = 274,
2589 SIGNED_KEYW = 275,
2590 STATIC_KEYW = 276,
2591 STRUCT_KEYW = 277,
2592 TYPEDEF_KEYW = 278,
2593 UNION_KEYW = 279,
2594 UNSIGNED_KEYW = 280,
2595 VOID_KEYW = 281,
2596 VOLATILE_KEYW = 282,
2597 TYPEOF_KEYW = 283,
2598 EXPORT_SYMBOL_KEYW = 284,
2599 ASM_PHRASE = 285,
2600 ATTRIBUTE_PHRASE = 286,
2601 BRACE_PHRASE = 287,
2602 BRACKET_PHRASE = 288,
2603 EXPRESSION_PHRASE = 289,
2604 CHAR = 290,
2605 DOTS = 291,
2606 IDENT = 292,
2607 INT = 293,
2608 REAL = 294,
2609 STRING = 295,
2610 TYPE = 296,
2611 OTHER = 297,
2612 FILENAME = 298
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002613 };
2614#endif
Sam Ravnborg70f75242007-09-01 10:26:32 +02002615/* Tokens. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002616#define ASM_KEYW 258
2617#define ATTRIBUTE_KEYW 259
2618#define AUTO_KEYW 260
2619#define BOOL_KEYW 261
2620#define CHAR_KEYW 262
2621#define CONST_KEYW 263
2622#define DOUBLE_KEYW 264
2623#define ENUM_KEYW 265
2624#define EXTERN_KEYW 266
Sam Ravnborg70f75242007-09-01 10:26:32 +02002625#define EXTENSION_KEYW 267
2626#define FLOAT_KEYW 268
2627#define INLINE_KEYW 269
2628#define INT_KEYW 270
2629#define LONG_KEYW 271
2630#define REGISTER_KEYW 272
2631#define RESTRICT_KEYW 273
2632#define SHORT_KEYW 274
2633#define SIGNED_KEYW 275
2634#define STATIC_KEYW 276
2635#define STRUCT_KEYW 277
2636#define TYPEDEF_KEYW 278
2637#define UNION_KEYW 279
2638#define UNSIGNED_KEYW 280
2639#define VOID_KEYW 281
2640#define VOLATILE_KEYW 282
2641#define TYPEOF_KEYW 283
2642#define EXPORT_SYMBOL_KEYW 284
2643#define ASM_PHRASE 285
2644#define ATTRIBUTE_PHRASE 286
2645#define BRACE_PHRASE 287
2646#define BRACKET_PHRASE 288
2647#define EXPRESSION_PHRASE 289
2648#define CHAR 290
2649#define DOTS 291
2650#define IDENT 292
2651#define INT 293
2652#define REAL 294
2653#define STRING 295
2654#define TYPE 296
2655#define OTHER 297
2656#define FILENAME 298
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002657
2658
2659
2660
Sam Ravnborg70f75242007-09-01 10:26:32 +02002661#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002662typedef int YYSTYPE;
2663# define yystype YYSTYPE /* obsolescent; will be withdrawn */
2664# define YYSTYPE_IS_DECLARED 1
2665# define YYSTYPE_IS_TRIVIAL 1
2666#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07002667
2668extern YYSTYPE yylval;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002669
2670