blob: b54044ac1fa7cadcdcd59c37368e19374f670a94 [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
Adrian Bunk11ddad32008-07-17 02:08:12 +03009/* %not-for-header */
10
11/* %if-c-only */
12/* %if-not-reentrant */
13
14/* %endif */
15/* %endif */
16/* %ok-for-header */
17
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#define FLEX_SCANNER
19#define YY_FLEX_MAJOR_VERSION 2
20#define YY_FLEX_MINOR_VERSION 5
Adrian Bunk11ddad32008-07-17 02:08:12 +030021#define YY_FLEX_SUBMINOR_VERSION 35
Sam Ravnborg70f75242007-09-01 10:26:32 +020022#if YY_FLEX_SUBMINOR_VERSION > 0
23#define FLEX_BETA
24#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Sam Ravnborg70f75242007-09-01 10:26:32 +020026/* %if-c++-only */
27/* %endif */
28
29/* %if-c-only */
30
31/* %endif */
32
33/* %if-c-only */
34
35/* %endif */
36
37/* First, we deal with platform-specific or compiler-specific issues. */
38
39/* begin standard C headers. */
40/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -070041#include <stdio.h>
Sam Ravnborg70f75242007-09-01 10:26:32 +020042#include <string.h>
43#include <errno.h>
44#include <stdlib.h>
45/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
Sam Ravnborg70f75242007-09-01 10:26:32 +020047/* %if-tables-serialization */
48/* %endif */
49/* end standard C headers. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
Sam Ravnborg70f75242007-09-01 10:26:32 +020051/* %if-c-or-c++ */
52/* flex integer type definitions */
53
54#ifndef FLEXINT_H
55#define FLEXINT_H
56
57/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
58
Adrian Bunk11ddad32008-07-17 02:08:12 +030059#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
Sam Ravnborg70f75242007-09-01 10:26:32 +020060
61/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
62 * if you want the limit (max/min) macros for int types.
63 */
64#ifndef __STDC_LIMIT_MACROS
65#define __STDC_LIMIT_MACROS 1
Linus Torvalds1da177e2005-04-16 15:20:36 -070066#endif
67
Sam Ravnborg70f75242007-09-01 10:26:32 +020068#include <inttypes.h>
69typedef int8_t flex_int8_t;
70typedef uint8_t flex_uint8_t;
71typedef int16_t flex_int16_t;
72typedef uint16_t flex_uint16_t;
73typedef int32_t flex_int32_t;
74typedef uint32_t flex_uint32_t;
75#else
76typedef signed char flex_int8_t;
77typedef short int flex_int16_t;
78typedef int flex_int32_t;
79typedef unsigned char flex_uint8_t;
80typedef unsigned short int flex_uint16_t;
81typedef unsigned int flex_uint32_t;
Michal Marek9c281f12011-01-20 15:23:08 +010082#endif /* ! C99 */
Sam Ravnborg70f75242007-09-01 10:26:32 +020083
84/* Limits of integral types. */
85#ifndef INT8_MIN
86#define INT8_MIN (-128)
87#endif
88#ifndef INT16_MIN
89#define INT16_MIN (-32767-1)
90#endif
91#ifndef INT32_MIN
92#define INT32_MIN (-2147483647-1)
93#endif
94#ifndef INT8_MAX
95#define INT8_MAX (127)
96#endif
97#ifndef INT16_MAX
98#define INT16_MAX (32767)
99#endif
100#ifndef INT32_MAX
101#define INT32_MAX (2147483647)
102#endif
103#ifndef UINT8_MAX
104#define UINT8_MAX (255U)
105#endif
106#ifndef UINT16_MAX
107#define UINT16_MAX (65535U)
108#endif
109#ifndef UINT32_MAX
110#define UINT32_MAX (4294967295U)
111#endif
112
113#endif /* ! FLEXINT_H */
114
115/* %endif */
116
117/* %if-c++-only */
118/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119
120#ifdef __cplusplus
121
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122/* The "const" storage-class-modifier is valid. */
123#define YY_USE_CONST
124
125#else /* ! __cplusplus */
126
Adrian Bunk11ddad32008-07-17 02:08:12 +0300127/* C99 requires __STDC__ to be defined as 1. */
128#if defined (__STDC__)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130#define YY_USE_CONST
131
Adrian Bunk11ddad32008-07-17 02:08:12 +0300132#endif /* defined (__STDC__) */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133#endif /* ! __cplusplus */
134
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135#ifdef YY_USE_CONST
136#define yyconst const
137#else
138#define yyconst
139#endif
140
Sam Ravnborg70f75242007-09-01 10:26:32 +0200141/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142
143/* Returned upon end-of-file. */
144#define YY_NULL 0
Sam Ravnborg70f75242007-09-01 10:26:32 +0200145/* %ok-for-header */
146
147/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148
149/* Promotes a possibly negative, possibly signed char to an unsigned
150 * integer for use as an array index. If the signed char is negative,
151 * we want to instead treat it as an 8-bit unsigned char, hence the
152 * double cast.
153 */
154#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
Sam Ravnborg70f75242007-09-01 10:26:32 +0200155/* %ok-for-header */
156
157/* %if-reentrant */
158/* %endif */
159
160/* %if-not-reentrant */
161
162/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700163
164/* Enter a start condition. This macro really ought to take a parameter,
165 * but we do it the disgusting crufty way forced on us by the ()-less
166 * definition of BEGIN.
167 */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200168#define BEGIN (yy_start) = 1 + 2 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169
170/* Translate the current start state into a value that can be later handed
171 * to BEGIN to return to the state. The YYSTATE alias is for lex
172 * compatibility.
173 */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200174#define YY_START (((yy_start) - 1) / 2)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175#define YYSTATE YY_START
176
177/* Action number for EOF rule of a given start state. */
178#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
179
180/* Special action meaning "start processing a new file". */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200181#define YY_NEW_FILE yyrestart(yyin )
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182
183#define YY_END_OF_BUFFER_CHAR 0
184
185/* Size of default input buffer. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200186#ifndef YY_BUF_SIZE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187#define YY_BUF_SIZE 16384
Sam Ravnborg70f75242007-09-01 10:26:32 +0200188#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700189
Sam Ravnborg70f75242007-09-01 10:26:32 +0200190/* The state buf must be large enough to hold one state per character in the main buffer.
191 */
192#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
193
194#ifndef YY_TYPEDEF_YY_BUFFER_STATE
195#define YY_TYPEDEF_YY_BUFFER_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196typedef struct yy_buffer_state *YY_BUFFER_STATE;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200197#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198
Sam Ravnborg70f75242007-09-01 10:26:32 +0200199/* %if-not-reentrant */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200extern int yyleng;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200201/* %endif */
202
203/* %if-c-only */
204/* %if-not-reentrant */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700205extern FILE *yyin, *yyout;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200206/* %endif */
207/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208
209#define EOB_ACT_CONTINUE_SCAN 0
210#define EOB_ACT_END_OF_FILE 1
211#define EOB_ACT_LAST_MATCH 2
212
Sam Ravnborg70f75242007-09-01 10:26:32 +0200213 #define YY_LESS_LINENO(n)
214
215/* Return all but the first "n" matched characters back to the input stream. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216#define yyless(n) \
217 do \
218 { \
219 /* Undo effects of setting up yytext. */ \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200220 int yyless_macro_arg = (n); \
221 YY_LESS_LINENO(yyless_macro_arg);\
222 *yy_cp = (yy_hold_char); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223 YY_RESTORE_YY_MORE_OFFSET \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200224 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700225 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
226 } \
227 while ( 0 )
228
Sam Ravnborg70f75242007-09-01 10:26:32 +0200229#define unput(c) yyunput( c, (yytext_ptr) )
Linus Torvalds1da177e2005-04-16 15:20:36 -0700230
Sam Ravnborg70f75242007-09-01 10:26:32 +0200231#ifndef YY_TYPEDEF_YY_SIZE_T
232#define YY_TYPEDEF_YY_SIZE_T
Adrian Bunk11ddad32008-07-17 02:08:12 +0300233typedef size_t yy_size_t;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200234#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700235
Sam Ravnborg70f75242007-09-01 10:26:32 +0200236#ifndef YY_STRUCT_YY_BUFFER_STATE
237#define YY_STRUCT_YY_BUFFER_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700238struct yy_buffer_state
239 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200240/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241 FILE *yy_input_file;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200242/* %endif */
243
244/* %if-c++-only */
245/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700246
247 char *yy_ch_buf; /* input buffer */
248 char *yy_buf_pos; /* current position in input buffer */
249
250 /* Size of input buffer in bytes, not including room for EOB
251 * characters.
252 */
253 yy_size_t yy_buf_size;
254
255 /* Number of characters read into yy_ch_buf, not including EOB
256 * characters.
257 */
258 int yy_n_chars;
259
260 /* Whether we "own" the buffer - i.e., we know we created it,
261 * and can realloc() it to grow it, and should free() it to
262 * delete it.
263 */
264 int yy_is_our_buffer;
265
266 /* Whether this is an "interactive" input source; if so, and
267 * if we're using stdio for input, then we want to use getc()
268 * instead of fread(), to make sure we stop fetching input after
269 * each newline.
270 */
271 int yy_is_interactive;
272
273 /* Whether we're considered to be at the beginning of a line.
274 * If so, '^' rules will be active on the next match, otherwise
275 * not.
276 */
277 int yy_at_bol;
278
Sam Ravnborg70f75242007-09-01 10:26:32 +0200279 int yy_bs_lineno; /**< The line count. */
280 int yy_bs_column; /**< The column count. */
281
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282 /* Whether to try to fill the input buffer when we reach the
283 * end of it.
284 */
285 int yy_fill_buffer;
286
287 int yy_buffer_status;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200288
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289#define YY_BUFFER_NEW 0
290#define YY_BUFFER_NORMAL 1
291 /* When an EOF's been seen but there's still some text to process
292 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
293 * shouldn't try reading from the input source any more. We might
294 * still have a bunch of tokens to match, though, because of
295 * possible backing-up.
296 *
297 * When we actually see the EOF, we change the status to "new"
298 * (via yyrestart()), so that the user can continue scanning by
299 * just pointing yyin at a new input file.
300 */
301#define YY_BUFFER_EOF_PENDING 2
Linus Torvalds1da177e2005-04-16 15:20:36 -0700302
Sam Ravnborg70f75242007-09-01 10:26:32 +0200303 };
304#endif /* !YY_STRUCT_YY_BUFFER_STATE */
305
306/* %if-c-only Standard (non-C++) definition */
307/* %not-for-header */
308
309/* %if-not-reentrant */
310
311/* Stack of input buffers. */
312static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
313static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
314static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
315/* %endif */
316/* %ok-for-header */
317
318/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700319
320/* We provide macros for accessing buffer states in case in the
321 * future we want to put the buffer states in a more general
322 * "scanner state".
Sam Ravnborg70f75242007-09-01 10:26:32 +0200323 *
324 * Returns the top of the stack, or NULL.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700325 */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200326#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
327 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
328 : NULL)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700329
Sam Ravnborg70f75242007-09-01 10:26:32 +0200330/* Same as previous macro, but useful when we know that the buffer stack is not
331 * NULL or when we need an lvalue. For internal use only.
332 */
333#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
334
335/* %if-c-only Standard (non-C++) definition */
336
337/* %if-not-reentrant */
338/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700339
340/* yy_hold_char holds the character lost when yytext is formed. */
341static char yy_hold_char;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700342static int yy_n_chars; /* number of characters read into yy_ch_buf */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343int yyleng;
344
345/* Points to current character in buffer. */
346static char *yy_c_buf_p = (char *) 0;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200347static int yy_init = 0; /* whether we need to initialize */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700348static int yy_start = 0; /* start state number */
349
350/* Flag which is used to allow yywrap()'s to do buffer switches
351 * instead of setting up a fresh yyin. A bit of a hack ...
352 */
353static int yy_did_buffer_switch_on_eof;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200354/* %ok-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700355
Sam Ravnborg70f75242007-09-01 10:26:32 +0200356/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700357
Sam Ravnborg70f75242007-09-01 10:26:32 +0200358void yyrestart (FILE *input_file );
359void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
360YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
361void yy_delete_buffer (YY_BUFFER_STATE b );
362void yy_flush_buffer (YY_BUFFER_STATE b );
363void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
364void yypop_buffer_state (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700365
Sam Ravnborg70f75242007-09-01 10:26:32 +0200366static void yyensure_buffer_stack (void );
367static void yy_load_buffer_state (void );
368static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700369
Sam Ravnborg70f75242007-09-01 10:26:32 +0200370#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
371
372YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
373YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
374YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
375
376/* %endif */
377
378void *yyalloc (yy_size_t );
379void *yyrealloc (void *,yy_size_t );
380void yyfree (void * );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700381
382#define yy_new_buffer yy_create_buffer
383
384#define yy_set_interactive(is_interactive) \
385 { \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200386 if ( ! YY_CURRENT_BUFFER ){ \
387 yyensure_buffer_stack (); \
388 YY_CURRENT_BUFFER_LVALUE = \
389 yy_create_buffer(yyin,YY_BUF_SIZE ); \
390 } \
391 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700392 }
393
394#define yy_set_bol(at_bol) \
395 { \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200396 if ( ! YY_CURRENT_BUFFER ){\
397 yyensure_buffer_stack (); \
398 YY_CURRENT_BUFFER_LVALUE = \
399 yy_create_buffer(yyin,YY_BUF_SIZE ); \
400 } \
401 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700402 }
403
Sam Ravnborg70f75242007-09-01 10:26:32 +0200404#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700405
Sam Ravnborg70f75242007-09-01 10:26:32 +0200406/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
407/* Begin user sect3 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700408
Adrian Bunk11ddad32008-07-17 02:08:12 +0300409#define yywrap(n) 1
Linus Torvalds1da177e2005-04-16 15:20:36 -0700410#define YY_SKIP_YYWRAP
411
412#define FLEX_DEBUG
Sam Ravnborg70f75242007-09-01 10:26:32 +0200413
Linus Torvalds1da177e2005-04-16 15:20:36 -0700414typedef unsigned char YY_CHAR;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200415
Linus Torvalds1da177e2005-04-16 15:20:36 -0700416FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200417
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418typedef int yy_state_type;
419
Sam Ravnborg70f75242007-09-01 10:26:32 +0200420extern int yylineno;
421
422int yylineno = 1;
423
Linus Torvalds1da177e2005-04-16 15:20:36 -0700424extern char *yytext;
425#define yytext_ptr yytext
426
Sam Ravnborg70f75242007-09-01 10:26:32 +0200427/* %if-c-only Standard (non-C++) definition */
428
429static yy_state_type yy_get_previous_state (void );
430static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
431static int yy_get_next_buffer (void );
432static void yy_fatal_error (yyconst char msg[] );
433
434/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435
436/* Done after the current pattern has been matched and before the
437 * corresponding action - sets up yytext.
438 */
439#define YY_DO_BEFORE_ACTION \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200440 (yytext_ptr) = yy_bp; \
441/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
442 yyleng = (size_t) (yy_cp - yy_bp); \
443 (yy_hold_char) = *yy_cp; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444 *yy_cp = '\0'; \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200445/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
446 (yy_c_buf_p) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700447
Sam Ravnborg70f75242007-09-01 10:26:32 +0200448/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700449#define YY_NUM_RULES 13
450#define YY_END_OF_BUFFER 14
Sam Ravnborg70f75242007-09-01 10:26:32 +0200451/* This struct is not used in this scanner,
452 but its presence is necessary. */
453struct yy_trans_info
454 {
455 flex_int32_t yy_verify;
456 flex_int32_t yy_nxt;
457 };
458static yyconst flex_int16_t yy_accept[76] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700459 { 0,
460 0, 0, 0, 0, 14, 12, 4, 3, 12, 7,
461 12, 12, 7, 12, 12, 12, 12, 12, 9, 9,
462 12, 12, 12, 4, 0, 5, 0, 7, 0, 6,
463 0, 0, 0, 0, 0, 0, 2, 8, 10, 10,
464 9, 0, 0, 9, 9, 0, 9, 0, 0, 11,
465 0, 0, 0, 10, 0, 10, 9, 9, 0, 0,
466 0, 0, 0, 0, 0, 10, 10, 0, 0, 0,
467 0, 0, 0, 1, 0
468 } ;
469
Sam Ravnborg70f75242007-09-01 10:26:32 +0200470static yyconst flex_int32_t yy_ec[256] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700471 { 0,
472 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
473 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 2, 1, 5, 6, 7, 8, 9, 10, 1,
476 1, 8, 11, 1, 12, 13, 8, 14, 15, 15,
477 15, 15, 15, 15, 15, 16, 16, 1, 1, 17,
478 18, 19, 1, 1, 20, 20, 20, 20, 21, 22,
479 7, 7, 7, 7, 7, 23, 7, 7, 7, 7,
480 7, 7, 7, 7, 24, 7, 7, 25, 7, 7,
481 1, 26, 1, 8, 7, 1, 20, 20, 20, 20,
482
483 21, 22, 7, 7, 7, 7, 7, 27, 7, 7,
484 7, 7, 7, 7, 7, 7, 24, 7, 7, 25,
485 7, 7, 1, 28, 1, 8, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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
494 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
495 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
496 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
498 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
499 1, 1, 1, 1, 1
500 } ;
501
Sam Ravnborg70f75242007-09-01 10:26:32 +0200502static yyconst flex_int32_t yy_meta[29] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700503 { 0,
504 1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
505 4, 4, 5, 6, 6, 6, 1, 1, 1, 7,
506 8, 7, 3, 3, 3, 1, 3, 1
507 } ;
508
Sam Ravnborg70f75242007-09-01 10:26:32 +0200509static yyconst flex_int16_t yy_base[88] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700510 { 0,
511 0, 147, 21, 140, 145, 284, 39, 284, 26, 0,
512 32, 126, 40, 44, 115, 35, 36, 46, 50, 53,
513 39, 61, 54, 79, 65, 284, 0, 0, 66, 284,
514 0, 119, 79, 75, 123, 104, 284, 284, 107, 0,
515 79, 73, 76, 76, 66, 0, 0, 85, 86, 284,
516 133, 83, 91, 284, 99, 147, 284, 114, 122, 70,
517 107, 141, 172, 151, 135, 181, 284, 137, 114, 157,
518 149, 48, 45, 284, 284, 208, 214, 222, 230, 238,
519 246, 250, 255, 256, 261, 267, 275
520 } ;
521
Sam Ravnborg70f75242007-09-01 10:26:32 +0200522static yyconst flex_int16_t yy_def[88] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700523 { 0,
524 75, 1, 1, 3, 75, 75, 75, 75, 76, 77,
525 78, 75, 77, 79, 75, 75, 75, 75, 75, 19,
526 75, 75, 75, 75, 76, 75, 80, 77, 78, 75,
527 81, 75, 76, 78, 79, 79, 75, 75, 75, 39,
528 19, 82, 83, 75, 75, 84, 20, 76, 78, 75,
529 79, 51, 85, 75, 75, 75, 75, 84, 79, 51,
530 79, 79, 79, 51, 75, 75, 75, 86, 79, 63,
531 86, 87, 87, 75, 0, 75, 75, 75, 75, 75,
532 75, 75, 75, 75, 75, 75, 75
533 } ;
534
Sam Ravnborg70f75242007-09-01 10:26:32 +0200535static yyconst flex_int16_t yy_nxt[313] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700536 { 0,
537 6, 7, 8, 7, 9, 6, 10, 6, 6, 11,
538 6, 6, 12, 6, 6, 6, 6, 6, 6, 10,
539 10, 10, 13, 10, 10, 6, 10, 6, 15, 16,
540 26, 15, 17, 18, 19, 20, 20, 21, 15, 22,
541 24, 30, 24, 38, 33, 36, 37, 74, 23, 34,
542 74, 27, 38, 38, 38, 38, 38, 31, 32, 39,
543 39, 39, 40, 41, 41, 42, 47, 47, 47, 26,
544 43, 38, 44, 45, 46, 30, 44, 75, 38, 38,
545 24, 38, 24, 26, 30, 40, 55, 55, 57, 26,
546 27, 31, 57, 43, 35, 30, 64, 64, 64, 57,
547
548 31, 65, 65, 75, 27, 36, 37, 35, 59, 37,
549 27, 31, 56, 56, 56, 59, 37, 51, 52, 52,
550 39, 39, 39, 59, 37, 37, 68, 53, 54, 54,
551 69, 50, 38, 54, 59, 37, 44, 45, 32, 37,
552 44, 35, 59, 37, 75, 14, 60, 60, 66, 66,
553 66, 37, 14, 72, 75, 61, 62, 63, 59, 61,
554 56, 56, 56, 69, 64, 64, 64, 69, 67, 67,
555 75, 75, 75, 67, 37, 35, 75, 75, 75, 61,
556 62, 75, 75, 61, 75, 70, 70, 70, 75, 75,
557 75, 70, 70, 70, 66, 66, 66, 75, 75, 75,
558
559 75, 75, 54, 54, 75, 75, 75, 54, 25, 25,
560 25, 25, 25, 25, 25, 25, 28, 75, 75, 28,
561 28, 28, 29, 29, 29, 29, 29, 29, 29, 29,
562 35, 35, 35, 35, 35, 35, 35, 35, 48, 75,
563 48, 48, 48, 48, 48, 48, 49, 75, 49, 49,
564 49, 49, 49, 49, 42, 42, 75, 42, 56, 75,
565 56, 58, 58, 58, 66, 75, 66, 71, 71, 71,
566 71, 71, 71, 71, 71, 73, 73, 73, 73, 73,
567 73, 73, 73, 5, 75, 75, 75, 75, 75, 75,
568 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
569
570 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
571 75, 75
572 } ;
573
Sam Ravnborg70f75242007-09-01 10:26:32 +0200574static yyconst flex_int16_t yy_chk[313] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575 { 0,
576 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
577 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
578 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
579 9, 3, 3, 3, 3, 3, 3, 3, 3, 3,
580 7, 11, 7, 16, 13, 14, 14, 73, 3, 13,
581 72, 9, 16, 17, 17, 21, 21, 11, 18, 18,
582 18, 18, 19, 19, 19, 19, 20, 20, 20, 25,
583 19, 23, 19, 19, 19, 29, 19, 20, 22, 22,
584 24, 23, 24, 33, 34, 42, 43, 43, 45, 48,
585 25, 29, 45, 42, 60, 49, 52, 52, 52, 44,
586
587 34, 53, 53, 41, 33, 36, 36, 52, 61, 61,
588 48, 49, 55, 55, 55, 69, 69, 36, 36, 36,
589 39, 39, 39, 59, 59, 35, 59, 39, 39, 39,
590 61, 32, 15, 39, 51, 51, 58, 58, 12, 68,
591 58, 68, 62, 62, 5, 4, 51, 51, 65, 65,
592 65, 71, 2, 71, 0, 51, 51, 51, 70, 51,
593 56, 56, 56, 62, 64, 64, 64, 62, 56, 56,
594 0, 0, 0, 56, 63, 64, 0, 0, 0, 70,
595 70, 0, 0, 70, 0, 63, 63, 63, 0, 0,
596 0, 63, 63, 63, 66, 66, 66, 0, 0, 0,
597
598 0, 0, 66, 66, 0, 0, 0, 66, 76, 76,
599 76, 76, 76, 76, 76, 76, 77, 0, 0, 77,
600 77, 77, 78, 78, 78, 78, 78, 78, 78, 78,
601 79, 79, 79, 79, 79, 79, 79, 79, 80, 0,
602 80, 80, 80, 80, 80, 80, 81, 0, 81, 81,
603 81, 81, 81, 81, 82, 82, 0, 82, 83, 0,
604 83, 84, 84, 84, 85, 0, 85, 86, 86, 86,
605 86, 86, 86, 86, 86, 87, 87, 87, 87, 87,
606 87, 87, 87, 75, 75, 75, 75, 75, 75, 75,
607 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
608
609 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
610 75, 75
611 } ;
612
613static yy_state_type yy_last_accepting_state;
614static char *yy_last_accepting_cpos;
615
616extern int yy_flex_debug;
617int yy_flex_debug = 1;
618
Sam Ravnborg70f75242007-09-01 10:26:32 +0200619static yyconst flex_int16_t yy_rule_linenum[13] =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700620 { 0,
Adrian Bunk11ddad32008-07-17 02:08:12 +0300621 71, 72, 73, 76, 79, 80, 81, 87, 88, 89,
622 91, 94
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 } ;
624
625/* The intent behind this definition is that it'll catch
626 * any uses of REJECT which flex missed.
627 */
628#define REJECT reject_used_but_not_detected
629#define yymore() yymore_used_but_not_detected
630#define YY_MORE_ADJ 0
631#define YY_RESTORE_YY_MORE_OFFSET
632char *yytext;
633#line 1 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634/* Lexical analysis for genksyms.
635 Copyright 1996, 1997 Linux International.
636
637 New implementation contributed by Richard Henderson <rth@tamu.edu>
638 Based on original work by Bjorn Ekwall <bj0rn@blox.se>
639
640 Taken from Linux modutils 2.4.22.
641
642 This program is free software; you can redistribute it and/or modify it
643 under the terms of the GNU General Public License as published by the
644 Free Software Foundation; either version 2 of the License, or (at your
645 option) any later version.
646
647 This program is distributed in the hope that it will be useful, but
648 WITHOUT ANY WARRANTY; without even the implied warranty of
649 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
650 General Public License for more details.
651
652 You should have received a copy of the GNU General Public License
653 along with this program; if not, write to the Free Software Foundation,
654 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
655#line 25 "scripts/genksyms/lex.l"
656
657#include <limits.h>
658#include <stdlib.h>
659#include <string.h>
660#include <ctype.h>
661
662#include "genksyms.h"
663#include "parse.h"
664
665/* We've got a two-level lexer here. We let flex do basic tokenization
666 and then we categorize those basic tokens in the second stage. */
667#define YY_DECL static int yylex1(void)
668
669/* Version 2 checksumming does proper tokenization; version 1 wasn't
670 quite so pedantic. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700671
672/* We don't do multiple input files. */
Adrian Bunk11ddad32008-07-17 02:08:12 +0300673#define YY_NO_INPUT 1
Michal Marek9c281f12011-01-20 15:23:08 +0100674#line 675 "scripts/genksyms/lex.c"
Sam Ravnborg70f75242007-09-01 10:26:32 +0200675
676#define INITIAL 0
677#define V2_TOKENS 1
678
679#ifndef YY_NO_UNISTD_H
680/* Special case for "unistd.h", since it is non-ANSI. We include it way
681 * down here because we want the user's section 1 to have been scanned first.
682 * The user has a chance to override it with an option.
683 */
684/* %if-c-only */
685#include <unistd.h>
686/* %endif */
687/* %if-c++-only */
688/* %endif */
689#endif
690
691#ifndef YY_EXTRA_TYPE
692#define YY_EXTRA_TYPE void *
693#endif
694
695/* %if-c-only Reentrant structure and macros (non-C++). */
696/* %if-reentrant */
697/* %if-c-only */
698
699static int yy_init_globals (void );
700
701/* %endif */
702/* %if-reentrant */
703/* %endif */
Adrian Bunk11ddad32008-07-17 02:08:12 +0300704/* %endif End reentrant structures and macros. */
705
706/* Accessor methods to globals.
707 These are made visible to non-reentrant scanners for convenience. */
708
709int yylex_destroy (void );
710
711int yyget_debug (void );
712
713void yyset_debug (int debug_flag );
714
715YY_EXTRA_TYPE yyget_extra (void );
716
717void yyset_extra (YY_EXTRA_TYPE user_defined );
718
719FILE *yyget_in (void );
720
721void yyset_in (FILE * in_str );
722
723FILE *yyget_out (void );
724
725void yyset_out (FILE * out_str );
726
727int yyget_leng (void );
728
729char *yyget_text (void );
730
731int yyget_lineno (void );
732
733void yyset_lineno (int line_number );
734
Sam Ravnborg70f75242007-09-01 10:26:32 +0200735/* %if-bison-bridge */
736/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737
738/* Macros after this point can all be overridden by user definitions in
739 * section 1.
740 */
741
742#ifndef YY_SKIP_YYWRAP
743#ifdef __cplusplus
Sam Ravnborg70f75242007-09-01 10:26:32 +0200744extern "C" int yywrap (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700745#else
Sam Ravnborg70f75242007-09-01 10:26:32 +0200746extern int yywrap (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700747#endif
748#endif
749
Sam Ravnborg70f75242007-09-01 10:26:32 +0200750/* %not-for-header */
751
752 static void yyunput (int c,char *buf_ptr );
753
754/* %ok-for-header */
755
756/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700757
758#ifndef yytext_ptr
Sam Ravnborg70f75242007-09-01 10:26:32 +0200759static void yy_flex_strncpy (char *,yyconst char *,int );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700760#endif
761
762#ifdef YY_NEED_STRLEN
Sam Ravnborg70f75242007-09-01 10:26:32 +0200763static int yy_flex_strlen (yyconst char * );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700764#endif
765
766#ifndef YY_NO_INPUT
Sam Ravnborg70f75242007-09-01 10:26:32 +0200767/* %if-c-only Standard (non-C++) definition */
768/* %not-for-header */
769
Linus Torvalds1da177e2005-04-16 15:20:36 -0700770#ifdef __cplusplus
Sam Ravnborg70f75242007-09-01 10:26:32 +0200771static int yyinput (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772#else
Sam Ravnborg70f75242007-09-01 10:26:32 +0200773static int input (void );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700774#endif
Sam Ravnborg70f75242007-09-01 10:26:32 +0200775/* %ok-for-header */
776
777/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700778#endif
779
Sam Ravnborg70f75242007-09-01 10:26:32 +0200780/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700781
Sam Ravnborg70f75242007-09-01 10:26:32 +0200782/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783
784/* Amount of stuff to slurp up with each read. */
785#ifndef YY_READ_BUF_SIZE
786#define YY_READ_BUF_SIZE 8192
787#endif
788
789/* Copy whatever the last rule matched to the standard output. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700790#ifndef ECHO
Sam Ravnborg70f75242007-09-01 10:26:32 +0200791/* %if-c-only Standard (non-C++) definition */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700792/* This used to be an fputs(), but since the string might contain NUL's,
793 * we now use fwrite().
794 */
Adrian Bunk11ddad32008-07-17 02:08:12 +0300795#define ECHO fwrite( yytext, yyleng, 1, yyout )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200796/* %endif */
797/* %if-c++-only C++ definition */
798/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799#endif
800
801/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
802 * is returned in "result".
803 */
804#ifndef YY_INPUT
805#define YY_INPUT(buf,result,max_size) \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200806/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
807 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700808 { \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200809 int c = '*'; \
Michal Marek9c281f12011-01-20 15:23:08 +0100810 int n; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700811 for ( n = 0; n < max_size && \
812 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
813 buf[n] = (char) c; \
814 if ( c == '\n' ) \
815 buf[n++] = (char) c; \
816 if ( c == EOF && ferror( yyin ) ) \
817 YY_FATAL_ERROR( "input in flex scanner failed" ); \
818 result = n; \
819 } \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200820 else \
821 { \
822 errno=0; \
823 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
824 { \
825 if( errno != EINTR) \
826 { \
827 YY_FATAL_ERROR( "input in flex scanner failed" ); \
828 break; \
829 } \
830 errno=0; \
831 clearerr(yyin); \
832 } \
833 }\
834\
835/* %if-c++-only C++ definition \ */\
836/* %endif */
837
Linus Torvalds1da177e2005-04-16 15:20:36 -0700838#endif
839
840/* No semi-colon after return; correct usage is to write "yyterminate();" -
841 * we don't want an extra ';' after the "return" because that will cause
842 * some compilers to complain about unreachable statements.
843 */
844#ifndef yyterminate
845#define yyterminate() return YY_NULL
846#endif
847
848/* Number of entries by which start-condition stack grows. */
849#ifndef YY_START_STACK_INCR
850#define YY_START_STACK_INCR 25
851#endif
852
853/* Report a fatal error. */
854#ifndef YY_FATAL_ERROR
Sam Ravnborg70f75242007-09-01 10:26:32 +0200855/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700856#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200857/* %endif */
858/* %if-c++-only */
859/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860#endif
861
Sam Ravnborg70f75242007-09-01 10:26:32 +0200862/* %if-tables-serialization structures and prototypes */
863/* %not-for-header */
864
865/* %ok-for-header */
866
867/* %not-for-header */
868
869/* %tables-yydmap generated elements */
870/* %endif */
871/* end tables serialization structures and prototypes */
872
873/* %ok-for-header */
874
Linus Torvalds1da177e2005-04-16 15:20:36 -0700875/* Default declaration of generated scanner - a define so the user can
876 * easily add parameters.
877 */
878#ifndef YY_DECL
Sam Ravnborg70f75242007-09-01 10:26:32 +0200879#define YY_DECL_IS_OURS 1
880/* %if-c-only Standard (non-C++) definition */
881
882extern int yylex (void);
883
884#define YY_DECL int yylex (void)
885/* %endif */
886/* %if-c++-only C++ definition */
887/* %endif */
888#endif /* !YY_DECL */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700889
890/* Code executed at the beginning of each rule, after yytext and yyleng
891 * have been set up.
892 */
893#ifndef YY_USER_ACTION
894#define YY_USER_ACTION
895#endif
896
897/* Code executed at the end of each rule. */
898#ifndef YY_BREAK
899#define YY_BREAK break;
900#endif
901
Sam Ravnborg70f75242007-09-01 10:26:32 +0200902/* %% [6.0] YY_RULE_SETUP definition goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700903#define YY_RULE_SETUP \
904 if ( yyleng > 0 ) \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200905 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700906 (yytext[yyleng - 1] == '\n'); \
907 YY_USER_ACTION
908
Sam Ravnborg70f75242007-09-01 10:26:32 +0200909/* %not-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700910
Sam Ravnborg70f75242007-09-01 10:26:32 +0200911/** The main scanner function which does all the work.
912 */
913YY_DECL
914{
915 register yy_state_type yy_current_state;
916 register char *yy_cp, *yy_bp;
917 register int yy_act;
918
919/* %% [7.0] user's declarations go here */
Adrian Bunk11ddad32008-07-17 02:08:12 +0300920#line 67 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700921
922
923
924 /* Keep track of our location in the original source files. */
Michal Marek9c281f12011-01-20 15:23:08 +0100925#line 926 "scripts/genksyms/lex.c"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700926
Sam Ravnborg70f75242007-09-01 10:26:32 +0200927 if ( !(yy_init) )
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200929 (yy_init) = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700930
931#ifdef YY_USER_INIT
932 YY_USER_INIT;
933#endif
934
Sam Ravnborg70f75242007-09-01 10:26:32 +0200935 if ( ! (yy_start) )
936 (yy_start) = 1; /* first start state */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700937
938 if ( ! yyin )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200939/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 yyin = stdin;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200941/* %endif */
942/* %if-c++-only */
943/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700944
945 if ( ! yyout )
Sam Ravnborg70f75242007-09-01 10:26:32 +0200946/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700947 yyout = stdout;
Sam Ravnborg70f75242007-09-01 10:26:32 +0200948/* %endif */
949/* %if-c++-only */
950/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700951
Sam Ravnborg70f75242007-09-01 10:26:32 +0200952 if ( ! YY_CURRENT_BUFFER ) {
953 yyensure_buffer_stack ();
954 YY_CURRENT_BUFFER_LVALUE =
955 yy_create_buffer(yyin,YY_BUF_SIZE );
956 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700957
Sam Ravnborg70f75242007-09-01 10:26:32 +0200958 yy_load_buffer_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -0700959 }
960
961 while ( 1 ) /* loops until end-of-file is reached */
962 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200963/* %% [8.0] yymore()-related code goes here */
964 yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700965
966 /* Support of yytext. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200967 *yy_cp = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700968
969 /* yy_bp points to the position in yy_ch_buf of the start of
970 * the current run.
971 */
972 yy_bp = yy_cp;
973
Sam Ravnborg70f75242007-09-01 10:26:32 +0200974/* %% [9.0] code to set up and find next match goes here */
975 yy_current_state = (yy_start);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 yy_current_state += YY_AT_BOL();
977yy_match:
978 do
979 {
980 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
981 if ( yy_accept[yy_current_state] )
982 {
Sam Ravnborg70f75242007-09-01 10:26:32 +0200983 (yy_last_accepting_state) = yy_current_state;
984 (yy_last_accepting_cpos) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 }
986 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
987 {
988 yy_current_state = (int) yy_def[yy_current_state];
989 if ( yy_current_state >= 76 )
990 yy_c = yy_meta[(unsigned int) yy_c];
991 }
992 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
993 ++yy_cp;
994 }
995 while ( yy_base[yy_current_state] != 284 );
996
997yy_find_action:
Sam Ravnborg70f75242007-09-01 10:26:32 +0200998/* %% [10.0] code to find the action number goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700999 yy_act = yy_accept[yy_current_state];
1000 if ( yy_act == 0 )
1001 { /* have to back up */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001002 yy_cp = (yy_last_accepting_cpos);
1003 yy_current_state = (yy_last_accepting_state);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001004 yy_act = yy_accept[yy_current_state];
1005 }
1006
1007 YY_DO_BEFORE_ACTION;
1008
Sam Ravnborg70f75242007-09-01 10:26:32 +02001009/* %% [11.0] code for yylineno update goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001010
1011do_action: /* This label is used only to access EOF actions. */
1012
Sam Ravnborg70f75242007-09-01 10:26:32 +02001013/* %% [12.0] debug code goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001014 if ( yy_flex_debug )
1015 {
1016 if ( yy_act == 0 )
1017 fprintf( stderr, "--scanner backing up\n" );
1018 else if ( yy_act < 13 )
Sam Ravnborg70f75242007-09-01 10:26:32 +02001019 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1020 (long)yy_rule_linenum[yy_act], yytext );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 else if ( yy_act == 13 )
1022 fprintf( stderr, "--accepting default rule (\"%s\")\n",
1023 yytext );
1024 else if ( yy_act == 14 )
1025 fprintf( stderr, "--(end of buffer or a NUL)\n" );
1026 else
1027 fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1028 }
1029
1030 switch ( yy_act )
1031 { /* beginning of action switch */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001032/* %% [13.0] actions go here */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001033 case 0: /* must back up */
1034 /* undo the effects of YY_DO_BEFORE_ACTION */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001035 *yy_cp = (yy_hold_char);
1036 yy_cp = (yy_last_accepting_cpos);
1037 yy_current_state = (yy_last_accepting_state);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001038 goto yy_find_action;
1039
1040case 1:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001041/* rule 1 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001042YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001043#line 71 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001044return FILENAME;
1045 YY_BREAK
1046case 2:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001047/* rule 2 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001049#line 72 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001050cur_line++;
1051 YY_BREAK
1052case 3:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001053/* rule 3 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001054YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001055#line 73 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001056cur_line++;
1057 YY_BREAK
1058/* Ignore all other whitespace. */
1059case 4:
1060YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001061#line 76 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062;
1063 YY_BREAK
1064case 5:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001065/* rule 5 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001066YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001067#line 79 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068return STRING;
1069 YY_BREAK
1070case 6:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001071/* rule 6 can match eol */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001073#line 80 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001074return CHAR;
1075 YY_BREAK
1076case 7:
1077YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001078#line 81 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001079return IDENT;
1080 YY_BREAK
1081/* The Pedant requires that the other C multi-character tokens be
1082 recognized as tokens. We don't actually use them since we don't
1083 parse expressions, but we do want whitespace to be arranged
1084 around them properly. */
1085case 8:
1086YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001087#line 87 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001088return OTHER;
1089 YY_BREAK
1090case 9:
1091YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001092#line 88 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001093return INT;
1094 YY_BREAK
1095case 10:
1096YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001097#line 89 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001098return REAL;
1099 YY_BREAK
1100case 11:
1101YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001102#line 91 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001103return DOTS;
1104 YY_BREAK
1105/* All other tokens are single characters. */
1106case 12:
1107YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001108#line 94 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001109return yytext[0];
1110 YY_BREAK
1111case 13:
1112YY_RULE_SETUP
Adrian Bunk11ddad32008-07-17 02:08:12 +03001113#line 97 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001114ECHO;
1115 YY_BREAK
Michal Marek9c281f12011-01-20 15:23:08 +01001116#line 1117 "scripts/genksyms/lex.c"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001117case YY_STATE_EOF(INITIAL):
1118case YY_STATE_EOF(V2_TOKENS):
1119 yyterminate();
1120
1121 case YY_END_OF_BUFFER:
1122 {
1123 /* Amount of text matched not including the EOB char. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001124 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001125
1126 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001127 *yy_cp = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001128 YY_RESTORE_YY_MORE_OFFSET
1129
Sam Ravnborg70f75242007-09-01 10:26:32 +02001130 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001131 {
1132 /* We're scanning a new file or input source. It's
1133 * possible that this happened because the user
1134 * just pointed yyin at a new source and called
1135 * yylex(). If so, then we have to assure
Sam Ravnborg70f75242007-09-01 10:26:32 +02001136 * consistency between YY_CURRENT_BUFFER and our
Linus Torvalds1da177e2005-04-16 15:20:36 -07001137 * globals. Here is the right place to do so, because
1138 * this is the first action (other than possibly a
1139 * back-up) that will match for the new input source.
1140 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001141 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1142 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1143 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001144 }
1145
1146 /* Note that here we test for yy_c_buf_p "<=" to the position
1147 * of the first EOB in the buffer, since yy_c_buf_p will
1148 * already have been incremented past the NUL character
1149 * (since all states make transitions on EOB to the
1150 * end-of-buffer state). Contrast this with the test
1151 * in input().
1152 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001153 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 { /* This was really a NUL. */
1155 yy_state_type yy_next_state;
1156
Sam Ravnborg70f75242007-09-01 10:26:32 +02001157 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158
Sam Ravnborg70f75242007-09-01 10:26:32 +02001159 yy_current_state = yy_get_previous_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001160
1161 /* Okay, we're now positioned to make the NUL
1162 * transition. We couldn't have
1163 * yy_get_previous_state() go ahead and do it
1164 * for us because it doesn't know how to deal
1165 * with the possibility of jamming (and we don't
1166 * want to build jamming into it because then it
1167 * will run more slowly).
1168 */
1169
1170 yy_next_state = yy_try_NUL_trans( yy_current_state );
1171
Sam Ravnborg70f75242007-09-01 10:26:32 +02001172 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001173
1174 if ( yy_next_state )
1175 {
1176 /* Consume the NUL. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001177 yy_cp = ++(yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001178 yy_current_state = yy_next_state;
1179 goto yy_match;
1180 }
1181
1182 else
1183 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001184/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1185 yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001186 goto yy_find_action;
1187 }
1188 }
1189
Sam Ravnborg70f75242007-09-01 10:26:32 +02001190 else switch ( yy_get_next_buffer( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001191 {
1192 case EOB_ACT_END_OF_FILE:
1193 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001194 (yy_did_buffer_switch_on_eof) = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195
Sam Ravnborg70f75242007-09-01 10:26:32 +02001196 if ( yywrap( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001197 {
1198 /* Note: because we've taken care in
1199 * yy_get_next_buffer() to have set up
1200 * yytext, we can now set up
1201 * yy_c_buf_p so that if some total
1202 * hoser (like flex itself) wants to
1203 * call the scanner after we return the
1204 * YY_NULL, it'll still work - another
1205 * YY_NULL will get returned.
1206 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001207 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001208
1209 yy_act = YY_STATE_EOF(YY_START);
1210 goto do_action;
1211 }
1212
1213 else
1214 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001215 if ( ! (yy_did_buffer_switch_on_eof) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001216 YY_NEW_FILE;
1217 }
1218 break;
1219 }
1220
1221 case EOB_ACT_CONTINUE_SCAN:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001222 (yy_c_buf_p) =
1223 (yytext_ptr) + yy_amount_of_matched_text;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001224
Sam Ravnborg70f75242007-09-01 10:26:32 +02001225 yy_current_state = yy_get_previous_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226
Sam Ravnborg70f75242007-09-01 10:26:32 +02001227 yy_cp = (yy_c_buf_p);
1228 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001229 goto yy_match;
1230
1231 case EOB_ACT_LAST_MATCH:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001232 (yy_c_buf_p) =
1233 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001234
Sam Ravnborg70f75242007-09-01 10:26:32 +02001235 yy_current_state = yy_get_previous_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001236
Sam Ravnborg70f75242007-09-01 10:26:32 +02001237 yy_cp = (yy_c_buf_p);
1238 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001239 goto yy_find_action;
1240 }
1241 break;
1242 }
1243
1244 default:
1245 YY_FATAL_ERROR(
1246 "fatal flex scanner internal error--no action found" );
1247 } /* end of action switch */
1248 } /* end of scanning one token */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001249} /* end of yylex */
1250/* %ok-for-header */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001251
Sam Ravnborg70f75242007-09-01 10:26:32 +02001252/* %if-c++-only */
1253/* %not-for-header */
1254
1255/* %ok-for-header */
1256
1257/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001258
1259/* yy_get_next_buffer - try to read in a new buffer
1260 *
1261 * Returns a code representing an action:
1262 * EOB_ACT_LAST_MATCH -
1263 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1264 * EOB_ACT_END_OF_FILE - end of file
1265 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001266/* %if-c-only */
1267static int yy_get_next_buffer (void)
1268/* %endif */
1269/* %if-c++-only */
1270/* %endif */
1271{
1272 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1273 register char *source = (yytext_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001274 register int number_to_move, i;
1275 int ret_val;
1276
Sam Ravnborg70f75242007-09-01 10:26:32 +02001277 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 YY_FATAL_ERROR(
1279 "fatal flex scanner internal error--end of buffer missed" );
1280
Sam Ravnborg70f75242007-09-01 10:26:32 +02001281 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 { /* Don't try to fill the buffer, so this is an EOF. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001283 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001284 {
1285 /* We matched a single character, the EOB, so
1286 * treat this as a final EOF.
1287 */
1288 return EOB_ACT_END_OF_FILE;
1289 }
1290
1291 else
1292 {
1293 /* We matched some text prior to the EOB, first
1294 * process it.
1295 */
1296 return EOB_ACT_LAST_MATCH;
1297 }
1298 }
1299
1300 /* Try to read more data. */
1301
1302 /* First move last chars to start of buffer. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001303 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001304
1305 for ( i = 0; i < number_to_move; ++i )
1306 *(dest++) = *(source++);
1307
Sam Ravnborg70f75242007-09-01 10:26:32 +02001308 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001309 /* don't do the read, it's not guaranteed to return an EOF,
1310 * just force an EOF
1311 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001312 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001313
1314 else
1315 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001316 int num_to_read =
1317 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318
1319 while ( num_to_read <= 0 )
1320 { /* Not enough room in the buffer - grow it. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321
1322 /* just a shorter name for the current buffer */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001323 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324
1325 int yy_c_buf_p_offset =
Sam Ravnborg70f75242007-09-01 10:26:32 +02001326 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001327
1328 if ( b->yy_is_our_buffer )
1329 {
1330 int new_size = b->yy_buf_size * 2;
1331
1332 if ( new_size <= 0 )
1333 b->yy_buf_size += b->yy_buf_size / 8;
1334 else
1335 b->yy_buf_size *= 2;
1336
1337 b->yy_ch_buf = (char *)
1338 /* Include room in for 2 EOB chars. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001339 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001340 }
1341 else
1342 /* Can't grow it, we don't own it. */
1343 b->yy_ch_buf = 0;
1344
1345 if ( ! b->yy_ch_buf )
1346 YY_FATAL_ERROR(
1347 "fatal error - scanner input buffer overflow" );
1348
Sam Ravnborg70f75242007-09-01 10:26:32 +02001349 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001350
Sam Ravnborg70f75242007-09-01 10:26:32 +02001351 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Linus Torvalds1da177e2005-04-16 15:20:36 -07001352 number_to_move - 1;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001353
Linus Torvalds1da177e2005-04-16 15:20:36 -07001354 }
1355
1356 if ( num_to_read > YY_READ_BUF_SIZE )
1357 num_to_read = YY_READ_BUF_SIZE;
1358
1359 /* Read in more data. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001360 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1361 (yy_n_chars), (size_t) num_to_read );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001362
Sam Ravnborg70f75242007-09-01 10:26:32 +02001363 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001364 }
1365
Sam Ravnborg70f75242007-09-01 10:26:32 +02001366 if ( (yy_n_chars) == 0 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001367 {
1368 if ( number_to_move == YY_MORE_ADJ )
1369 {
1370 ret_val = EOB_ACT_END_OF_FILE;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001371 yyrestart(yyin );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001372 }
1373
1374 else
1375 {
1376 ret_val = EOB_ACT_LAST_MATCH;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001377 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Linus Torvalds1da177e2005-04-16 15:20:36 -07001378 YY_BUFFER_EOF_PENDING;
1379 }
1380 }
1381
1382 else
1383 ret_val = EOB_ACT_CONTINUE_SCAN;
1384
Adrian Bunk11ddad32008-07-17 02:08:12 +03001385 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1386 /* Extend the array by 50%, plus the number we really need. */
1387 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1388 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1389 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1390 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1391 }
1392
Sam Ravnborg70f75242007-09-01 10:26:32 +02001393 (yy_n_chars) += number_to_move;
1394 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1395 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001396
Sam Ravnborg70f75242007-09-01 10:26:32 +02001397 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001398
1399 return ret_val;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001400}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001401
1402/* yy_get_previous_state - get the state just before the EOB char was reached */
1403
Sam Ravnborg70f75242007-09-01 10:26:32 +02001404/* %if-c-only */
1405/* %not-for-header */
1406
1407 static yy_state_type yy_get_previous_state (void)
1408/* %endif */
1409/* %if-c++-only */
1410/* %endif */
1411{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001412 register yy_state_type yy_current_state;
1413 register char *yy_cp;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001414
1415/* %% [15.0] code to get the start state into yy_current_state goes here */
1416 yy_current_state = (yy_start);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001417 yy_current_state += YY_AT_BOL();
1418
Sam Ravnborg70f75242007-09-01 10:26:32 +02001419 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001420 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001421/* %% [16.0] code to find the next state goes here */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001422 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1423 if ( yy_accept[yy_current_state] )
1424 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001425 (yy_last_accepting_state) = yy_current_state;
1426 (yy_last_accepting_cpos) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001427 }
1428 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1429 {
1430 yy_current_state = (int) yy_def[yy_current_state];
1431 if ( yy_current_state >= 76 )
1432 yy_c = yy_meta[(unsigned int) yy_c];
1433 }
1434 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1435 }
1436
1437 return yy_current_state;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001438}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001439
1440/* yy_try_NUL_trans - try to make a transition on the NUL character
1441 *
1442 * synopsis
1443 * next_state = yy_try_NUL_trans( current_state );
1444 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001445/* %if-c-only */
1446 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1447/* %endif */
1448/* %if-c++-only */
1449/* %endif */
1450{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001451 register int yy_is_jam;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001452 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
1453 register char *yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001454
1455 register YY_CHAR yy_c = 1;
1456 if ( yy_accept[yy_current_state] )
1457 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001458 (yy_last_accepting_state) = yy_current_state;
1459 (yy_last_accepting_cpos) = yy_cp;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001460 }
1461 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1462 {
1463 yy_current_state = (int) yy_def[yy_current_state];
1464 if ( yy_current_state >= 76 )
1465 yy_c = yy_meta[(unsigned int) yy_c];
1466 }
1467 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1468 yy_is_jam = (yy_current_state == 75);
1469
1470 return yy_is_jam ? 0 : yy_current_state;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001471}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001472
Sam Ravnborg70f75242007-09-01 10:26:32 +02001473/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001474
Sam Ravnborg70f75242007-09-01 10:26:32 +02001475 static void yyunput (int c, register char * yy_bp )
1476/* %endif */
1477/* %if-c++-only */
1478/* %endif */
1479{
1480 register char *yy_cp;
1481
1482 yy_cp = (yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001483
1484 /* undo effects of setting up yytext */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001485 *yy_cp = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001486
Sam Ravnborg70f75242007-09-01 10:26:32 +02001487 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001488 { /* need to shift things up to make room */
1489 /* +2 for EOB chars. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001490 register int number_to_move = (yy_n_chars) + 2;
1491 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1492 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001493 register char *source =
Sam Ravnborg70f75242007-09-01 10:26:32 +02001494 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001495
Sam Ravnborg70f75242007-09-01 10:26:32 +02001496 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001497 *--dest = *--source;
1498
1499 yy_cp += (int) (dest - source);
1500 yy_bp += (int) (dest - source);
Sam Ravnborg70f75242007-09-01 10:26:32 +02001501 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1502 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001503
Sam Ravnborg70f75242007-09-01 10:26:32 +02001504 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001505 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1506 }
1507
1508 *--yy_cp = (char) c;
1509
Sam Ravnborg70f75242007-09-01 10:26:32 +02001510/* %% [18.0] update yylineno here */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001511
Sam Ravnborg70f75242007-09-01 10:26:32 +02001512 (yytext_ptr) = yy_bp;
1513 (yy_hold_char) = *yy_cp;
1514 (yy_c_buf_p) = yy_cp;
1515}
1516/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001517
Sam Ravnborg70f75242007-09-01 10:26:32 +02001518/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001519
Sam Ravnborg70f75242007-09-01 10:26:32 +02001520/* %if-c-only */
1521#ifndef YY_NO_INPUT
Linus Torvalds1da177e2005-04-16 15:20:36 -07001522#ifdef __cplusplus
Sam Ravnborg70f75242007-09-01 10:26:32 +02001523 static int yyinput (void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001524#else
Sam Ravnborg70f75242007-09-01 10:26:32 +02001525 static int input (void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001526#endif
Sam Ravnborg70f75242007-09-01 10:26:32 +02001527
1528/* %endif */
1529/* %if-c++-only */
1530/* %endif */
1531{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001532 int c;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001533
1534 *(yy_c_buf_p) = (yy_hold_char);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001535
Sam Ravnborg70f75242007-09-01 10:26:32 +02001536 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001537 {
1538 /* yy_c_buf_p now points to the character we want to return.
1539 * If this occurs *before* the EOB characters, then it's a
1540 * valid NUL; if not, then we've hit the end of the buffer.
1541 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001542 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001543 /* This was really a NUL. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001544 *(yy_c_buf_p) = '\0';
Linus Torvalds1da177e2005-04-16 15:20:36 -07001545
1546 else
1547 { /* need more input */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001548 int offset = (yy_c_buf_p) - (yytext_ptr);
1549 ++(yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001550
Sam Ravnborg70f75242007-09-01 10:26:32 +02001551 switch ( yy_get_next_buffer( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001552 {
1553 case EOB_ACT_LAST_MATCH:
1554 /* This happens because yy_g_n_b()
1555 * sees that we've accumulated a
1556 * token and flags that we need to
1557 * try matching the token before
1558 * proceeding. But for input(),
1559 * there's no matching to consider.
1560 * So convert the EOB_ACT_LAST_MATCH
1561 * to EOB_ACT_END_OF_FILE.
1562 */
1563
1564 /* Reset buffer status. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001565 yyrestart(yyin );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001566
Sam Ravnborg70f75242007-09-01 10:26:32 +02001567 /*FALLTHROUGH*/
Linus Torvalds1da177e2005-04-16 15:20:36 -07001568
1569 case EOB_ACT_END_OF_FILE:
1570 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001571 if ( yywrap( ) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001572 return EOF;
1573
Sam Ravnborg70f75242007-09-01 10:26:32 +02001574 if ( ! (yy_did_buffer_switch_on_eof) )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001575 YY_NEW_FILE;
1576#ifdef __cplusplus
1577 return yyinput();
1578#else
1579 return input();
1580#endif
1581 }
1582
1583 case EOB_ACT_CONTINUE_SCAN:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001584 (yy_c_buf_p) = (yytext_ptr) + offset;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001585 break;
1586 }
1587 }
1588 }
1589
Sam Ravnborg70f75242007-09-01 10:26:32 +02001590 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1591 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1592 (yy_hold_char) = *++(yy_c_buf_p);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001593
Sam Ravnborg70f75242007-09-01 10:26:32 +02001594/* %% [19.0] update BOL and yylineno */
1595 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
Linus Torvalds1da177e2005-04-16 15:20:36 -07001596
1597 return c;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001598}
1599/* %if-c-only */
1600#endif /* ifndef YY_NO_INPUT */
1601/* %endif */
1602
1603/** Immediately switch to a different input stream.
1604 * @param input_file A readable stream.
1605 *
1606 * @note This function does not reset the start condition to @c INITIAL .
1607 */
1608/* %if-c-only */
1609 void yyrestart (FILE * input_file )
1610/* %endif */
1611/* %if-c++-only */
1612/* %endif */
1613{
1614
1615 if ( ! YY_CURRENT_BUFFER ){
1616 yyensure_buffer_stack ();
1617 YY_CURRENT_BUFFER_LVALUE =
1618 yy_create_buffer(yyin,YY_BUF_SIZE );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001619 }
1620
Sam Ravnborg70f75242007-09-01 10:26:32 +02001621 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1622 yy_load_buffer_state( );
1623}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001624
Sam Ravnborg70f75242007-09-01 10:26:32 +02001625/** Switch to a different input buffer.
1626 * @param new_buffer The new input buffer.
1627 *
1628 */
1629/* %if-c-only */
1630 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1631/* %endif */
1632/* %if-c++-only */
1633/* %endif */
1634{
1635
1636 /* TODO. We should be able to replace this entire function body
1637 * with
1638 * yypop_buffer_state();
1639 * yypush_buffer_state(new_buffer);
1640 */
1641 yyensure_buffer_stack ();
1642 if ( YY_CURRENT_BUFFER == new_buffer )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001643 return;
1644
Sam Ravnborg70f75242007-09-01 10:26:32 +02001645 if ( YY_CURRENT_BUFFER )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001646 {
1647 /* Flush out information for old buffer. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001648 *(yy_c_buf_p) = (yy_hold_char);
1649 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1650 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001651 }
1652
Sam Ravnborg70f75242007-09-01 10:26:32 +02001653 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1654 yy_load_buffer_state( );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001655
1656 /* We don't actually know whether we did this switch during
1657 * EOF (yywrap()) processing, but the only time this flag
1658 * is looked at is after yywrap() is called, so it's safe
1659 * to go ahead and always set it.
1660 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001661 (yy_did_buffer_switch_on_eof) = 1;
1662}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001663
Sam Ravnborg70f75242007-09-01 10:26:32 +02001664/* %if-c-only */
1665static void yy_load_buffer_state (void)
1666/* %endif */
1667/* %if-c++-only */
1668/* %endif */
1669{
1670 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1671 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1672 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1673 (yy_hold_char) = *(yy_c_buf_p);
1674}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001675
Sam Ravnborg70f75242007-09-01 10:26:32 +02001676/** Allocate and initialize an input buffer state.
1677 * @param file A readable stream.
1678 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1679 *
1680 * @return the allocated buffer state.
1681 */
1682/* %if-c-only */
1683 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1684/* %endif */
1685/* %if-c++-only */
1686/* %endif */
1687{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001688 YY_BUFFER_STATE b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001689
1690 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001691 if ( ! b )
1692 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1693
1694 b->yy_buf_size = size;
1695
1696 /* yy_ch_buf has to be 2 characters longer than the size given because
1697 * we need to put in 2 end-of-buffer characters.
1698 */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001699 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001700 if ( ! b->yy_ch_buf )
1701 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1702
1703 b->yy_is_our_buffer = 1;
1704
Sam Ravnborg70f75242007-09-01 10:26:32 +02001705 yy_init_buffer(b,file );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001706
1707 return b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001708}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001709
Sam Ravnborg70f75242007-09-01 10:26:32 +02001710/** Destroy the buffer.
1711 * @param b a buffer created with yy_create_buffer()
1712 *
1713 */
1714/* %if-c-only */
1715 void yy_delete_buffer (YY_BUFFER_STATE b )
1716/* %endif */
1717/* %if-c++-only */
1718/* %endif */
1719{
1720
Linus Torvalds1da177e2005-04-16 15:20:36 -07001721 if ( ! b )
1722 return;
1723
Sam Ravnborg70f75242007-09-01 10:26:32 +02001724 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1725 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001726
1727 if ( b->yy_is_our_buffer )
Sam Ravnborg70f75242007-09-01 10:26:32 +02001728 yyfree((void *) b->yy_ch_buf );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001729
Sam Ravnborg70f75242007-09-01 10:26:32 +02001730 yyfree((void *) b );
1731}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001732
Sam Ravnborg70f75242007-09-01 10:26:32 +02001733/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001734
Sam Ravnborg70f75242007-09-01 10:26:32 +02001735#ifndef __cplusplus
1736extern int isatty (int );
1737#endif /* __cplusplus */
1738
1739/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001740
Sam Ravnborg70f75242007-09-01 10:26:32 +02001741/* %if-c++-only */
1742/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001743
Sam Ravnborg70f75242007-09-01 10:26:32 +02001744/* Initializes or reinitializes a buffer.
1745 * This function is sometimes called more than once on the same buffer,
1746 * such as during a yyrestart() or at EOF.
1747 */
1748/* %if-c-only */
1749 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1750/* %endif */
1751/* %if-c++-only */
1752/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001753
Sam Ravnborg70f75242007-09-01 10:26:32 +02001754{
1755 int oerrno = errno;
1756
1757 yy_flush_buffer(b );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001758
1759 b->yy_input_file = file;
1760 b->yy_fill_buffer = 1;
1761
Sam Ravnborg70f75242007-09-01 10:26:32 +02001762 /* If b is the current buffer, then yy_init_buffer was _probably_
1763 * called from yyrestart() or through yy_get_next_buffer.
1764 * In that case, we don't want to reset the lineno or column.
1765 */
1766 if (b != YY_CURRENT_BUFFER){
1767 b->yy_bs_lineno = 1;
1768 b->yy_bs_column = 0;
1769 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001770
Sam Ravnborg70f75242007-09-01 10:26:32 +02001771/* %if-c-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001772
Sam Ravnborg70f75242007-09-01 10:26:32 +02001773 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1774
1775/* %endif */
1776/* %if-c++-only */
1777/* %endif */
1778 errno = oerrno;
1779}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001780
Sam Ravnborg70f75242007-09-01 10:26:32 +02001781/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1782 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1783 *
1784 */
1785/* %if-c-only */
1786 void yy_flush_buffer (YY_BUFFER_STATE b )
1787/* %endif */
1788/* %if-c++-only */
1789/* %endif */
1790{
1791 if ( ! b )
Linus Torvalds1da177e2005-04-16 15:20:36 -07001792 return;
1793
1794 b->yy_n_chars = 0;
1795
1796 /* We always need two end-of-buffer characters. The first causes
1797 * a transition to the end-of-buffer state. The second causes
1798 * a jam in that state.
1799 */
1800 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1801 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1802
1803 b->yy_buf_pos = &b->yy_ch_buf[0];
1804
1805 b->yy_at_bol = 1;
1806 b->yy_buffer_status = YY_BUFFER_NEW;
1807
Sam Ravnborg70f75242007-09-01 10:26:32 +02001808 if ( b == YY_CURRENT_BUFFER )
1809 yy_load_buffer_state( );
1810}
1811
1812/* %if-c-or-c++ */
1813/** Pushes the new state onto the stack. The new state becomes
1814 * the current state. This function will allocate the stack
1815 * if necessary.
1816 * @param new_buffer The new state.
1817 *
1818 */
1819/* %if-c-only */
1820void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1821/* %endif */
1822/* %if-c++-only */
1823/* %endif */
1824{
1825 if (new_buffer == NULL)
1826 return;
1827
1828 yyensure_buffer_stack();
1829
1830 /* This block is copied from yy_switch_to_buffer. */
1831 if ( YY_CURRENT_BUFFER )
1832 {
1833 /* Flush out information for old buffer. */
1834 *(yy_c_buf_p) = (yy_hold_char);
1835 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1836 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1837 }
1838
1839 /* Only push if top exists. Otherwise, replace top. */
1840 if (YY_CURRENT_BUFFER)
1841 (yy_buffer_stack_top)++;
1842 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1843
1844 /* copied from yy_switch_to_buffer. */
1845 yy_load_buffer_state( );
1846 (yy_did_buffer_switch_on_eof) = 1;
1847}
1848/* %endif */
1849
1850/* %if-c-or-c++ */
1851/** Removes and deletes the top of the stack, if present.
1852 * The next element becomes the new top.
1853 *
1854 */
1855/* %if-c-only */
1856void yypop_buffer_state (void)
1857/* %endif */
1858/* %if-c++-only */
1859/* %endif */
1860{
1861 if (!YY_CURRENT_BUFFER)
1862 return;
1863
1864 yy_delete_buffer(YY_CURRENT_BUFFER );
1865 YY_CURRENT_BUFFER_LVALUE = NULL;
1866 if ((yy_buffer_stack_top) > 0)
1867 --(yy_buffer_stack_top);
1868
1869 if (YY_CURRENT_BUFFER) {
1870 yy_load_buffer_state( );
1871 (yy_did_buffer_switch_on_eof) = 1;
1872 }
1873}
1874/* %endif */
1875
1876/* %if-c-or-c++ */
1877/* Allocates the stack if it does not exist.
1878 * Guarantees space for at least one push.
1879 */
1880/* %if-c-only */
1881static void yyensure_buffer_stack (void)
1882/* %endif */
1883/* %if-c++-only */
1884/* %endif */
1885{
1886 int num_to_alloc;
1887
1888 if (!(yy_buffer_stack)) {
1889
1890 /* First allocation is just for 2 elements, since we don't know if this
1891 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1892 * immediate realloc on the next call.
1893 */
1894 num_to_alloc = 1;
1895 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1896 (num_to_alloc * sizeof(struct yy_buffer_state*)
1897 );
Adrian Bunk11ddad32008-07-17 02:08:12 +03001898 if ( ! (yy_buffer_stack) )
1899 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1900
Sam Ravnborg70f75242007-09-01 10:26:32 +02001901 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1902
1903 (yy_buffer_stack_max) = num_to_alloc;
1904 (yy_buffer_stack_top) = 0;
1905 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001906 }
1907
Sam Ravnborg70f75242007-09-01 10:26:32 +02001908 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Linus Torvalds1da177e2005-04-16 15:20:36 -07001909
Sam Ravnborg70f75242007-09-01 10:26:32 +02001910 /* Increase the buffer to prepare for a possible push. */
1911 int grow_size = 8 /* arbitrary grow size */;
1912
1913 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1914 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1915 ((yy_buffer_stack),
1916 num_to_alloc * sizeof(struct yy_buffer_state*)
1917 );
Adrian Bunk11ddad32008-07-17 02:08:12 +03001918 if ( ! (yy_buffer_stack) )
1919 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Sam Ravnborg70f75242007-09-01 10:26:32 +02001920
1921 /* zero only the new slots.*/
1922 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1923 (yy_buffer_stack_max) = num_to_alloc;
1924 }
1925}
1926/* %endif */
1927
1928/* %if-c-only */
1929/** Setup the input buffer state to scan directly from a user-specified character buffer.
1930 * @param base the character buffer
1931 * @param size the size in bytes of the character buffer
1932 *
1933 * @return the newly allocated buffer state object.
1934 */
1935YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1936{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001937 YY_BUFFER_STATE b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001938
Linus Torvalds1da177e2005-04-16 15:20:36 -07001939 if ( size < 2 ||
1940 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1941 base[size-1] != YY_END_OF_BUFFER_CHAR )
1942 /* They forgot to leave room for the EOB's. */
1943 return 0;
1944
Sam Ravnborg70f75242007-09-01 10:26:32 +02001945 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001946 if ( ! b )
1947 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1948
1949 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1950 b->yy_buf_pos = b->yy_ch_buf = base;
1951 b->yy_is_our_buffer = 0;
1952 b->yy_input_file = 0;
1953 b->yy_n_chars = b->yy_buf_size;
1954 b->yy_is_interactive = 0;
1955 b->yy_at_bol = 1;
1956 b->yy_fill_buffer = 0;
1957 b->yy_buffer_status = YY_BUFFER_NEW;
1958
Sam Ravnborg70f75242007-09-01 10:26:32 +02001959 yy_switch_to_buffer(b );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001960
1961 return b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001962}
1963/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001964
Sam Ravnborg70f75242007-09-01 10:26:32 +02001965/* %if-c-only */
1966/** Setup the input buffer state to scan a string. The next call to yylex() will
1967 * scan from a @e copy of @a str.
1968 * @param yystr a NUL-terminated string to scan
1969 *
1970 * @return the newly allocated buffer state object.
1971 * @note If you want to scan bytes that may contain NUL values, then use
1972 * yy_scan_bytes() instead.
1973 */
1974YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1975{
1976
1977 return yy_scan_bytes(yystr,strlen(yystr) );
1978}
1979/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001980
Sam Ravnborg70f75242007-09-01 10:26:32 +02001981/* %if-c-only */
1982/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1983 * scan from a @e copy of @a bytes.
1984 * @param bytes the byte buffer to scan
1985 * @param len the number of bytes in the buffer pointed to by @a bytes.
1986 *
1987 * @return the newly allocated buffer state object.
1988 */
1989YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1990{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001991 YY_BUFFER_STATE b;
1992 char *buf;
1993 yy_size_t n;
1994 int i;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001995
Linus Torvalds1da177e2005-04-16 15:20:36 -07001996 /* Get memory for full buffer, including space for trailing EOB's. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001997 n = _yybytes_len + 2;
1998 buf = (char *) yyalloc(n );
Linus Torvalds1da177e2005-04-16 15:20:36 -07001999 if ( ! buf )
2000 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2001
Sam Ravnborg70f75242007-09-01 10:26:32 +02002002 for ( i = 0; i < _yybytes_len; ++i )
2003 buf[i] = yybytes[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002004
Sam Ravnborg70f75242007-09-01 10:26:32 +02002005 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002006
Sam Ravnborg70f75242007-09-01 10:26:32 +02002007 b = yy_scan_buffer(buf,n );
Linus Torvalds1da177e2005-04-16 15:20:36 -07002008 if ( ! b )
2009 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2010
2011 /* It's okay to grow etc. this buffer, and we should throw it
2012 * away when we're done.
2013 */
2014 b->yy_is_our_buffer = 1;
2015
2016 return b;
Sam Ravnborg70f75242007-09-01 10:26:32 +02002017}
2018/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002019
2020#ifndef YY_EXIT_FAILURE
2021#define YY_EXIT_FAILURE 2
2022#endif
2023
Sam Ravnborg70f75242007-09-01 10:26:32 +02002024/* %if-c-only */
2025static void yy_fatal_error (yyconst char* msg )
2026{
2027 (void) fprintf( stderr, "%s\n", msg );
Linus Torvalds1da177e2005-04-16 15:20:36 -07002028 exit( YY_EXIT_FAILURE );
Sam Ravnborg70f75242007-09-01 10:26:32 +02002029}
2030/* %endif */
2031/* %if-c++-only */
2032/* %endif */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002033
2034/* Redefine yyless() so it works in section 3 code. */
2035
2036#undef yyless
2037#define yyless(n) \
2038 do \
2039 { \
2040 /* Undo effects of setting up yytext. */ \
Sam Ravnborg70f75242007-09-01 10:26:32 +02002041 int yyless_macro_arg = (n); \
2042 YY_LESS_LINENO(yyless_macro_arg);\
2043 yytext[yyleng] = (yy_hold_char); \
2044 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2045 (yy_hold_char) = *(yy_c_buf_p); \
2046 *(yy_c_buf_p) = '\0'; \
2047 yyleng = yyless_macro_arg; \
Linus Torvalds1da177e2005-04-16 15:20:36 -07002048 } \
2049 while ( 0 )
2050
Sam Ravnborg70f75242007-09-01 10:26:32 +02002051/* Accessor methods (get/set functions) to struct members. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002052
Sam Ravnborg70f75242007-09-01 10:26:32 +02002053/* %if-c-only */
2054/* %if-reentrant */
2055/* %endif */
2056
2057/** Get the current line number.
2058 *
2059 */
2060int yyget_lineno (void)
2061{
2062
2063 return yylineno;
2064}
2065
2066/** Get the input stream.
2067 *
2068 */
2069FILE *yyget_in (void)
2070{
2071 return yyin;
2072}
2073
2074/** Get the output stream.
2075 *
2076 */
2077FILE *yyget_out (void)
2078{
2079 return yyout;
2080}
2081
2082/** Get the length of the current token.
2083 *
2084 */
2085int yyget_leng (void)
2086{
2087 return yyleng;
2088}
2089
2090/** Get the current token.
2091 *
2092 */
2093
2094char *yyget_text (void)
2095{
2096 return yytext;
2097}
2098
2099/* %if-reentrant */
2100/* %endif */
2101
2102/** Set the current line number.
2103 * @param line_number
2104 *
2105 */
2106void yyset_lineno (int line_number )
2107{
2108
2109 yylineno = line_number;
2110}
2111
2112/** Set the input stream. This does not discard the current
2113 * input buffer.
2114 * @param in_str A readable stream.
2115 *
2116 * @see yy_switch_to_buffer
2117 */
2118void yyset_in (FILE * in_str )
2119{
2120 yyin = in_str ;
2121}
2122
2123void yyset_out (FILE * out_str )
2124{
2125 yyout = out_str ;
2126}
2127
2128int yyget_debug (void)
2129{
2130 return yy_flex_debug;
2131}
2132
2133void yyset_debug (int bdebug )
2134{
2135 yy_flex_debug = bdebug ;
2136}
2137
2138/* %endif */
2139
2140/* %if-reentrant */
2141/* %if-bison-bridge */
2142/* %endif */
Adrian Bunk11ddad32008-07-17 02:08:12 +03002143/* %endif if-c-only */
Sam Ravnborg70f75242007-09-01 10:26:32 +02002144
2145/* %if-c-only */
2146static int yy_init_globals (void)
2147{
2148 /* Initialization is the same as for the non-reentrant scanner.
2149 * This function is called from yylex_destroy(), so don't allocate here.
2150 */
2151
2152 (yy_buffer_stack) = 0;
2153 (yy_buffer_stack_top) = 0;
2154 (yy_buffer_stack_max) = 0;
2155 (yy_c_buf_p) = (char *) 0;
2156 (yy_init) = 0;
2157 (yy_start) = 0;
2158
2159/* Defined in main.c */
2160#ifdef YY_STDINIT
2161 yyin = stdin;
2162 yyout = stdout;
2163#else
2164 yyin = (FILE *) 0;
2165 yyout = (FILE *) 0;
2166#endif
2167
2168 /* For future reference: Set errno on error, since we are called by
2169 * yylex_init()
2170 */
2171 return 0;
2172}
2173/* %endif */
2174
Adrian Bunk11ddad32008-07-17 02:08:12 +03002175/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
Sam Ravnborg70f75242007-09-01 10:26:32 +02002176/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2177int yylex_destroy (void)
Sam Ravnborg70f75242007-09-01 10:26:32 +02002178{
2179
2180 /* Pop the buffer stack, destroying each element. */
2181 while(YY_CURRENT_BUFFER){
2182 yy_delete_buffer(YY_CURRENT_BUFFER );
2183 YY_CURRENT_BUFFER_LVALUE = NULL;
2184 yypop_buffer_state();
2185 }
2186
2187 /* Destroy the stack itself. */
2188 yyfree((yy_buffer_stack) );
2189 (yy_buffer_stack) = NULL;
2190
Sam Ravnborg70f75242007-09-01 10:26:32 +02002191 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2192 * yylex() is called, initialization will occur. */
2193 yy_init_globals( );
2194
2195/* %if-reentrant */
2196/* %endif */
2197 return 0;
Sam Ravnborg70f75242007-09-01 10:26:32 +02002198}
2199/* %endif */
2200
2201/*
2202 * Internal utility routines.
2203 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002204
2205#ifndef yytext_ptr
Sam Ravnborg70f75242007-09-01 10:26:32 +02002206static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2207{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002208 register int i;
2209 for ( i = 0; i < n; ++i )
2210 s1[i] = s2[i];
Sam Ravnborg70f75242007-09-01 10:26:32 +02002211}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002212#endif
2213
2214#ifdef YY_NEED_STRLEN
Sam Ravnborg70f75242007-09-01 10:26:32 +02002215static int yy_flex_strlen (yyconst char * s )
2216{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002217 register int n;
2218 for ( n = 0; s[n]; ++n )
2219 ;
2220
2221 return n;
Sam Ravnborg70f75242007-09-01 10:26:32 +02002222}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002223#endif
2224
Sam Ravnborg70f75242007-09-01 10:26:32 +02002225void *yyalloc (yy_size_t size )
2226{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002227 return (void *) malloc( size );
Sam Ravnborg70f75242007-09-01 10:26:32 +02002228}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002229
Sam Ravnborg70f75242007-09-01 10:26:32 +02002230void *yyrealloc (void * ptr, yy_size_t size )
2231{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002232 /* The cast to (char *) in the following accommodates both
2233 * implementations that use char* generic pointers, and those
2234 * that use void* generic pointers. It works with the latter
2235 * because both ANSI C and C++ allow castless assignment from
2236 * any pointer type to void*, and deal with argument conversions
2237 * as though doing an assignment.
2238 */
2239 return (void *) realloc( (char *) ptr, size );
Sam Ravnborg70f75242007-09-01 10:26:32 +02002240}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002241
Sam Ravnborg70f75242007-09-01 10:26:32 +02002242void yyfree (void * ptr )
2243{
2244 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2245}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002246
Sam Ravnborg70f75242007-09-01 10:26:32 +02002247/* %if-tables-serialization definitions */
2248/* %define-yytables The name for this specific scanner's tables. */
2249#define YYTABLES_NAME "yytables"
2250/* %endif */
2251
2252/* %ok-for-header */
2253
Adrian Bunk11ddad32008-07-17 02:08:12 +03002254#line 97 "scripts/genksyms/lex.l"
Linus Torvalds1da177e2005-04-16 15:20:36 -07002255
2256
Sam Ravnborg70f75242007-09-01 10:26:32 +02002257
Linus Torvalds1da177e2005-04-16 15:20:36 -07002258/* Bring in the keyword recognizer. */
2259
2260#include "keywords.c"
2261
2262
2263/* Macros to append to our phrase collection list. */
2264
2265#define _APP(T,L) do { \
2266 cur_node = next_node; \
2267 next_node = xmalloc(sizeof(*next_node)); \
2268 next_node->next = cur_node; \
2269 cur_node->string = memcpy(xmalloc(L+1), T, L+1); \
2270 cur_node->tag = SYM_NORMAL; \
2271 } while (0)
2272
2273#define APP _APP(yytext, yyleng)
2274
2275
2276/* The second stage lexer. Here we incorporate knowledge of the state
2277 of the parser to tailor the tokens that are returned. */
2278
2279int
2280yylex(void)
2281{
2282 static enum {
2283 ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE,
2284 ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4,
2285 ST_TABLE_5, ST_TABLE_6
2286 } lexstate = ST_NOTSTARTED;
2287
2288 static int suppress_type_lookup, dont_want_brace_phrase;
2289 static struct string_list *next_node;
2290
2291 int token, count = 0;
2292 struct string_list *cur_node;
2293
2294 if (lexstate == ST_NOTSTARTED)
2295 {
2296 BEGIN(V2_TOKENS);
2297 next_node = xmalloc(sizeof(*next_node));
2298 next_node->next = NULL;
2299 lexstate = ST_NORMAL;
2300 }
2301
2302repeat:
2303 token = yylex1();
2304
2305 if (token == 0)
2306 return 0;
2307 else if (token == FILENAME)
2308 {
2309 char *file, *e;
2310
2311 /* Save the filename and line number for later error messages. */
2312
2313 if (cur_filename)
2314 free(cur_filename);
2315
2316 file = strchr(yytext, '\"')+1;
2317 e = strchr(file, '\"');
2318 *e = '\0';
2319 cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1);
2320 cur_line = atoi(yytext+2);
2321
2322 goto repeat;
2323 }
2324
2325 switch (lexstate)
2326 {
2327 case ST_NORMAL:
2328 switch (token)
2329 {
2330 case IDENT:
2331 APP;
2332 {
2333 const struct resword *r = is_reserved_word(yytext, yyleng);
2334 if (r)
2335 {
2336 switch (token = r->token)
2337 {
2338 case ATTRIBUTE_KEYW:
2339 lexstate = ST_ATTRIBUTE;
2340 count = 0;
2341 goto repeat;
2342 case ASM_KEYW:
2343 lexstate = ST_ASM;
2344 count = 0;
2345 goto repeat;
2346
2347 case STRUCT_KEYW:
2348 case UNION_KEYW:
2349 dont_want_brace_phrase = 3;
2350 case ENUM_KEYW:
2351 suppress_type_lookup = 2;
2352 goto fini;
2353
2354 case EXPORT_SYMBOL_KEYW:
2355 goto fini;
2356 }
2357 }
2358 if (!suppress_type_lookup)
2359 {
2360 struct symbol *sym = find_symbol(yytext, SYM_TYPEDEF);
2361 if (sym && sym->type == SYM_TYPEDEF)
2362 token = TYPE;
2363 }
2364 }
2365 break;
2366
2367 case '[':
2368 APP;
2369 lexstate = ST_BRACKET;
2370 count = 1;
2371 goto repeat;
2372
2373 case '{':
2374 APP;
2375 if (dont_want_brace_phrase)
2376 break;
2377 lexstate = ST_BRACE;
2378 count = 1;
2379 goto repeat;
2380
2381 case '=': case ':':
2382 APP;
2383 lexstate = ST_EXPRESSION;
2384 break;
2385
2386 case DOTS:
2387 default:
2388 APP;
2389 break;
2390 }
2391 break;
2392
2393 case ST_ATTRIBUTE:
2394 APP;
2395 switch (token)
2396 {
2397 case '(':
2398 ++count;
2399 goto repeat;
2400 case ')':
2401 if (--count == 0)
2402 {
2403 lexstate = ST_NORMAL;
2404 token = ATTRIBUTE_PHRASE;
2405 break;
2406 }
2407 goto repeat;
2408 default:
2409 goto repeat;
2410 }
2411 break;
2412
2413 case ST_ASM:
2414 APP;
2415 switch (token)
2416 {
2417 case '(':
2418 ++count;
2419 goto repeat;
2420 case ')':
2421 if (--count == 0)
2422 {
2423 lexstate = ST_NORMAL;
2424 token = ASM_PHRASE;
2425 break;
2426 }
2427 goto repeat;
2428 default:
2429 goto repeat;
2430 }
2431 break;
2432
2433 case ST_BRACKET:
2434 APP;
2435 switch (token)
2436 {
2437 case '[':
2438 ++count;
2439 goto repeat;
2440 case ']':
2441 if (--count == 0)
2442 {
2443 lexstate = ST_NORMAL;
2444 token = BRACKET_PHRASE;
2445 break;
2446 }
2447 goto repeat;
2448 default:
2449 goto repeat;
2450 }
2451 break;
2452
2453 case ST_BRACE:
2454 APP;
2455 switch (token)
2456 {
2457 case '{':
2458 ++count;
2459 goto repeat;
2460 case '}':
2461 if (--count == 0)
2462 {
2463 lexstate = ST_NORMAL;
2464 token = BRACE_PHRASE;
2465 break;
2466 }
2467 goto repeat;
2468 default:
2469 goto repeat;
2470 }
2471 break;
2472
2473 case ST_EXPRESSION:
2474 switch (token)
2475 {
2476 case '(': case '[': case '{':
2477 ++count;
2478 APP;
2479 goto repeat;
2480 case ')': case ']': case '}':
2481 --count;
2482 APP;
2483 goto repeat;
2484 case ',': case ';':
2485 if (count == 0)
2486 {
2487 /* Put back the token we just read so's we can find it again
2488 after registering the expression. */
2489 unput(token);
2490
2491 lexstate = ST_NORMAL;
2492 token = EXPRESSION_PHRASE;
2493 break;
2494 }
2495 APP;
2496 goto repeat;
2497 default:
2498 APP;
2499 goto repeat;
2500 }
2501 break;
2502
2503 case ST_TABLE_1:
2504 goto repeat;
2505
2506 case ST_TABLE_2:
2507 if (token == IDENT && yyleng == 1 && yytext[0] == 'X')
2508 {
2509 token = EXPORT_SYMBOL_KEYW;
2510 lexstate = ST_TABLE_5;
2511 APP;
2512 break;
2513 }
2514 lexstate = ST_TABLE_6;
2515 /* FALLTHRU */
2516
2517 case ST_TABLE_6:
2518 switch (token)
2519 {
2520 case '{': case '[': case '(':
2521 ++count;
2522 break;
2523 case '}': case ']': case ')':
2524 --count;
2525 break;
2526 case ',':
2527 if (count == 0)
2528 lexstate = ST_TABLE_2;
2529 break;
2530 };
2531 goto repeat;
2532
2533 case ST_TABLE_3:
2534 goto repeat;
2535
2536 case ST_TABLE_4:
2537 if (token == ';')
2538 lexstate = ST_NORMAL;
2539 goto repeat;
2540
2541 case ST_TABLE_5:
2542 switch (token)
2543 {
2544 case ',':
2545 token = ';';
2546 lexstate = ST_TABLE_2;
2547 APP;
2548 break;
2549 default:
2550 APP;
2551 break;
2552 }
2553 break;
2554
2555 default:
Sam Ravnborg6803dc02006-06-24 23:46:54 +02002556 exit(1);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002557 }
2558fini:
2559
2560 if (suppress_type_lookup > 0)
2561 --suppress_type_lookup;
2562 if (dont_want_brace_phrase > 0)
2563 --dont_want_brace_phrase;
2564
2565 yylval = &next_node->next;
2566
2567 return token;
2568}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002569