aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-03-23 09:04:32 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-04-07 06:04:02 -0400
commit833e622459432ed5bc7cc58ffadb91b59c863a3a (patch)
tree75de2796fa5650bde6c3ec22b380ae955a927ee2
parent9a8dfb394c046742b2ac7444ba42272e11e9989d (diff)
genksyms: generate lexer and parser during build instead of shipping
Now that the kernel build supports flex and bison, remove the _shipped files and generate them during the build instead. There are no more shipped lexer and parser, so I ripped off the rules in scripts/Malefile.lib that were used for REGENERATE_PARSERS. The genksyms parser has ambiguous grammar, which would emit warnings: scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr] scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] They are normally suppressed, but displayed when W=1 is given. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--scripts/Makefile.lib24
-rw-r--r--scripts/genksyms/Makefile27
-rw-r--r--scripts/genksyms/lex.lex.c_shipped2291
-rw-r--r--scripts/genksyms/parse.tab.c_shipped2394
-rw-r--r--scripts/genksyms/parse.tab.h_shipped119
5 files changed, 30 insertions, 4825 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 45b9aa3ca39e..b1d938fab73b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -184,14 +184,8 @@ endef
184quiet_cmd_flex = LEX $@ 184quiet_cmd_flex = LEX $@
185 cmd_flex = $(LEX) -o$@ -L $< 185 cmd_flex = $(LEX) -o$@ -L $<
186 186
187ifdef REGENERATE_PARSERS
188.PRECIOUS: $(src)/%.lex.c_shipped
189$(src)/%.lex.c_shipped: $(src)/%.l
190 $(call cmd,flex)
191endif
192
193.PRECIOUS: $(obj)/%.lex.c 187.PRECIOUS: $(obj)/%.lex.c
194$(filter %.lex.c,$(targets)): $(obj)/%.lex.c: $(src)/%.l FORCE 188$(obj)/%.lex.c: $(src)/%.l FORCE
195 $(call if_changed,flex) 189 $(call if_changed,flex)
196 190
197# YACC 191# YACC
@@ -199,27 +193,15 @@ $(filter %.lex.c,$(targets)): $(obj)/%.lex.c: $(src)/%.l FORCE
199quiet_cmd_bison = YACC $@ 193quiet_cmd_bison = YACC $@
200 cmd_bison = $(YACC) -o$@ -t -l $< 194 cmd_bison = $(YACC) -o$@ -t -l $<
201 195
202ifdef REGENERATE_PARSERS
203.PRECIOUS: $(src)/%.tab.c_shipped
204$(src)/%.tab.c_shipped: $(src)/%.y
205 $(call cmd,bison)
206endif
207
208.PRECIOUS: $(obj)/%.tab.c 196.PRECIOUS: $(obj)/%.tab.c
209$(filter %.tab.c,$(targets)): $(obj)/%.tab.c: $(src)/%.y FORCE 197$(obj)/%.tab.c: $(src)/%.y FORCE
210 $(call if_changed,bison) 198 $(call if_changed,bison)
211 199
212quiet_cmd_bison_h = YACC $@ 200quiet_cmd_bison_h = YACC $@
213 cmd_bison_h = bison -o/dev/null --defines=$@ -t -l $< 201 cmd_bison_h = bison -o/dev/null --defines=$@ -t -l $<
214 202
215ifdef REGENERATE_PARSERS
216.PRECIOUS: $(src)/%.tab.h_shipped
217$(src)/%.tab.h_shipped: $(src)/%.y
218 $(call cmd,bison_h)
219endif
220
221.PRECIOUS: $(obj)/%.tab.h 203.PRECIOUS: $(obj)/%.tab.h
222$(filter %.tab.h,$(targets)): $(obj)/%.tab.h: $(src)/%.y FORCE 204$(obj)/%.tab.h: $(src)/%.y FORCE
223 $(call if_changed,bison_h) 205 $(call if_changed,bison_h)
224 206
225# Shipped files 207# Shipped files
diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
index 0ccac515a8d8..a9565eb6a292 100644
--- a/scripts/genksyms/Makefile
+++ b/scripts/genksyms/Makefile
@@ -5,9 +5,36 @@ always := $(hostprogs-y)
5 5
6genksyms-objs := genksyms.o parse.tab.o lex.lex.o 6genksyms-objs := genksyms.o parse.tab.o lex.lex.o
7 7
8# FIXME: fix the ambiguous grammar in parse.y and delete this hack
9#
10# Suppress shift/reduce, reduce/reduce conflicts warnings
11# unless W=1 is specified.
12#
13# Just in case, run "$(YACC) --version" without suppressing stderr
14# so that 'bison: not found' will be displayed if it is missing.
15ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
16
17quiet_cmd_bison_no_warn = $(quet_cmd_bison)
18 cmd_bison_no_warn = $(YACC) --version >/dev/null; \
19 $(cmd_bison) 2>/dev/null
20
21$(obj)/parse.tab.c: $(src)/parse.y FORCE
22 $(call if_changed,bison_no_warn)
23
24quiet_cmd_bison_h_no_warn = $(quet_cmd_bison_h)
25 cmd_bison_h_no_warn = $(YACC) --version >/dev/null; \
26 $(cmd_bison_h) 2>/dev/null
27
28$(obj)/parse.tab.h: $(src)/parse.y FORCE
29 $(call if_changed,bison_h_no_warn)
30
31endif
32
8# -I needed for generated C source (shipped source) 33# -I needed for generated C source (shipped source)
9HOSTCFLAGS_parse.tab.o := -I$(src) 34HOSTCFLAGS_parse.tab.o := -I$(src)
10HOSTCFLAGS_lex.lex.o := -I$(src) 35HOSTCFLAGS_lex.lex.o := -I$(src)
11 36
12# dependencies on generated files need to be listed explicitly 37# dependencies on generated files need to be listed explicitly
13$(obj)/lex.lex.o: $(obj)/parse.tab.h 38$(obj)/lex.lex.o: $(obj)/parse.tab.h
39
40targets := lex.lex.c parse.tab.c parse.tab.h
diff --git a/scripts/genksyms/lex.lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped
deleted file mode 100644
index ba2fda8dfdb2..000000000000
--- a/scripts/genksyms/lex.lex.c_shipped
+++ /dev/null
@@ -1,2291 +0,0 @@
1
2#line 3 "scripts/genksyms/lex.lex.c_shipped"
3
4#define YY_INT_ALIGNED short int
5
6/* A lexical scanner generated by flex */
7
8#define FLEX_SCANNER
9#define YY_FLEX_MAJOR_VERSION 2
10#define YY_FLEX_MINOR_VERSION 5
11#define YY_FLEX_SUBMINOR_VERSION 35
12#if YY_FLEX_SUBMINOR_VERSION > 0
13#define FLEX_BETA
14#endif
15
16/* First, we deal with platform-specific or compiler-specific issues. */
17
18/* begin standard C headers. */
19#include <stdio.h>
20#include <string.h>
21#include <errno.h>
22#include <stdlib.h>
23
24/* end standard C headers. */
25
26/* flex integer type definitions */
27
28#ifndef FLEXINT_H
29#define FLEXINT_H
30
31/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38#ifndef __STDC_LIMIT_MACROS
39#define __STDC_LIMIT_MACROS 1
40#endif
41
42#include <inttypes.h>
43typedef int8_t flex_int8_t;
44typedef uint8_t flex_uint8_t;
45typedef int16_t flex_int16_t;
46typedef uint16_t flex_uint16_t;
47typedef int32_t flex_int32_t;
48typedef uint32_t flex_uint32_t;
49#else
50typedef signed char flex_int8_t;
51typedef short int flex_int16_t;
52typedef int flex_int32_t;
53typedef unsigned char flex_uint8_t;
54typedef unsigned short int flex_uint16_t;
55typedef unsigned int flex_uint32_t;
56#endif /* ! C99 */
57
58/* Limits of integral types. */
59#ifndef INT8_MIN
60#define INT8_MIN (-128)
61#endif
62#ifndef INT16_MIN
63#define INT16_MIN (-32767-1)
64#endif
65#ifndef INT32_MIN
66#define INT32_MIN (-2147483647-1)
67#endif
68#ifndef INT8_MAX
69#define INT8_MAX (127)
70#endif
71#ifndef INT16_MAX
72#define INT16_MAX (32767)
73#endif
74#ifndef INT32_MAX
75#define INT32_MAX (2147483647)
76#endif
77#ifndef UINT8_MAX
78#define UINT8_MAX (255U)
79#endif
80#ifndef UINT16_MAX
81#define UINT16_MAX (65535U)
82#endif
83#ifndef UINT32_MAX
84#define UINT32_MAX (4294967295U)
85#endif
86
87#endif /* ! FLEXINT_H */
88
89#ifdef __cplusplus
90
91/* The "const" storage-class-modifier is valid. */
92#define YY_USE_CONST
93
94#else /* ! __cplusplus */
95
96/* C99 requires __STDC__ to be defined as 1. */
97#if defined (__STDC__)
98
99#define YY_USE_CONST
100
101#endif /* defined (__STDC__) */
102#endif /* ! __cplusplus */
103
104#ifdef YY_USE_CONST
105#define yyconst const
106#else
107#define yyconst
108#endif
109
110/* Returned upon end-of-file. */
111#define YY_NULL 0
112
113/* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
116 * double cast.
117 */
118#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
120/* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
123 */
124#define BEGIN (yy_start) = 1 + 2 *
125
126/* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
128 * compatibility.
129 */
130#define YY_START (((yy_start) - 1) / 2)
131#define YYSTATE YY_START
132
133/* Action number for EOF rule of a given start state. */
134#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
136/* Special action meaning "start processing a new file". */
137#define YY_NEW_FILE yyrestart(yyin )
138
139#define YY_END_OF_BUFFER_CHAR 0
140
141/* Size of default input buffer. */
142#ifndef YY_BUF_SIZE
143#define YY_BUF_SIZE 16384
144#endif
145
146/* The state buf must be large enough to hold one state per character in the main buffer.
147 */
148#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
150#ifndef YY_TYPEDEF_YY_BUFFER_STATE
151#define YY_TYPEDEF_YY_BUFFER_STATE
152typedef struct yy_buffer_state *YY_BUFFER_STATE;
153#endif
154
155extern int yyleng;
156
157extern FILE *yyin, *yyout;
158
159#define EOB_ACT_CONTINUE_SCAN 0
160#define EOB_ACT_END_OF_FILE 1
161#define EOB_ACT_LAST_MATCH 2
162
163 #define YY_LESS_LINENO(n)
164
165/* Return all but the first "n" matched characters back to the input stream. */
166#define yyless(n) \
167 do \
168 { \
169 /* Undo effects of setting up yytext. */ \
170 int yyless_macro_arg = (n); \
171 YY_LESS_LINENO(yyless_macro_arg);\
172 *yy_cp = (yy_hold_char); \
173 YY_RESTORE_YY_MORE_OFFSET \
174 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
175 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
176 } \
177 while ( 0 )
178
179#define unput(c) yyunput( c, (yytext_ptr) )
180
181#ifndef YY_TYPEDEF_YY_SIZE_T
182#define YY_TYPEDEF_YY_SIZE_T
183typedef size_t yy_size_t;
184#endif
185
186#ifndef YY_STRUCT_YY_BUFFER_STATE
187#define YY_STRUCT_YY_BUFFER_STATE
188struct yy_buffer_state
189 {
190 FILE *yy_input_file;
191
192 char *yy_ch_buf; /* input buffer */
193 char *yy_buf_pos; /* current position in input buffer */
194
195 /* Size of input buffer in bytes, not including room for EOB
196 * characters.
197 */
198 yy_size_t yy_buf_size;
199
200 /* Number of characters read into yy_ch_buf, not including EOB
201 * characters.
202 */
203 int yy_n_chars;
204
205 /* Whether we "own" the buffer - i.e., we know we created it,
206 * and can realloc() it to grow it, and should free() it to
207 * delete it.
208 */
209 int yy_is_our_buffer;
210
211 /* Whether this is an "interactive" input source; if so, and
212 * if we're using stdio for input, then we want to use getc()
213 * instead of fread(), to make sure we stop fetching input after
214 * each newline.
215 */
216 int yy_is_interactive;
217
218 /* Whether we're considered to be at the beginning of a line.
219 * If so, '^' rules will be active on the next match, otherwise
220 * not.
221 */
222 int yy_at_bol;
223
224 int yy_bs_lineno; /**< The line count. */
225 int yy_bs_column; /**< The column count. */
226
227 /* Whether to try to fill the input buffer when we reach the
228 * end of it.
229 */
230 int yy_fill_buffer;
231
232 int yy_buffer_status;
233
234#define YY_BUFFER_NEW 0
235#define YY_BUFFER_NORMAL 1
236 /* When an EOF's been seen but there's still some text to process
237 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
238 * shouldn't try reading from the input source any more. We might
239 * still have a bunch of tokens to match, though, because of
240 * possible backing-up.
241 *
242 * When we actually see the EOF, we change the status to "new"
243 * (via yyrestart()), so that the user can continue scanning by
244 * just pointing yyin at a new input file.
245 */
246#define YY_BUFFER_EOF_PENDING 2
247
248 };
249#endif /* !YY_STRUCT_YY_BUFFER_STATE */
250
251/* Stack of input buffers. */
252static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
253static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
254static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
255
256/* We provide macros for accessing buffer states in case in the
257 * future we want to put the buffer states in a more general
258 * "scanner state".
259 *
260 * Returns the top of the stack, or NULL.
261 */
262#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
263 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
264 : NULL)
265
266/* Same as previous macro, but useful when we know that the buffer stack is not
267 * NULL or when we need an lvalue. For internal use only.
268 */
269#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
270
271/* yy_hold_char holds the character lost when yytext is formed. */
272static char yy_hold_char;
273static int yy_n_chars; /* number of characters read into yy_ch_buf */
274int yyleng;
275
276/* Points to current character in buffer. */
277static char *yy_c_buf_p = (char *) 0;
278static int yy_init = 0; /* whether we need to initialize */
279static int yy_start = 0; /* start state number */
280
281/* Flag which is used to allow yywrap()'s to do buffer switches
282 * instead of setting up a fresh yyin. A bit of a hack ...
283 */
284static int yy_did_buffer_switch_on_eof;
285
286void yyrestart (FILE *input_file );
287void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
288YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
289void yy_delete_buffer (YY_BUFFER_STATE b );
290void yy_flush_buffer (YY_BUFFER_STATE b );
291void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
292void yypop_buffer_state (void );
293
294static void yyensure_buffer_stack (void );
295static void yy_load_buffer_state (void );
296static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
297
298#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
299
300YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
301YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
302YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
303
304void *yyalloc (yy_size_t );
305void *yyrealloc (void *,yy_size_t );
306void yyfree (void * );
307
308#define yy_new_buffer yy_create_buffer
309
310#define yy_set_interactive(is_interactive) \
311 { \
312 if ( ! YY_CURRENT_BUFFER ){ \
313 yyensure_buffer_stack (); \
314 YY_CURRENT_BUFFER_LVALUE = \
315 yy_create_buffer(yyin,YY_BUF_SIZE ); \
316 } \
317 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
318 }
319
320#define yy_set_bol(at_bol) \
321 { \
322 if ( ! YY_CURRENT_BUFFER ){\
323 yyensure_buffer_stack (); \
324 YY_CURRENT_BUFFER_LVALUE = \
325 yy_create_buffer(yyin,YY_BUF_SIZE ); \
326 } \
327 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
328 }
329
330#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
331
332/* Begin user sect3 */
333
334#define yywrap(n) 1
335#define YY_SKIP_YYWRAP
336
337typedef unsigned char YY_CHAR;
338
339FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
340
341typedef int yy_state_type;
342
343extern int yylineno;
344
345int yylineno = 1;
346
347extern char *yytext;
348#define yytext_ptr yytext
349
350static yy_state_type yy_get_previous_state (void );
351static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
352static int yy_get_next_buffer (void );
353static void yy_fatal_error (yyconst char msg[] );
354
355/* Done after the current pattern has been matched and before the
356 * corresponding action - sets up yytext.
357 */
358#define YY_DO_BEFORE_ACTION \
359 (yytext_ptr) = yy_bp; \
360 yyleng = (size_t) (yy_cp - yy_bp); \
361 (yy_hold_char) = *yy_cp; \
362 *yy_cp = '\0'; \
363 (yy_c_buf_p) = yy_cp;
364
365#define YY_NUM_RULES 13
366#define YY_END_OF_BUFFER 14
367/* This struct is not used in this scanner,
368 but its presence is necessary. */
369struct yy_trans_info
370 {
371 flex_int32_t yy_verify;
372 flex_int32_t yy_nxt;
373 };
374static yyconst flex_int16_t yy_accept[73] =
375 { 0,
376 0, 0, 14, 12, 4, 3, 12, 7, 12, 12,
377 12, 12, 12, 9, 9, 12, 12, 7, 12, 12,
378 4, 0, 5, 0, 7, 8, 0, 6, 0, 0,
379 10, 10, 9, 0, 0, 9, 9, 0, 9, 0,
380 0, 0, 0, 2, 0, 0, 11, 0, 10, 0,
381 10, 9, 9, 0, 0, 0, 10, 10, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
383 1, 0
384 } ;
385
386static yyconst flex_int32_t yy_ec[256] =
387 { 0,
388 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
389 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 2, 1, 5, 6, 7, 8, 9, 10, 1,
392 1, 8, 11, 1, 12, 13, 8, 14, 15, 15,
393 15, 15, 15, 15, 15, 16, 16, 1, 1, 17,
394 18, 19, 1, 1, 20, 20, 20, 20, 21, 22,
395 7, 7, 7, 7, 7, 23, 7, 7, 7, 7,
396 7, 7, 7, 7, 24, 7, 7, 25, 7, 7,
397 1, 26, 1, 8, 7, 1, 20, 20, 20, 20,
398
399 21, 22, 7, 7, 7, 7, 7, 27, 7, 7,
400 7, 7, 7, 7, 7, 7, 24, 7, 7, 25,
401 7, 7, 1, 28, 1, 8, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1
416 } ;
417
418static yyconst flex_int32_t yy_meta[29] =
419 { 0,
420 1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
421 4, 4, 5, 6, 6, 6, 1, 1, 1, 7,
422 8, 7, 3, 3, 3, 1, 3, 1
423 } ;
424
425static yyconst flex_int16_t yy_base[85] =
426 { 0,
427 0, 145, 150, 266, 27, 266, 25, 0, 131, 23,
428 23, 16, 23, 39, 31, 25, 39, 60, 22, 65,
429 57, 43, 266, 0, 0, 266, 61, 266, 0, 128,
430 74, 0, 113, 59, 62, 113, 52, 0, 0, 72,
431 66, 110, 100, 266, 73, 74, 266, 70, 266, 90,
432 103, 266, 84, 129, 108, 113, 143, 266, 107, 66,
433 118, 137, 168, 120, 80, 91, 145, 143, 83, 41,
434 266, 266, 190, 196, 204, 212, 220, 228, 232, 237,
435 238, 243, 249, 257
436 } ;
437
438static yyconst flex_int16_t yy_def[85] =
439 { 0,
440 72, 1, 72, 72, 72, 72, 73, 74, 72, 72,
441 75, 72, 72, 72, 14, 72, 72, 74, 72, 76,
442 72, 73, 72, 77, 74, 72, 75, 72, 78, 72,
443 72, 31, 14, 79, 80, 72, 72, 81, 15, 73,
444 75, 76, 76, 72, 73, 75, 72, 82, 72, 72,
445 72, 72, 81, 76, 54, 72, 72, 72, 76, 54,
446 76, 76, 76, 54, 83, 76, 63, 83, 84, 84,
447 72, 0, 72, 72, 72, 72, 72, 72, 72, 72,
448 72, 72, 72, 72
449 } ;
450
451static yyconst flex_int16_t yy_nxt[295] =
452 { 0,
453 4, 5, 6, 5, 7, 4, 8, 9, 10, 11,
454 9, 12, 13, 14, 15, 15, 16, 9, 17, 8,
455 8, 8, 18, 8, 8, 4, 8, 19, 21, 23,
456 21, 26, 28, 26, 26, 30, 31, 31, 31, 26,
457 26, 26, 26, 71, 39, 39, 39, 23, 29, 26,
458 24, 32, 33, 33, 34, 72, 26, 26, 21, 35,
459 21, 36, 37, 38, 40, 36, 43, 44, 24, 41,
460 28, 32, 50, 50, 52, 28, 23, 23, 52, 35,
461 56, 56, 44, 28, 42, 71, 29, 31, 31, 31,
462 42, 29, 59, 44, 48, 49, 49, 24, 24, 29,
463
464 49, 43, 44, 51, 51, 51, 36, 37, 59, 44,
465 36, 65, 44, 54, 55, 55, 51, 51, 51, 59,
466 44, 64, 64, 64, 58, 58, 57, 57, 57, 58,
467 59, 44, 42, 64, 64, 64, 52, 72, 59, 44,
468 47, 66, 60, 60, 42, 44, 59, 69, 26, 72,
469 20, 61, 62, 63, 72, 61, 57, 57, 57, 66,
470 72, 72, 72, 66, 49, 49, 72, 61, 62, 49,
471 44, 61, 72, 72, 72, 72, 72, 72, 72, 72,
472 72, 67, 67, 67, 72, 72, 72, 67, 67, 67,
473 22, 22, 22, 22, 22, 22, 22, 22, 25, 72,
474
475 72, 25, 25, 25, 27, 27, 27, 27, 27, 27,
476 27, 27, 42, 42, 42, 42, 42, 42, 42, 42,
477 45, 72, 45, 45, 45, 45, 45, 45, 46, 72,
478 46, 46, 46, 46, 46, 46, 34, 34, 72, 34,
479 51, 72, 51, 53, 53, 53, 57, 72, 57, 68,
480 68, 68, 68, 68, 68, 68, 68, 70, 70, 70,
481 70, 70, 70, 70, 70, 3, 72, 72, 72, 72,
482 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
483 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
484 72, 72, 72, 72
485
486 } ;
487
488static yyconst flex_int16_t yy_chk[295] =
489 { 0,
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, 5, 7,
493 5, 10, 11, 12, 12, 13, 13, 13, 13, 19,
494 10, 16, 16, 70, 15, 15, 15, 22, 11, 19,
495 7, 14, 14, 14, 14, 15, 17, 17, 21, 14,
496 21, 14, 14, 14, 18, 14, 20, 20, 22, 18,
497 27, 34, 35, 35, 37, 41, 40, 45, 37, 34,
498 48, 48, 65, 46, 65, 69, 27, 31, 31, 31,
499 60, 41, 66, 66, 31, 31, 31, 40, 45, 46,
500
501 31, 43, 43, 50, 50, 50, 53, 53, 59, 59,
502 53, 59, 42, 43, 43, 43, 51, 51, 51, 61,
503 61, 55, 55, 55, 51, 51, 56, 56, 56, 51,
504 54, 54, 55, 64, 64, 64, 36, 33, 62, 62,
505 30, 61, 54, 54, 64, 68, 67, 68, 9, 3,
506 2, 54, 54, 54, 0, 54, 57, 57, 57, 62,
507 0, 0, 0, 62, 57, 57, 0, 67, 67, 57,
508 63, 67, 0, 0, 0, 0, 0, 0, 0, 0,
509 0, 63, 63, 63, 0, 0, 0, 63, 63, 63,
510 73, 73, 73, 73, 73, 73, 73, 73, 74, 0,
511
512 0, 74, 74, 74, 75, 75, 75, 75, 75, 75,
513 75, 75, 76, 76, 76, 76, 76, 76, 76, 76,
514 77, 0, 77, 77, 77, 77, 77, 77, 78, 0,
515 78, 78, 78, 78, 78, 78, 79, 79, 0, 79,
516 80, 0, 80, 81, 81, 81, 82, 0, 82, 83,
517 83, 83, 83, 83, 83, 83, 83, 84, 84, 84,
518 84, 84, 84, 84, 84, 72, 72, 72, 72, 72,
519 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
520 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
521 72, 72, 72, 72
522
523 } ;
524
525static yy_state_type yy_last_accepting_state;
526static char *yy_last_accepting_cpos;
527
528extern int yy_flex_debug;
529int yy_flex_debug = 0;
530
531/* The intent behind this definition is that it'll catch
532 * any uses of REJECT which flex missed.
533 */
534#define REJECT reject_used_but_not_detected
535#define yymore() yymore_used_but_not_detected
536#define YY_MORE_ADJ 0
537#define YY_RESTORE_YY_MORE_OFFSET
538char *yytext;
539/* Lexical analysis for genksyms.
540 Copyright 1996, 1997 Linux International.
541
542 New implementation contributed by Richard Henderson <rth@tamu.edu>
543 Based on original work by Bjorn Ekwall <bj0rn@blox.se>
544
545 Taken from Linux modutils 2.4.22.
546
547 This program is free software; you can redistribute it and/or modify it
548 under the terms of the GNU General Public License as published by the
549 Free Software Foundation; either version 2 of the License, or (at your
550 option) any later version.
551
552 This program is distributed in the hope that it will be useful, but
553 WITHOUT ANY WARRANTY; without even the implied warranty of
554 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
555 General Public License for more details.
556
557 You should have received a copy of the GNU General Public License
558 along with this program; if not, write to the Free Software Foundation,
559 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
560
561#include <limits.h>
562#include <stdlib.h>
563#include <string.h>
564#include <ctype.h>
565
566#include "genksyms.h"
567#include "parse.tab.h"
568
569/* We've got a two-level lexer here. We let flex do basic tokenization
570 and then we categorize those basic tokens in the second stage. */
571#define YY_DECL static int yylex1(void)
572
573/* We don't do multiple input files. */
574#define YY_NO_INPUT 1
575
576#define INITIAL 0
577
578#ifndef YY_NO_UNISTD_H
579/* Special case for "unistd.h", since it is non-ANSI. We include it way
580 * down here because we want the user's section 1 to have been scanned first.
581 * The user has a chance to override it with an option.
582 */
583#include <unistd.h>
584#endif
585
586#ifndef YY_EXTRA_TYPE
587#define YY_EXTRA_TYPE void *
588#endif
589
590static int yy_init_globals (void );
591
592/* Accessor methods to globals.
593 These are made visible to non-reentrant scanners for convenience. */
594
595int yylex_destroy (void );
596
597int yyget_debug (void );
598
599void yyset_debug (int debug_flag );
600
601YY_EXTRA_TYPE yyget_extra (void );
602
603void yyset_extra (YY_EXTRA_TYPE user_defined );
604
605FILE *yyget_in (void );
606
607void yyset_in (FILE * in_str );
608
609FILE *yyget_out (void );
610
611void yyset_out (FILE * out_str );
612
613int yyget_leng (void );
614
615char *yyget_text (void );
616
617int yyget_lineno (void );
618
619void yyset_lineno (int line_number );
620
621/* Macros after this point can all be overridden by user definitions in
622 * section 1.
623 */
624
625#ifndef YY_SKIP_YYWRAP
626#ifdef __cplusplus
627extern "C" int yywrap (void );
628#else
629extern int yywrap (void );
630#endif
631#endif
632
633 static void yyunput (int c,char *buf_ptr );
634
635#ifndef yytext_ptr
636static void yy_flex_strncpy (char *,yyconst char *,int );
637#endif
638
639#ifdef YY_NEED_STRLEN
640static int yy_flex_strlen (yyconst char * );
641#endif
642
643#ifndef YY_NO_INPUT
644
645#ifdef __cplusplus
646static int yyinput (void );
647#else
648static int input (void );
649#endif
650
651#endif
652
653/* Amount of stuff to slurp up with each read. */
654#ifndef YY_READ_BUF_SIZE
655#define YY_READ_BUF_SIZE 8192
656#endif
657
658/* Copy whatever the last rule matched to the standard output. */
659#ifndef ECHO
660/* This used to be an fputs(), but since the string might contain NUL's,
661 * we now use fwrite().
662 */
663#define ECHO fwrite( yytext, yyleng, 1, yyout )
664#endif
665
666/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
667 * is returned in "result".
668 */
669#ifndef YY_INPUT
670#define YY_INPUT(buf,result,max_size) \
671 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
672 { \
673 int c = '*'; \
674 int n; \
675 for ( n = 0; n < max_size && \
676 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
677 buf[n] = (char) c; \
678 if ( c == '\n' ) \
679 buf[n++] = (char) c; \
680 if ( c == EOF && ferror( yyin ) ) \
681 YY_FATAL_ERROR( "input in flex scanner failed" ); \
682 result = n; \
683 } \
684 else \
685 { \
686 errno=0; \
687 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
688 { \
689 if( errno != EINTR) \
690 { \
691 YY_FATAL_ERROR( "input in flex scanner failed" ); \
692 break; \
693 } \
694 errno=0; \
695 clearerr(yyin); \
696 } \
697 }\
698\
699
700#endif
701
702/* No semi-colon after return; correct usage is to write "yyterminate();" -
703 * we don't want an extra ';' after the "return" because that will cause
704 * some compilers to complain about unreachable statements.
705 */
706#ifndef yyterminate
707#define yyterminate() return YY_NULL
708#endif
709
710/* Number of entries by which start-condition stack grows. */
711#ifndef YY_START_STACK_INCR
712#define YY_START_STACK_INCR 25
713#endif
714
715/* Report a fatal error. */
716#ifndef YY_FATAL_ERROR
717#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
718#endif
719
720/* end tables serialization structures and prototypes */
721
722/* Default declaration of generated scanner - a define so the user can
723 * easily add parameters.
724 */
725#ifndef YY_DECL
726#define YY_DECL_IS_OURS 1
727
728extern int yylex (void);
729
730#define YY_DECL int yylex (void)
731#endif /* !YY_DECL */
732
733/* Code executed at the beginning of each rule, after yytext and yyleng
734 * have been set up.
735 */
736#ifndef YY_USER_ACTION
737#define YY_USER_ACTION
738#endif
739
740/* Code executed at the end of each rule. */
741#ifndef YY_BREAK
742#define YY_BREAK break;
743#endif
744
745#define YY_RULE_SETUP \
746 if ( yyleng > 0 ) \
747 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
748 (yytext[yyleng - 1] == '\n'); \
749 YY_USER_ACTION
750
751/** The main scanner function which does all the work.
752 */
753YY_DECL
754{
755 register yy_state_type yy_current_state;
756 register char *yy_cp, *yy_bp;
757 register int yy_act;
758
759 /* Keep track of our location in the original source files. */
760
761 if ( !(yy_init) )
762 {
763 (yy_init) = 1;
764
765#ifdef YY_USER_INIT
766 YY_USER_INIT;
767#endif
768
769 if ( ! (yy_start) )
770 (yy_start) = 1; /* first start state */
771
772 if ( ! yyin )
773 yyin = stdin;
774
775 if ( ! yyout )
776 yyout = stdout;
777
778 if ( ! YY_CURRENT_BUFFER ) {
779 yyensure_buffer_stack ();
780 YY_CURRENT_BUFFER_LVALUE =
781 yy_create_buffer(yyin,YY_BUF_SIZE );
782 }
783
784 yy_load_buffer_state( );
785 }
786
787 while ( 1 ) /* loops until end-of-file is reached */
788 {
789 yy_cp = (yy_c_buf_p);
790
791 /* Support of yytext. */
792 *yy_cp = (yy_hold_char);
793
794 /* yy_bp points to the position in yy_ch_buf of the start of
795 * the current run.
796 */
797 yy_bp = yy_cp;
798
799 yy_current_state = (yy_start);
800 yy_current_state += YY_AT_BOL();
801yy_match:
802 do
803 {
804 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
805 if ( yy_accept[yy_current_state] )
806 {
807 (yy_last_accepting_state) = yy_current_state;
808 (yy_last_accepting_cpos) = yy_cp;
809 }
810 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
811 {
812 yy_current_state = (int) yy_def[yy_current_state];
813 if ( yy_current_state >= 73 )
814 yy_c = yy_meta[(unsigned int) yy_c];
815 }
816 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
817 ++yy_cp;
818 }
819 while ( yy_base[yy_current_state] != 266 );
820
821yy_find_action:
822 yy_act = yy_accept[yy_current_state];
823 if ( yy_act == 0 )
824 { /* have to back up */
825 yy_cp = (yy_last_accepting_cpos);
826 yy_current_state = (yy_last_accepting_state);
827 yy_act = yy_accept[yy_current_state];
828 }
829
830 YY_DO_BEFORE_ACTION;
831
832do_action: /* This label is used only to access EOF actions. */
833
834 switch ( yy_act )
835 { /* beginning of action switch */
836 case 0: /* must back up */
837 /* undo the effects of YY_DO_BEFORE_ACTION */
838 *yy_cp = (yy_hold_char);
839 yy_cp = (yy_last_accepting_cpos);
840 yy_current_state = (yy_last_accepting_state);
841 goto yy_find_action;
842
843case 1:
844/* rule 1 can match eol */
845YY_RULE_SETUP
846return FILENAME;
847 YY_BREAK
848case 2:
849/* rule 2 can match eol */
850YY_RULE_SETUP
851cur_line++;
852 YY_BREAK
853case 3:
854/* rule 3 can match eol */
855YY_RULE_SETUP
856cur_line++;
857 YY_BREAK
858/* Ignore all other whitespace. */
859case 4:
860YY_RULE_SETUP
861;
862 YY_BREAK
863case 5:
864/* rule 5 can match eol */
865YY_RULE_SETUP
866return STRING;
867 YY_BREAK
868case 6:
869/* rule 6 can match eol */
870YY_RULE_SETUP
871return CHAR;
872 YY_BREAK
873case 7:
874YY_RULE_SETUP
875return IDENT;
876 YY_BREAK
877/* The Pedant requires that the other C multi-character tokens be
878 recognized as tokens. We don't actually use them since we don't
879 parse expressions, but we do want whitespace to be arranged
880 around them properly. */
881case 8:
882YY_RULE_SETUP
883return OTHER;
884 YY_BREAK
885case 9:
886YY_RULE_SETUP
887return INT;
888 YY_BREAK
889case 10:
890YY_RULE_SETUP
891return REAL;
892 YY_BREAK
893case 11:
894YY_RULE_SETUP
895return DOTS;
896 YY_BREAK
897/* All other tokens are single characters. */
898case 12:
899YY_RULE_SETUP
900return yytext[0];
901 YY_BREAK
902case 13:
903YY_RULE_SETUP
904ECHO;
905 YY_BREAK
906case YY_STATE_EOF(INITIAL):
907 yyterminate();
908
909 case YY_END_OF_BUFFER:
910 {
911 /* Amount of text matched not including the EOB char. */
912 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
913
914 /* Undo the effects of YY_DO_BEFORE_ACTION. */
915 *yy_cp = (yy_hold_char);
916 YY_RESTORE_YY_MORE_OFFSET
917
918 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
919 {
920 /* We're scanning a new file or input source. It's
921 * possible that this happened because the user
922 * just pointed yyin at a new source and called
923 * yylex(). If so, then we have to assure
924 * consistency between YY_CURRENT_BUFFER and our
925 * globals. Here is the right place to do so, because
926 * this is the first action (other than possibly a
927 * back-up) that will match for the new input source.
928 */
929 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
930 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
931 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
932 }
933
934 /* Note that here we test for yy_c_buf_p "<=" to the position
935 * of the first EOB in the buffer, since yy_c_buf_p will
936 * already have been incremented past the NUL character
937 * (since all states make transitions on EOB to the
938 * end-of-buffer state). Contrast this with the test
939 * in input().
940 */
941 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
942 { /* This was really a NUL. */
943 yy_state_type yy_next_state;
944
945 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
946
947 yy_current_state = yy_get_previous_state( );
948
949 /* Okay, we're now positioned to make the NUL
950 * transition. We couldn't have
951 * yy_get_previous_state() go ahead and do it
952 * for us because it doesn't know how to deal
953 * with the possibility of jamming (and we don't
954 * want to build jamming into it because then it
955 * will run more slowly).
956 */
957
958 yy_next_state = yy_try_NUL_trans( yy_current_state );
959
960 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
961
962 if ( yy_next_state )
963 {
964 /* Consume the NUL. */
965 yy_cp = ++(yy_c_buf_p);
966 yy_current_state = yy_next_state;
967 goto yy_match;
968 }
969
970 else
971 {
972 yy_cp = (yy_c_buf_p);
973 goto yy_find_action;
974 }
975 }
976
977 else switch ( yy_get_next_buffer( ) )
978 {
979 case EOB_ACT_END_OF_FILE:
980 {
981 (yy_did_buffer_switch_on_eof) = 0;
982
983 if ( yywrap( ) )
984 {
985 /* Note: because we've taken care in
986 * yy_get_next_buffer() to have set up
987 * yytext, we can now set up
988 * yy_c_buf_p so that if some total
989 * hoser (like flex itself) wants to
990 * call the scanner after we return the
991 * YY_NULL, it'll still work - another
992 * YY_NULL will get returned.
993 */
994 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
995
996 yy_act = YY_STATE_EOF(YY_START);
997 goto do_action;
998 }
999
1000 else
1001 {
1002 if ( ! (yy_did_buffer_switch_on_eof) )
1003 YY_NEW_FILE;
1004 }
1005 break;
1006 }
1007
1008 case EOB_ACT_CONTINUE_SCAN:
1009 (yy_c_buf_p) =
1010 (yytext_ptr) + yy_amount_of_matched_text;
1011
1012 yy_current_state = yy_get_previous_state( );
1013
1014 yy_cp = (yy_c_buf_p);
1015 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1016 goto yy_match;
1017
1018 case EOB_ACT_LAST_MATCH:
1019 (yy_c_buf_p) =
1020 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1021
1022 yy_current_state = yy_get_previous_state( );
1023
1024 yy_cp = (yy_c_buf_p);
1025 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1026 goto yy_find_action;
1027 }
1028 break;
1029 }
1030
1031 default:
1032 YY_FATAL_ERROR(
1033 "fatal flex scanner internal error--no action found" );
1034 } /* end of action switch */
1035 } /* end of scanning one token */
1036} /* end of yylex */
1037
1038/* yy_get_next_buffer - try to read in a new buffer
1039 *
1040 * Returns a code representing an action:
1041 * EOB_ACT_LAST_MATCH -
1042 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1043 * EOB_ACT_END_OF_FILE - end of file
1044 */
1045static int yy_get_next_buffer (void)
1046{
1047 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1048 register char *source = (yytext_ptr);
1049 register int number_to_move, i;
1050 int ret_val;
1051
1052 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1053 YY_FATAL_ERROR(
1054 "fatal flex scanner internal error--end of buffer missed" );
1055
1056 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1057 { /* Don't try to fill the buffer, so this is an EOF. */
1058 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1059 {
1060 /* We matched a single character, the EOB, so
1061 * treat this as a final EOF.
1062 */
1063 return EOB_ACT_END_OF_FILE;
1064 }
1065
1066 else
1067 {
1068 /* We matched some text prior to the EOB, first
1069 * process it.
1070 */
1071 return EOB_ACT_LAST_MATCH;
1072 }
1073 }
1074
1075 /* Try to read more data. */
1076
1077 /* First move last chars to start of buffer. */
1078 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1079
1080 for ( i = 0; i < number_to_move; ++i )
1081 *(dest++) = *(source++);
1082
1083 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1084 /* don't do the read, it's not guaranteed to return an EOF,
1085 * just force an EOF
1086 */
1087 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1088
1089 else
1090 {
1091 int num_to_read =
1092 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1093
1094 while ( num_to_read <= 0 )
1095 { /* Not enough room in the buffer - grow it. */
1096
1097 /* just a shorter name for the current buffer */
1098 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1099
1100 int yy_c_buf_p_offset =
1101 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1102
1103 if ( b->yy_is_our_buffer )
1104 {
1105 int new_size = b->yy_buf_size * 2;
1106
1107 if ( new_size <= 0 )
1108 b->yy_buf_size += b->yy_buf_size / 8;
1109 else
1110 b->yy_buf_size *= 2;
1111
1112 b->yy_ch_buf = (char *)
1113 /* Include room in for 2 EOB chars. */
1114 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1115 }
1116 else
1117 /* Can't grow it, we don't own it. */
1118 b->yy_ch_buf = 0;
1119
1120 if ( ! b->yy_ch_buf )
1121 YY_FATAL_ERROR(
1122 "fatal error - scanner input buffer overflow" );
1123
1124 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1125
1126 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1127 number_to_move - 1;
1128
1129 }
1130
1131 if ( num_to_read > YY_READ_BUF_SIZE )
1132 num_to_read = YY_READ_BUF_SIZE;
1133
1134 /* Read in more data. */
1135 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1136 (yy_n_chars), (size_t) num_to_read );
1137
1138 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1139 }
1140
1141 if ( (yy_n_chars) == 0 )
1142 {
1143 if ( number_to_move == YY_MORE_ADJ )
1144 {
1145 ret_val = EOB_ACT_END_OF_FILE;
1146 yyrestart(yyin );
1147 }
1148
1149 else
1150 {
1151 ret_val = EOB_ACT_LAST_MATCH;
1152 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1153 YY_BUFFER_EOF_PENDING;
1154 }
1155 }
1156
1157 else
1158 ret_val = EOB_ACT_CONTINUE_SCAN;
1159
1160 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1161 /* Extend the array by 50%, plus the number we really need. */
1162 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1163 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1164 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1165 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1166 }
1167
1168 (yy_n_chars) += number_to_move;
1169 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1170 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1171
1172 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1173
1174 return ret_val;
1175}
1176
1177/* yy_get_previous_state - get the state just before the EOB char was reached */
1178
1179 static yy_state_type yy_get_previous_state (void)
1180{
1181 register yy_state_type yy_current_state;
1182 register char *yy_cp;
1183
1184 yy_current_state = (yy_start);
1185 yy_current_state += YY_AT_BOL();
1186
1187 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1188 {
1189 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1190 if ( yy_accept[yy_current_state] )
1191 {
1192 (yy_last_accepting_state) = yy_current_state;
1193 (yy_last_accepting_cpos) = yy_cp;
1194 }
1195 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1196 {
1197 yy_current_state = (int) yy_def[yy_current_state];
1198 if ( yy_current_state >= 73 )
1199 yy_c = yy_meta[(unsigned int) yy_c];
1200 }
1201 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1202 }
1203
1204 return yy_current_state;
1205}
1206
1207/* yy_try_NUL_trans - try to make a transition on the NUL character
1208 *
1209 * synopsis
1210 * next_state = yy_try_NUL_trans( current_state );
1211 */
1212 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1213{
1214 register int yy_is_jam;
1215 register char *yy_cp = (yy_c_buf_p);
1216
1217 register YY_CHAR yy_c = 1;
1218 if ( yy_accept[yy_current_state] )
1219 {
1220 (yy_last_accepting_state) = yy_current_state;
1221 (yy_last_accepting_cpos) = yy_cp;
1222 }
1223 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1224 {
1225 yy_current_state = (int) yy_def[yy_current_state];
1226 if ( yy_current_state >= 73 )
1227 yy_c = yy_meta[(unsigned int) yy_c];
1228 }
1229 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1230 yy_is_jam = (yy_current_state == 72);
1231
1232 return yy_is_jam ? 0 : yy_current_state;
1233}
1234
1235 static void yyunput (int c, register char * yy_bp )
1236{
1237 register char *yy_cp;
1238
1239 yy_cp = (yy_c_buf_p);
1240
1241 /* undo effects of setting up yytext */
1242 *yy_cp = (yy_hold_char);
1243
1244 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1245 { /* need to shift things up to make room */
1246 /* +2 for EOB chars. */
1247 register int number_to_move = (yy_n_chars) + 2;
1248 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1249 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1250 register char *source =
1251 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1252
1253 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1254 *--dest = *--source;
1255
1256 yy_cp += (int) (dest - source);
1257 yy_bp += (int) (dest - source);
1258 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1259 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1260
1261 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1262 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1263 }
1264
1265 *--yy_cp = (char) c;
1266
1267 (yytext_ptr) = yy_bp;
1268 (yy_hold_char) = *yy_cp;
1269 (yy_c_buf_p) = yy_cp;
1270}
1271
1272#ifndef YY_NO_INPUT
1273#ifdef __cplusplus
1274 static int yyinput (void)
1275#else
1276 static int input (void)
1277#endif
1278
1279{
1280 int c;
1281
1282 *(yy_c_buf_p) = (yy_hold_char);
1283
1284 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1285 {
1286 /* yy_c_buf_p now points to the character we want to return.
1287 * If this occurs *before* the EOB characters, then it's a
1288 * valid NUL; if not, then we've hit the end of the buffer.
1289 */
1290 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1291 /* This was really a NUL. */
1292 *(yy_c_buf_p) = '\0';
1293
1294 else
1295 { /* need more input */
1296 int offset = (yy_c_buf_p) - (yytext_ptr);
1297 ++(yy_c_buf_p);
1298
1299 switch ( yy_get_next_buffer( ) )
1300 {
1301 case EOB_ACT_LAST_MATCH:
1302 /* This happens because yy_g_n_b()
1303 * sees that we've accumulated a
1304 * token and flags that we need to
1305 * try matching the token before
1306 * proceeding. But for input(),
1307 * there's no matching to consider.
1308 * So convert the EOB_ACT_LAST_MATCH
1309 * to EOB_ACT_END_OF_FILE.
1310 */
1311
1312 /* Reset buffer status. */
1313 yyrestart(yyin );
1314
1315 /*FALLTHROUGH*/
1316
1317 case EOB_ACT_END_OF_FILE:
1318 {
1319 if ( yywrap( ) )
1320 return EOF;
1321
1322 if ( ! (yy_did_buffer_switch_on_eof) )
1323 YY_NEW_FILE;
1324#ifdef __cplusplus
1325 return yyinput();
1326#else
1327 return input();
1328#endif
1329 }
1330
1331 case EOB_ACT_CONTINUE_SCAN:
1332 (yy_c_buf_p) = (yytext_ptr) + offset;
1333 break;
1334 }
1335 }
1336 }
1337
1338 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1339 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1340 (yy_hold_char) = *++(yy_c_buf_p);
1341
1342 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1343
1344 return c;
1345}
1346#endif /* ifndef YY_NO_INPUT */
1347
1348/** Immediately switch to a different input stream.
1349 * @param input_file A readable stream.
1350 *
1351 * @note This function does not reset the start condition to @c INITIAL .
1352 */
1353 void yyrestart (FILE * input_file )
1354{
1355
1356 if ( ! YY_CURRENT_BUFFER ){
1357 yyensure_buffer_stack ();
1358 YY_CURRENT_BUFFER_LVALUE =
1359 yy_create_buffer(yyin,YY_BUF_SIZE );
1360 }
1361
1362 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1363 yy_load_buffer_state( );
1364}
1365
1366/** Switch to a different input buffer.
1367 * @param new_buffer The new input buffer.
1368 *
1369 */
1370 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1371{
1372
1373 /* TODO. We should be able to replace this entire function body
1374 * with
1375 * yypop_buffer_state();
1376 * yypush_buffer_state(new_buffer);
1377 */
1378 yyensure_buffer_stack ();
1379 if ( YY_CURRENT_BUFFER == new_buffer )
1380 return;
1381
1382 if ( YY_CURRENT_BUFFER )
1383 {
1384 /* Flush out information for old buffer. */
1385 *(yy_c_buf_p) = (yy_hold_char);
1386 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1387 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1388 }
1389
1390 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1391 yy_load_buffer_state( );
1392
1393 /* We don't actually know whether we did this switch during
1394 * EOF (yywrap()) processing, but the only time this flag
1395 * is looked at is after yywrap() is called, so it's safe
1396 * to go ahead and always set it.
1397 */
1398 (yy_did_buffer_switch_on_eof) = 1;
1399}
1400
1401static void yy_load_buffer_state (void)
1402{
1403 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1404 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1405 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1406 (yy_hold_char) = *(yy_c_buf_p);
1407}
1408
1409/** Allocate and initialize an input buffer state.
1410 * @param file A readable stream.
1411 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1412 *
1413 * @return the allocated buffer state.
1414 */
1415 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1416{
1417 YY_BUFFER_STATE b;
1418
1419 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1420 if ( ! b )
1421 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1422
1423 b->yy_buf_size = size;
1424
1425 /* yy_ch_buf has to be 2 characters longer than the size given because
1426 * we need to put in 2 end-of-buffer characters.
1427 */
1428 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1429 if ( ! b->yy_ch_buf )
1430 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1431
1432 b->yy_is_our_buffer = 1;
1433
1434 yy_init_buffer(b,file );
1435
1436 return b;
1437}
1438
1439/** Destroy the buffer.
1440 * @param b a buffer created with yy_create_buffer()
1441 *
1442 */
1443 void yy_delete_buffer (YY_BUFFER_STATE b )
1444{
1445
1446 if ( ! b )
1447 return;
1448
1449 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1450 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1451
1452 if ( b->yy_is_our_buffer )
1453 yyfree((void *) b->yy_ch_buf );
1454
1455 yyfree((void *) b );
1456}
1457
1458#ifndef __cplusplus
1459extern int isatty (int );
1460#endif /* __cplusplus */
1461
1462/* Initializes or reinitializes a buffer.
1463 * This function is sometimes called more than once on the same buffer,
1464 * such as during a yyrestart() or at EOF.
1465 */
1466 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1467
1468{
1469 int oerrno = errno;
1470
1471 yy_flush_buffer(b );
1472
1473 b->yy_input_file = file;
1474 b->yy_fill_buffer = 1;
1475
1476 /* If b is the current buffer, then yy_init_buffer was _probably_
1477 * called from yyrestart() or through yy_get_next_buffer.
1478 * In that case, we don't want to reset the lineno or column.
1479 */
1480 if (b != YY_CURRENT_BUFFER){
1481 b->yy_bs_lineno = 1;
1482 b->yy_bs_column = 0;
1483 }
1484
1485 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1486
1487 errno = oerrno;
1488}
1489
1490/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1491 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1492 *
1493 */
1494 void yy_flush_buffer (YY_BUFFER_STATE b )
1495{
1496 if ( ! b )
1497 return;
1498
1499 b->yy_n_chars = 0;
1500
1501 /* We always need two end-of-buffer characters. The first causes
1502 * a transition to the end-of-buffer state. The second causes
1503 * a jam in that state.
1504 */
1505 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1506 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1507
1508 b->yy_buf_pos = &b->yy_ch_buf[0];
1509
1510 b->yy_at_bol = 1;
1511 b->yy_buffer_status = YY_BUFFER_NEW;
1512
1513 if ( b == YY_CURRENT_BUFFER )
1514 yy_load_buffer_state( );
1515}
1516
1517/** Pushes the new state onto the stack. The new state becomes
1518 * the current state. This function will allocate the stack
1519 * if necessary.
1520 * @param new_buffer The new state.
1521 *
1522 */
1523void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1524{
1525 if (new_buffer == NULL)
1526 return;
1527
1528 yyensure_buffer_stack();
1529
1530 /* This block is copied from yy_switch_to_buffer. */
1531 if ( YY_CURRENT_BUFFER )
1532 {
1533 /* Flush out information for old buffer. */
1534 *(yy_c_buf_p) = (yy_hold_char);
1535 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1536 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1537 }
1538
1539 /* Only push if top exists. Otherwise, replace top. */
1540 if (YY_CURRENT_BUFFER)
1541 (yy_buffer_stack_top)++;
1542 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1543
1544 /* copied from yy_switch_to_buffer. */
1545 yy_load_buffer_state( );
1546 (yy_did_buffer_switch_on_eof) = 1;
1547}
1548
1549/** Removes and deletes the top of the stack, if present.
1550 * The next element becomes the new top.
1551 *
1552 */
1553void yypop_buffer_state (void)
1554{
1555 if (!YY_CURRENT_BUFFER)
1556 return;
1557
1558 yy_delete_buffer(YY_CURRENT_BUFFER );
1559 YY_CURRENT_BUFFER_LVALUE = NULL;
1560 if ((yy_buffer_stack_top) > 0)
1561 --(yy_buffer_stack_top);
1562
1563 if (YY_CURRENT_BUFFER) {
1564 yy_load_buffer_state( );
1565 (yy_did_buffer_switch_on_eof) = 1;
1566 }
1567}
1568
1569/* Allocates the stack if it does not exist.
1570 * Guarantees space for at least one push.
1571 */
1572static void yyensure_buffer_stack (void)
1573{
1574 int num_to_alloc;
1575
1576 if (!(yy_buffer_stack)) {
1577
1578 /* First allocation is just for 2 elements, since we don't know if this
1579 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1580 * immediate realloc on the next call.
1581 */
1582 num_to_alloc = 1;
1583 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1584 (num_to_alloc * sizeof(struct yy_buffer_state*)
1585 );
1586 if ( ! (yy_buffer_stack) )
1587 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1588
1589 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1590
1591 (yy_buffer_stack_max) = num_to_alloc;
1592 (yy_buffer_stack_top) = 0;
1593 return;
1594 }
1595
1596 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1597
1598 /* Increase the buffer to prepare for a possible push. */
1599 int grow_size = 8 /* arbitrary grow size */;
1600
1601 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1602 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1603 ((yy_buffer_stack),
1604 num_to_alloc * sizeof(struct yy_buffer_state*)
1605 );
1606 if ( ! (yy_buffer_stack) )
1607 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1608
1609 /* zero only the new slots.*/
1610 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1611 (yy_buffer_stack_max) = num_to_alloc;
1612 }
1613}
1614
1615/** Setup the input buffer state to scan directly from a user-specified character buffer.
1616 * @param base the character buffer
1617 * @param size the size in bytes of the character buffer
1618 *
1619 * @return the newly allocated buffer state object.
1620 */
1621YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1622{
1623 YY_BUFFER_STATE b;
1624
1625 if ( size < 2 ||
1626 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1627 base[size-1] != YY_END_OF_BUFFER_CHAR )
1628 /* They forgot to leave room for the EOB's. */
1629 return 0;
1630
1631 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1632 if ( ! b )
1633 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1634
1635 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1636 b->yy_buf_pos = b->yy_ch_buf = base;
1637 b->yy_is_our_buffer = 0;
1638 b->yy_input_file = 0;
1639 b->yy_n_chars = b->yy_buf_size;
1640 b->yy_is_interactive = 0;
1641 b->yy_at_bol = 1;
1642 b->yy_fill_buffer = 0;
1643 b->yy_buffer_status = YY_BUFFER_NEW;
1644
1645 yy_switch_to_buffer(b );
1646
1647 return b;
1648}
1649
1650/** Setup the input buffer state to scan a string. The next call to yylex() will
1651 * scan from a @e copy of @a str.
1652 * @param yystr a NUL-terminated string to scan
1653 *
1654 * @return the newly allocated buffer state object.
1655 * @note If you want to scan bytes that may contain NUL values, then use
1656 * yy_scan_bytes() instead.
1657 */
1658YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1659{
1660
1661 return yy_scan_bytes(yystr,strlen(yystr) );
1662}
1663
1664/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1665 * scan from a @e copy of @a bytes.
1666 * @param bytes the byte buffer to scan
1667 * @param len the number of bytes in the buffer pointed to by @a bytes.
1668 *
1669 * @return the newly allocated buffer state object.
1670 */
1671YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1672{
1673 YY_BUFFER_STATE b;
1674 char *buf;
1675 yy_size_t n;
1676 int i;
1677
1678 /* Get memory for full buffer, including space for trailing EOB's. */
1679 n = _yybytes_len + 2;
1680 buf = (char *) yyalloc(n );
1681 if ( ! buf )
1682 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1683
1684 for ( i = 0; i < _yybytes_len; ++i )
1685 buf[i] = yybytes[i];
1686
1687 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1688
1689 b = yy_scan_buffer(buf,n );
1690 if ( ! b )
1691 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1692
1693 /* It's okay to grow etc. this buffer, and we should throw it
1694 * away when we're done.
1695 */
1696 b->yy_is_our_buffer = 1;
1697
1698 return b;
1699}
1700
1701#ifndef YY_EXIT_FAILURE
1702#define YY_EXIT_FAILURE 2
1703#endif
1704
1705static void yy_fatal_error (yyconst char* msg )
1706{
1707 (void) fprintf( stderr, "%s\n", msg );
1708 exit( YY_EXIT_FAILURE );
1709}
1710
1711/* Redefine yyless() so it works in section 3 code. */
1712
1713#undef yyless
1714#define yyless(n) \
1715 do \
1716 { \
1717 /* Undo effects of setting up yytext. */ \
1718 int yyless_macro_arg = (n); \
1719 YY_LESS_LINENO(yyless_macro_arg);\
1720 yytext[yyleng] = (yy_hold_char); \
1721 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1722 (yy_hold_char) = *(yy_c_buf_p); \
1723 *(yy_c_buf_p) = '\0'; \
1724 yyleng = yyless_macro_arg; \
1725 } \
1726 while ( 0 )
1727
1728/* Accessor methods (get/set functions) to struct members. */
1729
1730/** Get the current line number.
1731 *
1732 */
1733int yyget_lineno (void)
1734{
1735
1736 return yylineno;
1737}
1738
1739/** Get the input stream.
1740 *
1741 */
1742FILE *yyget_in (void)
1743{
1744 return yyin;
1745}
1746
1747/** Get the output stream.
1748 *
1749 */
1750FILE *yyget_out (void)
1751{
1752 return yyout;
1753}
1754
1755/** Get the length of the current token.
1756 *
1757 */
1758int yyget_leng (void)
1759{
1760 return yyleng;
1761}
1762
1763/** Get the current token.
1764 *
1765 */
1766
1767char *yyget_text (void)
1768{
1769 return yytext;
1770}
1771
1772/** Set the current line number.
1773 * @param line_number
1774 *
1775 */
1776void yyset_lineno (int line_number )
1777{
1778
1779 yylineno = line_number;
1780}
1781
1782/** Set the input stream. This does not discard the current
1783 * input buffer.
1784 * @param in_str A readable stream.
1785 *
1786 * @see yy_switch_to_buffer
1787 */
1788void yyset_in (FILE * in_str )
1789{
1790 yyin = in_str ;
1791}
1792
1793void yyset_out (FILE * out_str )
1794{
1795 yyout = out_str ;
1796}
1797
1798int yyget_debug (void)
1799{
1800 return yy_flex_debug;
1801}
1802
1803void yyset_debug (int bdebug )
1804{
1805 yy_flex_debug = bdebug ;
1806}
1807
1808static int yy_init_globals (void)
1809{
1810 /* Initialization is the same as for the non-reentrant scanner.
1811 * This function is called from yylex_destroy(), so don't allocate here.
1812 */
1813
1814 (yy_buffer_stack) = 0;
1815 (yy_buffer_stack_top) = 0;
1816 (yy_buffer_stack_max) = 0;
1817 (yy_c_buf_p) = (char *) 0;
1818 (yy_init) = 0;
1819 (yy_start) = 0;
1820
1821/* Defined in main.c */
1822#ifdef YY_STDINIT
1823 yyin = stdin;
1824 yyout = stdout;
1825#else
1826 yyin = (FILE *) 0;
1827 yyout = (FILE *) 0;
1828#endif
1829
1830 /* For future reference: Set errno on error, since we are called by
1831 * yylex_init()
1832 */
1833 return 0;
1834}
1835
1836/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1837int yylex_destroy (void)
1838{
1839
1840 /* Pop the buffer stack, destroying each element. */
1841 while(YY_CURRENT_BUFFER){
1842 yy_delete_buffer(YY_CURRENT_BUFFER );
1843 YY_CURRENT_BUFFER_LVALUE = NULL;
1844 yypop_buffer_state();
1845 }
1846
1847 /* Destroy the stack itself. */
1848 yyfree((yy_buffer_stack) );
1849 (yy_buffer_stack) = NULL;
1850
1851 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1852 * yylex() is called, initialization will occur. */
1853 yy_init_globals( );
1854
1855 return 0;
1856}
1857
1858/*
1859 * Internal utility routines.
1860 */
1861
1862#ifndef yytext_ptr
1863static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1864{
1865 register int i;
1866 for ( i = 0; i < n; ++i )
1867 s1[i] = s2[i];
1868}
1869#endif
1870
1871#ifdef YY_NEED_STRLEN
1872static int yy_flex_strlen (yyconst char * s )
1873{
1874 register int n;
1875 for ( n = 0; s[n]; ++n )
1876 ;
1877
1878 return n;
1879}
1880#endif
1881
1882void *yyalloc (yy_size_t size )
1883{
1884 return (void *) malloc( size );
1885}
1886
1887void *yyrealloc (void * ptr, yy_size_t size )
1888{
1889 /* The cast to (char *) in the following accommodates both
1890 * implementations that use char* generic pointers, and those
1891 * that use void* generic pointers. It works with the latter
1892 * because both ANSI C and C++ allow castless assignment from
1893 * any pointer type to void*, and deal with argument conversions
1894 * as though doing an assignment.
1895 */
1896 return (void *) realloc( (char *) ptr, size );
1897}
1898
1899void yyfree (void * ptr )
1900{
1901 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1902}
1903
1904#define YYTABLES_NAME "yytables"
1905
1906/* Bring in the keyword recognizer. */
1907
1908#include "keywords.c"
1909
1910/* Macros to append to our phrase collection list. */
1911
1912/*
1913 * We mark any token, that that equals to a known enumerator, as
1914 * SYM_ENUM_CONST. The parser will change this for struct and union tags later,
1915 * the only problem is struct and union members:
1916 * enum e { a, b }; struct s { int a, b; }
1917 * but in this case, the only effect will be, that the ABI checksums become
1918 * more volatile, which is acceptable. Also, such collisions are quite rare,
1919 * so far it was only observed in include/linux/telephony.h.
1920 */
1921#define _APP(T,L) do { \
1922 cur_node = next_node; \
1923 next_node = xmalloc(sizeof(*next_node)); \
1924 next_node->next = cur_node; \
1925 cur_node->string = memcpy(xmalloc(L+1), T, L+1); \
1926 cur_node->tag = \
1927 find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\
1928 SYM_ENUM_CONST : SYM_NORMAL ; \
1929 cur_node->in_source_file = in_source_file; \
1930 } while (0)
1931
1932#define APP _APP(yytext, yyleng)
1933
1934/* The second stage lexer. Here we incorporate knowledge of the state
1935 of the parser to tailor the tokens that are returned. */
1936
1937int
1938yylex(void)
1939{
1940 static enum {
1941 ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_TYPEOF, ST_TYPEOF_1,
1942 ST_BRACKET, ST_BRACE, ST_EXPRESSION,
1943 ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4,
1944 ST_TABLE_5, ST_TABLE_6
1945 } lexstate = ST_NOTSTARTED;
1946
1947 static int suppress_type_lookup, dont_want_brace_phrase;
1948 static struct string_list *next_node;
1949
1950 int token, count = 0;
1951 struct string_list *cur_node;
1952
1953 if (lexstate == ST_NOTSTARTED)
1954 {
1955 next_node = xmalloc(sizeof(*next_node));
1956 next_node->next = NULL;
1957 lexstate = ST_NORMAL;
1958 }
1959
1960repeat:
1961 token = yylex1();
1962
1963 if (token == 0)
1964 return 0;
1965 else if (token == FILENAME)
1966 {
1967 char *file, *e;
1968
1969 /* Save the filename and line number for later error messages. */
1970
1971 if (cur_filename)
1972 free(cur_filename);
1973
1974 file = strchr(yytext, '\"')+1;
1975 e = strchr(file, '\"');
1976 *e = '\0';
1977 cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1);
1978 cur_line = atoi(yytext+2);
1979
1980 if (!source_file) {
1981 source_file = xstrdup(cur_filename);
1982 in_source_file = 1;
1983 } else {
1984 in_source_file = (strcmp(cur_filename, source_file) == 0);
1985 }
1986
1987 goto repeat;
1988 }
1989
1990 switch (lexstate)
1991 {
1992 case ST_NORMAL:
1993 switch (token)
1994 {
1995 case IDENT:
1996 APP;
1997 {
1998 int r = is_reserved_word(yytext, yyleng);
1999 if (r >= 0)
2000 {
2001 switch (token = r)
2002 {
2003 case ATTRIBUTE_KEYW:
2004 lexstate = ST_ATTRIBUTE;
2005 count = 0;
2006 goto repeat;
2007 case ASM_KEYW:
2008 lexstate = ST_ASM;
2009 count = 0;
2010 goto repeat;
2011 case TYPEOF_KEYW:
2012 lexstate = ST_TYPEOF;
2013 count = 0;
2014 goto repeat;
2015
2016 case STRUCT_KEYW:
2017 case UNION_KEYW:
2018 case ENUM_KEYW:
2019 dont_want_brace_phrase = 3;
2020 suppress_type_lookup = 2;
2021 goto fini;
2022
2023 case EXPORT_SYMBOL_KEYW:
2024 goto fini;
2025 }
2026 }
2027 if (!suppress_type_lookup)
2028 {
2029 if (find_symbol(yytext, SYM_TYPEDEF, 1))
2030 token = TYPE;
2031 }
2032 }
2033 break;
2034
2035 case '[':
2036 APP;
2037 lexstate = ST_BRACKET;
2038 count = 1;
2039 goto repeat;
2040
2041 case '{':
2042 APP;
2043 if (dont_want_brace_phrase)
2044 break;
2045 lexstate = ST_BRACE;
2046 count = 1;
2047 goto repeat;
2048
2049 case '=': case ':':
2050 APP;
2051 lexstate = ST_EXPRESSION;
2052 break;
2053
2054 case DOTS:
2055 default:
2056 APP;
2057 break;
2058 }
2059 break;
2060
2061 case ST_ATTRIBUTE:
2062 APP;
2063 switch (token)
2064 {
2065 case '(':
2066 ++count;
2067 goto repeat;
2068 case ')':
2069 if (--count == 0)
2070 {
2071 lexstate = ST_NORMAL;
2072 token = ATTRIBUTE_PHRASE;
2073 break;
2074 }
2075 goto repeat;
2076 default:
2077 goto repeat;
2078 }
2079 break;
2080
2081 case ST_ASM:
2082 APP;
2083 switch (token)
2084 {
2085 case '(':
2086 ++count;
2087 goto repeat;
2088 case ')':
2089 if (--count == 0)
2090 {
2091 lexstate = ST_NORMAL;
2092 token = ASM_PHRASE;
2093 break;
2094 }
2095 goto repeat;
2096 default:
2097 goto repeat;
2098 }
2099 break;
2100
2101 case ST_TYPEOF_1:
2102 if (token == IDENT)
2103 {
2104 if (is_reserved_word(yytext, yyleng) >= 0
2105 || find_symbol(yytext, SYM_TYPEDEF, 1))
2106 {
2107 yyless(0);
2108 unput('(');
2109 lexstate = ST_NORMAL;
2110 token = TYPEOF_KEYW;
2111 break;
2112 }
2113 _APP("(", 1);
2114 }
2115 lexstate = ST_TYPEOF;
2116 /* FALLTHRU */
2117
2118 case ST_TYPEOF:
2119 switch (token)
2120 {
2121 case '(':
2122 if ( ++count == 1 )
2123 lexstate = ST_TYPEOF_1;
2124 else
2125 APP;
2126 goto repeat;
2127 case ')':
2128 APP;
2129 if (--count == 0)
2130 {
2131 lexstate = ST_NORMAL;
2132 token = TYPEOF_PHRASE;
2133 break;
2134 }
2135 goto repeat;
2136 default:
2137 APP;
2138 goto repeat;
2139 }
2140 break;
2141
2142 case ST_BRACKET:
2143 APP;
2144 switch (token)
2145 {
2146 case '[':
2147 ++count;
2148 goto repeat;
2149 case ']':
2150 if (--count == 0)
2151 {
2152 lexstate = ST_NORMAL;
2153 token = BRACKET_PHRASE;
2154 break;
2155 }
2156 goto repeat;
2157 default:
2158 goto repeat;
2159 }
2160 break;
2161
2162 case ST_BRACE:
2163 APP;
2164 switch (token)
2165 {
2166 case '{':
2167 ++count;
2168 goto repeat;
2169 case '}':
2170 if (--count == 0)
2171 {
2172 lexstate = ST_NORMAL;
2173 token = BRACE_PHRASE;
2174 break;
2175 }
2176 goto repeat;
2177 default:
2178 goto repeat;
2179 }
2180 break;
2181
2182 case ST_EXPRESSION:
2183 switch (token)
2184 {
2185 case '(': case '[': case '{':
2186 ++count;
2187 APP;
2188 goto repeat;
2189 case '}':
2190 /* is this the last line of an enum declaration? */
2191 if (count == 0)
2192 {
2193 /* Put back the token we just read so's we can find it again
2194 after registering the expression. */
2195 unput(token);
2196
2197 lexstate = ST_NORMAL;
2198 token = EXPRESSION_PHRASE;
2199 break;
2200 }
2201 /* FALLTHRU */
2202 case ')': case ']':
2203 --count;
2204 APP;
2205 goto repeat;
2206 case ',': case ';':
2207 if (count == 0)
2208 {
2209 /* Put back the token we just read so's we can find it again
2210 after registering the expression. */
2211 unput(token);
2212
2213 lexstate = ST_NORMAL;
2214 token = EXPRESSION_PHRASE;
2215 break;
2216 }
2217 APP;
2218 goto repeat;
2219 default:
2220 APP;
2221 goto repeat;
2222 }
2223 break;
2224
2225 case ST_TABLE_1:
2226 goto repeat;
2227
2228 case ST_TABLE_2:
2229 if (token == IDENT && yyleng == 1 && yytext[0] == 'X')
2230 {
2231 token = EXPORT_SYMBOL_KEYW;
2232 lexstate = ST_TABLE_5;
2233 APP;
2234 break;
2235 }
2236 lexstate = ST_TABLE_6;
2237 /* FALLTHRU */
2238
2239 case ST_TABLE_6:
2240 switch (token)
2241 {
2242 case '{': case '[': case '(':
2243 ++count;
2244 break;
2245 case '}': case ']': case ')':
2246 --count;
2247 break;
2248 case ',':
2249 if (count == 0)
2250 lexstate = ST_TABLE_2;
2251 break;
2252 };
2253 goto repeat;
2254
2255 case ST_TABLE_3:
2256 goto repeat;
2257
2258 case ST_TABLE_4:
2259 if (token == ';')
2260 lexstate = ST_NORMAL;
2261 goto repeat;
2262
2263 case ST_TABLE_5:
2264 switch (token)
2265 {
2266 case ',':
2267 token = ';';
2268 lexstate = ST_TABLE_2;
2269 APP;
2270 break;
2271 default:
2272 APP;
2273 break;
2274 }
2275 break;
2276
2277 default:
2278 exit(1);
2279 }
2280fini:
2281
2282 if (suppress_type_lookup > 0)
2283 --suppress_type_lookup;
2284 if (dont_want_brace_phrase > 0)
2285 --dont_want_brace_phrase;
2286
2287 yylval = &next_node->next;
2288
2289 return token;
2290}
2291
diff --git a/scripts/genksyms/parse.tab.c_shipped b/scripts/genksyms/parse.tab.c_shipped
deleted file mode 100644
index d02258bafe7b..000000000000
--- a/scripts/genksyms/parse.tab.c_shipped
+++ /dev/null
@@ -1,2394 +0,0 @@
1/* A Bison parser, made by GNU Bison 2.7. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20/* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33/* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
35
36/* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
42
43/* Identify Bison output. */
44#define YYBISON 1
45
46/* Bison version. */
47#define YYBISON_VERSION "2.7"
48
49/* Skeleton name. */
50#define YYSKELETON_NAME "yacc.c"
51
52/* Pure parsers. */
53#define YYPURE 0
54
55/* Push parsers. */
56#define YYPUSH 0
57
58/* Pull parsers. */
59#define YYPULL 1
60
61
62
63
64/* Copy the first part of user declarations. */
65
66
67
68#include <assert.h>
69#include <stdlib.h>
70#include <string.h>
71#include "genksyms.h"
72
73static int is_typedef;
74static int is_extern;
75static char *current_name;
76static struct string_list *decl_spec;
77
78static void yyerror(const char *);
79
80static inline void
81remove_node(struct string_list **p)
82{
83 struct string_list *node = *p;
84 *p = node->next;
85 free_node(node);
86}
87
88static inline void
89remove_list(struct string_list **pb, struct string_list **pe)
90{
91 struct string_list *b = *pb, *e = *pe;
92 *pb = e;
93 free_list(b, e);
94}
95
96/* Record definition of a struct/union/enum */
97static void record_compound(struct string_list **keyw,
98 struct string_list **ident,
99 struct string_list **body,
100 enum symbol_type type)
101{
102 struct string_list *b = *body, *i = *ident, *r;
103
104 if (i->in_source_file) {
105 remove_node(keyw);
106 (*ident)->tag = type;
107 remove_list(body, ident);
108 return;
109 }
110 r = copy_node(i); r->tag = type;
111 r->next = (*keyw)->next; *body = r; (*keyw)->next = NULL;
112 add_symbol(i->string, type, b, is_extern);
113}
114
115
116
117
118# ifndef YY_NULL
119# if defined __cplusplus && 201103L <= __cplusplus
120# define YY_NULL nullptr
121# else
122# define YY_NULL 0
123# endif
124# endif
125
126/* Enabling verbose error messages. */
127#ifdef YYERROR_VERBOSE
128# undef YYERROR_VERBOSE
129# define YYERROR_VERBOSE 1
130#else
131# define YYERROR_VERBOSE 0
132#endif
133
134
135/* Enabling traces. */
136#ifndef YYDEBUG
137# define YYDEBUG 1
138#endif
139#if YYDEBUG
140extern int yydebug;
141#endif
142
143/* Tokens. */
144#ifndef YYTOKENTYPE
145# define YYTOKENTYPE
146 /* Put the tokens into the symbol table, so that GDB and other debuggers
147 know about them. */
148 enum yytokentype {
149 ASM_KEYW = 258,
150 ATTRIBUTE_KEYW = 259,
151 AUTO_KEYW = 260,
152 BOOL_KEYW = 261,
153 CHAR_KEYW = 262,
154 CONST_KEYW = 263,
155 DOUBLE_KEYW = 264,
156 ENUM_KEYW = 265,
157 EXTERN_KEYW = 266,
158 EXTENSION_KEYW = 267,
159 FLOAT_KEYW = 268,
160 INLINE_KEYW = 269,
161 INT_KEYW = 270,
162 LONG_KEYW = 271,
163 REGISTER_KEYW = 272,
164 RESTRICT_KEYW = 273,
165 SHORT_KEYW = 274,
166 SIGNED_KEYW = 275,
167 STATIC_KEYW = 276,
168 STRUCT_KEYW = 277,
169 TYPEDEF_KEYW = 278,
170 UNION_KEYW = 279,
171 UNSIGNED_KEYW = 280,
172 VOID_KEYW = 281,
173 VOLATILE_KEYW = 282,
174 TYPEOF_KEYW = 283,
175 VA_LIST_KEYW = 284,
176 EXPORT_SYMBOL_KEYW = 285,
177 ASM_PHRASE = 286,
178 ATTRIBUTE_PHRASE = 287,
179 TYPEOF_PHRASE = 288,
180 BRACE_PHRASE = 289,
181 BRACKET_PHRASE = 290,
182 EXPRESSION_PHRASE = 291,
183 CHAR = 292,
184 DOTS = 293,
185 IDENT = 294,
186 INT = 295,
187 REAL = 296,
188 STRING = 297,
189 TYPE = 298,
190 OTHER = 299,
191 FILENAME = 300
192 };
193#endif
194
195
196#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
197typedef int YYSTYPE;
198# define YYSTYPE_IS_TRIVIAL 1
199# define yystype YYSTYPE /* obsolescent; will be withdrawn */
200# define YYSTYPE_IS_DECLARED 1
201#endif
202
203extern YYSTYPE yylval;
204
205#ifdef YYPARSE_PARAM
206#if defined __STDC__ || defined __cplusplus
207int yyparse (void *YYPARSE_PARAM);
208#else
209int yyparse ();
210#endif
211#else /* ! YYPARSE_PARAM */
212#if defined __STDC__ || defined __cplusplus
213int yyparse (void);
214#else
215int yyparse ();
216#endif
217#endif /* ! YYPARSE_PARAM */
218
219
220
221/* Copy the second part of user declarations. */
222
223
224
225#ifdef short
226# undef short
227#endif
228
229#ifdef YYTYPE_UINT8
230typedef YYTYPE_UINT8 yytype_uint8;
231#else
232typedef unsigned char yytype_uint8;
233#endif
234
235#ifdef YYTYPE_INT8
236typedef YYTYPE_INT8 yytype_int8;
237#elif (defined __STDC__ || defined __C99__FUNC__ \
238 || defined __cplusplus || defined _MSC_VER)
239typedef signed char yytype_int8;
240#else
241typedef short int yytype_int8;
242#endif
243
244#ifdef YYTYPE_UINT16
245typedef YYTYPE_UINT16 yytype_uint16;
246#else
247typedef unsigned short int yytype_uint16;
248#endif
249
250#ifdef YYTYPE_INT16
251typedef YYTYPE_INT16 yytype_int16;
252#else
253typedef short int yytype_int16;
254#endif
255
256#ifndef YYSIZE_T
257# ifdef __SIZE_TYPE__
258# define YYSIZE_T __SIZE_TYPE__
259# elif defined size_t
260# define YYSIZE_T size_t
261# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
262 || defined __cplusplus || defined _MSC_VER)
263# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
264# define YYSIZE_T size_t
265# else
266# define YYSIZE_T unsigned int
267# endif
268#endif
269
270#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
271
272#ifndef YY_
273# if defined YYENABLE_NLS && YYENABLE_NLS
274# if ENABLE_NLS
275# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
276# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
277# endif
278# endif
279# ifndef YY_
280# define YY_(Msgid) Msgid
281# endif
282#endif
283
284/* Suppress unused-variable warnings by "using" E. */
285#if ! defined lint || defined __GNUC__
286# define YYUSE(E) ((void) (E))
287#else
288# define YYUSE(E) /* empty */
289#endif
290
291/* Identity function, used to suppress warnings about constant conditions. */
292#ifndef lint
293# define YYID(N) (N)
294#else
295#if (defined __STDC__ || defined __C99__FUNC__ \
296 || defined __cplusplus || defined _MSC_VER)
297static int
298YYID (int yyi)
299#else
300static int
301YYID (yyi)
302 int yyi;
303#endif
304{
305 return yyi;
306}
307#endif
308
309#if ! defined yyoverflow || YYERROR_VERBOSE
310
311/* The parser invokes alloca or malloc; define the necessary symbols. */
312
313# ifdef YYSTACK_USE_ALLOCA
314# if YYSTACK_USE_ALLOCA
315# ifdef __GNUC__
316# define YYSTACK_ALLOC __builtin_alloca
317# elif defined __BUILTIN_VA_ARG_INCR
318# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
319# elif defined _AIX
320# define YYSTACK_ALLOC __alloca
321# elif defined _MSC_VER
322# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
323# define alloca _alloca
324# else
325# define YYSTACK_ALLOC alloca
326# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
327 || defined __cplusplus || defined _MSC_VER)
328# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
329 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
330# ifndef EXIT_SUCCESS
331# define EXIT_SUCCESS 0
332# endif
333# endif
334# endif
335# endif
336# endif
337
338# ifdef YYSTACK_ALLOC
339 /* Pacify GCC's `empty if-body' warning. */
340# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
341# ifndef YYSTACK_ALLOC_MAXIMUM
342 /* The OS might guarantee only one guard page at the bottom of the stack,
343 and a page size can be as small as 4096 bytes. So we cannot safely
344 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
345 to allow for a few compiler-allocated temporary stack slots. */
346# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
347# endif
348# else
349# define YYSTACK_ALLOC YYMALLOC
350# define YYSTACK_FREE YYFREE
351# ifndef YYSTACK_ALLOC_MAXIMUM
352# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
353# endif
354# if (defined __cplusplus && ! defined EXIT_SUCCESS \
355 && ! ((defined YYMALLOC || defined malloc) \
356 && (defined YYFREE || defined free)))
357# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
358# ifndef EXIT_SUCCESS
359# define EXIT_SUCCESS 0
360# endif
361# endif
362# ifndef YYMALLOC
363# define YYMALLOC malloc
364# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
365 || defined __cplusplus || defined _MSC_VER)
366void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
367# endif
368# endif
369# ifndef YYFREE
370# define YYFREE free
371# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
372 || defined __cplusplus || defined _MSC_VER)
373void free (void *); /* INFRINGES ON USER NAME SPACE */
374# endif
375# endif
376# endif
377#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
378
379
380#if (! defined yyoverflow \
381 && (! defined __cplusplus \
382 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
383
384/* A type that is properly aligned for any stack member. */
385union yyalloc
386{
387 yytype_int16 yyss_alloc;
388 YYSTYPE yyvs_alloc;
389};
390
391/* The size of the maximum gap between one aligned stack and the next. */
392# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
393
394/* The size of an array large to enough to hold all stacks, each with
395 N elements. */
396# define YYSTACK_BYTES(N) \
397 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
398 + YYSTACK_GAP_MAXIMUM)
399
400# define YYCOPY_NEEDED 1
401
402/* Relocate STACK from its old location to the new one. The
403 local variables YYSIZE and YYSTACKSIZE give the old and new number of
404 elements in the stack, and YYPTR gives the new location of the
405 stack. Advance YYPTR to a properly aligned location for the next
406 stack. */
407# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
408 do \
409 { \
410 YYSIZE_T yynewbytes; \
411 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
412 Stack = &yyptr->Stack_alloc; \
413 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
414 yyptr += yynewbytes / sizeof (*yyptr); \
415 } \
416 while (YYID (0))
417
418#endif
419
420#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
421/* Copy COUNT objects from SRC to DST. The source and destination do
422 not overlap. */
423# ifndef YYCOPY
424# if defined __GNUC__ && 1 < __GNUC__
425# define YYCOPY(Dst, Src, Count) \
426 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
427# else
428# define YYCOPY(Dst, Src, Count) \
429 do \
430 { \
431 YYSIZE_T yyi; \
432 for (yyi = 0; yyi < (Count); yyi++) \
433 (Dst)[yyi] = (Src)[yyi]; \
434 } \
435 while (YYID (0))
436# endif
437# endif
438#endif /* !YYCOPY_NEEDED */
439
440/* YYFINAL -- State number of the termination state. */
441#define YYFINAL 4
442/* YYLAST -- Last index in YYTABLE. */
443#define YYLAST 522
444
445/* YYNTOKENS -- Number of terminals. */
446#define YYNTOKENS 55
447/* YYNNTS -- Number of nonterminals. */
448#define YYNNTS 49
449/* YYNRULES -- Number of rules. */
450#define YYNRULES 133
451/* YYNRULES -- Number of states. */
452#define YYNSTATES 187
453
454/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
455#define YYUNDEFTOK 2
456#define YYMAXUTOK 300
457
458#define YYTRANSLATE(YYX) \
459 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
460
461/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
462static const yytype_uint8 yytranslate[] =
463{
464 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 49, 50, 51, 2, 48, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 54, 46,
470 2, 52, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 53, 2, 47, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
490 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
491 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
492 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
493 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
494 45
495};
496
497#if YYDEBUG
498/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
499 YYRHS. */
500static const yytype_uint16 yyprhs[] =
501{
502 0, 0, 3, 5, 8, 9, 12, 13, 18, 19,
503 23, 25, 27, 29, 31, 34, 37, 41, 42, 44,
504 46, 50, 55, 56, 58, 60, 63, 65, 67, 69,
505 71, 73, 75, 77, 79, 81, 86, 88, 91, 94,
506 97, 101, 105, 109, 112, 115, 118, 120, 122, 124,
507 126, 128, 130, 132, 134, 136, 138, 140, 142, 145,
508 146, 148, 150, 153, 155, 157, 159, 161, 164, 166,
509 168, 170, 175, 180, 183, 187, 190, 192, 194, 196,
510 201, 206, 209, 213, 217, 220, 222, 226, 227, 229,
511 231, 235, 238, 241, 243, 244, 246, 248, 253, 258,
512 261, 265, 269, 273, 274, 276, 279, 283, 287, 288,
513 290, 292, 295, 299, 302, 303, 305, 307, 311, 314,
514 317, 319, 322, 323, 326, 330, 335, 337, 341, 343,
515 347, 350, 351, 353
516};
517
518/* YYRHS -- A `-1'-separated list of the rules' RHS. */
519static const yytype_int8 yyrhs[] =
520{
521 56, 0, -1, 57, -1, 56, 57, -1, -1, 58,
522 59, -1, -1, 12, 23, 60, 62, -1, -1, 23,
523 61, 62, -1, 62, -1, 86, -1, 101, -1, 103,
524 -1, 1, 46, -1, 1, 47, -1, 66, 63, 46,
525 -1, -1, 64, -1, 65, -1, 64, 48, 65, -1,
526 76, 102, 97, 87, -1, -1, 67, -1, 68, -1,
527 67, 68, -1, 69, -1, 70, -1, 5, -1, 17,
528 -1, 21, -1, 11, -1, 14, -1, 71, -1, 75,
529 -1, 28, 49, 83, 50, -1, 33, -1, 22, 39,
530 -1, 24, 39, -1, 10, 39, -1, 22, 39, 89,
531 -1, 24, 39, 89, -1, 10, 39, 98, -1, 10,
532 98, -1, 22, 89, -1, 24, 89, -1, 7, -1,
533 19, -1, 15, -1, 16, -1, 20, -1, 25, -1,
534 13, -1, 9, -1, 26, -1, 6, -1, 29, -1,
535 43, -1, 51, 73, -1, -1, 74, -1, 75, -1,
536 74, 75, -1, 8, -1, 27, -1, 32, -1, 18,
537 -1, 72, 76, -1, 77, -1, 39, -1, 43, -1,
538 77, 49, 80, 50, -1, 77, 49, 1, 50, -1,
539 77, 35, -1, 49, 76, 50, -1, 72, 78, -1,
540 79, -1, 39, -1, 43, -1, 79, 49, 80, 50,
541 -1, 79, 49, 1, 50, -1, 79, 35, -1, 49,
542 78, 50, -1, 49, 1, 50, -1, 81, 38, -1,
543 81, -1, 82, 48, 38, -1, -1, 82, -1, 83,
544 -1, 82, 48, 83, -1, 67, 84, -1, 72, 84,
545 -1, 85, -1, -1, 39, -1, 43, -1, 85, 49,
546 80, 50, -1, 85, 49, 1, 50, -1, 85, 35,
547 -1, 49, 84, 50, -1, 49, 1, 50, -1, 66,
548 76, 34, -1, -1, 88, -1, 52, 36, -1, 53,
549 90, 47, -1, 53, 1, 47, -1, -1, 91, -1,
550 92, -1, 91, 92, -1, 66, 93, 46, -1, 1,
551 46, -1, -1, 94, -1, 95, -1, 94, 48, 95,
552 -1, 78, 97, -1, 39, 96, -1, 96, -1, 54,
553 36, -1, -1, 97, 32, -1, 53, 99, 47, -1,
554 53, 99, 48, 47, -1, 100, -1, 99, 48, 100,
555 -1, 39, -1, 39, 52, 36, -1, 31, 46, -1,
556 -1, 31, -1, 30, 49, 39, 50, 46, -1
557};
558
559/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
560static const yytype_uint16 yyrline[] =
561{
562 0, 125, 125, 126, 130, 130, 136, 136, 138, 138,
563 140, 141, 142, 143, 144, 145, 149, 163, 164, 168,
564 176, 189, 195, 196, 200, 201, 205, 211, 215, 216,
565 217, 218, 219, 223, 224, 225, 226, 230, 232, 234,
566 238, 240, 242, 247, 250, 251, 255, 256, 257, 258,
567 259, 260, 261, 262, 263, 264, 265, 266, 270, 275,
568 276, 280, 281, 285, 285, 285, 286, 294, 295, 299,
569 308, 317, 319, 321, 323, 330, 331, 335, 336, 337,
570 339, 341, 343, 345, 350, 351, 352, 356, 357, 361,
571 362, 367, 372, 374, 378, 379, 387, 391, 393, 395,
572 397, 399, 404, 413, 414, 419, 424, 425, 429, 430,
573 434, 435, 439, 441, 446, 447, 451, 452, 456, 457,
574 458, 462, 466, 467, 471, 472, 476, 477, 480, 485,
575 493, 497, 498, 502
576};
577#endif
578
579#if YYDEBUG || YYERROR_VERBOSE || 0
580/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
581 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
582static const char *const yytname[] =
583{
584 "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
585 "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
586 "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW",
587 "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
588 "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
589 "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
590 "VOLATILE_KEYW", "TYPEOF_KEYW", "VA_LIST_KEYW", "EXPORT_SYMBOL_KEYW",
591 "ASM_PHRASE", "ATTRIBUTE_PHRASE", "TYPEOF_PHRASE", "BRACE_PHRASE",
592 "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT",
593 "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','",
594 "'('", "')'", "'*'", "'='", "'{'", "':'", "$accept", "declaration_seq",
595 "declaration", "$@1", "declaration1", "$@2", "$@3", "simple_declaration",
596 "init_declarator_list_opt", "init_declarator_list", "init_declarator",
597 "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
598 "storage_class_specifier", "type_specifier", "simple_type_specifier",
599 "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq",
600 "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator",
601 "direct_nested_declarator", "parameter_declaration_clause",
602 "parameter_declaration_list_opt", "parameter_declaration_list",
603 "parameter_declaration", "m_abstract_declarator",
604 "direct_m_abstract_declarator", "function_definition", "initializer_opt",
605 "initializer", "class_body", "member_specification_opt",
606 "member_specification", "member_declaration",
607 "member_declarator_list_opt", "member_declarator_list",
608 "member_declarator", "member_bitfield_declarator", "attribute_opt",
609 "enum_body", "enumerator_list", "enumerator", "asm_definition",
610 "asm_phrase_opt", "export_definition", YY_NULL
611};
612#endif
613
614# ifdef YYPRINT
615/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
616 token YYLEX-NUM. */
617static const yytype_uint16 yytoknum[] =
618{
619 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
620 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
621 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
622 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
623 295, 296, 297, 298, 299, 300, 59, 125, 44, 40,
624 41, 42, 61, 123, 58
625};
626# endif
627
628/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
629static const yytype_uint8 yyr1[] =
630{
631 0, 55, 56, 56, 58, 57, 60, 59, 61, 59,
632 59, 59, 59, 59, 59, 59, 62, 63, 63, 64,
633 64, 65, 66, 66, 67, 67, 68, 68, 69, 69,
634 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
635 70, 70, 70, 70, 70, 70, 71, 71, 71, 71,
636 71, 71, 71, 71, 71, 71, 71, 71, 72, 73,
637 73, 74, 74, 75, 75, 75, 75, 76, 76, 77,
638 77, 77, 77, 77, 77, 78, 78, 79, 79, 79,
639 79, 79, 79, 79, 80, 80, 80, 81, 81, 82,
640 82, 83, 84, 84, 85, 85, 85, 85, 85, 85,
641 85, 85, 86, 87, 87, 88, 89, 89, 90, 90,
642 91, 91, 92, 92, 93, 93, 94, 94, 95, 95,
643 95, 96, 97, 97, 98, 98, 99, 99, 100, 100,
644 101, 102, 102, 103
645};
646
647/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
648static const yytype_uint8 yyr2[] =
649{
650 0, 2, 1, 2, 0, 2, 0, 4, 0, 3,
651 1, 1, 1, 1, 2, 2, 3, 0, 1, 1,
652 3, 4, 0, 1, 1, 2, 1, 1, 1, 1,
653 1, 1, 1, 1, 1, 4, 1, 2, 2, 2,
654 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
655 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
656 1, 1, 2, 1, 1, 1, 1, 2, 1, 1,
657 1, 4, 4, 2, 3, 2, 1, 1, 1, 4,
658 4, 2, 3, 3, 2, 1, 3, 0, 1, 1,
659 3, 2, 2, 1, 0, 1, 1, 4, 4, 2,
660 3, 3, 3, 0, 1, 2, 3, 3, 0, 1,
661 1, 2, 3, 2, 0, 1, 1, 3, 2, 2,
662 1, 2, 0, 2, 3, 4, 1, 3, 1, 3,
663 2, 0, 1, 5
664};
665
666/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
667 Performed when YYTABLE doesn't specify something else to do. Zero
668 means the default is an error. */
669static const yytype_uint8 yydefact[] =
670{
671 4, 4, 2, 0, 1, 3, 0, 28, 55, 46,
672 63, 53, 0, 31, 0, 52, 32, 48, 49, 29,
673 66, 47, 50, 30, 0, 8, 0, 51, 54, 64,
674 0, 56, 0, 0, 65, 36, 57, 5, 10, 17,
675 23, 24, 26, 27, 33, 34, 11, 12, 13, 14,
676 15, 39, 0, 43, 6, 37, 0, 44, 22, 38,
677 45, 0, 0, 130, 69, 70, 0, 59, 0, 18,
678 19, 0, 131, 68, 25, 42, 128, 0, 126, 22,
679 40, 0, 114, 0, 0, 110, 9, 17, 41, 94,
680 0, 0, 0, 58, 60, 61, 16, 0, 67, 132,
681 102, 122, 73, 0, 0, 124, 0, 7, 113, 107,
682 77, 78, 0, 0, 0, 122, 76, 0, 115, 116,
683 120, 106, 0, 111, 131, 95, 57, 0, 94, 91,
684 93, 35, 0, 74, 62, 20, 103, 0, 0, 85,
685 88, 89, 129, 125, 127, 119, 0, 77, 0, 121,
686 75, 118, 81, 0, 112, 0, 0, 96, 0, 92,
687 99, 0, 133, 123, 0, 21, 104, 72, 71, 84,
688 0, 83, 82, 0, 0, 117, 101, 100, 0, 0,
689 105, 86, 90, 80, 79, 98, 97
690};
691
692/* YYDEFGOTO[NTERM-NUM]. */
693static const yytype_int16 yydefgoto[] =
694{
695 -1, 1, 2, 3, 37, 79, 58, 38, 68, 69,
696 70, 82, 40, 41, 42, 43, 44, 71, 93, 94,
697 45, 124, 73, 115, 116, 138, 139, 140, 141, 129,
698 130, 46, 165, 166, 57, 83, 84, 85, 117, 118,
699 119, 120, 136, 53, 77, 78, 47, 101, 48
700};
701
702/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
703 STATE-NUM. */
704#define YYPACT_NINF -94
705static const yytype_int16 yypact[] =
706{
707 -94, 15, -94, 208, -94, -94, 34, -94, -94, -94,
708 -94, -94, -27, -94, -5, -94, -94, -94, -94, -94,
709 -94, -94, -94, -94, -25, -94, -16, -94, -94, -94,
710 -4, -94, 19, -24, -94, -94, -94, -94, -94, 24,
711 479, -94, -94, -94, -94, -94, -94, -94, -94, -94,
712 -94, 29, 48, -94, -94, 37, 106, -94, 479, 37,
713 -94, 479, 54, -94, -94, -94, 24, -2, 49, 53,
714 -94, 24, -14, -11, -94, -94, 47, 38, -94, 479,
715 -94, 51, 23, 55, 157, -94, -94, 24, -94, 393,
716 56, 58, 68, -94, -2, -94, -94, 24, -94, -94,
717 -94, -94, -94, 255, 67, -94, 5, -94, -94, -94,
718 50, -94, 7, 69, 40, -94, -8, 83, 88, -94,
719 -94, -94, 91, -94, 109, -94, -94, 4, 45, -94,
720 16, -94, 95, -94, -94, -94, -23, 92, 93, 108,
721 96, -94, -94, -94, -94, -94, 97, -94, 98, -94,
722 -94, 118, -94, 301, -94, 23, 101, -94, 104, -94,
723 -94, 347, -94, -94, 120, -94, -94, -94, -94, -94,
724 440, -94, -94, 111, 119, -94, -94, -94, 130, 137,
725 -94, -94, -94, -94, -94, -94, -94
726};
727
728/* YYPGOTO[NTERM-NUM]. */
729static const yytype_int16 yypgoto[] =
730{
731 -94, -94, 158, -94, -94, -94, -94, -45, -94, -94,
732 94, -1, -61, -29, -94, -94, -94, -79, -94, -94,
733 -63, -7, -94, -93, -94, -92, -94, -94, -60, -57,
734 -94, -94, -94, -94, -19, -94, -94, 110, -94, -94,
735 33, 82, 78, 144, -94, 99, -94, -94, -94
736};
737
738/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
739 positive, shift that token. If negative, reduce the rule which
740 number is the opposite. If YYTABLE_NINF, syntax error. */
741#define YYTABLE_NINF -110
742static const yytype_int16 yytable[] =
743{
744 89, 90, 39, 114, 95, 156, 10, 60, 146, 163,
745 128, 74, 51, 86, 55, 4, 20, 99, 54, 148,
746 100, 150, 63, 59, 102, 29, 52, 152, 56, 164,
747 34, 134, 72, 114, 107, 114, 80, 56, 103, -94,
748 88, 153, 89, 125, 76, 61, 147, 157, 128, 128,
749 111, 160, 143, 127, -94, 67, 112, 87, 67, 92,
750 74, 174, 110, 64, 98, 161, 111, 65, 62, 179,
751 158, 159, 112, 66, 67, 67, 114, 113, 87, 147,
752 49, 50, 52, 111, 125, 105, 106, 76, 157, 112,
753 56, 67, 89, 91, 127, 96, 67, 108, 109, 104,
754 89, 97, 121, 142, 113, 149, 131, 81, 132, 89,
755 182, 7, 8, 9, 10, 11, 12, 13, 133, 15,
756 16, 17, 18, 19, 20, 21, 22, 23, 24, 154,
757 26, 27, 28, 29, 30, 31, 155, 108, 34, 35,
758 99, 162, 167, 168, 170, -22, 169, 171, 172, 36,
759 163, 176, -22, -108, 177, -22, 180, -22, 122, 5,
760 -22, 183, 7, 8, 9, 10, 11, 12, 13, 184,
761 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
762 185, 26, 27, 28, 29, 30, 31, 186, 175, 34,
763 35, 135, 145, 151, 123, 75, -22, 0, 0, 0,
764 36, 0, 0, -22, -109, 144, -22, 0, -22, 6,
765 0, -22, 0, 7, 8, 9, 10, 11, 12, 13,
766 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
767 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
768 34, 35, 0, 0, 0, 0, 0, -22, 0, 0,
769 0, 36, 0, 0, -22, 0, 137, -22, 0, -22,
770 7, 8, 9, 10, 11, 12, 13, 0, 15, 16,
771 17, 18, 19, 20, 21, 22, 23, 24, 0, 26,
772 27, 28, 29, 30, 31, 0, 0, 34, 35, 0,
773 0, 0, 0, -87, 0, 0, 0, 0, 36, 0,
774 0, 0, 173, 0, 0, -87, 7, 8, 9, 10,
775 11, 12, 13, 0, 15, 16, 17, 18, 19, 20,
776 21, 22, 23, 24, 0, 26, 27, 28, 29, 30,
777 31, 0, 0, 34, 35, 0, 0, 0, 0, -87,
778 0, 0, 0, 0, 36, 0, 0, 0, 178, 0,
779 0, -87, 7, 8, 9, 10, 11, 12, 13, 0,
780 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
781 0, 26, 27, 28, 29, 30, 31, 0, 0, 34,
782 35, 0, 0, 0, 0, -87, 0, 0, 0, 0,
783 36, 0, 0, 0, 0, 0, 0, -87, 7, 8,
784 9, 10, 11, 12, 13, 0, 15, 16, 17, 18,
785 19, 20, 21, 22, 23, 24, 0, 26, 27, 28,
786 29, 30, 31, 0, 0, 34, 35, 0, 0, 0,
787 0, 0, 125, 0, 0, 0, 126, 0, 0, 0,
788 0, 0, 127, 0, 67, 7, 8, 9, 10, 11,
789 12, 13, 0, 15, 16, 17, 18, 19, 20, 21,
790 22, 23, 24, 0, 26, 27, 28, 29, 30, 31,
791 0, 0, 34, 35, 0, 0, 0, 0, 181, 0,
792 0, 0, 0, 36, 7, 8, 9, 10, 11, 12,
793 13, 0, 15, 16, 17, 18, 19, 20, 21, 22,
794 23, 24, 0, 26, 27, 28, 29, 30, 31, 0,
795 0, 34, 35, 0, 0, 0, 0, 0, 0, 0,
796 0, 0, 36
797};
798
799#define yypact_value_is_default(Yystate) \
800 (!!((Yystate) == (-94)))
801
802#define yytable_value_is_error(Yytable_value) \
803 YYID (0)
804
805static const yytype_int16 yycheck[] =
806{
807 61, 61, 3, 82, 67, 1, 8, 26, 1, 32,
808 89, 40, 39, 58, 39, 0, 18, 31, 23, 112,
809 34, 114, 46, 39, 35, 27, 53, 35, 53, 52,
810 32, 94, 39, 112, 79, 114, 55, 53, 49, 35,
811 59, 49, 103, 39, 39, 49, 39, 43, 127, 128,
812 43, 35, 47, 49, 50, 51, 49, 58, 51, 66,
813 89, 153, 39, 39, 71, 49, 43, 43, 49, 161,
814 127, 128, 49, 49, 51, 51, 155, 54, 79, 39,
815 46, 47, 53, 43, 39, 47, 48, 39, 43, 49,
816 53, 51, 153, 39, 49, 46, 51, 46, 47, 52,
817 161, 48, 47, 36, 54, 36, 50, 1, 50, 170,
818 170, 5, 6, 7, 8, 9, 10, 11, 50, 13,
819 14, 15, 16, 17, 18, 19, 20, 21, 22, 46,
820 24, 25, 26, 27, 28, 29, 48, 46, 32, 33,
821 31, 46, 50, 50, 48, 39, 38, 50, 50, 43,
822 32, 50, 46, 47, 50, 49, 36, 51, 1, 1,
823 54, 50, 5, 6, 7, 8, 9, 10, 11, 50,
824 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
825 50, 24, 25, 26, 27, 28, 29, 50, 155, 32,
826 33, 97, 110, 115, 84, 51, 39, -1, -1, -1,
827 43, -1, -1, 46, 47, 106, 49, -1, 51, 1,
828 -1, 54, -1, 5, 6, 7, 8, 9, 10, 11,
829 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
830 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
831 32, 33, -1, -1, -1, -1, -1, 39, -1, -1,
832 -1, 43, -1, -1, 46, -1, 1, 49, -1, 51,
833 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
834 15, 16, 17, 18, 19, 20, 21, 22, -1, 24,
835 25, 26, 27, 28, 29, -1, -1, 32, 33, -1,
836 -1, -1, -1, 38, -1, -1, -1, -1, 43, -1,
837 -1, -1, 1, -1, -1, 50, 5, 6, 7, 8,
838 9, 10, 11, -1, 13, 14, 15, 16, 17, 18,
839 19, 20, 21, 22, -1, 24, 25, 26, 27, 28,
840 29, -1, -1, 32, 33, -1, -1, -1, -1, 38,
841 -1, -1, -1, -1, 43, -1, -1, -1, 1, -1,
842 -1, 50, 5, 6, 7, 8, 9, 10, 11, -1,
843 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
844 -1, 24, 25, 26, 27, 28, 29, -1, -1, 32,
845 33, -1, -1, -1, -1, 38, -1, -1, -1, -1,
846 43, -1, -1, -1, -1, -1, -1, 50, 5, 6,
847 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
848 17, 18, 19, 20, 21, 22, -1, 24, 25, 26,
849 27, 28, 29, -1, -1, 32, 33, -1, -1, -1,
850 -1, -1, 39, -1, -1, -1, 43, -1, -1, -1,
851 -1, -1, 49, -1, 51, 5, 6, 7, 8, 9,
852 10, 11, -1, 13, 14, 15, 16, 17, 18, 19,
853 20, 21, 22, -1, 24, 25, 26, 27, 28, 29,
854 -1, -1, 32, 33, -1, -1, -1, -1, 38, -1,
855 -1, -1, -1, 43, 5, 6, 7, 8, 9, 10,
856 11, -1, 13, 14, 15, 16, 17, 18, 19, 20,
857 21, 22, -1, 24, 25, 26, 27, 28, 29, -1,
858 -1, 32, 33, -1, -1, -1, -1, -1, -1, -1,
859 -1, -1, 43
860};
861
862/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
863 symbol of state STATE-NUM. */
864static const yytype_uint8 yystos[] =
865{
866 0, 56, 57, 58, 0, 57, 1, 5, 6, 7,
867 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
868 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
869 28, 29, 30, 31, 32, 33, 43, 59, 62, 66,
870 67, 68, 69, 70, 71, 75, 86, 101, 103, 46,
871 47, 39, 53, 98, 23, 39, 53, 89, 61, 39,
872 89, 49, 49, 46, 39, 43, 49, 51, 63, 64,
873 65, 72, 76, 77, 68, 98, 39, 99, 100, 60,
874 89, 1, 66, 90, 91, 92, 62, 66, 89, 67,
875 83, 39, 76, 73, 74, 75, 46, 48, 76, 31,
876 34, 102, 35, 49, 52, 47, 48, 62, 46, 47,
877 39, 43, 49, 54, 72, 78, 79, 93, 94, 95,
878 96, 47, 1, 92, 76, 39, 43, 49, 72, 84,
879 85, 50, 50, 50, 75, 65, 97, 1, 80, 81,
880 82, 83, 36, 47, 100, 96, 1, 39, 78, 36,
881 78, 97, 35, 49, 46, 48, 1, 43, 84, 84,
882 35, 49, 46, 32, 52, 87, 88, 50, 50, 38,
883 48, 50, 50, 1, 80, 95, 50, 50, 1, 80,
884 36, 38, 83, 50, 50, 50, 50
885};
886
887#define yyerrok (yyerrstatus = 0)
888#define yyclearin (yychar = YYEMPTY)
889#define YYEMPTY (-2)
890#define YYEOF 0
891
892#define YYACCEPT goto yyacceptlab
893#define YYABORT goto yyabortlab
894#define YYERROR goto yyerrorlab
895
896
897/* Like YYERROR except do call yyerror. This remains here temporarily
898 to ease the transition to the new meaning of YYERROR, for GCC.
899 Once GCC version 2 has supplanted version 1, this can go. However,
900 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
901 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
902 discussed. */
903
904#define YYFAIL goto yyerrlab
905#if defined YYFAIL
906 /* This is here to suppress warnings from the GCC cpp's
907 -Wunused-macros. Normally we don't worry about that warning, but
908 some users do, and we want to make it easy for users to remove
909 YYFAIL uses, which will produce warnings from Bison 2.5. */
910#endif
911
912#define YYRECOVERING() (!!yyerrstatus)
913
914#define YYBACKUP(Token, Value) \
915do \
916 if (yychar == YYEMPTY) \
917 { \
918 yychar = (Token); \
919 yylval = (Value); \
920 YYPOPSTACK (yylen); \
921 yystate = *yyssp; \
922 goto yybackup; \
923 } \
924 else \
925 { \
926 yyerror (YY_("syntax error: cannot back up")); \
927 YYERROR; \
928 } \
929while (YYID (0))
930
931/* Error token number */
932#define YYTERROR 1
933#define YYERRCODE 256
934
935
936/* This macro is provided for backward compatibility. */
937#ifndef YY_LOCATION_PRINT
938# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
939#endif
940
941
942/* YYLEX -- calling `yylex' with the right arguments. */
943#ifdef YYLEX_PARAM
944# define YYLEX yylex (YYLEX_PARAM)
945#else
946# define YYLEX yylex ()
947#endif
948
949/* Enable debugging if requested. */
950#if YYDEBUG
951
952# ifndef YYFPRINTF
953# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
954# define YYFPRINTF fprintf
955# endif
956
957# define YYDPRINTF(Args) \
958do { \
959 if (yydebug) \
960 YYFPRINTF Args; \
961} while (YYID (0))
962
963# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
964do { \
965 if (yydebug) \
966 { \
967 YYFPRINTF (stderr, "%s ", Title); \
968 yy_symbol_print (stderr, \
969 Type, Value); \
970 YYFPRINTF (stderr, "\n"); \
971 } \
972} while (YYID (0))
973
974
975/*--------------------------------.
976| Print this symbol on YYOUTPUT. |
977`--------------------------------*/
978
979/*ARGSUSED*/
980#if (defined __STDC__ || defined __C99__FUNC__ \
981 || defined __cplusplus || defined _MSC_VER)
982static void
983yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
984#else
985static void
986yy_symbol_value_print (yyoutput, yytype, yyvaluep)
987 FILE *yyoutput;
988 int yytype;
989 YYSTYPE const * const yyvaluep;
990#endif
991{
992 FILE *yyo = yyoutput;
993 YYUSE (yyo);
994 if (!yyvaluep)
995 return;
996# ifdef YYPRINT
997 if (yytype < YYNTOKENS)
998 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
999# else
1000 YYUSE (yyoutput);
1001# endif
1002 switch (yytype)
1003 {
1004 default:
1005 break;
1006 }
1007}
1008
1009
1010/*--------------------------------.
1011| Print this symbol on YYOUTPUT. |
1012`--------------------------------*/
1013
1014#if (defined __STDC__ || defined __C99__FUNC__ \
1015 || defined __cplusplus || defined _MSC_VER)
1016static void
1017yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1018#else
1019static void
1020yy_symbol_print (yyoutput, yytype, yyvaluep)
1021 FILE *yyoutput;
1022 int yytype;
1023 YYSTYPE const * const yyvaluep;
1024#endif
1025{
1026 if (yytype < YYNTOKENS)
1027 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1028 else
1029 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1030
1031 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1032 YYFPRINTF (yyoutput, ")");
1033}
1034
1035/*------------------------------------------------------------------.
1036| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1037| TOP (included). |
1038`------------------------------------------------------------------*/
1039
1040#if (defined __STDC__ || defined __C99__FUNC__ \
1041 || defined __cplusplus || defined _MSC_VER)
1042static void
1043yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1044#else
1045static void
1046yy_stack_print (yybottom, yytop)
1047 yytype_int16 *yybottom;
1048 yytype_int16 *yytop;
1049#endif
1050{
1051 YYFPRINTF (stderr, "Stack now");
1052 for (; yybottom <= yytop; yybottom++)
1053 {
1054 int yybot = *yybottom;
1055 YYFPRINTF (stderr, " %d", yybot);
1056 }
1057 YYFPRINTF (stderr, "\n");
1058}
1059
1060# define YY_STACK_PRINT(Bottom, Top) \
1061do { \
1062 if (yydebug) \
1063 yy_stack_print ((Bottom), (Top)); \
1064} while (YYID (0))
1065
1066
1067/*------------------------------------------------.
1068| Report that the YYRULE is going to be reduced. |
1069`------------------------------------------------*/
1070
1071#if (defined __STDC__ || defined __C99__FUNC__ \
1072 || defined __cplusplus || defined _MSC_VER)
1073static void
1074yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1075#else
1076static void
1077yy_reduce_print (yyvsp, yyrule)
1078 YYSTYPE *yyvsp;
1079 int yyrule;
1080#endif
1081{
1082 int yynrhs = yyr2[yyrule];
1083 int yyi;
1084 unsigned long int yylno = yyrline[yyrule];
1085 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1086 yyrule - 1, yylno);
1087 /* The symbols being reduced. */
1088 for (yyi = 0; yyi < yynrhs; yyi++)
1089 {
1090 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1091 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1092 &(yyvsp[(yyi + 1) - (yynrhs)])
1093 );
1094 YYFPRINTF (stderr, "\n");
1095 }
1096}
1097
1098# define YY_REDUCE_PRINT(Rule) \
1099do { \
1100 if (yydebug) \
1101 yy_reduce_print (yyvsp, Rule); \
1102} while (YYID (0))
1103
1104/* Nonzero means print parse trace. It is left uninitialized so that
1105 multiple parsers can coexist. */
1106int yydebug;
1107#else /* !YYDEBUG */
1108# define YYDPRINTF(Args)
1109# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1110# define YY_STACK_PRINT(Bottom, Top)
1111# define YY_REDUCE_PRINT(Rule)
1112#endif /* !YYDEBUG */
1113
1114
1115/* YYINITDEPTH -- initial size of the parser's stacks. */
1116#ifndef YYINITDEPTH
1117# define YYINITDEPTH 200
1118#endif
1119
1120/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1121 if the built-in stack extension method is used).
1122
1123 Do not make this value too large; the results are undefined if
1124 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1125 evaluated with infinite-precision integer arithmetic. */
1126
1127#ifndef YYMAXDEPTH
1128# define YYMAXDEPTH 10000
1129#endif
1130
1131
1132#if YYERROR_VERBOSE
1133
1134# ifndef yystrlen
1135# if defined __GLIBC__ && defined _STRING_H
1136# define yystrlen strlen
1137# else
1138/* Return the length of YYSTR. */
1139#if (defined __STDC__ || defined __C99__FUNC__ \
1140 || defined __cplusplus || defined _MSC_VER)
1141static YYSIZE_T
1142yystrlen (const char *yystr)
1143#else
1144static YYSIZE_T
1145yystrlen (yystr)
1146 const char *yystr;
1147#endif
1148{
1149 YYSIZE_T yylen;
1150 for (yylen = 0; yystr[yylen]; yylen++)
1151 continue;
1152 return yylen;
1153}
1154# endif
1155# endif
1156
1157# ifndef yystpcpy
1158# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1159# define yystpcpy stpcpy
1160# else
1161/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1162 YYDEST. */
1163#if (defined __STDC__ || defined __C99__FUNC__ \
1164 || defined __cplusplus || defined _MSC_VER)
1165static char *
1166yystpcpy (char *yydest, const char *yysrc)
1167#else
1168static char *
1169yystpcpy (yydest, yysrc)
1170 char *yydest;
1171 const char *yysrc;
1172#endif
1173{
1174 char *yyd = yydest;
1175 const char *yys = yysrc;
1176
1177 while ((*yyd++ = *yys++) != '\0')
1178 continue;
1179
1180 return yyd - 1;
1181}
1182# endif
1183# endif
1184
1185# ifndef yytnamerr
1186/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1187 quotes and backslashes, so that it's suitable for yyerror. The
1188 heuristic is that double-quoting is unnecessary unless the string
1189 contains an apostrophe, a comma, or backslash (other than
1190 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1191 null, do not copy; instead, return the length of what the result
1192 would have been. */
1193static YYSIZE_T
1194yytnamerr (char *yyres, const char *yystr)
1195{
1196 if (*yystr == '"')
1197 {
1198 YYSIZE_T yyn = 0;
1199 char const *yyp = yystr;
1200
1201 for (;;)
1202 switch (*++yyp)
1203 {
1204 case '\'':
1205 case ',':
1206 goto do_not_strip_quotes;
1207
1208 case '\\':
1209 if (*++yyp != '\\')
1210 goto do_not_strip_quotes;
1211 /* Fall through. */
1212 default:
1213 if (yyres)
1214 yyres[yyn] = *yyp;
1215 yyn++;
1216 break;
1217
1218 case '"':
1219 if (yyres)
1220 yyres[yyn] = '\0';
1221 return yyn;
1222 }
1223 do_not_strip_quotes: ;
1224 }
1225
1226 if (! yyres)
1227 return yystrlen (yystr);
1228
1229 return yystpcpy (yyres, yystr) - yyres;
1230}
1231# endif
1232
1233/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1234 about the unexpected token YYTOKEN for the state stack whose top is
1235 YYSSP.
1236
1237 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1238 not large enough to hold the message. In that case, also set
1239 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1240 required number of bytes is too large to store. */
1241static int
1242yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1243 yytype_int16 *yyssp, int yytoken)
1244{
1245 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1246 YYSIZE_T yysize = yysize0;
1247 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1248 /* Internationalized format string. */
1249 const char *yyformat = YY_NULL;
1250 /* Arguments of yyformat. */
1251 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1252 /* Number of reported tokens (one for the "unexpected", one per
1253 "expected"). */
1254 int yycount = 0;
1255
1256 /* There are many possibilities here to consider:
1257 - Assume YYFAIL is not used. It's too flawed to consider. See
1258 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1259 for details. YYERROR is fine as it does not invoke this
1260 function.
1261 - If this state is a consistent state with a default action, then
1262 the only way this function was invoked is if the default action
1263 is an error action. In that case, don't check for expected
1264 tokens because there are none.
1265 - The only way there can be no lookahead present (in yychar) is if
1266 this state is a consistent state with a default action. Thus,
1267 detecting the absence of a lookahead is sufficient to determine
1268 that there is no unexpected or expected token to report. In that
1269 case, just report a simple "syntax error".
1270 - Don't assume there isn't a lookahead just because this state is a
1271 consistent state with a default action. There might have been a
1272 previous inconsistent state, consistent state with a non-default
1273 action, or user semantic action that manipulated yychar.
1274 - Of course, the expected token list depends on states to have
1275 correct lookahead information, and it depends on the parser not
1276 to perform extra reductions after fetching a lookahead from the
1277 scanner and before detecting a syntax error. Thus, state merging
1278 (from LALR or IELR) and default reductions corrupt the expected
1279 token list. However, the list is correct for canonical LR with
1280 one exception: it will still contain any token that will not be
1281 accepted due to an error action in a later state.
1282 */
1283 if (yytoken != YYEMPTY)
1284 {
1285 int yyn = yypact[*yyssp];
1286 yyarg[yycount++] = yytname[yytoken];
1287 if (!yypact_value_is_default (yyn))
1288 {
1289 /* Start YYX at -YYN if negative to avoid negative indexes in
1290 YYCHECK. In other words, skip the first -YYN actions for
1291 this state because they are default actions. */
1292 int yyxbegin = yyn < 0 ? -yyn : 0;
1293 /* Stay within bounds of both yycheck and yytname. */
1294 int yychecklim = YYLAST - yyn + 1;
1295 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1296 int yyx;
1297
1298 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1299 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1300 && !yytable_value_is_error (yytable[yyx + yyn]))
1301 {
1302 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1303 {
1304 yycount = 1;
1305 yysize = yysize0;
1306 break;
1307 }
1308 yyarg[yycount++] = yytname[yyx];
1309 {
1310 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1311 if (! (yysize <= yysize1
1312 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1313 return 2;
1314 yysize = yysize1;
1315 }
1316 }
1317 }
1318 }
1319
1320 switch (yycount)
1321 {
1322# define YYCASE_(N, S) \
1323 case N: \
1324 yyformat = S; \
1325 break
1326 YYCASE_(0, YY_("syntax error"));
1327 YYCASE_(1, YY_("syntax error, unexpected %s"));
1328 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1329 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1330 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1331 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1332# undef YYCASE_
1333 }
1334
1335 {
1336 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1337 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1338 return 2;
1339 yysize = yysize1;
1340 }
1341
1342 if (*yymsg_alloc < yysize)
1343 {
1344 *yymsg_alloc = 2 * yysize;
1345 if (! (yysize <= *yymsg_alloc
1346 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1347 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1348 return 1;
1349 }
1350
1351 /* Avoid sprintf, as that infringes on the user's name space.
1352 Don't have undefined behavior even if the translation
1353 produced a string with the wrong number of "%s"s. */
1354 {
1355 char *yyp = *yymsg;
1356 int yyi = 0;
1357 while ((*yyp = *yyformat) != '\0')
1358 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1359 {
1360 yyp += yytnamerr (yyp, yyarg[yyi++]);
1361 yyformat += 2;
1362 }
1363 else
1364 {
1365 yyp++;
1366 yyformat++;
1367 }
1368 }
1369 return 0;
1370}
1371#endif /* YYERROR_VERBOSE */
1372
1373/*-----------------------------------------------.
1374| Release the memory associated to this symbol. |
1375`-----------------------------------------------*/
1376
1377/*ARGSUSED*/
1378#if (defined __STDC__ || defined __C99__FUNC__ \
1379 || defined __cplusplus || defined _MSC_VER)
1380static void
1381yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1382#else
1383static void
1384yydestruct (yymsg, yytype, yyvaluep)
1385 const char *yymsg;
1386 int yytype;
1387 YYSTYPE *yyvaluep;
1388#endif
1389{
1390 YYUSE (yyvaluep);
1391
1392 if (!yymsg)
1393 yymsg = "Deleting";
1394 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1395
1396 switch (yytype)
1397 {
1398
1399 default:
1400 break;
1401 }
1402}
1403
1404
1405
1406
1407/* The lookahead symbol. */
1408int yychar;
1409
1410
1411#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1412# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1413# define YY_IGNORE_MAYBE_UNINITIALIZED_END
1414#endif
1415#ifndef YY_INITIAL_VALUE
1416# define YY_INITIAL_VALUE(Value) /* Nothing. */
1417#endif
1418
1419/* The semantic value of the lookahead symbol. */
1420YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1421
1422/* Number of syntax errors so far. */
1423int yynerrs;
1424
1425
1426/*----------.
1427| yyparse. |
1428`----------*/
1429
1430#ifdef YYPARSE_PARAM
1431#if (defined __STDC__ || defined __C99__FUNC__ \
1432 || defined __cplusplus || defined _MSC_VER)
1433int
1434yyparse (void *YYPARSE_PARAM)
1435#else
1436int
1437yyparse (YYPARSE_PARAM)
1438 void *YYPARSE_PARAM;
1439#endif
1440#else /* ! YYPARSE_PARAM */
1441#if (defined __STDC__ || defined __C99__FUNC__ \
1442 || defined __cplusplus || defined _MSC_VER)
1443int
1444yyparse (void)
1445#else
1446int
1447yyparse ()
1448
1449#endif
1450#endif
1451{
1452 int yystate;
1453 /* Number of tokens to shift before error messages enabled. */
1454 int yyerrstatus;
1455
1456 /* The stacks and their tools:
1457 `yyss': related to states.
1458 `yyvs': related to semantic values.
1459
1460 Refer to the stacks through separate pointers, to allow yyoverflow
1461 to reallocate them elsewhere. */
1462
1463 /* The state stack. */
1464 yytype_int16 yyssa[YYINITDEPTH];
1465 yytype_int16 *yyss;
1466 yytype_int16 *yyssp;
1467
1468 /* The semantic value stack. */
1469 YYSTYPE yyvsa[YYINITDEPTH];
1470 YYSTYPE *yyvs;
1471 YYSTYPE *yyvsp;
1472
1473 YYSIZE_T yystacksize;
1474
1475 int yyn;
1476 int yyresult;
1477 /* Lookahead token as an internal (translated) token number. */
1478 int yytoken = 0;
1479 /* The variables used to return semantic value and location from the
1480 action routines. */
1481 YYSTYPE yyval;
1482
1483#if YYERROR_VERBOSE
1484 /* Buffer for error messages, and its allocated size. */
1485 char yymsgbuf[128];
1486 char *yymsg = yymsgbuf;
1487 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1488#endif
1489
1490#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1491
1492 /* The number of symbols on the RHS of the reduced rule.
1493 Keep to zero when no symbol should be popped. */
1494 int yylen = 0;
1495
1496 yyssp = yyss = yyssa;
1497 yyvsp = yyvs = yyvsa;
1498 yystacksize = YYINITDEPTH;
1499
1500 YYDPRINTF ((stderr, "Starting parse\n"));
1501
1502 yystate = 0;
1503 yyerrstatus = 0;
1504 yynerrs = 0;
1505 yychar = YYEMPTY; /* Cause a token to be read. */
1506 goto yysetstate;
1507
1508/*------------------------------------------------------------.
1509| yynewstate -- Push a new state, which is found in yystate. |
1510`------------------------------------------------------------*/
1511 yynewstate:
1512 /* In all cases, when you get here, the value and location stacks
1513 have just been pushed. So pushing a state here evens the stacks. */
1514 yyssp++;
1515
1516 yysetstate:
1517 *yyssp = yystate;
1518
1519 if (yyss + yystacksize - 1 <= yyssp)
1520 {
1521 /* Get the current used size of the three stacks, in elements. */
1522 YYSIZE_T yysize = yyssp - yyss + 1;
1523
1524#ifdef yyoverflow
1525 {
1526 /* Give user a chance to reallocate the stack. Use copies of
1527 these so that the &'s don't force the real ones into
1528 memory. */
1529 YYSTYPE *yyvs1 = yyvs;
1530 yytype_int16 *yyss1 = yyss;
1531
1532 /* Each stack pointer address is followed by the size of the
1533 data in use in that stack, in bytes. This used to be a
1534 conditional around just the two extra args, but that might
1535 be undefined if yyoverflow is a macro. */
1536 yyoverflow (YY_("memory exhausted"),
1537 &yyss1, yysize * sizeof (*yyssp),
1538 &yyvs1, yysize * sizeof (*yyvsp),
1539 &yystacksize);
1540
1541 yyss = yyss1;
1542 yyvs = yyvs1;
1543 }
1544#else /* no yyoverflow */
1545# ifndef YYSTACK_RELOCATE
1546 goto yyexhaustedlab;
1547# else
1548 /* Extend the stack our own way. */
1549 if (YYMAXDEPTH <= yystacksize)
1550 goto yyexhaustedlab;
1551 yystacksize *= 2;
1552 if (YYMAXDEPTH < yystacksize)
1553 yystacksize = YYMAXDEPTH;
1554
1555 {
1556 yytype_int16 *yyss1 = yyss;
1557 union yyalloc *yyptr =
1558 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1559 if (! yyptr)
1560 goto yyexhaustedlab;
1561 YYSTACK_RELOCATE (yyss_alloc, yyss);
1562 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1563# undef YYSTACK_RELOCATE
1564 if (yyss1 != yyssa)
1565 YYSTACK_FREE (yyss1);
1566 }
1567# endif
1568#endif /* no yyoverflow */
1569
1570 yyssp = yyss + yysize - 1;
1571 yyvsp = yyvs + yysize - 1;
1572
1573 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1574 (unsigned long int) yystacksize));
1575
1576 if (yyss + yystacksize - 1 <= yyssp)
1577 YYABORT;
1578 }
1579
1580 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1581
1582 if (yystate == YYFINAL)
1583 YYACCEPT;
1584
1585 goto yybackup;
1586
1587/*-----------.
1588| yybackup. |
1589`-----------*/
1590yybackup:
1591
1592 /* Do appropriate processing given the current state. Read a
1593 lookahead token if we need one and don't already have one. */
1594
1595 /* First try to decide what to do without reference to lookahead token. */
1596 yyn = yypact[yystate];
1597 if (yypact_value_is_default (yyn))
1598 goto yydefault;
1599
1600 /* Not known => get a lookahead token if don't already have one. */
1601
1602 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1603 if (yychar == YYEMPTY)
1604 {
1605 YYDPRINTF ((stderr, "Reading a token: "));
1606 yychar = YYLEX;
1607 }
1608
1609 if (yychar <= YYEOF)
1610 {
1611 yychar = yytoken = YYEOF;
1612 YYDPRINTF ((stderr, "Now at end of input.\n"));
1613 }
1614 else
1615 {
1616 yytoken = YYTRANSLATE (yychar);
1617 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1618 }
1619
1620 /* If the proper action on seeing token YYTOKEN is to reduce or to
1621 detect an error, take that action. */
1622 yyn += yytoken;
1623 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1624 goto yydefault;
1625 yyn = yytable[yyn];
1626 if (yyn <= 0)
1627 {
1628 if (yytable_value_is_error (yyn))
1629 goto yyerrlab;
1630 yyn = -yyn;
1631 goto yyreduce;
1632 }
1633
1634 /* Count tokens shifted since error; after three, turn off error
1635 status. */
1636 if (yyerrstatus)
1637 yyerrstatus--;
1638
1639 /* Shift the lookahead token. */
1640 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1641
1642 /* Discard the shifted token. */
1643 yychar = YYEMPTY;
1644
1645 yystate = yyn;
1646 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1647 *++yyvsp = yylval;
1648 YY_IGNORE_MAYBE_UNINITIALIZED_END
1649
1650 goto yynewstate;
1651
1652
1653/*-----------------------------------------------------------.
1654| yydefault -- do the default action for the current state. |
1655`-----------------------------------------------------------*/
1656yydefault:
1657 yyn = yydefact[yystate];
1658 if (yyn == 0)
1659 goto yyerrlab;
1660 goto yyreduce;
1661
1662
1663/*-----------------------------.
1664| yyreduce -- Do a reduction. |
1665`-----------------------------*/
1666yyreduce:
1667 /* yyn is the number of a rule to reduce with. */
1668 yylen = yyr2[yyn];
1669
1670 /* If YYLEN is nonzero, implement the default value of the action:
1671 `$$ = $1'.
1672
1673 Otherwise, the following line sets YYVAL to garbage.
1674 This behavior is undocumented and Bison
1675 users should not rely upon it. Assigning to YYVAL
1676 unconditionally makes the parser a bit smaller, and it avoids a
1677 GCC warning that YYVAL may be used uninitialized. */
1678 yyval = yyvsp[1-yylen];
1679
1680
1681 YY_REDUCE_PRINT (yyn);
1682 switch (yyn)
1683 {
1684 case 4:
1685
1686 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; }
1687 break;
1688
1689 case 5:
1690
1691 { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; }
1692 break;
1693
1694 case 6:
1695
1696 { is_typedef = 1; }
1697 break;
1698
1699 case 7:
1700
1701 { (yyval) = (yyvsp[(4) - (4)]); }
1702 break;
1703
1704 case 8:
1705
1706 { is_typedef = 1; }
1707 break;
1708
1709 case 9:
1710
1711 { (yyval) = (yyvsp[(3) - (3)]); }
1712 break;
1713
1714 case 14:
1715
1716 { (yyval) = (yyvsp[(2) - (2)]); }
1717 break;
1718
1719 case 15:
1720
1721 { (yyval) = (yyvsp[(2) - (2)]); }
1722 break;
1723
1724 case 16:
1725
1726 { if (current_name) {
1727 struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
1728 (*(yyvsp[(3) - (3)]))->next = NULL;
1729 add_symbol(current_name,
1730 is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
1731 decl, is_extern);
1732 current_name = NULL;
1733 }
1734 (yyval) = (yyvsp[(3) - (3)]);
1735 }
1736 break;
1737
1738 case 17:
1739
1740 { (yyval) = NULL; }
1741 break;
1742
1743 case 19:
1744
1745 { struct string_list *decl = *(yyvsp[(1) - (1)]);
1746 *(yyvsp[(1) - (1)]) = NULL;
1747 add_symbol(current_name,
1748 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1749 current_name = NULL;
1750 (yyval) = (yyvsp[(1) - (1)]);
1751 }
1752 break;
1753
1754 case 20:
1755
1756 { struct string_list *decl = *(yyvsp[(3) - (3)]);
1757 *(yyvsp[(3) - (3)]) = NULL;
1758 free_list(*(yyvsp[(2) - (3)]), NULL);
1759 *(yyvsp[(2) - (3)]) = decl_spec;
1760 add_symbol(current_name,
1761 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1762 current_name = NULL;
1763 (yyval) = (yyvsp[(3) - (3)]);
1764 }
1765 break;
1766
1767 case 21:
1768
1769 { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); }
1770 break;
1771
1772 case 22:
1773
1774 { decl_spec = NULL; }
1775 break;
1776
1777 case 24:
1778
1779 { decl_spec = *(yyvsp[(1) - (1)]); }
1780 break;
1781
1782 case 25:
1783
1784 { decl_spec = *(yyvsp[(2) - (2)]); }
1785 break;
1786
1787 case 26:
1788
1789 { /* Version 2 checksumming ignores storage class, as that
1790 is really irrelevant to the linkage. */
1791 remove_node((yyvsp[(1) - (1)]));
1792 (yyval) = (yyvsp[(1) - (1)]);
1793 }
1794 break;
1795
1796 case 31:
1797
1798 { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); }
1799 break;
1800
1801 case 32:
1802
1803 { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); }
1804 break;
1805
1806 case 37:
1807
1808 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); }
1809 break;
1810
1811 case 38:
1812
1813 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); }
1814 break;
1815
1816 case 39:
1817
1818 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); }
1819 break;
1820
1821 case 40:
1822
1823 { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_STRUCT); (yyval) = (yyvsp[(3) - (3)]); }
1824 break;
1825
1826 case 41:
1827
1828 { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_UNION); (yyval) = (yyvsp[(3) - (3)]); }
1829 break;
1830
1831 case 42:
1832
1833 { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_ENUM); (yyval) = (yyvsp[(3) - (3)]); }
1834 break;
1835
1836 case 43:
1837
1838 { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); }
1839 break;
1840
1841 case 44:
1842
1843 { (yyval) = (yyvsp[(2) - (2)]); }
1844 break;
1845
1846 case 45:
1847
1848 { (yyval) = (yyvsp[(2) - (2)]); }
1849 break;
1850
1851 case 57:
1852
1853 { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); }
1854 break;
1855
1856 case 58:
1857
1858 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
1859 break;
1860
1861 case 59:
1862
1863 { (yyval) = NULL; }
1864 break;
1865
1866 case 62:
1867
1868 { (yyval) = (yyvsp[(2) - (2)]); }
1869 break;
1870
1871 case 66:
1872
1873 { /* restrict has no effect in prototypes so ignore it */
1874 remove_node((yyvsp[(1) - (1)]));
1875 (yyval) = (yyvsp[(1) - (1)]);
1876 }
1877 break;
1878
1879 case 67:
1880
1881 { (yyval) = (yyvsp[(2) - (2)]); }
1882 break;
1883
1884 case 69:
1885
1886 { if (current_name != NULL) {
1887 error_with_pos("unexpected second declaration name");
1888 YYERROR;
1889 } else {
1890 current_name = (*(yyvsp[(1) - (1)]))->string;
1891 (yyval) = (yyvsp[(1) - (1)]);
1892 }
1893 }
1894 break;
1895
1896 case 70:
1897
1898 { if (current_name != NULL) {
1899 error_with_pos("unexpected second declaration name");
1900 YYERROR;
1901 } else {
1902 current_name = (*(yyvsp[(1) - (1)]))->string;
1903 (yyval) = (yyvsp[(1) - (1)]);
1904 }
1905 }
1906 break;
1907
1908 case 71:
1909
1910 { (yyval) = (yyvsp[(4) - (4)]); }
1911 break;
1912
1913 case 72:
1914
1915 { (yyval) = (yyvsp[(4) - (4)]); }
1916 break;
1917
1918 case 73:
1919
1920 { (yyval) = (yyvsp[(2) - (2)]); }
1921 break;
1922
1923 case 74:
1924
1925 { (yyval) = (yyvsp[(3) - (3)]); }
1926 break;
1927
1928 case 75:
1929
1930 { (yyval) = (yyvsp[(2) - (2)]); }
1931 break;
1932
1933 case 79:
1934
1935 { (yyval) = (yyvsp[(4) - (4)]); }
1936 break;
1937
1938 case 80:
1939
1940 { (yyval) = (yyvsp[(4) - (4)]); }
1941 break;
1942
1943 case 81:
1944
1945 { (yyval) = (yyvsp[(2) - (2)]); }
1946 break;
1947
1948 case 82:
1949
1950 { (yyval) = (yyvsp[(3) - (3)]); }
1951 break;
1952
1953 case 83:
1954
1955 { (yyval) = (yyvsp[(3) - (3)]); }
1956 break;
1957
1958 case 84:
1959
1960 { (yyval) = (yyvsp[(2) - (2)]); }
1961 break;
1962
1963 case 86:
1964
1965 { (yyval) = (yyvsp[(3) - (3)]); }
1966 break;
1967
1968 case 87:
1969
1970 { (yyval) = NULL; }
1971 break;
1972
1973 case 90:
1974
1975 { (yyval) = (yyvsp[(3) - (3)]); }
1976 break;
1977
1978 case 91:
1979
1980 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
1981 break;
1982
1983 case 92:
1984
1985 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
1986 break;
1987
1988 case 94:
1989
1990 { (yyval) = NULL; }
1991 break;
1992
1993 case 95:
1994
1995 { /* For version 2 checksums, we don't want to remember
1996 private parameter names. */
1997 remove_node((yyvsp[(1) - (1)]));
1998 (yyval) = (yyvsp[(1) - (1)]);
1999 }
2000 break;
2001
2002 case 96:
2003
2004 { remove_node((yyvsp[(1) - (1)]));
2005 (yyval) = (yyvsp[(1) - (1)]);
2006 }
2007 break;
2008
2009 case 97:
2010
2011 { (yyval) = (yyvsp[(4) - (4)]); }
2012 break;
2013
2014 case 98:
2015
2016 { (yyval) = (yyvsp[(4) - (4)]); }
2017 break;
2018
2019 case 99:
2020
2021 { (yyval) = (yyvsp[(2) - (2)]); }
2022 break;
2023
2024 case 100:
2025
2026 { (yyval) = (yyvsp[(3) - (3)]); }
2027 break;
2028
2029 case 101:
2030
2031 { (yyval) = (yyvsp[(3) - (3)]); }
2032 break;
2033
2034 case 102:
2035
2036 { struct string_list *decl = *(yyvsp[(2) - (3)]);
2037 *(yyvsp[(2) - (3)]) = NULL;
2038 add_symbol(current_name, SYM_NORMAL, decl, is_extern);
2039 (yyval) = (yyvsp[(3) - (3)]);
2040 }
2041 break;
2042
2043 case 103:
2044
2045 { (yyval) = NULL; }
2046 break;
2047
2048 case 105:
2049
2050 { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); }
2051 break;
2052
2053 case 106:
2054
2055 { (yyval) = (yyvsp[(3) - (3)]); }
2056 break;
2057
2058 case 107:
2059
2060 { (yyval) = (yyvsp[(3) - (3)]); }
2061 break;
2062
2063 case 108:
2064
2065 { (yyval) = NULL; }
2066 break;
2067
2068 case 111:
2069
2070 { (yyval) = (yyvsp[(2) - (2)]); }
2071 break;
2072
2073 case 112:
2074
2075 { (yyval) = (yyvsp[(3) - (3)]); }
2076 break;
2077
2078 case 113:
2079
2080 { (yyval) = (yyvsp[(2) - (2)]); }
2081 break;
2082
2083 case 114:
2084
2085 { (yyval) = NULL; }
2086 break;
2087
2088 case 117:
2089
2090 { (yyval) = (yyvsp[(3) - (3)]); }
2091 break;
2092
2093 case 118:
2094
2095 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
2096 break;
2097
2098 case 119:
2099
2100 { (yyval) = (yyvsp[(2) - (2)]); }
2101 break;
2102
2103 case 121:
2104
2105 { (yyval) = (yyvsp[(2) - (2)]); }
2106 break;
2107
2108 case 122:
2109
2110 { (yyval) = NULL; }
2111 break;
2112
2113 case 124:
2114
2115 { (yyval) = (yyvsp[(3) - (3)]); }
2116 break;
2117
2118 case 125:
2119
2120 { (yyval) = (yyvsp[(4) - (4)]); }
2121 break;
2122
2123 case 128:
2124
2125 {
2126 const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
2127 add_symbol(name, SYM_ENUM_CONST, NULL, 0);
2128 }
2129 break;
2130
2131 case 129:
2132
2133 {
2134 const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
2135 struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)]));
2136 add_symbol(name, SYM_ENUM_CONST, expr, 0);
2137 }
2138 break;
2139
2140 case 130:
2141
2142 { (yyval) = (yyvsp[(2) - (2)]); }
2143 break;
2144
2145 case 131:
2146
2147 { (yyval) = NULL; }
2148 break;
2149
2150 case 133:
2151
2152 { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); }
2153 break;
2154
2155
2156
2157 default: break;
2158 }
2159 /* User semantic actions sometimes alter yychar, and that requires
2160 that yytoken be updated with the new translation. We take the
2161 approach of translating immediately before every use of yytoken.
2162 One alternative is translating here after every semantic action,
2163 but that translation would be missed if the semantic action invokes
2164 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2165 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2166 incorrect destructor might then be invoked immediately. In the
2167 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2168 to an incorrect destructor call or verbose syntax error message
2169 before the lookahead is translated. */
2170 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2171
2172 YYPOPSTACK (yylen);
2173 yylen = 0;
2174 YY_STACK_PRINT (yyss, yyssp);
2175
2176 *++yyvsp = yyval;
2177
2178 /* Now `shift' the result of the reduction. Determine what state
2179 that goes to, based on the state we popped back to and the rule
2180 number reduced by. */
2181
2182 yyn = yyr1[yyn];
2183
2184 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2185 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2186 yystate = yytable[yystate];
2187 else
2188 yystate = yydefgoto[yyn - YYNTOKENS];
2189
2190 goto yynewstate;
2191
2192
2193/*------------------------------------.
2194| yyerrlab -- here on detecting error |
2195`------------------------------------*/
2196yyerrlab:
2197 /* Make sure we have latest lookahead translation. See comments at
2198 user semantic actions for why this is necessary. */
2199 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2200
2201 /* If not already recovering from an error, report this error. */
2202 if (!yyerrstatus)
2203 {
2204 ++yynerrs;
2205#if ! YYERROR_VERBOSE
2206 yyerror (YY_("syntax error"));
2207#else
2208# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2209 yyssp, yytoken)
2210 {
2211 char const *yymsgp = YY_("syntax error");
2212 int yysyntax_error_status;
2213 yysyntax_error_status = YYSYNTAX_ERROR;
2214 if (yysyntax_error_status == 0)
2215 yymsgp = yymsg;
2216 else if (yysyntax_error_status == 1)
2217 {
2218 if (yymsg != yymsgbuf)
2219 YYSTACK_FREE (yymsg);
2220 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2221 if (!yymsg)
2222 {
2223 yymsg = yymsgbuf;
2224 yymsg_alloc = sizeof yymsgbuf;
2225 yysyntax_error_status = 2;
2226 }
2227 else
2228 {
2229 yysyntax_error_status = YYSYNTAX_ERROR;
2230 yymsgp = yymsg;
2231 }
2232 }
2233 yyerror (yymsgp);
2234 if (yysyntax_error_status == 2)
2235 goto yyexhaustedlab;
2236 }
2237# undef YYSYNTAX_ERROR
2238#endif
2239 }
2240
2241
2242
2243 if (yyerrstatus == 3)
2244 {
2245 /* If just tried and failed to reuse lookahead token after an
2246 error, discard it. */
2247
2248 if (yychar <= YYEOF)
2249 {
2250 /* Return failure if at end of input. */
2251 if (yychar == YYEOF)
2252 YYABORT;
2253 }
2254 else
2255 {
2256 yydestruct ("Error: discarding",
2257 yytoken, &yylval);
2258 yychar = YYEMPTY;
2259 }
2260 }
2261
2262 /* Else will try to reuse lookahead token after shifting the error
2263 token. */
2264 goto yyerrlab1;
2265
2266
2267/*---------------------------------------------------.
2268| yyerrorlab -- error raised explicitly by YYERROR. |
2269`---------------------------------------------------*/
2270yyerrorlab:
2271
2272 /* Pacify compilers like GCC when the user code never invokes
2273 YYERROR and the label yyerrorlab therefore never appears in user
2274 code. */
2275 if (/*CONSTCOND*/ 0)
2276 goto yyerrorlab;
2277
2278 /* Do not reclaim the symbols of the rule which action triggered
2279 this YYERROR. */
2280 YYPOPSTACK (yylen);
2281 yylen = 0;
2282 YY_STACK_PRINT (yyss, yyssp);
2283 yystate = *yyssp;
2284 goto yyerrlab1;
2285
2286
2287/*-------------------------------------------------------------.
2288| yyerrlab1 -- common code for both syntax error and YYERROR. |
2289`-------------------------------------------------------------*/
2290yyerrlab1:
2291 yyerrstatus = 3; /* Each real token shifted decrements this. */
2292
2293 for (;;)
2294 {
2295 yyn = yypact[yystate];
2296 if (!yypact_value_is_default (yyn))
2297 {
2298 yyn += YYTERROR;
2299 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2300 {
2301 yyn = yytable[yyn];
2302 if (0 < yyn)
2303 break;
2304 }
2305 }
2306
2307 /* Pop the current state because it cannot handle the error token. */
2308 if (yyssp == yyss)
2309 YYABORT;
2310
2311
2312 yydestruct ("Error: popping",
2313 yystos[yystate], yyvsp);
2314 YYPOPSTACK (1);
2315 yystate = *yyssp;
2316 YY_STACK_PRINT (yyss, yyssp);
2317 }
2318
2319 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2320 *++yyvsp = yylval;
2321 YY_IGNORE_MAYBE_UNINITIALIZED_END
2322
2323
2324 /* Shift the error token. */
2325 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2326
2327 yystate = yyn;
2328 goto yynewstate;
2329
2330
2331/*-------------------------------------.
2332| yyacceptlab -- YYACCEPT comes here. |
2333`-------------------------------------*/
2334yyacceptlab:
2335 yyresult = 0;
2336 goto yyreturn;
2337
2338/*-----------------------------------.
2339| yyabortlab -- YYABORT comes here. |
2340`-----------------------------------*/
2341yyabortlab:
2342 yyresult = 1;
2343 goto yyreturn;
2344
2345#if !defined yyoverflow || YYERROR_VERBOSE
2346/*-------------------------------------------------.
2347| yyexhaustedlab -- memory exhaustion comes here. |
2348`-------------------------------------------------*/
2349yyexhaustedlab:
2350 yyerror (YY_("memory exhausted"));
2351 yyresult = 2;
2352 /* Fall through. */
2353#endif
2354
2355yyreturn:
2356 if (yychar != YYEMPTY)
2357 {
2358 /* Make sure we have latest lookahead translation. See comments at
2359 user semantic actions for why this is necessary. */
2360 yytoken = YYTRANSLATE (yychar);
2361 yydestruct ("Cleanup: discarding lookahead",
2362 yytoken, &yylval);
2363 }
2364 /* Do not reclaim the symbols of the rule which action triggered
2365 this YYABORT or YYACCEPT. */
2366 YYPOPSTACK (yylen);
2367 YY_STACK_PRINT (yyss, yyssp);
2368 while (yyssp != yyss)
2369 {
2370 yydestruct ("Cleanup: popping",
2371 yystos[*yyssp], yyvsp);
2372 YYPOPSTACK (1);
2373 }
2374#ifndef yyoverflow
2375 if (yyss != yyssa)
2376 YYSTACK_FREE (yyss);
2377#endif
2378#if YYERROR_VERBOSE
2379 if (yymsg != yymsgbuf)
2380 YYSTACK_FREE (yymsg);
2381#endif
2382 /* Make sure YYID is used. */
2383 return YYID (yyresult);
2384}
2385
2386
2387
2388
2389
2390static void
2391yyerror(const char *e)
2392{
2393 error_with_pos("%s", e);
2394}
diff --git a/scripts/genksyms/parse.tab.h_shipped b/scripts/genksyms/parse.tab.h_shipped
deleted file mode 100644
index 46a5e124eda1..000000000000
--- a/scripts/genksyms/parse.tab.h_shipped
+++ /dev/null
@@ -1,119 +0,0 @@
1/* A Bison parser, made by GNU Bison 2.7. */
2
3/* Bison interface for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20/* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33#ifndef YY_YY_SCRIPTS_GENKSYMS_PARSE_TAB_H_SHIPPED_INCLUDED
34# define YY_YY_SCRIPTS_GENKSYMS_PARSE_TAB_H_SHIPPED_INCLUDED
35/* Enabling traces. */
36#ifndef YYDEBUG
37# define YYDEBUG 1
38#endif
39#if YYDEBUG
40extern int yydebug;
41#endif
42
43/* Tokens. */
44#ifndef YYTOKENTYPE
45# define YYTOKENTYPE
46 /* Put the tokens into the symbol table, so that GDB and other debuggers
47 know about them. */
48 enum yytokentype {
49 ASM_KEYW = 258,
50 ATTRIBUTE_KEYW = 259,
51 AUTO_KEYW = 260,
52 BOOL_KEYW = 261,
53 CHAR_KEYW = 262,
54 CONST_KEYW = 263,
55 DOUBLE_KEYW = 264,
56 ENUM_KEYW = 265,
57 EXTERN_KEYW = 266,
58 EXTENSION_KEYW = 267,
59 FLOAT_KEYW = 268,
60 INLINE_KEYW = 269,
61 INT_KEYW = 270,
62 LONG_KEYW = 271,
63 REGISTER_KEYW = 272,
64 RESTRICT_KEYW = 273,
65 SHORT_KEYW = 274,
66 SIGNED_KEYW = 275,
67 STATIC_KEYW = 276,
68 STRUCT_KEYW = 277,
69 TYPEDEF_KEYW = 278,
70 UNION_KEYW = 279,
71 UNSIGNED_KEYW = 280,
72 VOID_KEYW = 281,
73 VOLATILE_KEYW = 282,
74 TYPEOF_KEYW = 283,
75 VA_LIST_KEYW = 284,
76 EXPORT_SYMBOL_KEYW = 285,
77 ASM_PHRASE = 286,
78 ATTRIBUTE_PHRASE = 287,
79 TYPEOF_PHRASE = 288,
80 BRACE_PHRASE = 289,
81 BRACKET_PHRASE = 290,
82 EXPRESSION_PHRASE = 291,
83 CHAR = 292,
84 DOTS = 293,
85 IDENT = 294,
86 INT = 295,
87 REAL = 296,
88 STRING = 297,
89 TYPE = 298,
90 OTHER = 299,
91 FILENAME = 300
92 };
93#endif
94
95
96#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
97typedef int YYSTYPE;
98# define YYSTYPE_IS_TRIVIAL 1
99# define yystype YYSTYPE /* obsolescent; will be withdrawn */
100# define YYSTYPE_IS_DECLARED 1
101#endif
102
103extern YYSTYPE yylval;
104
105#ifdef YYPARSE_PARAM
106#if defined __STDC__ || defined __cplusplus
107int yyparse (void *YYPARSE_PARAM);
108#else
109int yyparse ();
110#endif
111#else /* ! YYPARSE_PARAM */
112#if defined __STDC__ || defined __cplusplus
113int yyparse (void);
114#else
115int yyparse ();
116#endif
117#endif /* ! YYPARSE_PARAM */
118
119#endif /* !YY_YY_SCRIPTS_GENKSYMS_PARSE_TAB_H_SHIPPED_INCLUDED */