blob: 3e6079f36b9f918ffa91a7cf9b16d9ceb38c2cf3 [file] [log] [blame]
Sam Ravnborg70f75242007-09-01 10:26:32 +02001/* A Bison parser, made by GNU Bison 2.3. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
Sam Ravnborg70f75242007-09-01 10:26:32 +02003/* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Sam Ravnborgc40f5642005-12-26 22:53:25 +01008 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
Sam Ravnborgc40f5642005-12-26 22:53:25 +010013 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
Sam Ravnborgc40f5642005-12-26 22:53:25 +010018 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
Sam Ravnborg70f75242007-09-01 10:26:32 +020020 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +010022
Sam Ravnborg70f75242007-09-01 10:26:32 +020023/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
Sam Ravnborgc40f5642005-12-26 22:53:25 +010032
Sam Ravnborg70f75242007-09-01 10:26:32 +020033 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
35
36/* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +010038
39/* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
45
46/* Identify Bison output. */
47#define YYBISON 1
48
Sam Ravnborg70f75242007-09-01 10:26:32 +020049/* Bison version. */
50#define YYBISON_VERSION "2.3"
51
Sam Ravnborgc40f5642005-12-26 22:53:25 +010052/* Skeleton name. */
53#define YYSKELETON_NAME "yacc.c"
54
55/* Pure parsers. */
56#define YYPURE 0
57
58/* Using locations. */
59#define YYLSP_NEEDED 0
60
61
62
63/* Tokens. */
64#ifndef YYTOKENTYPE
65# define YYTOKENTYPE
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
67 know about them. */
68 enum yytokentype {
69 ASM_KEYW = 258,
70 ATTRIBUTE_KEYW = 259,
71 AUTO_KEYW = 260,
72 BOOL_KEYW = 261,
73 CHAR_KEYW = 262,
74 CONST_KEYW = 263,
75 DOUBLE_KEYW = 264,
76 ENUM_KEYW = 265,
77 EXTERN_KEYW = 266,
Sam Ravnborg70f75242007-09-01 10:26:32 +020078 EXTENSION_KEYW = 267,
79 FLOAT_KEYW = 268,
80 INLINE_KEYW = 269,
81 INT_KEYW = 270,
82 LONG_KEYW = 271,
83 REGISTER_KEYW = 272,
84 RESTRICT_KEYW = 273,
85 SHORT_KEYW = 274,
86 SIGNED_KEYW = 275,
87 STATIC_KEYW = 276,
88 STRUCT_KEYW = 277,
89 TYPEDEF_KEYW = 278,
90 UNION_KEYW = 279,
91 UNSIGNED_KEYW = 280,
92 VOID_KEYW = 281,
93 VOLATILE_KEYW = 282,
94 TYPEOF_KEYW = 283,
95 EXPORT_SYMBOL_KEYW = 284,
96 ASM_PHRASE = 285,
97 ATTRIBUTE_PHRASE = 286,
98 BRACE_PHRASE = 287,
99 BRACKET_PHRASE = 288,
100 EXPRESSION_PHRASE = 289,
101 CHAR = 290,
102 DOTS = 291,
103 IDENT = 292,
104 INT = 293,
105 REAL = 294,
106 STRING = 295,
107 TYPE = 296,
108 OTHER = 297,
109 FILENAME = 298
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100110 };
111#endif
Sam Ravnborg70f75242007-09-01 10:26:32 +0200112/* Tokens. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100113#define ASM_KEYW 258
114#define ATTRIBUTE_KEYW 259
115#define AUTO_KEYW 260
116#define BOOL_KEYW 261
117#define CHAR_KEYW 262
118#define CONST_KEYW 263
119#define DOUBLE_KEYW 264
120#define ENUM_KEYW 265
121#define EXTERN_KEYW 266
Sam Ravnborg70f75242007-09-01 10:26:32 +0200122#define EXTENSION_KEYW 267
123#define FLOAT_KEYW 268
124#define INLINE_KEYW 269
125#define INT_KEYW 270
126#define LONG_KEYW 271
127#define REGISTER_KEYW 272
128#define RESTRICT_KEYW 273
129#define SHORT_KEYW 274
130#define SIGNED_KEYW 275
131#define STATIC_KEYW 276
132#define STRUCT_KEYW 277
133#define TYPEDEF_KEYW 278
134#define UNION_KEYW 279
135#define UNSIGNED_KEYW 280
136#define VOID_KEYW 281
137#define VOLATILE_KEYW 282
138#define TYPEOF_KEYW 283
139#define EXPORT_SYMBOL_KEYW 284
140#define ASM_PHRASE 285
141#define ATTRIBUTE_PHRASE 286
142#define BRACE_PHRASE 287
143#define BRACKET_PHRASE 288
144#define EXPRESSION_PHRASE 289
145#define CHAR 290
146#define DOTS 291
147#define IDENT 292
148#define INT 293
149#define REAL 294
150#define STRING 295
151#define TYPE 296
152#define OTHER 297
153#define FILENAME 298
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100154
155
156
157
158/* Copy the first part of user declarations. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159#line 24 "scripts/genksyms/parse.y"
160
161
162#include <assert.h>
163#include <malloc.h>
164#include "genksyms.h"
165
166static int is_typedef;
167static int is_extern;
168static char *current_name;
169static struct string_list *decl_spec;
170
171static void yyerror(const char *);
172
173static inline void
174remove_node(struct string_list **p)
175{
176 struct string_list *node = *p;
177 *p = node->next;
178 free_node(node);
179}
180
181static inline void
182remove_list(struct string_list **pb, struct string_list **pe)
183{
184 struct string_list *b = *pb, *e = *pe;
185 *pb = e;
186 free_list(b, e);
187}
188
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100189
190
191/* Enabling traces. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192#ifndef YYDEBUG
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100193# define YYDEBUG 1
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194#endif
195
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100196/* Enabling verbose error messages. */
197#ifdef YYERROR_VERBOSE
198# undef YYERROR_VERBOSE
199# define YYERROR_VERBOSE 1
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200#else
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100201# define YYERROR_VERBOSE 0
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202#endif
203
Sam Ravnborg70f75242007-09-01 10:26:32 +0200204/* Enabling the token table. */
205#ifndef YYTOKEN_TABLE
206# define YYTOKEN_TABLE 0
207#endif
208
209#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100210typedef int YYSTYPE;
211# define yystype YYSTYPE /* obsolescent; will be withdrawn */
212# define YYSTYPE_IS_DECLARED 1
213# define YYSTYPE_IS_TRIVIAL 1
214#endif
215
216
217
218/* Copy the second part of user declarations. */
219
220
Sam Ravnborg70f75242007-09-01 10:26:32 +0200221/* Line 216 of yacc.c. */
222#line 223 "scripts/genksyms/parse.c"
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100223
Sam Ravnborg70f75242007-09-01 10:26:32 +0200224#ifdef short
225# undef short
226#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100227
Sam Ravnborg70f75242007-09-01 10:26:32 +0200228#ifdef YYTYPE_UINT8
229typedef YYTYPE_UINT8 yytype_uint8;
230#else
231typedef unsigned char yytype_uint8;
232#endif
233
234#ifdef YYTYPE_INT8
235typedef YYTYPE_INT8 yytype_int8;
236#elif (defined __STDC__ || defined __C99__FUNC__ \
237 || defined __cplusplus || defined _MSC_VER)
238typedef signed char yytype_int8;
239#else
240typedef short int yytype_int8;
241#endif
242
243#ifdef YYTYPE_UINT16
244typedef YYTYPE_UINT16 yytype_uint16;
245#else
246typedef unsigned short int yytype_uint16;
247#endif
248
249#ifdef YYTYPE_INT16
250typedef YYTYPE_INT16 yytype_int16;
251#else
252typedef short int yytype_int16;
253#endif
254
255#ifndef YYSIZE_T
256# ifdef __SIZE_TYPE__
257# define YYSIZE_T __SIZE_TYPE__
258# elif defined size_t
259# define YYSIZE_T size_t
260# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
261 || defined __cplusplus || defined _MSC_VER)
262# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
263# define YYSIZE_T size_t
264# else
265# define YYSIZE_T unsigned int
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100266# endif
Sam Ravnborg70f75242007-09-01 10:26:32 +0200267#endif
268
269#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
270
271#ifndef YY_
272# if YYENABLE_NLS
273# if ENABLE_NLS
274# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
275# define YY_(msgid) dgettext ("bison-runtime", msgid)
276# endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100277# endif
Sam Ravnborg70f75242007-09-01 10:26:32 +0200278# ifndef YY_
279# define YY_(msgid) msgid
280# endif
281#endif
282
283/* Suppress unused-variable warnings by "using" E. */
284#if ! defined lint || defined __GNUC__
285# define YYUSE(e) ((void) (e))
286#else
287# define YYUSE(e) /* empty */
288#endif
289
290/* Identity function, used to suppress warnings about constant conditions. */
291#ifndef lint
292# define YYID(n) (n)
293#else
294#if (defined __STDC__ || defined __C99__FUNC__ \
295 || defined __cplusplus || defined _MSC_VER)
296static int
297YYID (int i)
298#else
299static int
300YYID (i)
301 int i;
302#endif
303{
304 return i;
305}
306#endif
307
308#if ! defined yyoverflow || YYERROR_VERBOSE
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100309
310/* The parser invokes alloca or malloc; define the necessary symbols. */
311
312# ifdef YYSTACK_USE_ALLOCA
313# if YYSTACK_USE_ALLOCA
314# ifdef __GNUC__
315# define YYSTACK_ALLOC __builtin_alloca
Sam Ravnborg70f75242007-09-01 10:26:32 +0200316# elif defined __BUILTIN_VA_ARG_INCR
317# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
318# elif defined _AIX
319# define YYSTACK_ALLOC __alloca
320# elif defined _MSC_VER
321# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
322# define alloca _alloca
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100323# else
324# define YYSTACK_ALLOC alloca
Sam Ravnborg70f75242007-09-01 10:26:32 +0200325# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
326 || defined __cplusplus || defined _MSC_VER)
327# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
328# ifndef _STDLIB_H
329# define _STDLIB_H 1
330# endif
331# endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100332# endif
333# endif
334# endif
335
336# ifdef YYSTACK_ALLOC
Sam Ravnborg70f75242007-09-01 10:26:32 +0200337 /* Pacify GCC's `empty if-body' warning. */
338# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
339# ifndef YYSTACK_ALLOC_MAXIMUM
340 /* The OS might guarantee only one guard page at the bottom of the stack,
341 and a page size can be as small as 4096 bytes. So we cannot safely
342 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
343 to allow for a few compiler-allocated temporary stack slots. */
344# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100345# endif
Sam Ravnborg70f75242007-09-01 10:26:32 +0200346# else
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100347# define YYSTACK_ALLOC YYMALLOC
348# define YYSTACK_FREE YYFREE
Sam Ravnborg70f75242007-09-01 10:26:32 +0200349# ifndef YYSTACK_ALLOC_MAXIMUM
350# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
351# endif
352# if (defined __cplusplus && ! defined _STDLIB_H \
353 && ! ((defined YYMALLOC || defined malloc) \
354 && (defined YYFREE || defined free)))
355# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
356# ifndef _STDLIB_H
357# define _STDLIB_H 1
358# endif
359# endif
360# ifndef YYMALLOC
361# define YYMALLOC malloc
362# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
363 || defined __cplusplus || defined _MSC_VER)
364void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
365# endif
366# endif
367# ifndef YYFREE
368# define YYFREE free
369# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
370 || defined __cplusplus || defined _MSC_VER)
371void free (void *); /* INFRINGES ON USER NAME SPACE */
372# endif
373# endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100374# endif
Sam Ravnborg70f75242007-09-01 10:26:32 +0200375#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100376
377
Sam Ravnborg70f75242007-09-01 10:26:32 +0200378#if (! defined yyoverflow \
379 && (! defined __cplusplus \
380 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100381
382/* A type that is properly aligned for any stack member. */
383union yyalloc
384{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200385 yytype_int16 yyss;
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100386 YYSTYPE yyvs;
387 };
388
389/* The size of the maximum gap between one aligned stack and the next. */
390# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
391
392/* The size of an array large to enough to hold all stacks, each with
393 N elements. */
394# define YYSTACK_BYTES(N) \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200395 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100396 + YYSTACK_GAP_MAXIMUM)
397
398/* Copy COUNT objects from FROM to TO. The source and destination do
399 not overlap. */
400# ifndef YYCOPY
Sam Ravnborg70f75242007-09-01 10:26:32 +0200401# if defined __GNUC__ && 1 < __GNUC__
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100402# define YYCOPY(To, From, Count) \
403 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
404# else
405# define YYCOPY(To, From, Count) \
406 do \
407 { \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200408 YYSIZE_T yyi; \
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100409 for (yyi = 0; yyi < (Count); yyi++) \
410 (To)[yyi] = (From)[yyi]; \
411 } \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200412 while (YYID (0))
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100413# endif
414# endif
415
416/* Relocate STACK from its old location to the new one. The
417 local variables YYSIZE and YYSTACKSIZE give the old and new number of
418 elements in the stack, and YYPTR gives the new location of the
419 stack. Advance YYPTR to a properly aligned location for the next
420 stack. */
421# define YYSTACK_RELOCATE(Stack) \
422 do \
423 { \
424 YYSIZE_T yynewbytes; \
425 YYCOPY (&yyptr->Stack, Stack, yysize); \
426 Stack = &yyptr->Stack; \
427 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
428 yyptr += yynewbytes / sizeof (*yyptr); \
429 } \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200430 while (YYID (0))
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100431
432#endif
433
Sam Ravnborg70f75242007-09-01 10:26:32 +0200434/* YYFINAL -- State number of the termination state. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100435#define YYFINAL 4
436/* YYLAST -- Last index in YYTABLE. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200437#define YYLAST 523
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100438
Sam Ravnborg70f75242007-09-01 10:26:32 +0200439/* YYNTOKENS -- Number of terminals. */
440#define YYNTOKENS 53
441/* YYNNTS -- Number of nonterminals. */
442#define YYNNTS 46
443/* YYNRULES -- Number of rules. */
444#define YYNRULES 126
445/* YYNRULES -- Number of states. */
446#define YYNSTATES 178
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100447
448/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
449#define YYUNDEFTOK 2
Sam Ravnborg70f75242007-09-01 10:26:32 +0200450#define YYMAXUTOK 298
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100451
Sam Ravnborg70f75242007-09-01 10:26:32 +0200452#define YYTRANSLATE(YYX) \
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100453 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
454
455/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200456static const yytype_uint8 yytranslate[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100457{
458 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Sam Ravnborg70f75242007-09-01 10:26:32 +0200462 47, 49, 48, 2, 46, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 52, 44,
464 2, 50, 2, 2, 2, 2, 2, 2, 2, 2,
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100465 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Sam Ravnborg70f75242007-09-01 10:26:32 +0200470 2, 2, 2, 51, 2, 45, 2, 2, 2, 2,
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100471 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, 2, 2, 2, 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, 1, 2, 3, 4,
484 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
485 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
486 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Sam Ravnborg70f75242007-09-01 10:26:32 +0200487 35, 36, 37, 38, 39, 40, 41, 42, 43
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100488};
489
490#if YYDEBUG
491/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
492 YYRHS. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200493static const yytype_uint16 yyprhs[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100494{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200495 0, 0, 3, 5, 8, 9, 12, 13, 18, 19,
496 23, 25, 27, 29, 31, 34, 37, 41, 42, 44,
497 46, 50, 55, 56, 58, 60, 63, 65, 67, 69,
498 71, 73, 75, 77, 79, 81, 87, 92, 95, 98,
499 101, 105, 109, 113, 116, 119, 122, 124, 126, 128,
500 130, 132, 134, 136, 138, 140, 142, 144, 147, 148,
501 150, 152, 155, 157, 159, 161, 163, 166, 168, 170,
502 175, 180, 183, 187, 191, 194, 196, 198, 200, 205,
503 210, 213, 217, 221, 224, 226, 230, 231, 233, 235,
504 239, 242, 245, 247, 248, 250, 252, 257, 262, 265,
505 269, 273, 277, 278, 280, 283, 287, 291, 292, 294,
506 296, 299, 303, 306, 307, 309, 311, 315, 318, 321,
507 323, 326, 327, 329, 332, 333, 335
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100508};
509
Sam Ravnborg70f75242007-09-01 10:26:32 +0200510/* YYRHS -- A `-1'-separated list of the rules' RHS. */
511static const yytype_int8 yyrhs[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100512{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200513 54, 0, -1, 55, -1, 54, 55, -1, -1, 56,
514 57, -1, -1, 12, 23, 58, 60, -1, -1, 23,
515 59, 60, -1, 60, -1, 84, -1, 96, -1, 98,
516 -1, 1, 44, -1, 1, 45, -1, 64, 61, 44,
517 -1, -1, 62, -1, 63, -1, 62, 46, 63, -1,
518 74, 97, 95, 85, -1, -1, 65, -1, 66, -1,
519 65, 66, -1, 67, -1, 68, -1, 5, -1, 17,
520 -1, 21, -1, 11, -1, 14, -1, 69, -1, 73,
521 -1, 28, 47, 65, 48, 49, -1, 28, 47, 65,
522 49, -1, 22, 37, -1, 24, 37, -1, 10, 37,
523 -1, 22, 37, 87, -1, 24, 37, 87, -1, 10,
524 37, 32, -1, 10, 32, -1, 22, 87, -1, 24,
525 87, -1, 7, -1, 19, -1, 15, -1, 16, -1,
526 20, -1, 25, -1, 13, -1, 9, -1, 26, -1,
527 6, -1, 41, -1, 48, 71, -1, -1, 72, -1,
528 73, -1, 72, 73, -1, 8, -1, 27, -1, 31,
529 -1, 18, -1, 70, 74, -1, 75, -1, 37, -1,
530 75, 47, 78, 49, -1, 75, 47, 1, 49, -1,
531 75, 33, -1, 47, 74, 49, -1, 47, 1, 49,
532 -1, 70, 76, -1, 77, -1, 37, -1, 41, -1,
533 77, 47, 78, 49, -1, 77, 47, 1, 49, -1,
534 77, 33, -1, 47, 76, 49, -1, 47, 1, 49,
535 -1, 79, 36, -1, 79, -1, 80, 46, 36, -1,
536 -1, 80, -1, 81, -1, 80, 46, 81, -1, 65,
537 82, -1, 70, 82, -1, 83, -1, -1, 37, -1,
538 41, -1, 83, 47, 78, 49, -1, 83, 47, 1,
539 49, -1, 83, 33, -1, 47, 82, 49, -1, 47,
540 1, 49, -1, 64, 74, 32, -1, -1, 86, -1,
541 50, 34, -1, 51, 88, 45, -1, 51, 1, 45,
542 -1, -1, 89, -1, 90, -1, 89, 90, -1, 64,
543 91, 44, -1, 1, 44, -1, -1, 92, -1, 93,
544 -1, 92, 46, 93, -1, 76, 95, -1, 37, 94,
545 -1, 94, -1, 52, 34, -1, -1, 31, -1, 30,
546 44, -1, -1, 30, -1, 29, 47, 37, 49, 44,
547 -1
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100548};
549
550/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200551static const yytype_uint16 yyrline[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100552{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200553 0, 103, 103, 104, 108, 108, 114, 114, 116, 116,
554 118, 119, 120, 121, 122, 123, 127, 141, 142, 146,
555 154, 167, 173, 174, 178, 179, 183, 189, 193, 194,
556 195, 196, 197, 201, 202, 203, 204, 208, 210, 212,
557 216, 223, 230, 239, 240, 241, 245, 246, 247, 248,
558 249, 250, 251, 252, 253, 254, 255, 259, 264, 265,
559 269, 270, 274, 274, 274, 275, 283, 284, 288, 297,
560 299, 301, 303, 305, 312, 313, 317, 318, 319, 321,
561 323, 325, 327, 332, 333, 334, 338, 339, 343, 344,
562 349, 354, 356, 360, 361, 369, 373, 375, 377, 379,
563 381, 386, 395, 396, 401, 406, 407, 411, 412, 416,
564 417, 421, 423, 428, 429, 433, 434, 438, 439, 440,
565 444, 448, 449, 453, 457, 458, 462
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100566};
567#endif
568
Sam Ravnborg70f75242007-09-01 10:26:32 +0200569#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
570/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
571 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100572static const char *const yytname[] =
573{
574 "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
575 "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
Sam Ravnborg70f75242007-09-01 10:26:32 +0200576 "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW",
577 "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
578 "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
579 "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
580 "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE",
581 "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE",
582 "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING",
583 "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'",
584 "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "@1",
585 "declaration1", "@2", "@3", "simple_declaration",
586 "init_declarator_list_opt", "init_declarator_list", "init_declarator",
587 "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
588 "storage_class_specifier", "type_specifier", "simple_type_specifier",
589 "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq",
590 "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator",
591 "direct_nested_declarator", "parameter_declaration_clause",
592 "parameter_declaration_list_opt", "parameter_declaration_list",
593 "parameter_declaration", "m_abstract_declarator",
594 "direct_m_abstract_declarator", "function_definition", "initializer_opt",
595 "initializer", "class_body", "member_specification_opt",
596 "member_specification", "member_declaration",
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100597 "member_declarator_list_opt", "member_declarator_list",
598 "member_declarator", "member_bitfield_declarator", "attribute_opt",
599 "asm_definition", "asm_phrase_opt", "export_definition", 0
600};
601#endif
602
603# ifdef YYPRINT
604/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
605 token YYLEX-NUM. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200606static const yytype_uint16 yytoknum[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100607{
608 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
609 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
610 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
611 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
Sam Ravnborg70f75242007-09-01 10:26:32 +0200612 295, 296, 297, 298, 59, 125, 44, 40, 42, 41,
613 61, 123, 58
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100614};
615# endif
616
617/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200618static const yytype_uint8 yyr1[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100619{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200620 0, 53, 54, 54, 56, 55, 58, 57, 59, 57,
621 57, 57, 57, 57, 57, 57, 60, 61, 61, 62,
622 62, 63, 64, 64, 65, 65, 66, 66, 67, 67,
623 67, 67, 67, 68, 68, 68, 68, 68, 68, 68,
624 68, 68, 68, 68, 68, 68, 69, 69, 69, 69,
625 69, 69, 69, 69, 69, 69, 69, 70, 71, 71,
626 72, 72, 73, 73, 73, 73, 74, 74, 75, 75,
627 75, 75, 75, 75, 76, 76, 77, 77, 77, 77,
628 77, 77, 77, 78, 78, 78, 79, 79, 80, 80,
629 81, 82, 82, 83, 83, 83, 83, 83, 83, 83,
630 83, 84, 85, 85, 86, 87, 87, 88, 88, 89,
631 89, 90, 90, 91, 91, 92, 92, 93, 93, 93,
632 94, 95, 95, 96, 97, 97, 98
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100633};
634
635/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200636static const yytype_uint8 yyr2[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100637{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200638 0, 2, 1, 2, 0, 2, 0, 4, 0, 3,
639 1, 1, 1, 1, 2, 2, 3, 0, 1, 1,
640 3, 4, 0, 1, 1, 2, 1, 1, 1, 1,
641 1, 1, 1, 1, 1, 5, 4, 2, 2, 2,
642 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
643 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
644 1, 2, 1, 1, 1, 1, 2, 1, 1, 4,
645 4, 2, 3, 3, 2, 1, 1, 1, 4, 4,
646 2, 3, 3, 2, 1, 3, 0, 1, 1, 3,
647 2, 2, 1, 0, 1, 1, 4, 4, 2, 3,
648 3, 3, 0, 1, 2, 3, 3, 0, 1, 1,
649 2, 3, 2, 0, 1, 1, 3, 2, 2, 1,
650 2, 0, 1, 2, 0, 1, 5
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100651};
652
653/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
654 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
655 means the default is an error. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200656static const yytype_uint8 yydefact[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100657{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200658 4, 4, 2, 0, 1, 3, 0, 28, 55, 46,
659 62, 53, 0, 31, 0, 52, 32, 48, 49, 29,
660 65, 47, 50, 30, 0, 8, 0, 51, 54, 63,
661 0, 0, 0, 64, 56, 5, 10, 17, 23, 24,
662 26, 27, 33, 34, 11, 12, 13, 14, 15, 43,
663 39, 6, 37, 0, 44, 22, 38, 45, 0, 0,
664 123, 68, 0, 58, 0, 18, 19, 0, 124, 67,
665 25, 42, 22, 40, 0, 113, 0, 0, 109, 9,
666 17, 41, 0, 0, 0, 0, 57, 59, 60, 16,
667 0, 66, 125, 101, 121, 71, 0, 7, 112, 106,
668 76, 77, 0, 0, 0, 121, 75, 0, 114, 115,
669 119, 105, 0, 110, 124, 0, 36, 0, 73, 72,
670 61, 20, 122, 102, 0, 93, 0, 84, 87, 88,
671 118, 0, 76, 0, 120, 74, 117, 80, 0, 111,
672 0, 35, 126, 0, 21, 103, 70, 94, 56, 0,
673 93, 90, 92, 69, 83, 0, 82, 81, 0, 0,
674 116, 104, 0, 95, 0, 91, 98, 0, 85, 89,
675 79, 78, 100, 99, 0, 0, 97, 96
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100676};
677
Sam Ravnborg70f75242007-09-01 10:26:32 +0200678/* YYDEFGOTO[NTERM-NUM]. */
679static const yytype_int16 yydefgoto[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100680{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200681 -1, 1, 2, 3, 35, 72, 55, 36, 64, 65,
682 66, 75, 38, 39, 40, 41, 42, 67, 86, 87,
683 43, 114, 69, 105, 106, 126, 127, 128, 129, 151,
684 152, 44, 144, 145, 54, 76, 77, 78, 107, 108,
685 109, 110, 123, 45, 94, 46
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100686};
687
688/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
689 STATE-NUM. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200690#define YYPACT_NINF -135
691static const yytype_int16 yypact[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100692{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200693 -135, 11, -135, 312, -135, -135, 24, -135, -135, -135,
694 -135, -135, -23, -135, -2, -135, -135, -135, -135, -135,
695 -135, -135, -135, -135, -17, -135, -11, -135, -135, -135,
696 -3, 16, 26, -135, -135, -135, -135, 34, 482, -135,
697 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
698 -8, -135, 22, 97, -135, 482, 22, -135, 482, 56,
699 -135, -135, 12, 10, 50, 49, -135, 34, -13, 15,
700 -135, -135, 482, -135, 47, -25, 51, 145, -135, -135,
701 34, -135, 356, 52, 71, 77, -135, 10, -135, -135,
702 34, -135, -135, -135, 68, -135, 193, -135, -135, -135,
703 48, -135, 6, 93, 37, 68, 18, 85, 84, -135,
704 -135, -135, 87, -135, 102, 86, -135, 89, -135, -135,
705 -135, -135, -135, 90, 88, 401, 94, 100, 101, -135,
706 -135, 99, -135, 108, -135, -135, -135, -135, 230, -135,
707 -25, -135, -135, 105, -135, -135, -135, -135, -135, 9,
708 42, -135, 28, -135, -135, 445, -135, -135, 119, 125,
709 -135, -135, 126, -135, 128, -135, -135, 267, -135, -135,
710 -135, -135, -135, -135, 129, 130, -135, -135
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100711};
712
713/* YYPGOTO[NTERM-NUM]. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200714static const yytype_int16 yypgoto[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100715{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200716 -135, -135, 179, -135, -135, -135, -135, -47, -135, -135,
717 91, 0, -58, -37, -135, -135, -135, -73, -135, -135,
718 -48, -32, -135, -38, -135, -134, -135, -135, 29, -63,
719 -135, -135, -135, -135, -20, -135, -135, 106, -135, -135,
720 45, 95, 82, -135, -135, -135
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100721};
722
723/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
724 positive, shift that token. If negative, reduce the rule which
725 number is the opposite. If zero, do what YYDEFACT says.
726 If YYTABLE_NINF, syntax error. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200727#define YYTABLE_NINF -109
728static const yytype_int16 yytable[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100729{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200730 82, 70, 104, 37, 159, 68, 57, 131, 79, 49,
731 162, 4, 100, 84, 50, 88, 101, 92, 10, 93,
732 52, 51, 102, 63, 71, 97, 56, 103, 20, 104,
733 85, 104, 73, 175, 53, 91, 81, 29, 125, 120,
734 53, 33, -93, 132, 58, 70, 147, 101, 95, 61,
735 163, 137, 150, 102, 63, 80, 149, 63, -93, 62,
736 63, 166, 96, 59, 133, 138, 135, 104, 47, 48,
737 60, 61, 80, 53, 132, 167, 150, 150, 101, 147,
738 125, 62, 63, 163, 102, 63, 164, 165, 70, 149,
739 63, 98, 99, 83, 89, 90, 111, 125, 74, 122,
740 103, 117, 7, 8, 9, 10, 11, 12, 13, 125,
741 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
742 118, 26, 27, 28, 29, 30, 119, 134, 33, 139,
743 140, 98, 92, 142, -22, 141, 154, 146, 34, 161,
744 143, -22, -107, 153, -22, -22, 112, 155, 156, -22,
745 7, 8, 9, 10, 11, 12, 13, 157, 15, 16,
746 17, 18, 19, 20, 21, 22, 23, 24, 170, 26,
747 27, 28, 29, 30, 171, 172, 33, 173, 176, 177,
748 5, 121, -22, 113, 169, 160, 34, 136, 0, -22,
749 -108, 0, -22, -22, 124, 130, 0, -22, 7, 8,
750 9, 10, 11, 12, 13, 0, 15, 16, 17, 18,
751 19, 20, 21, 22, 23, 24, 0, 26, 27, 28,
752 29, 30, 0, 0, 33, 0, 0, 0, 0, -86,
753 0, 158, 0, 0, 34, 7, 8, 9, 10, 11,
754 12, 13, -86, 15, 16, 17, 18, 19, 20, 21,
755 22, 23, 24, 0, 26, 27, 28, 29, 30, 0,
756 0, 33, 0, 0, 0, 0, -86, 0, 174, 0,
757 0, 34, 7, 8, 9, 10, 11, 12, 13, -86,
758 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
759 0, 26, 27, 28, 29, 30, 0, 0, 33, 0,
760 0, 0, 0, -86, 0, 0, 0, 0, 34, 0,
761 0, 0, 0, 6, 0, 0, -86, 7, 8, 9,
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100762 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
Sam Ravnborg70f75242007-09-01 10:26:32 +0200763 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
764 30, 31, 32, 33, 0, 0, 0, 0, 0, -22,
765 0, 0, 0, 34, 0, 0, -22, 0, 0, -22,
766 -22, 7, 8, 9, 10, 11, 12, 13, 0, 15,
767 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
768 26, 27, 28, 29, 30, 0, 0, 33, 0, 0,
769 0, 0, 0, 0, 0, 0, 0, 34, 0, 0,
770 0, 0, 0, 0, 115, 116, 7, 8, 9, 10,
771 11, 12, 13, 0, 15, 16, 17, 18, 19, 20,
772 21, 22, 23, 24, 0, 26, 27, 28, 29, 30,
773 0, 0, 33, 0, 0, 0, 0, 0, 147, 0,
774 0, 0, 148, 0, 0, 0, 0, 0, 149, 63,
775 7, 8, 9, 10, 11, 12, 13, 0, 15, 16,
776 17, 18, 19, 20, 21, 22, 23, 24, 0, 26,
777 27, 28, 29, 30, 0, 0, 33, 0, 0, 0,
778 0, 168, 0, 0, 0, 0, 34, 7, 8, 9,
779 10, 11, 12, 13, 0, 15, 16, 17, 18, 19,
780 20, 21, 22, 23, 24, 0, 26, 27, 28, 29,
781 30, 0, 0, 33, 0, 0, 0, 0, 0, 0,
782 0, 0, 0, 34
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100783};
784
Sam Ravnborg70f75242007-09-01 10:26:32 +0200785static const yytype_int16 yycheck[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100786{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200787 58, 38, 75, 3, 138, 37, 26, 1, 55, 32,
788 1, 0, 37, 1, 37, 63, 41, 30, 8, 32,
789 37, 23, 47, 48, 32, 72, 37, 52, 18, 102,
790 62, 104, 52, 167, 51, 67, 56, 27, 96, 87,
791 51, 31, 33, 37, 47, 82, 37, 41, 33, 37,
792 41, 33, 125, 47, 48, 55, 47, 48, 49, 47,
793 48, 33, 47, 47, 102, 47, 104, 140, 44, 45,
794 44, 37, 72, 51, 37, 47, 149, 150, 41, 37,
795 138, 47, 48, 41, 47, 48, 149, 150, 125, 47,
796 48, 44, 45, 37, 44, 46, 45, 155, 1, 31,
797 52, 49, 5, 6, 7, 8, 9, 10, 11, 167,
798 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
799 49, 24, 25, 26, 27, 28, 49, 34, 31, 44,
800 46, 44, 30, 44, 37, 49, 36, 49, 41, 34,
801 50, 44, 45, 49, 47, 48, 1, 46, 49, 52,
802 5, 6, 7, 8, 9, 10, 11, 49, 13, 14,
803 15, 16, 17, 18, 19, 20, 21, 22, 49, 24,
804 25, 26, 27, 28, 49, 49, 31, 49, 49, 49,
805 1, 90, 37, 77, 155, 140, 41, 105, -1, 44,
806 45, -1, 47, 48, 1, 100, -1, 52, 5, 6,
807 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
808 17, 18, 19, 20, 21, 22, -1, 24, 25, 26,
809 27, 28, -1, -1, 31, -1, -1, -1, -1, 36,
810 -1, 1, -1, -1, 41, 5, 6, 7, 8, 9,
811 10, 11, 49, 13, 14, 15, 16, 17, 18, 19,
812 20, 21, 22, -1, 24, 25, 26, 27, 28, -1,
813 -1, 31, -1, -1, -1, -1, 36, -1, 1, -1,
814 -1, 41, 5, 6, 7, 8, 9, 10, 11, 49,
815 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
816 -1, 24, 25, 26, 27, 28, -1, -1, 31, -1,
817 -1, -1, -1, 36, -1, -1, -1, -1, 41, -1,
818 -1, -1, -1, 1, -1, -1, 49, 5, 6, 7,
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100819 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
Sam Ravnborg70f75242007-09-01 10:26:32 +0200820 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
821 28, 29, 30, 31, -1, -1, -1, -1, -1, 37,
822 -1, -1, -1, 41, -1, -1, 44, -1, -1, 47,
823 48, 5, 6, 7, 8, 9, 10, 11, -1, 13,
824 14, 15, 16, 17, 18, 19, 20, 21, 22, -1,
825 24, 25, 26, 27, 28, -1, -1, 31, -1, -1,
826 -1, -1, -1, -1, -1, -1, -1, 41, -1, -1,
827 -1, -1, -1, -1, 48, 49, 5, 6, 7, 8,
828 9, 10, 11, -1, 13, 14, 15, 16, 17, 18,
829 19, 20, 21, 22, -1, 24, 25, 26, 27, 28,
830 -1, -1, 31, -1, -1, -1, -1, -1, 37, -1,
831 -1, -1, 41, -1, -1, -1, -1, -1, 47, 48,
832 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
833 15, 16, 17, 18, 19, 20, 21, 22, -1, 24,
834 25, 26, 27, 28, -1, -1, 31, -1, -1, -1,
835 -1, 36, -1, -1, -1, -1, 41, 5, 6, 7,
836 8, 9, 10, 11, -1, 13, 14, 15, 16, 17,
837 18, 19, 20, 21, 22, -1, 24, 25, 26, 27,
838 28, -1, -1, 31, -1, -1, -1, -1, -1, -1,
839 -1, -1, -1, 41
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100840};
841
842/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
843 symbol of state STATE-NUM. */
Sam Ravnborg70f75242007-09-01 10:26:32 +0200844static const yytype_uint8 yystos[] =
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100845{
Sam Ravnborg70f75242007-09-01 10:26:32 +0200846 0, 54, 55, 56, 0, 55, 1, 5, 6, 7,
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100847 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
848 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Sam Ravnborg70f75242007-09-01 10:26:32 +0200849 28, 29, 30, 31, 41, 57, 60, 64, 65, 66,
850 67, 68, 69, 73, 84, 96, 98, 44, 45, 32,
851 37, 23, 37, 51, 87, 59, 37, 87, 47, 47,
852 44, 37, 47, 48, 61, 62, 63, 70, 74, 75,
853 66, 32, 58, 87, 1, 64, 88, 89, 90, 60,
854 64, 87, 65, 37, 1, 74, 71, 72, 73, 44,
855 46, 74, 30, 32, 97, 33, 47, 60, 44, 45,
856 37, 41, 47, 52, 70, 76, 77, 91, 92, 93,
857 94, 45, 1, 90, 74, 48, 49, 49, 49, 49,
858 73, 63, 31, 95, 1, 65, 78, 79, 80, 81,
859 94, 1, 37, 76, 34, 76, 95, 33, 47, 44,
860 46, 49, 44, 50, 85, 86, 49, 37, 41, 47,
861 70, 82, 83, 49, 36, 46, 49, 49, 1, 78,
862 93, 34, 1, 41, 82, 82, 33, 47, 36, 81,
863 49, 49, 49, 49, 1, 78, 49, 49
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100864};
865
Linus Torvalds1da177e2005-04-16 15:20:36 -0700866#define yyerrok (yyerrstatus = 0)
867#define yyclearin (yychar = YYEMPTY)
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100868#define YYEMPTY (-2)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869#define YYEOF 0
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100870
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871#define YYACCEPT goto yyacceptlab
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100872#define YYABORT goto yyabortlab
873#define YYERROR goto yyerrorlab
874
875
876/* Like YYERROR except do call yyerror. This remains here temporarily
877 to ease the transition to the new meaning of YYERROR, for GCC.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700878 Once GCC version 2 has supplanted version 1, this can go. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100879
Linus Torvalds1da177e2005-04-16 15:20:36 -0700880#define YYFAIL goto yyerrlab
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100881
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882#define YYRECOVERING() (!!yyerrstatus)
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100883
884#define YYBACKUP(Token, Value) \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700885do \
886 if (yychar == YYEMPTY && yylen == 1) \
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100887 { \
888 yychar = (Token); \
889 yylval = (Value); \
890 yytoken = YYTRANSLATE (yychar); \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200891 YYPOPSTACK (1); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 goto yybackup; \
893 } \
894 else \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200895 { \
896 yyerror (YY_("syntax error: cannot back up")); \
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100897 YYERROR; \
898 } \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200899while (YYID (0))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700900
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100901
Linus Torvalds1da177e2005-04-16 15:20:36 -0700902#define YYTERROR 1
903#define YYERRCODE 256
904
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100905
906/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
907 If N is 0, then set CURRENT to the empty location which ends
908 the previous symbol: RHS[0] (always defined). */
909
910#define YYRHSLOC(Rhs, K) ((Rhs)[K])
911#ifndef YYLLOC_DEFAULT
912# define YYLLOC_DEFAULT(Current, Rhs, N) \
913 do \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200914 if (YYID (N)) \
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100915 { \
916 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
917 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
918 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
919 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
920 } \
921 else \
922 { \
923 (Current).first_line = (Current).last_line = \
924 YYRHSLOC (Rhs, 0).last_line; \
925 (Current).first_column = (Current).last_column = \
926 YYRHSLOC (Rhs, 0).last_column; \
927 } \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200928 while (YYID (0))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700929#endif
930
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100931
932/* YY_LOCATION_PRINT -- Print the location on the stream.
933 This macro was not mandated originally: define only if we know
934 we won't break user code: when these are the locations we know. */
935
936#ifndef YY_LOCATION_PRINT
937# if YYLTYPE_IS_TRIVIAL
938# define YY_LOCATION_PRINT(File, Loc) \
939 fprintf (File, "%d.%d-%d.%d", \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200940 (Loc).first_line, (Loc).first_column, \
941 (Loc).last_line, (Loc).last_column)
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100942# else
943# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
944# endif
945#endif
946
947
948/* YYLEX -- calling `yylex' with the right arguments. */
949
Linus Torvalds1da177e2005-04-16 15:20:36 -0700950#ifdef YYLEX_PARAM
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100951# define YYLEX yylex (YYLEX_PARAM)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700952#else
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100953# define YYLEX yylex ()
Linus Torvalds1da177e2005-04-16 15:20:36 -0700954#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100955
956/* Enable debugging if requested. */
957#if YYDEBUG
958
959# ifndef YYFPRINTF
960# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
961# define YYFPRINTF fprintf
962# endif
963
964# define YYDPRINTF(Args) \
965do { \
966 if (yydebug) \
967 YYFPRINTF Args; \
Sam Ravnborg70f75242007-09-01 10:26:32 +0200968} while (YYID (0))
Sam Ravnborgc40f5642005-12-26 22:53:25 +0100969
Sam Ravnborg70f75242007-09-01 10:26:32 +0200970# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
971do { \
972 if (yydebug) \
973 { \
974 YYFPRINTF (stderr, "%s ", Title); \
975 yy_symbol_print (stderr, \
976 Type, Value); \
977 YYFPRINTF (stderr, "\n"); \
978 } \
979} while (YYID (0))
980
981
982/*--------------------------------.
983| Print this symbol on YYOUTPUT. |
984`--------------------------------*/
985
986/*ARGSUSED*/
987#if (defined __STDC__ || defined __C99__FUNC__ \
988 || defined __cplusplus || defined _MSC_VER)
989static void
990yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
991#else
992static void
993yy_symbol_value_print (yyoutput, yytype, yyvaluep)
994 FILE *yyoutput;
995 int yytype;
996 YYSTYPE const * const yyvaluep;
997#endif
998{
999 if (!yyvaluep)
1000 return;
1001# ifdef YYPRINT
1002 if (yytype < YYNTOKENS)
1003 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1004# else
1005 YYUSE (yyoutput);
1006# endif
1007 switch (yytype)
1008 {
1009 default:
1010 break;
1011 }
1012}
1013
1014
1015/*--------------------------------.
1016| Print this symbol on YYOUTPUT. |
1017`--------------------------------*/
1018
1019#if (defined __STDC__ || defined __C99__FUNC__ \
1020 || defined __cplusplus || defined _MSC_VER)
1021static void
1022yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1023#else
1024static void
1025yy_symbol_print (yyoutput, yytype, yyvaluep)
1026 FILE *yyoutput;
1027 int yytype;
1028 YYSTYPE const * const yyvaluep;
1029#endif
1030{
1031 if (yytype < YYNTOKENS)
1032 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1033 else
1034 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1035
1036 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1037 YYFPRINTF (yyoutput, ")");
1038}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001039
1040/*------------------------------------------------------------------.
1041| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1042| TOP (included). |
1043`------------------------------------------------------------------*/
1044
Sam Ravnborg70f75242007-09-01 10:26:32 +02001045#if (defined __STDC__ || defined __C99__FUNC__ \
1046 || defined __cplusplus || defined _MSC_VER)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001047static void
Sam Ravnborg70f75242007-09-01 10:26:32 +02001048yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001049#else
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001050static void
1051yy_stack_print (bottom, top)
Sam Ravnborg70f75242007-09-01 10:26:32 +02001052 yytype_int16 *bottom;
1053 yytype_int16 *top;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001054#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001055{
1056 YYFPRINTF (stderr, "Stack now");
Sam Ravnborg70f75242007-09-01 10:26:32 +02001057 for (; bottom <= top; ++bottom)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001058 YYFPRINTF (stderr, " %d", *bottom);
1059 YYFPRINTF (stderr, "\n");
1060}
1061
1062# define YY_STACK_PRINT(Bottom, Top) \
1063do { \
1064 if (yydebug) \
1065 yy_stack_print ((Bottom), (Top)); \
Sam Ravnborg70f75242007-09-01 10:26:32 +02001066} while (YYID (0))
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001067
1068
1069/*------------------------------------------------.
1070| Report that the YYRULE is going to be reduced. |
1071`------------------------------------------------*/
1072
Sam Ravnborg70f75242007-09-01 10:26:32 +02001073#if (defined __STDC__ || defined __C99__FUNC__ \
1074 || defined __cplusplus || defined _MSC_VER)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001075static void
Sam Ravnborg70f75242007-09-01 10:26:32 +02001076yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001077#else
1078static void
Sam Ravnborg70f75242007-09-01 10:26:32 +02001079yy_reduce_print (yyvsp, yyrule)
1080 YYSTYPE *yyvsp;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001081 int yyrule;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001082#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001083{
Sam Ravnborg70f75242007-09-01 10:26:32 +02001084 int yynrhs = yyr2[yyrule];
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001085 int yyi;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001086 unsigned long int yylno = yyrline[yyrule];
1087 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1088 yyrule - 1, yylno);
1089 /* The symbols being reduced. */
1090 for (yyi = 0; yyi < yynrhs; yyi++)
1091 {
1092 fprintf (stderr, " $%d = ", yyi + 1);
1093 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1094 &(yyvsp[(yyi + 1) - (yynrhs)])
1095 );
1096 fprintf (stderr, "\n");
1097 }
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001098}
Linus Torvalds1da177e2005-04-16 15:20:36 -07001099
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001100# define YY_REDUCE_PRINT(Rule) \
1101do { \
1102 if (yydebug) \
Sam Ravnborg70f75242007-09-01 10:26:32 +02001103 yy_reduce_print (yyvsp, Rule); \
1104} while (YYID (0))
Linus Torvalds1da177e2005-04-16 15:20:36 -07001105
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001106/* Nonzero means print parse trace. It is left uninitialized so that
1107 multiple parsers can coexist. */
1108int yydebug;
1109#else /* !YYDEBUG */
1110# define YYDPRINTF(Args)
1111# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1112# define YY_STACK_PRINT(Bottom, Top)
1113# define YY_REDUCE_PRINT(Rule)
1114#endif /* !YYDEBUG */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001115
Linus Torvalds1da177e2005-04-16 15:20:36 -07001116
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001117/* YYINITDEPTH -- initial size of the parser's stacks. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001118#ifndef YYINITDEPTH
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001119# define YYINITDEPTH 200
Linus Torvalds1da177e2005-04-16 15:20:36 -07001120#endif
1121
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001122/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1123 if the built-in stack extension method is used).
Linus Torvalds1da177e2005-04-16 15:20:36 -07001124
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001125 Do not make this value too large; the results are undefined if
Sam Ravnborg70f75242007-09-01 10:26:32 +02001126 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001127 evaluated with infinite-precision integer arithmetic. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001128
1129#ifndef YYMAXDEPTH
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001130# define YYMAXDEPTH 10000
Linus Torvalds1da177e2005-04-16 15:20:36 -07001131#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001132
Linus Torvalds1da177e2005-04-16 15:20:36 -07001133
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001135#if YYERROR_VERBOSE
Linus Torvalds1da177e2005-04-16 15:20:36 -07001136
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001137# ifndef yystrlen
Sam Ravnborg70f75242007-09-01 10:26:32 +02001138# if defined __GLIBC__ && defined _STRING_H
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001139# define yystrlen strlen
1140# else
1141/* Return the length of YYSTR. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001142#if (defined __STDC__ || defined __C99__FUNC__ \
1143 || defined __cplusplus || defined _MSC_VER)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001144static YYSIZE_T
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001145yystrlen (const char *yystr)
Sam Ravnborg70f75242007-09-01 10:26:32 +02001146#else
1147static YYSIZE_T
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001148yystrlen (yystr)
Sam Ravnborg70f75242007-09-01 10:26:32 +02001149 const char *yystr;
1150#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151{
Sam Ravnborg70f75242007-09-01 10:26:32 +02001152 YYSIZE_T yylen;
1153 for (yylen = 0; yystr[yylen]; yylen++)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001154 continue;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001155 return yylen;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001156}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001157# endif
1158# endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001160# ifndef yystpcpy
Sam Ravnborg70f75242007-09-01 10:26:32 +02001161# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001162# define yystpcpy stpcpy
1163# else
1164/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1165 YYDEST. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001166#if (defined __STDC__ || defined __C99__FUNC__ \
1167 || defined __cplusplus || defined _MSC_VER)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001168static char *
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001169yystpcpy (char *yydest, const char *yysrc)
Sam Ravnborg70f75242007-09-01 10:26:32 +02001170#else
1171static char *
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001172yystpcpy (yydest, yysrc)
Sam Ravnborg70f75242007-09-01 10:26:32 +02001173 char *yydest;
1174 const char *yysrc;
1175#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001176{
Sam Ravnborg70f75242007-09-01 10:26:32 +02001177 char *yyd = yydest;
1178 const char *yys = yysrc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001180 while ((*yyd++ = *yys++) != '\0')
1181 continue;
1182
1183 return yyd - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001184}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001185# endif
1186# endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001187
Sam Ravnborg70f75242007-09-01 10:26:32 +02001188# ifndef yytnamerr
1189/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1190 quotes and backslashes, so that it's suitable for yyerror. The
1191 heuristic is that double-quoting is unnecessary unless the string
1192 contains an apostrophe, a comma, or backslash (other than
1193 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1194 null, do not copy; instead, return the length of what the result
1195 would have been. */
1196static YYSIZE_T
1197yytnamerr (char *yyres, const char *yystr)
1198{
1199 if (*yystr == '"')
1200 {
1201 YYSIZE_T yyn = 0;
1202 char const *yyp = yystr;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001203
Sam Ravnborg70f75242007-09-01 10:26:32 +02001204 for (;;)
1205 switch (*++yyp)
1206 {
1207 case '\'':
1208 case ',':
1209 goto do_not_strip_quotes;
1210
1211 case '\\':
1212 if (*++yyp != '\\')
1213 goto do_not_strip_quotes;
1214 /* Fall through. */
1215 default:
1216 if (yyres)
1217 yyres[yyn] = *yyp;
1218 yyn++;
1219 break;
1220
1221 case '"':
1222 if (yyres)
1223 yyres[yyn] = '\0';
1224 return yyn;
1225 }
1226 do_not_strip_quotes: ;
1227 }
1228
1229 if (! yyres)
1230 return yystrlen (yystr);
1231
1232 return yystpcpy (yyres, yystr) - yyres;
1233}
1234# endif
1235
1236/* Copy into YYRESULT an error message about the unexpected token
1237 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1238 including the terminating null byte. If YYRESULT is null, do not
1239 copy anything; just return the number of bytes that would be
1240 copied. As a special case, return 0 if an ordinary "syntax error"
1241 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1242 size calculation. */
1243static YYSIZE_T
1244yysyntax_error (char *yyresult, int yystate, int yychar)
1245{
1246 int yyn = yypact[yystate];
1247
1248 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1249 return 0;
1250 else
1251 {
1252 int yytype = YYTRANSLATE (yychar);
1253 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1254 YYSIZE_T yysize = yysize0;
1255 YYSIZE_T yysize1;
1256 int yysize_overflow = 0;
1257 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1258 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1259 int yyx;
1260
1261# if 0
1262 /* This is so xgettext sees the translatable formats that are
1263 constructed on the fly. */
1264 YY_("syntax error, unexpected %s");
1265 YY_("syntax error, unexpected %s, expecting %s");
1266 YY_("syntax error, unexpected %s, expecting %s or %s");
1267 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1268 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1269# endif
1270 char *yyfmt;
1271 char const *yyf;
1272 static char const yyunexpected[] = "syntax error, unexpected %s";
1273 static char const yyexpecting[] = ", expecting %s";
1274 static char const yyor[] = " or %s";
1275 char yyformat[sizeof yyunexpected
1276 + sizeof yyexpecting - 1
1277 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1278 * (sizeof yyor - 1))];
1279 char const *yyprefix = yyexpecting;
1280
1281 /* Start YYX at -YYN if negative to avoid negative indexes in
1282 YYCHECK. */
1283 int yyxbegin = yyn < 0 ? -yyn : 0;
1284
1285 /* Stay within bounds of both yycheck and yytname. */
1286 int yychecklim = YYLAST - yyn + 1;
1287 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1288 int yycount = 1;
1289
1290 yyarg[0] = yytname[yytype];
1291 yyfmt = yystpcpy (yyformat, yyunexpected);
1292
1293 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1294 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1295 {
1296 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1297 {
1298 yycount = 1;
1299 yysize = yysize0;
1300 yyformat[sizeof yyunexpected - 1] = '\0';
1301 break;
1302 }
1303 yyarg[yycount++] = yytname[yyx];
1304 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1305 yysize_overflow |= (yysize1 < yysize);
1306 yysize = yysize1;
1307 yyfmt = yystpcpy (yyfmt, yyprefix);
1308 yyprefix = yyor;
1309 }
1310
1311 yyf = YY_(yyformat);
1312 yysize1 = yysize + yystrlen (yyf);
1313 yysize_overflow |= (yysize1 < yysize);
1314 yysize = yysize1;
1315
1316 if (yysize_overflow)
1317 return YYSIZE_MAXIMUM;
1318
1319 if (yyresult)
1320 {
1321 /* Avoid sprintf, as that infringes on the user's name space.
1322 Don't have undefined behavior even if the translation
1323 produced a string with the wrong number of "%s"s. */
1324 char *yyp = yyresult;
1325 int yyi = 0;
1326 while ((*yyp = *yyf) != '\0')
1327 {
1328 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1329 {
1330 yyp += yytnamerr (yyp, yyarg[yyi++]);
1331 yyf += 2;
1332 }
1333 else
1334 {
1335 yyp++;
1336 yyf++;
1337 }
1338 }
1339 }
1340 return yysize;
1341 }
1342}
1343#endif /* YYERROR_VERBOSE */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001344
Linus Torvalds1da177e2005-04-16 15:20:36 -07001345
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001346/*-----------------------------------------------.
1347| Release the memory associated to this symbol. |
1348`-----------------------------------------------*/
1349
Sam Ravnborg70f75242007-09-01 10:26:32 +02001350/*ARGSUSED*/
1351#if (defined __STDC__ || defined __C99__FUNC__ \
1352 || defined __cplusplus || defined _MSC_VER)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001353static void
1354yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1355#else
1356static void
1357yydestruct (yymsg, yytype, yyvaluep)
1358 const char *yymsg;
1359 int yytype;
1360 YYSTYPE *yyvaluep;
1361#endif
1362{
Sam Ravnborg70f75242007-09-01 10:26:32 +02001363 YYUSE (yyvaluep);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001364
1365 if (!yymsg)
1366 yymsg = "Deleting";
1367 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1368
1369 switch (yytype)
1370 {
1371
1372 default:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001373 break;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001374 }
1375}
1376
1377
1378/* Prevent warnings from -Wmissing-prototypes. */
1379
1380#ifdef YYPARSE_PARAM
Sam Ravnborg70f75242007-09-01 10:26:32 +02001381#if defined __STDC__ || defined __cplusplus
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001382int yyparse (void *YYPARSE_PARAM);
Sam Ravnborg70f75242007-09-01 10:26:32 +02001383#else
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001384int yyparse ();
Sam Ravnborg70f75242007-09-01 10:26:32 +02001385#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001386#else /* ! YYPARSE_PARAM */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001387#if defined __STDC__ || defined __cplusplus
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001388int yyparse (void);
1389#else
1390int yyparse ();
1391#endif
1392#endif /* ! YYPARSE_PARAM */
1393
1394
1395
1396/* The look-ahead symbol. */
1397int yychar;
1398
1399/* The semantic value of the look-ahead symbol. */
1400YYSTYPE yylval;
1401
1402/* Number of syntax errors so far. */
1403int yynerrs;
1404
1405
1406
1407/*----------.
1408| yyparse. |
1409`----------*/
1410
1411#ifdef YYPARSE_PARAM
Sam Ravnborg70f75242007-09-01 10:26:32 +02001412#if (defined __STDC__ || defined __C99__FUNC__ \
1413 || defined __cplusplus || defined _MSC_VER)
1414int
1415yyparse (void *YYPARSE_PARAM)
1416#else
1417int
1418yyparse (YYPARSE_PARAM)
1419 void *YYPARSE_PARAM;
1420#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001421#else /* ! YYPARSE_PARAM */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001422#if (defined __STDC__ || defined __C99__FUNC__ \
1423 || defined __cplusplus || defined _MSC_VER)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001424int
1425yyparse (void)
1426#else
1427int
1428yyparse ()
1429
1430#endif
1431#endif
1432{
1433
Sam Ravnborg70f75242007-09-01 10:26:32 +02001434 int yystate;
1435 int yyn;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001436 int yyresult;
1437 /* Number of tokens to shift before error messages enabled. */
1438 int yyerrstatus;
1439 /* Look-ahead token as an internal (translated) token number. */
1440 int yytoken = 0;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001441#if YYERROR_VERBOSE
1442 /* Buffer for error messages, and its allocated size. */
1443 char yymsgbuf[128];
1444 char *yymsg = yymsgbuf;
1445 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1446#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001447
1448 /* Three stacks and their tools:
1449 `yyss': related to states,
1450 `yyvs': related to semantic values,
1451 `yyls': related to locations.
1452
1453 Refer to the stacks thru separate pointers, to allow yyoverflow
1454 to reallocate them elsewhere. */
1455
1456 /* The state stack. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001457 yytype_int16 yyssa[YYINITDEPTH];
1458 yytype_int16 *yyss = yyssa;
1459 yytype_int16 *yyssp;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001460
1461 /* The semantic value stack. */
1462 YYSTYPE yyvsa[YYINITDEPTH];
1463 YYSTYPE *yyvs = yyvsa;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001464 YYSTYPE *yyvsp;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001465
Linus Torvalds1da177e2005-04-16 15:20:36 -07001466
Linus Torvalds1da177e2005-04-16 15:20:36 -07001467
Sam Ravnborg70f75242007-09-01 10:26:32 +02001468#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
Linus Torvalds1da177e2005-04-16 15:20:36 -07001469
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001470 YYSIZE_T yystacksize = YYINITDEPTH;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001471
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001472 /* The variables used to return semantic value and location from the
1473 action routines. */
1474 YYSTYPE yyval;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001475
Linus Torvalds1da177e2005-04-16 15:20:36 -07001476
Sam Ravnborg70f75242007-09-01 10:26:32 +02001477 /* The number of symbols on the RHS of the reduced rule.
1478 Keep to zero when no symbol should be popped. */
1479 int yylen = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001480
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001481 YYDPRINTF ((stderr, "Starting parse\n"));
Linus Torvalds1da177e2005-04-16 15:20:36 -07001482
1483 yystate = 0;
1484 yyerrstatus = 0;
1485 yynerrs = 0;
1486 yychar = YYEMPTY; /* Cause a token to be read. */
1487
1488 /* Initialize stack pointers.
1489 Waste one element of value and location stack
1490 so that they stay on the same level as the state stack.
1491 The wasted elements are never initialized. */
1492
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001493 yyssp = yyss;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001494 yyvsp = yyvs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001495
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001496 goto yysetstate;
1497
1498/*------------------------------------------------------------.
1499| yynewstate -- Push a new state, which is found in yystate. |
1500`------------------------------------------------------------*/
1501 yynewstate:
1502 /* In all cases, when you get here, the value and location stacks
Sam Ravnborg70f75242007-09-01 10:26:32 +02001503 have just been pushed. So pushing a state here evens the stacks. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001504 yyssp++;
1505
1506 yysetstate:
1507 *yyssp = yystate;
1508
1509 if (yyss + yystacksize - 1 <= yyssp)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001510 {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001511 /* Get the current used size of the three stacks, in elements. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001512 YYSIZE_T yysize = yyssp - yyss + 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001513
1514#ifdef yyoverflow
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001515 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001516 /* Give user a chance to reallocate the stack. Use copies of
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001517 these so that the &'s don't force the real ones into
1518 memory. */
1519 YYSTYPE *yyvs1 = yyvs;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001520 yytype_int16 *yyss1 = yyss;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001521
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001522
1523 /* Each stack pointer address is followed by the size of the
1524 data in use in that stack, in bytes. This used to be a
1525 conditional around just the two extra args, but that might
1526 be undefined if yyoverflow is a macro. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001527 yyoverflow (YY_("memory exhausted"),
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001528 &yyss1, yysize * sizeof (*yyssp),
1529 &yyvs1, yysize * sizeof (*yyvsp),
1530
1531 &yystacksize);
1532
1533 yyss = yyss1;
1534 yyvs = yyvs1;
1535 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001536#else /* no yyoverflow */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001537# ifndef YYSTACK_RELOCATE
Sam Ravnborg70f75242007-09-01 10:26:32 +02001538 goto yyexhaustedlab;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001539# else
Linus Torvalds1da177e2005-04-16 15:20:36 -07001540 /* Extend the stack our own way. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001541 if (YYMAXDEPTH <= yystacksize)
Sam Ravnborg70f75242007-09-01 10:26:32 +02001542 goto yyexhaustedlab;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001543 yystacksize *= 2;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001544 if (YYMAXDEPTH < yystacksize)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001545 yystacksize = YYMAXDEPTH;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001546
1547 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001548 yytype_int16 *yyss1 = yyss;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001549 union yyalloc *yyptr =
1550 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1551 if (! yyptr)
Sam Ravnborg70f75242007-09-01 10:26:32 +02001552 goto yyexhaustedlab;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001553 YYSTACK_RELOCATE (yyss);
1554 YYSTACK_RELOCATE (yyvs);
1555
1556# undef YYSTACK_RELOCATE
1557 if (yyss1 != yyssa)
1558 YYSTACK_FREE (yyss1);
1559 }
1560# endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001561#endif /* no yyoverflow */
1562
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001563 yyssp = yyss + yysize - 1;
1564 yyvsp = yyvs + yysize - 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001565
Linus Torvalds1da177e2005-04-16 15:20:36 -07001566
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001567 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1568 (unsigned long int) yystacksize));
1569
1570 if (yyss + yystacksize - 1 <= yyssp)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001571 YYABORT;
1572 }
1573
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001574 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Linus Torvalds1da177e2005-04-16 15:20:36 -07001575
1576 goto yybackup;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001577
1578/*-----------.
1579| yybackup. |
1580`-----------*/
1581yybackup:
Linus Torvalds1da177e2005-04-16 15:20:36 -07001582
Sam Ravnborg70f75242007-09-01 10:26:32 +02001583 /* Do appropriate processing given the current state. Read a
1584 look-ahead token if we need one and don't already have one. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001585
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001586 /* First try to decide what to do without reference to look-ahead token. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001587 yyn = yypact[yystate];
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001588 if (yyn == YYPACT_NINF)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001589 goto yydefault;
1590
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001591 /* Not known => get a look-ahead token if don't already have one. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001592
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001593 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001594 if (yychar == YYEMPTY)
1595 {
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001596 YYDPRINTF ((stderr, "Reading a token: "));
Linus Torvalds1da177e2005-04-16 15:20:36 -07001597 yychar = YYLEX;
1598 }
1599
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001600 if (yychar <= YYEOF)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001601 {
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001602 yychar = yytoken = YYEOF;
1603 YYDPRINTF ((stderr, "Now at end of input.\n"));
Linus Torvalds1da177e2005-04-16 15:20:36 -07001604 }
1605 else
1606 {
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001607 yytoken = YYTRANSLATE (yychar);
1608 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001609 }
1610
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001611 /* If the proper action on seeing token YYTOKEN is to reduce or to
1612 detect an error, take that action. */
1613 yyn += yytoken;
1614 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001615 goto yydefault;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001616 yyn = yytable[yyn];
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001617 if (yyn <= 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001618 {
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001619 if (yyn == 0 || yyn == YYTABLE_NINF)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001620 goto yyerrlab;
1621 yyn = -yyn;
1622 goto yyreduce;
1623 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001624
1625 if (yyn == YYFINAL)
1626 YYACCEPT;
1627
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001628 /* Count tokens shifted since error; after three, turn off error
1629 status. */
1630 if (yyerrstatus)
1631 yyerrstatus--;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001632
Sam Ravnborg70f75242007-09-01 10:26:32 +02001633 /* Shift the look-ahead token. */
1634 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1635
1636 /* Discard the shifted token unless it is eof. */
1637 if (yychar != YYEOF)
1638 yychar = YYEMPTY;
1639
Linus Torvalds1da177e2005-04-16 15:20:36 -07001640 yystate = yyn;
Sam Ravnborg70f75242007-09-01 10:26:32 +02001641 *++yyvsp = yylval;
1642
Linus Torvalds1da177e2005-04-16 15:20:36 -07001643 goto yynewstate;
1644
Linus Torvalds1da177e2005-04-16 15:20:36 -07001645
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001646/*-----------------------------------------------------------.
1647| yydefault -- do the default action for the current state. |
1648`-----------------------------------------------------------*/
1649yydefault:
Linus Torvalds1da177e2005-04-16 15:20:36 -07001650 yyn = yydefact[yystate];
1651 if (yyn == 0)
1652 goto yyerrlab;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001653 goto yyreduce;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001654
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001655
1656/*-----------------------------.
1657| yyreduce -- Do a reduction. |
1658`-----------------------------*/
Linus Torvalds1da177e2005-04-16 15:20:36 -07001659yyreduce:
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001660 /* yyn is the number of a rule to reduce with. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001661 yylen = yyr2[yyn];
Linus Torvalds1da177e2005-04-16 15:20:36 -07001662
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001663 /* If YYLEN is nonzero, implement the default value of the action:
1664 `$$ = $1'.
1665
1666 Otherwise, the following line sets YYVAL to garbage.
1667 This behavior is undocumented and Bison
1668 users should not rely upon it. Assigning to YYVAL
1669 unconditionally makes the parser a bit smaller, and it avoids a
1670 GCC warning that YYVAL may be used uninitialized. */
1671 yyval = yyvsp[1-yylen];
1672
1673
1674 YY_REDUCE_PRINT (yyn);
1675 switch (yyn)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001676 {
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001677 case 4:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001678#line 108 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001679 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
1680 break;
1681
1682 case 5:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001683#line 110 "scripts/genksyms/parse.y"
1684 { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001685 break;
1686
1687 case 6:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001688#line 114 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001689 { is_typedef = 1; ;}
1690 break;
1691
1692 case 7:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001693#line 115 "scripts/genksyms/parse.y"
1694 { (yyval) = (yyvsp[(4) - (4)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001695 break;
1696
Sam Ravnborg70f75242007-09-01 10:26:32 +02001697 case 8:
1698#line 116 "scripts/genksyms/parse.y"
1699 { is_typedef = 1; ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001700 break;
1701
Sam Ravnborg70f75242007-09-01 10:26:32 +02001702 case 9:
1703#line 117 "scripts/genksyms/parse.y"
1704 { (yyval) = (yyvsp[(3) - (3)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001705 break;
1706
1707 case 14:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001708#line 122 "scripts/genksyms/parse.y"
1709 { (yyval) = (yyvsp[(2) - (2)]); ;}
1710 break;
1711
1712 case 15:
1713#line 123 "scripts/genksyms/parse.y"
1714 { (yyval) = (yyvsp[(2) - (2)]); ;}
1715 break;
1716
1717 case 16:
1718#line 128 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001719 { if (current_name) {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001720 struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
1721 (*(yyvsp[(3) - (3)]))->next = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001722 add_symbol(current_name,
1723 is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
1724 decl, is_extern);
1725 current_name = NULL;
1726 }
Sam Ravnborg70f75242007-09-01 10:26:32 +02001727 (yyval) = (yyvsp[(3) - (3)]);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001728 ;}
1729 break;
1730
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001731 case 17:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001732#line 141 "scripts/genksyms/parse.y"
1733 { (yyval) = NULL; ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001734 break;
1735
1736 case 19:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001737#line 147 "scripts/genksyms/parse.y"
1738 { struct string_list *decl = *(yyvsp[(1) - (1)]);
1739 *(yyvsp[(1) - (1)]) = NULL;
1740 add_symbol(current_name,
1741 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1742 current_name = NULL;
1743 (yyval) = (yyvsp[(1) - (1)]);
1744 ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001745 break;
1746
1747 case 20:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001748#line 155 "scripts/genksyms/parse.y"
1749 { struct string_list *decl = *(yyvsp[(3) - (3)]);
1750 *(yyvsp[(3) - (3)]) = NULL;
1751 free_list(*(yyvsp[(2) - (3)]), NULL);
1752 *(yyvsp[(2) - (3)]) = decl_spec;
1753 add_symbol(current_name,
1754 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1755 current_name = NULL;
1756 (yyval) = (yyvsp[(3) - (3)]);
1757 ;}
1758 break;
1759
1760 case 21:
1761#line 168 "scripts/genksyms/parse.y"
1762 { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001763 break;
1764
1765 case 22:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001766#line 173 "scripts/genksyms/parse.y"
1767 { decl_spec = NULL; ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001768 break;
1769
1770 case 24:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001771#line 178 "scripts/genksyms/parse.y"
1772 { decl_spec = *(yyvsp[(1) - (1)]); ;}
1773 break;
1774
1775 case 25:
1776#line 179 "scripts/genksyms/parse.y"
1777 { decl_spec = *(yyvsp[(2) - (2)]); ;}
1778 break;
1779
1780 case 26:
1781#line 184 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001782 { /* Version 2 checksumming ignores storage class, as that
Linus Torvalds1da177e2005-04-16 15:20:36 -07001783 is really irrelevant to the linkage. */
Sam Ravnborg70f75242007-09-01 10:26:32 +02001784 remove_node((yyvsp[(1) - (1)]));
1785 (yyval) = (yyvsp[(1) - (1)]);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001786 ;}
1787 break;
1788
Sam Ravnborg70f75242007-09-01 10:26:32 +02001789 case 31:
1790#line 196 "scripts/genksyms/parse.y"
1791 { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001792 break;
1793
Sam Ravnborg70f75242007-09-01 10:26:32 +02001794 case 32:
1795#line 197 "scripts/genksyms/parse.y"
1796 { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001797 break;
1798
1799 case 37:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001800#line 209 "scripts/genksyms/parse.y"
1801 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001802 break;
1803
1804 case 38:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001805#line 211 "scripts/genksyms/parse.y"
1806 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001807 break;
1808
1809 case 39:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001810#line 213 "scripts/genksyms/parse.y"
1811 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001812 break;
1813
1814 case 40:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001815#line 217 "scripts/genksyms/parse.y"
1816 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1817 r = copy_node(i); r->tag = SYM_STRUCT;
1818 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1819 add_symbol(i->string, SYM_STRUCT, s, is_extern);
1820 (yyval) = (yyvsp[(3) - (3)]);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001821 ;}
1822 break;
1823
1824 case 41:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001825#line 224 "scripts/genksyms/parse.y"
1826 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1827 r = copy_node(i); r->tag = SYM_UNION;
1828 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1829 add_symbol(i->string, SYM_UNION, s, is_extern);
1830 (yyval) = (yyvsp[(3) - (3)]);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001831 ;}
1832 break;
1833
Sam Ravnborg70f75242007-09-01 10:26:32 +02001834 case 42:
1835#line 231 "scripts/genksyms/parse.y"
1836 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1837 r = copy_node(i); r->tag = SYM_ENUM;
1838 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1839 add_symbol(i->string, SYM_ENUM, s, is_extern);
1840 (yyval) = (yyvsp[(3) - (3)]);
1841 ;}
1842 break;
1843
1844 case 43:
1845#line 239 "scripts/genksyms/parse.y"
1846 { (yyval) = (yyvsp[(2) - (2)]); ;}
1847 break;
1848
1849 case 44:
1850#line 240 "scripts/genksyms/parse.y"
1851 { (yyval) = (yyvsp[(2) - (2)]); ;}
1852 break;
1853
1854 case 45:
1855#line 241 "scripts/genksyms/parse.y"
1856 { (yyval) = (yyvsp[(2) - (2)]); ;}
1857 break;
1858
1859 case 56:
1860#line 255 "scripts/genksyms/parse.y"
1861 { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
1862 break;
1863
1864 case 57:
1865#line 260 "scripts/genksyms/parse.y"
1866 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1867 break;
1868
1869 case 58:
1870#line 264 "scripts/genksyms/parse.y"
1871 { (yyval) = NULL; ;}
1872 break;
1873
1874 case 61:
1875#line 270 "scripts/genksyms/parse.y"
1876 { (yyval) = (yyvsp[(2) - (2)]); ;}
1877 break;
1878
1879 case 65:
1880#line 276 "scripts/genksyms/parse.y"
1881 { /* restrict has no effect in prototypes so ignore it */
1882 remove_node((yyvsp[(1) - (1)]));
1883 (yyval) = (yyvsp[(1) - (1)]);
1884 ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001885 break;
1886
1887 case 66:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001888#line 283 "scripts/genksyms/parse.y"
1889 { (yyval) = (yyvsp[(2) - (2)]); ;}
1890 break;
1891
1892 case 68:
1893#line 289 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001894 { if (current_name != NULL) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001895 error_with_pos("unexpected second declaration name");
1896 YYERROR;
1897 } else {
Sam Ravnborg70f75242007-09-01 10:26:32 +02001898 current_name = (*(yyvsp[(1) - (1)]))->string;
1899 (yyval) = (yyvsp[(1) - (1)]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001900 }
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001901 ;}
1902 break;
1903
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001904 case 69:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001905#line 298 "scripts/genksyms/parse.y"
1906 { (yyval) = (yyvsp[(4) - (4)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001907 break;
1908
1909 case 70:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001910#line 300 "scripts/genksyms/parse.y"
1911 { (yyval) = (yyvsp[(4) - (4)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001912 break;
1913
1914 case 71:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001915#line 302 "scripts/genksyms/parse.y"
1916 { (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001917 break;
1918
1919 case 72:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001920#line 304 "scripts/genksyms/parse.y"
1921 { (yyval) = (yyvsp[(3) - (3)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001922 break;
1923
Sam Ravnborg70f75242007-09-01 10:26:32 +02001924 case 73:
1925#line 306 "scripts/genksyms/parse.y"
1926 { (yyval) = (yyvsp[(3) - (3)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001927 break;
1928
Sam Ravnborg70f75242007-09-01 10:26:32 +02001929 case 74:
1930#line 312 "scripts/genksyms/parse.y"
1931 { (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001932 break;
1933
1934 case 78:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001935#line 320 "scripts/genksyms/parse.y"
1936 { (yyval) = (yyvsp[(4) - (4)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001937 break;
1938
1939 case 79:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001940#line 322 "scripts/genksyms/parse.y"
1941 { (yyval) = (yyvsp[(4) - (4)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001942 break;
1943
1944 case 80:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001945#line 324 "scripts/genksyms/parse.y"
1946 { (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001947 break;
1948
1949 case 81:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001950#line 326 "scripts/genksyms/parse.y"
1951 { (yyval) = (yyvsp[(3) - (3)]); ;}
1952 break;
1953
1954 case 82:
1955#line 328 "scripts/genksyms/parse.y"
1956 { (yyval) = (yyvsp[(3) - (3)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001957 break;
1958
1959 case 83:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001960#line 332 "scripts/genksyms/parse.y"
1961 { (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001962 break;
1963
Sam Ravnborg70f75242007-09-01 10:26:32 +02001964 case 85:
1965#line 334 "scripts/genksyms/parse.y"
1966 { (yyval) = (yyvsp[(3) - (3)]); ;}
1967 break;
1968
1969 case 86:
1970#line 338 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001971 { (yyval) = NULL; ;}
1972 break;
1973
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001974 case 89:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001975#line 345 "scripts/genksyms/parse.y"
1976 { (yyval) = (yyvsp[(3) - (3)]); ;}
1977 break;
1978
1979 case 90:
1980#line 350 "scripts/genksyms/parse.y"
1981 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001982 break;
1983
1984 case 91:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001985#line 355 "scripts/genksyms/parse.y"
1986 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001987 break;
1988
1989 case 93:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001990#line 360 "scripts/genksyms/parse.y"
1991 { (yyval) = NULL; ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01001992 break;
1993
1994 case 94:
Sam Ravnborg70f75242007-09-01 10:26:32 +02001995#line 362 "scripts/genksyms/parse.y"
1996 { /* For version 2 checksums, we don't want to remember
1997 private parameter names. */
1998 remove_node((yyvsp[(1) - (1)]));
1999 (yyval) = (yyvsp[(1) - (1)]);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002000 ;}
2001 break;
2002
Sam Ravnborg70f75242007-09-01 10:26:32 +02002003 case 95:
2004#line 370 "scripts/genksyms/parse.y"
2005 { remove_node((yyvsp[(1) - (1)]));
2006 (yyval) = (yyvsp[(1) - (1)]);
2007 ;}
2008 break;
2009
2010 case 96:
2011#line 374 "scripts/genksyms/parse.y"
2012 { (yyval) = (yyvsp[(4) - (4)]); ;}
2013 break;
2014
2015 case 97:
2016#line 376 "scripts/genksyms/parse.y"
2017 { (yyval) = (yyvsp[(4) - (4)]); ;}
2018 break;
2019
2020 case 98:
2021#line 378 "scripts/genksyms/parse.y"
2022 { (yyval) = (yyvsp[(2) - (2)]); ;}
2023 break;
2024
2025 case 99:
2026#line 380 "scripts/genksyms/parse.y"
2027 { (yyval) = (yyvsp[(3) - (3)]); ;}
2028 break;
2029
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002030 case 100:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002031#line 382 "scripts/genksyms/parse.y"
2032 { (yyval) = (yyvsp[(3) - (3)]); ;}
2033 break;
2034
2035 case 101:
2036#line 387 "scripts/genksyms/parse.y"
2037 { struct string_list *decl = *(yyvsp[(2) - (3)]);
2038 *(yyvsp[(2) - (3)]) = NULL;
2039 add_symbol(current_name, SYM_NORMAL, decl, is_extern);
2040 (yyval) = (yyvsp[(3) - (3)]);
2041 ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002042 break;
2043
2044 case 102:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002045#line 395 "scripts/genksyms/parse.y"
2046 { (yyval) = NULL; ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002047 break;
2048
2049 case 104:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002050#line 402 "scripts/genksyms/parse.y"
2051 { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002052 break;
2053
2054 case 105:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002055#line 406 "scripts/genksyms/parse.y"
2056 { (yyval) = (yyvsp[(3) - (3)]); ;}
2057 break;
2058
2059 case 106:
2060#line 407 "scripts/genksyms/parse.y"
2061 { (yyval) = (yyvsp[(3) - (3)]); ;}
2062 break;
2063
2064 case 107:
2065#line 411 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002066 { (yyval) = NULL; ;}
2067 break;
2068
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002069 case 110:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002070#line 417 "scripts/genksyms/parse.y"
2071 { (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002072 break;
2073
2074 case 111:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002075#line 422 "scripts/genksyms/parse.y"
2076 { (yyval) = (yyvsp[(3) - (3)]); ;}
2077 break;
2078
2079 case 112:
2080#line 424 "scripts/genksyms/parse.y"
2081 { (yyval) = (yyvsp[(2) - (2)]); ;}
2082 break;
2083
2084 case 113:
2085#line 428 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002086 { (yyval) = NULL; ;}
2087 break;
2088
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002089 case 116:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002090#line 434 "scripts/genksyms/parse.y"
2091 { (yyval) = (yyvsp[(3) - (3)]); ;}
2092 break;
2093
2094 case 117:
2095#line 438 "scripts/genksyms/parse.y"
2096 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002097 break;
2098
2099 case 118:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002100#line 439 "scripts/genksyms/parse.y"
2101 { (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002102 break;
2103
Sam Ravnborg70f75242007-09-01 10:26:32 +02002104 case 120:
2105#line 444 "scripts/genksyms/parse.y"
2106 { (yyval) = (yyvsp[(2) - (2)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002107 break;
2108
2109 case 121:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002110#line 448 "scripts/genksyms/parse.y"
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002111 { (yyval) = NULL; ;}
2112 break;
2113
Sam Ravnborg70f75242007-09-01 10:26:32 +02002114 case 123:
2115#line 453 "scripts/genksyms/parse.y"
2116 { (yyval) = (yyvsp[(2) - (2)]); ;}
2117 break;
2118
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002119 case 124:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002120#line 457 "scripts/genksyms/parse.y"
2121 { (yyval) = NULL; ;}
2122 break;
2123
2124 case 126:
2125#line 463 "scripts/genksyms/parse.y"
2126 { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002127 break;
2128
2129
Sam Ravnborg70f75242007-09-01 10:26:32 +02002130/* Line 1267 of yacc.c. */
2131#line 2132 "scripts/genksyms/parse.c"
2132 default: break;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002133 }
Sam Ravnborg70f75242007-09-01 10:26:32 +02002134 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002135
Sam Ravnborg70f75242007-09-01 10:26:32 +02002136 YYPOPSTACK (yylen);
2137 yylen = 0;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002138 YY_STACK_PRINT (yyss, yyssp);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002139
2140 *++yyvsp = yyval;
2141
Linus Torvalds1da177e2005-04-16 15:20:36 -07002142
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002143 /* Now `shift' the result of the reduction. Determine what state
2144 that goes to, based on the state we popped back to and the rule
2145 number reduced by. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002146
2147 yyn = yyr1[yyn];
2148
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002149 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2150 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002151 yystate = yytable[yystate];
2152 else
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002153 yystate = yydefgoto[yyn - YYNTOKENS];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002154
2155 goto yynewstate;
2156
Linus Torvalds1da177e2005-04-16 15:20:36 -07002157
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002158/*------------------------------------.
2159| yyerrlab -- here on detecting error |
2160`------------------------------------*/
2161yyerrlab:
2162 /* If not already recovering from an error, report this error. */
2163 if (!yyerrstatus)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002164 {
2165 ++yynerrs;
Sam Ravnborg70f75242007-09-01 10:26:32 +02002166#if ! YYERROR_VERBOSE
2167 yyerror (YY_("syntax error"));
2168#else
2169 {
2170 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2171 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2172 {
2173 YYSIZE_T yyalloc = 2 * yysize;
2174 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2175 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2176 if (yymsg != yymsgbuf)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002177 YYSTACK_FREE (yymsg);
Sam Ravnborg70f75242007-09-01 10:26:32 +02002178 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2179 if (yymsg)
2180 yymsg_alloc = yyalloc;
2181 else
2182 {
2183 yymsg = yymsgbuf;
2184 yymsg_alloc = sizeof yymsgbuf;
2185 }
2186 }
2187
2188 if (0 < yysize && yysize <= yymsg_alloc)
2189 {
2190 (void) yysyntax_error (yymsg, yystate, yychar);
2191 yyerror (yymsg);
2192 }
2193 else
2194 {
2195 yyerror (YY_("syntax error"));
2196 if (yysize != 0)
2197 goto yyexhaustedlab;
2198 }
2199 }
2200#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07002201 }
2202
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002203
Linus Torvalds1da177e2005-04-16 15:20:36 -07002204
2205 if (yyerrstatus == 3)
2206 {
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002207 /* If just tried and failed to reuse look-ahead token after an
2208 error, discard it. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002209
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002210 if (yychar <= YYEOF)
Sam Ravnborg70f75242007-09-01 10:26:32 +02002211 {
2212 /* Return failure if at end of input. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002213 if (yychar == YYEOF)
Sam Ravnborg70f75242007-09-01 10:26:32 +02002214 YYABORT;
2215 }
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002216 else
2217 {
Sam Ravnborg70f75242007-09-01 10:26:32 +02002218 yydestruct ("Error: discarding",
2219 yytoken, &yylval);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002220 yychar = YYEMPTY;
2221 }
2222 }
2223
2224 /* Else will try to reuse look-ahead token after shifting the error
2225 token. */
2226 goto yyerrlab1;
2227
2228
2229/*---------------------------------------------------.
2230| yyerrorlab -- error raised explicitly by YYERROR. |
2231`---------------------------------------------------*/
2232yyerrorlab:
2233
Sam Ravnborg70f75242007-09-01 10:26:32 +02002234 /* Pacify compilers like GCC when the user code never invokes
2235 YYERROR and the label yyerrorlab therefore never appears in user
2236 code. */
2237 if (/*CONSTCOND*/ 0)
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002238 goto yyerrorlab;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002239
Sam Ravnborg70f75242007-09-01 10:26:32 +02002240 /* Do not reclaim the symbols of the rule which action triggered
2241 this YYERROR. */
2242 YYPOPSTACK (yylen);
2243 yylen = 0;
2244 YY_STACK_PRINT (yyss, yyssp);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002245 yystate = *yyssp;
2246 goto yyerrlab1;
2247
2248
2249/*-------------------------------------------------------------.
2250| yyerrlab1 -- common code for both syntax error and YYERROR. |
2251`-------------------------------------------------------------*/
2252yyerrlab1:
2253 yyerrstatus = 3; /* Each real token shifted decrements this. */
2254
2255 for (;;)
2256 {
2257 yyn = yypact[yystate];
2258 if (yyn != YYPACT_NINF)
2259 {
2260 yyn += YYTERROR;
2261 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2262 {
2263 yyn = yytable[yyn];
2264 if (0 < yyn)
2265 break;
2266 }
2267 }
2268
2269 /* Pop the current state because it cannot handle the error token. */
2270 if (yyssp == yyss)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002271 YYABORT;
2272
Linus Torvalds1da177e2005-04-16 15:20:36 -07002273
Sam Ravnborg70f75242007-09-01 10:26:32 +02002274 yydestruct ("Error: popping",
2275 yystos[yystate], yyvsp);
2276 YYPOPSTACK (1);
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002277 yystate = *yyssp;
2278 YY_STACK_PRINT (yyss, yyssp);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002279 }
2280
Linus Torvalds1da177e2005-04-16 15:20:36 -07002281 if (yyn == YYFINAL)
2282 YYACCEPT;
2283
Linus Torvalds1da177e2005-04-16 15:20:36 -07002284 *++yyvsp = yylval;
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002285
2286
Sam Ravnborg70f75242007-09-01 10:26:32 +02002287 /* Shift the error token. */
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002288 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002289
2290 yystate = yyn;
2291 goto yynewstate;
2292
Linus Torvalds1da177e2005-04-16 15:20:36 -07002293
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002294/*-------------------------------------.
2295| yyacceptlab -- YYACCEPT comes here. |
2296`-------------------------------------*/
2297yyacceptlab:
2298 yyresult = 0;
2299 goto yyreturn;
2300
2301/*-----------------------------------.
2302| yyabortlab -- YYABORT comes here. |
2303`-----------------------------------*/
2304yyabortlab:
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002305 yyresult = 1;
2306 goto yyreturn;
2307
2308#ifndef yyoverflow
Sam Ravnborg70f75242007-09-01 10:26:32 +02002309/*-------------------------------------------------.
2310| yyexhaustedlab -- memory exhaustion comes here. |
2311`-------------------------------------------------*/
2312yyexhaustedlab:
2313 yyerror (YY_("memory exhausted"));
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002314 yyresult = 2;
2315 /* Fall through. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002316#endif
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002317
2318yyreturn:
Sam Ravnborg70f75242007-09-01 10:26:32 +02002319 if (yychar != YYEOF && yychar != YYEMPTY)
2320 yydestruct ("Cleanup: discarding lookahead",
2321 yytoken, &yylval);
2322 /* Do not reclaim the symbols of the rule which action triggered
2323 this YYABORT or YYACCEPT. */
2324 YYPOPSTACK (yylen);
2325 YY_STACK_PRINT (yyss, yyssp);
2326 while (yyssp != yyss)
2327 {
2328 yydestruct ("Cleanup: popping",
2329 yystos[*yyssp], yyvsp);
2330 YYPOPSTACK (1);
2331 }
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002332#ifndef yyoverflow
2333 if (yyss != yyssa)
2334 YYSTACK_FREE (yyss);
2335#endif
Sam Ravnborg70f75242007-09-01 10:26:32 +02002336#if YYERROR_VERBOSE
2337 if (yymsg != yymsgbuf)
2338 YYSTACK_FREE (yymsg);
2339#endif
2340 /* Make sure YYID is used. */
2341 return YYID (yyresult);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002342}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002343
2344
Sam Ravnborg70f75242007-09-01 10:26:32 +02002345#line 467 "scripts/genksyms/parse.y"
Linus Torvalds1da177e2005-04-16 15:20:36 -07002346
2347
2348static void
2349yyerror(const char *e)
2350{
2351 error_with_pos("%s", e);
2352}
Sam Ravnborgc40f5642005-12-26 22:53:25 +01002353