parse.c_shipped 74.3 KB
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1

2
/* A Bison parser, made by GNU Bison 2.4.1.  */
3

4 5 6
/* Skeleton implementation for Bison's Yacc-like parsers in C
   
      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7
   Free Software Foundation, Inc.
8 9
   
   This program is free software: you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
11 12 13
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
   
14 15 16 17
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
18
   
19
   You should have received a copy of the GNU General Public License
20
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21 22 23 24 25 26 27 28 29 30

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.
31
   
32 33
   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */
34

35 36
/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */
37 38 39 40 41 42 43 44 45 46 47

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

48
/* Bison version.  */
49
#define YYBISON_VERSION "2.4.1"
50

51 52 53 54 55 56
/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

57 58 59 60 61 62
/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1

63 64 65 66 67
/* Using locations.  */
#define YYLSP_NEEDED 0



68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
/* Copy the first part of user declarations.  */

/* Line 189 of yacc.c  */
#line 24 "scripts/genksyms/parse.y"


#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "genksyms.h"

static int is_typedef;
static int is_extern;
static char *current_name;
static struct string_list *decl_spec;

static void yyerror(const char *);

static inline void
remove_node(struct string_list **p)
{
  struct string_list *node = *p;
  *p = node->next;
  free_node(node);
}

static inline void
remove_list(struct string_list **pb, struct string_list **pe)
{
  struct string_list *b = *pb, *e = *pe;
  *pb = e;
  free_list(b, e);
}



/* Line 189 of yacc.c  */
#line 106 "scripts/genksyms/parse.c"

/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

/* Enabling the token table.  */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif


126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     ASM_KEYW = 258,
     ATTRIBUTE_KEYW = 259,
     AUTO_KEYW = 260,
     BOOL_KEYW = 261,
     CHAR_KEYW = 262,
     CONST_KEYW = 263,
     DOUBLE_KEYW = 264,
     ENUM_KEYW = 265,
     EXTERN_KEYW = 266,
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
     EXTENSION_KEYW = 267,
     FLOAT_KEYW = 268,
     INLINE_KEYW = 269,
     INT_KEYW = 270,
     LONG_KEYW = 271,
     REGISTER_KEYW = 272,
     RESTRICT_KEYW = 273,
     SHORT_KEYW = 274,
     SIGNED_KEYW = 275,
     STATIC_KEYW = 276,
     STRUCT_KEYW = 277,
     TYPEDEF_KEYW = 278,
     UNION_KEYW = 279,
     UNSIGNED_KEYW = 280,
     VOID_KEYW = 281,
     VOLATILE_KEYW = 282,
     TYPEOF_KEYW = 283,
     EXPORT_SYMBOL_KEYW = 284,
     ASM_PHRASE = 285,
     ATTRIBUTE_PHRASE = 286,
     BRACE_PHRASE = 287,
     BRACKET_PHRASE = 288,
     EXPRESSION_PHRASE = 289,
     CHAR = 290,
     DOTS = 291,
     IDENT = 292,
     INT = 293,
     REAL = 294,
     STRING = 295,
     TYPE = 296,
     OTHER = 297,
     FILENAME = 298
173 174
   };
#endif
Linus Torvalds's avatar
Linus Torvalds committed
175

176

177 178

#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
179
typedef int YYSTYPE;
180
# define YYSTYPE_IS_TRIVIAL 1
181 182
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
Linus Torvalds's avatar
Linus Torvalds committed
183 184 185
#endif


186
/* Copy the second part of user declarations.  */
Linus Torvalds's avatar
Linus Torvalds committed
187 188


189 190
/* Line 264 of yacc.c  */
#line 191 "scripts/genksyms/parse.c"
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235

#ifdef short
# undef short
#endif

#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif

#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif

#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif

#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif
Linus Torvalds's avatar
Linus Torvalds committed
236

237
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
Linus Torvalds's avatar
Linus Torvalds committed
238

239 240 241 242 243 244
#ifndef YY_
# if YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
#  endif
245
# endif
246 247
# ifndef YY_
#  define YY_(msgid) msgid
248
# endif
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
#else
# define YYUSE(e) /* empty */
#endif

/* Identity function, used to suppress warnings about constant conditions.  */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static int
265
YYID (int yyi)
266 267
#else
static int
268 269
YYID (yyi)
    int yyi;
270 271
#endif
{
272
  return yyi;
273 274 275 276
}
#endif

#if ! defined yyoverflow || YYERROR_VERBOSE
Linus Torvalds's avatar
Linus Torvalds committed
277

278 279 280 281 282 283
/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
284 285 286 287 288 289 290
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
291 292
#   else
#    define YYSTACK_ALLOC alloca
293 294 295 296 297 298 299
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#     ifndef _STDLIB_H
#      define _STDLIB_H 1
#     endif
#    endif
300 301 302 303 304
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
305 306 307 308 309 310 311 312
   /* Pacify GCC's `empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
313
#  endif
314
# else
315 316
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined _STDLIB_H \
       && ! ((defined YYMALLOC || defined malloc) \
	     && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef _STDLIB_H
#    define _STDLIB_H 1
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
342
# endif
343
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
344 345


346 347 348
#if (! defined yyoverflow \
     && (! defined __cplusplus \
	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
349 350 351 352

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
353 354 355
  yytype_int16 yyss_alloc;
  YYSTYPE yyvs_alloc;
};
356 357 358 359 360 361 362

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
363
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
364 365 366 367 368
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
369
#  if defined __GNUC__ && 1 < __GNUC__
370 371 372 373 374 375
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
376
	  YYSIZE_T yyi;				\
377 378 379
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
380
      while (YYID (0))
381 382 383 384 385 386 387 388
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
389
# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
390 391 392
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
393 394
	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
	Stack = &yyptr->Stack_alloc;					\
395 396 397
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
398
    while (YYID (0))
Linus Torvalds's avatar
Linus Torvalds committed
399 400 401

#endif

402
/* YYFINAL -- State number of the termination state.  */
403 404
#define YYFINAL  4
/* YYLAST -- Last index in YYTABLE.  */
405
#define YYLAST   532
406

407 408 409
/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  53
/* YYNNTS -- Number of nonterminals.  */
410
#define YYNNTS  49
411
/* YYNRULES -- Number of rules.  */
412
#define YYNRULES  132
413
/* YYNRULES -- Number of states.  */
414
#define YYNSTATES  188
415 416 417

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
418
#define YYMAXUTOK   298
419

420
#define YYTRANSLATE(YYX)						\
421 422 423
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
424
static const yytype_uint8 yytranslate[] =
425 426 427 428 429
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
430 431 432
      47,    49,    48,     2,    46,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,    52,    44,
       2,    50,     2,     2,     2,     2,     2,     2,     2,     2,
433 434 435 436 437
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
438
       2,     2,     2,    51,     2,    45,     2,     2,     2,     2,
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
455
      35,    36,    37,    38,    39,    40,    41,    42,    43
Linus Torvalds's avatar
Linus Torvalds committed
456 457
};

458 459 460
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
461
static const yytype_uint16 yyprhs[] =
462
{
463 464 465 466 467 468 469 470 471 472 473 474
       0,     0,     3,     5,     8,     9,    12,    13,    18,    19,
      23,    25,    27,    29,    31,    34,    37,    41,    42,    44,
      46,    50,    55,    56,    58,    60,    63,    65,    67,    69,
      71,    73,    75,    77,    79,    81,    87,    92,    95,    98,
     101,   105,   109,   113,   116,   119,   122,   124,   126,   128,
     130,   132,   134,   136,   138,   140,   142,   144,   147,   148,
     150,   152,   155,   157,   159,   161,   163,   166,   168,   170,
     175,   180,   183,   187,   191,   194,   196,   198,   200,   205,
     210,   213,   217,   221,   224,   226,   230,   231,   233,   235,
     239,   242,   245,   247,   248,   250,   252,   257,   262,   265,
     269,   273,   277,   278,   280,   283,   287,   291,   292,   294,
     296,   299,   303,   306,   307,   309,   311,   315,   318,   321,
475 476
     323,   326,   327,   330,   334,   339,   341,   345,   347,   351,
     354,   355,   357
Linus Torvalds's avatar
Linus Torvalds committed
477 478
};

479 480
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
static const yytype_int8 yyrhs[] =
481
{
482 483
      54,     0,    -1,    55,    -1,    54,    55,    -1,    -1,    56,
      57,    -1,    -1,    12,    23,    58,    60,    -1,    -1,    23,
484
      59,    60,    -1,    60,    -1,    84,    -1,    99,    -1,   101,
485 486
      -1,     1,    44,    -1,     1,    45,    -1,    64,    61,    44,
      -1,    -1,    62,    -1,    63,    -1,    62,    46,    63,    -1,
487
      74,   100,    95,    85,    -1,    -1,    65,    -1,    66,    -1,
488 489 490 491 492
      65,    66,    -1,    67,    -1,    68,    -1,     5,    -1,    17,
      -1,    21,    -1,    11,    -1,    14,    -1,    69,    -1,    73,
      -1,    28,    47,    65,    48,    49,    -1,    28,    47,    65,
      49,    -1,    22,    37,    -1,    24,    37,    -1,    10,    37,
      -1,    22,    37,    87,    -1,    24,    37,    87,    -1,    10,
493
      37,    96,    -1,    10,    96,    -1,    22,    87,    -1,    24,
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
      87,    -1,     7,    -1,    19,    -1,    15,    -1,    16,    -1,
      20,    -1,    25,    -1,    13,    -1,     9,    -1,    26,    -1,
       6,    -1,    41,    -1,    48,    71,    -1,    -1,    72,    -1,
      73,    -1,    72,    73,    -1,     8,    -1,    27,    -1,    31,
      -1,    18,    -1,    70,    74,    -1,    75,    -1,    37,    -1,
      75,    47,    78,    49,    -1,    75,    47,     1,    49,    -1,
      75,    33,    -1,    47,    74,    49,    -1,    47,     1,    49,
      -1,    70,    76,    -1,    77,    -1,    37,    -1,    41,    -1,
      77,    47,    78,    49,    -1,    77,    47,     1,    49,    -1,
      77,    33,    -1,    47,    76,    49,    -1,    47,     1,    49,
      -1,    79,    36,    -1,    79,    -1,    80,    46,    36,    -1,
      -1,    80,    -1,    81,    -1,    80,    46,    81,    -1,    65,
      82,    -1,    70,    82,    -1,    83,    -1,    -1,    37,    -1,
      41,    -1,    83,    47,    78,    49,    -1,    83,    47,     1,
      49,    -1,    83,    33,    -1,    47,    82,    49,    -1,    47,
       1,    49,    -1,    64,    74,    32,    -1,    -1,    86,    -1,
      50,    34,    -1,    51,    88,    45,    -1,    51,     1,    45,
      -1,    -1,    89,    -1,    90,    -1,    89,    90,    -1,    64,
      91,    44,    -1,     1,    44,    -1,    -1,    92,    -1,    93,
      -1,    92,    46,    93,    -1,    76,    95,    -1,    37,    94,
514
      -1,    94,    -1,    52,    34,    -1,    -1,    95,    31,    -1,
515 516 517 518
      51,    97,    45,    -1,    51,    97,    46,    45,    -1,    98,
      -1,    97,    46,    98,    -1,    37,    -1,    37,    50,    34,
      -1,    30,    44,    -1,    -1,    30,    -1,    29,    47,    37,
      49,    44,    -1
Linus Torvalds's avatar
Linus Torvalds committed
519 520
};

521
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
522
static const yytype_uint16 yyrline[] =
523
{
524 525 526 527 528 529 530 531 532 533 534 535 536 537
       0,   104,   104,   105,   109,   109,   115,   115,   117,   117,
     119,   120,   121,   122,   123,   124,   128,   142,   143,   147,
     155,   168,   174,   175,   179,   180,   184,   190,   194,   195,
     196,   197,   198,   202,   203,   204,   205,   209,   211,   213,
     217,   224,   231,   241,   244,   245,   249,   250,   251,   252,
     253,   254,   255,   256,   257,   258,   259,   263,   268,   269,
     273,   274,   278,   278,   278,   279,   287,   288,   292,   301,
     303,   305,   307,   309,   316,   317,   321,   322,   323,   325,
     327,   329,   331,   336,   337,   338,   342,   343,   347,   348,
     353,   358,   360,   364,   365,   373,   377,   379,   381,   383,
     385,   390,   399,   400,   405,   410,   411,   415,   416,   420,
     421,   425,   427,   432,   433,   437,   438,   442,   443,   444,
     448,   452,   453,   457,   458,   462,   463,   466,   471,   479,
     483,   484,   488
Linus Torvalds's avatar
Linus Torvalds committed
538
};
539
#endif
Linus Torvalds's avatar
Linus Torvalds committed
540

541 542 543
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
544 545 546 547
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
  "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
548 549 550 551 552 553 554 555
  "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW",
  "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
  "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
  "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
  "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE",
  "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE",
  "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING",
  "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'",
556 557
  "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "$@1",
  "declaration1", "$@2", "$@3", "simple_declaration",
558 559 560 561 562 563 564 565 566 567 568
  "init_declarator_list_opt", "init_declarator_list", "init_declarator",
  "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
  "storage_class_specifier", "type_specifier", "simple_type_specifier",
  "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq",
  "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator",
  "direct_nested_declarator", "parameter_declaration_clause",
  "parameter_declaration_list_opt", "parameter_declaration_list",
  "parameter_declaration", "m_abstract_declarator",
  "direct_m_abstract_declarator", "function_definition", "initializer_opt",
  "initializer", "class_body", "member_specification_opt",
  "member_specification", "member_declaration",
569 570
  "member_declarator_list_opt", "member_declarator_list",
  "member_declarator", "member_bitfield_declarator", "attribute_opt",
571 572
  "enum_body", "enumerator_list", "enumerator", "asm_definition",
  "asm_phrase_opt", "export_definition", 0
Linus Torvalds's avatar
Linus Torvalds committed
573
};
574
#endif
Linus Torvalds's avatar
Linus Torvalds committed
575

576 577 578
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
579
static const yytype_uint16 yytoknum[] =
580 581 582 583 584
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
585 586
     295,   296,   297,   298,    59,   125,    44,    40,    42,    41,
      61,   123,    58
Linus Torvalds's avatar
Linus Torvalds committed
587
};
588
# endif
Linus Torvalds's avatar
Linus Torvalds committed
589

590
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
591
static const yytype_uint8 yyr1[] =
592
{
593 594 595 596 597 598 599 600 601 602 603 604
       0,    53,    54,    54,    56,    55,    58,    57,    59,    57,
      57,    57,    57,    57,    57,    57,    60,    61,    61,    62,
      62,    63,    64,    64,    65,    65,    66,    66,    67,    67,
      67,    67,    67,    68,    68,    68,    68,    68,    68,    68,
      68,    68,    68,    68,    68,    68,    69,    69,    69,    69,
      69,    69,    69,    69,    69,    69,    69,    70,    71,    71,
      72,    72,    73,    73,    73,    73,    74,    74,    75,    75,
      75,    75,    75,    75,    76,    76,    77,    77,    77,    77,
      77,    77,    77,    78,    78,    78,    79,    79,    80,    80,
      81,    82,    82,    83,    83,    83,    83,    83,    83,    83,
      83,    84,    85,    85,    86,    87,    87,    88,    88,    89,
      89,    90,    90,    91,    91,    92,    92,    93,    93,    93,
605 606
      94,    95,    95,    96,    96,    97,    97,    98,    98,    99,
     100,   100,   101
607
};
Linus Torvalds's avatar
Linus Torvalds committed
608

609
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
610
static const yytype_uint8 yyr2[] =
611
{
612 613 614 615 616 617 618 619 620 621 622 623
       0,     2,     1,     2,     0,     2,     0,     4,     0,     3,
       1,     1,     1,     1,     2,     2,     3,     0,     1,     1,
       3,     4,     0,     1,     1,     2,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     5,     4,     2,     2,     2,
       3,     3,     3,     2,     2,     2,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     2,     0,     1,
       1,     2,     1,     1,     1,     1,     2,     1,     1,     4,
       4,     2,     3,     3,     2,     1,     1,     1,     4,     4,
       2,     3,     3,     2,     1,     3,     0,     1,     1,     3,
       2,     2,     1,     0,     1,     1,     4,     4,     2,     3,
       3,     3,     0,     1,     2,     3,     3,     0,     1,     1,
       2,     3,     2,     0,     1,     1,     3,     2,     2,     1,
624 625
       2,     0,     2,     3,     4,     1,     3,     1,     3,     2,
       0,     1,     5
Linus Torvalds's avatar
Linus Torvalds committed
626 627
};

628 629 630
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
631
static const yytype_uint8 yydefact[] =
632
{
633 634 635 636
       4,     4,     2,     0,     1,     3,     0,    28,    55,    46,
      62,    53,     0,    31,     0,    52,    32,    48,    49,    29,
      65,    47,    50,    30,     0,     8,     0,    51,    54,    63,
       0,     0,     0,    64,    56,     5,    10,    17,    23,    24,
637 638 639 640 641 642 643 644 645 646
      26,    27,    33,    34,    11,    12,    13,    14,    15,    39,
       0,    43,     6,    37,     0,    44,    22,    38,    45,     0,
       0,   129,    68,     0,    58,     0,    18,    19,     0,   130,
      67,    25,    42,   127,     0,   125,    22,    40,     0,   113,
       0,     0,   109,     9,    17,    41,     0,     0,     0,     0,
      57,    59,    60,    16,     0,    66,   131,   101,   121,    71,
       0,     0,   123,     0,     7,   112,   106,    76,    77,     0,
       0,     0,   121,    75,     0,   114,   115,   119,   105,     0,
     110,   130,     0,    36,     0,    73,    72,    61,    20,   102,
       0,    93,     0,    84,    87,    88,   128,   124,   126,   118,
647
       0,    76,     0,   120,    74,   117,    80,     0,   111,     0,
648
      35,   132,   122,     0,    21,   103,    70,    94,    56,     0,
649 650 651
      93,    90,    92,    69,    83,     0,    82,    81,     0,     0,
     116,   104,     0,    95,     0,    91,    98,     0,    85,    89,
      79,    78,   100,    99,     0,     0,    97,    96
Linus Torvalds's avatar
Linus Torvalds committed
652 653
};

654 655
/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
656
{
657 658 659 660 661
      -1,     1,     2,     3,    35,    76,    56,    36,    65,    66,
      67,    79,    38,    39,    40,    41,    42,    68,    90,    91,
      43,   121,    70,   112,   113,   132,   133,   134,   135,   161,
     162,    44,   154,   155,    55,    80,    81,    82,   114,   115,
     116,   117,   129,    51,    74,    75,    45,    98,    46
662
};
Linus Torvalds's avatar
Linus Torvalds committed
663

664 665
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
666
#define YYPACT_NINF -135
667
static const yytype_int16 yypact[] =
668
{
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687
    -135,    20,  -135,   321,  -135,  -135,    30,  -135,  -135,  -135,
    -135,  -135,   -28,  -135,     2,  -135,  -135,  -135,  -135,  -135,
    -135,  -135,  -135,  -135,    -6,  -135,     9,  -135,  -135,  -135,
      -5,    15,   -17,  -135,  -135,  -135,  -135,    18,   491,  -135,
    -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,   -22,
      31,  -135,  -135,    19,   106,  -135,   491,    19,  -135,   491,
      50,  -135,  -135,    11,    -3,    51,    57,  -135,    18,   -14,
      14,  -135,  -135,    48,    46,  -135,   491,  -135,    33,    32,
      59,   154,  -135,  -135,    18,  -135,   365,    56,    60,    61,
    -135,    -3,  -135,  -135,    18,  -135,  -135,  -135,  -135,  -135,
     202,    74,  -135,   -23,  -135,  -135,  -135,    77,  -135,    16,
     101,    49,  -135,    34,    92,    93,  -135,  -135,  -135,    94,
    -135,   110,    95,  -135,    97,  -135,  -135,  -135,  -135,   -20,
      96,   410,    99,   113,   100,  -135,  -135,  -135,  -135,  -135,
     103,  -135,   107,  -135,  -135,   111,  -135,   239,  -135,    32,
    -135,  -135,  -135,   123,  -135,  -135,  -135,  -135,  -135,     3,
      52,  -135,    38,  -135,  -135,   454,  -135,  -135,   117,   128,
    -135,  -135,   134,  -135,   135,  -135,  -135,   276,  -135,  -135,
    -135,  -135,  -135,  -135,   137,   138,  -135,  -135
688
};
Linus Torvalds's avatar
Linus Torvalds committed
689

690
/* YYPGOTO[NTERM-NUM].  */
691
static const yytype_int16 yypgoto[] =
692
{
693 694 695 696 697
    -135,  -135,   187,  -135,  -135,  -135,  -135,   -50,  -135,  -135,
      98,     0,   -59,   -37,  -135,  -135,  -135,   -77,  -135,  -135,
     -54,   -30,  -135,   -90,  -135,  -134,  -135,  -135,    24,   -58,
    -135,  -135,  -135,  -135,   -18,  -135,  -135,   109,  -135,  -135,
      44,    87,    84,   148,  -135,   102,  -135,  -135,  -135
698
};
Linus Torvalds's avatar
Linus Torvalds committed
699

700 701 702 703
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
704 705
#define YYTABLE_NINF -109
static const yytype_int16 yytable[] =
706
{
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
      86,    71,   111,    37,   172,    10,    83,    69,    58,    49,
      92,   152,    88,   169,    73,    20,    96,   140,    97,   142,
       4,   144,   137,    50,    29,    52,   104,    61,    33,    50,
     153,    53,   111,    89,   111,    77,   -93,   127,    95,    85,
     157,   131,    59,   185,   173,    54,    57,    99,    62,    71,
     159,    64,   -93,   141,   160,    62,    84,   108,    63,    64,
      54,   100,    60,   109,    64,    63,    64,   146,    73,   107,
      54,   176,   111,   108,    47,    48,    84,   105,   106,   109,
      64,   147,   160,   160,   110,   177,   141,    87,   131,   157,
     108,   102,   103,   173,    71,    93,   109,    64,   101,   159,
      64,   174,   175,    94,   118,   124,   131,    78,   136,   125,
     126,     7,     8,     9,    10,    11,    12,    13,   131,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,   110,
      26,    27,    28,    29,    30,   143,   148,    33,   105,   149,
      96,   151,   152,   -22,   150,   156,   165,    34,   163,   164,
     -22,  -107,   166,   -22,   -22,   119,   167,   171,   -22,     7,
       8,     9,    10,    11,    12,    13,   180,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,   181,    26,    27,
      28,    29,    30,   182,   183,    33,   186,   187,     5,   179,
     120,   -22,   128,   170,   139,    34,   145,    72,   -22,  -108,
       0,   -22,   -22,   130,     0,   138,   -22,     7,     8,     9,
      10,    11,    12,    13,     0,    15,    16,    17,    18,    19,
      20,    21,    22,    23,    24,     0,    26,    27,    28,    29,
      30,     0,     0,    33,     0,     0,     0,     0,   -86,     0,
     168,     0,     0,    34,     7,     8,     9,    10,    11,    12,
      13,   -86,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    24,     0,    26,    27,    28,    29,    30,     0,     0,
      33,     0,     0,     0,     0,   -86,     0,   184,     0,     0,
      34,     7,     8,     9,    10,    11,    12,    13,   -86,    15,
736 737
      16,    17,    18,    19,    20,    21,    22,    23,    24,     0,
      26,    27,    28,    29,    30,     0,     0,    33,     0,     0,
738 739 740 741 742 743
       0,     0,   -86,     0,     0,     0,     0,    34,     0,     0,
       0,     0,     6,     0,     0,   -86,     7,     8,     9,    10,
      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
      31,    32,    33,     0,     0,     0,     0,     0,   -22,     0,
       0,     0,    34,     0,     0,   -22,     0,     0,   -22,   -22,
744 745 746
       7,     8,     9,    10,    11,    12,    13,     0,    15,    16,
      17,    18,    19,    20,    21,    22,    23,    24,     0,    26,
      27,    28,    29,    30,     0,     0,    33,     0,     0,     0,
747 748 749 750 751 752 753 754 755 756 757 758 759 760
       0,     0,     0,     0,     0,     0,    34,     0,     0,     0,
       0,     0,     0,   122,   123,     7,     8,     9,    10,    11,
      12,    13,     0,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,     0,    26,    27,    28,    29,    30,     0,
       0,    33,     0,     0,     0,     0,     0,   157,     0,     0,
       0,   158,     0,     0,     0,     0,     0,   159,    64,     7,
       8,     9,    10,    11,    12,    13,     0,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,     0,    26,    27,
      28,    29,    30,     0,     0,    33,     0,     0,     0,     0,
     178,     0,     0,     0,     0,    34,     7,     8,     9,    10,
      11,    12,    13,     0,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,     0,    26,    27,    28,    29,    30,
       0,     0,    33,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    34
761
};
Linus Torvalds's avatar
Linus Torvalds committed
762

763
static const yytype_int16 yycheck[] =
764
{
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793
      59,    38,    79,     3,     1,     8,    56,    37,    26,    37,
      64,    31,     1,   147,    37,    18,    30,     1,    32,   109,
       0,   111,    45,    51,    27,    23,    76,    44,    31,    51,
      50,    37,   109,    63,   111,    53,    33,    91,    68,    57,
      37,   100,    47,   177,    41,    51,    37,    33,    37,    86,
      47,    48,    49,    37,   131,    37,    56,    41,    47,    48,
      51,    47,    47,    47,    48,    47,    48,    33,    37,    37,
      51,    33,   149,    41,    44,    45,    76,    44,    45,    47,
      48,    47,   159,   160,    52,    47,    37,    37,   147,    37,
      41,    45,    46,    41,   131,    44,    47,    48,    50,    47,
      48,   159,   160,    46,    45,    49,   165,     1,    34,    49,
      49,     5,     6,     7,     8,     9,    10,    11,   177,    13,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    52,
      24,    25,    26,    27,    28,    34,    44,    31,    44,    46,
      30,    44,    31,    37,    49,    49,    46,    41,    49,    36,
      44,    45,    49,    47,    48,     1,    49,    34,    52,     5,
       6,     7,     8,     9,    10,    11,    49,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    49,    24,    25,
      26,    27,    28,    49,    49,    31,    49,    49,     1,   165,
      81,    37,    94,   149,   107,    41,   112,    49,    44,    45,
      -1,    47,    48,     1,    -1,   103,    52,     5,     6,     7,
       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
      18,    19,    20,    21,    22,    -1,    24,    25,    26,    27,
      28,    -1,    -1,    31,    -1,    -1,    -1,    -1,    36,    -1,
       1,    -1,    -1,    41,     5,     6,     7,     8,     9,    10,
      11,    49,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    -1,    24,    25,    26,    27,    28,    -1,    -1,
      31,    -1,    -1,    -1,    -1,    36,    -1,     1,    -1,    -1,
      41,     5,     6,     7,     8,     9,    10,    11,    49,    13,
794 795
      14,    15,    16,    17,    18,    19,    20,    21,    22,    -1,
      24,    25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,
796 797 798 799 800 801
      -1,    -1,    36,    -1,    -1,    -1,    -1,    41,    -1,    -1,
      -1,    -1,     1,    -1,    -1,    49,     5,     6,     7,     8,
       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
      29,    30,    31,    -1,    -1,    -1,    -1,    -1,    37,    -1,
      -1,    -1,    41,    -1,    -1,    44,    -1,    -1,    47,    48,
802 803 804
       5,     6,     7,     8,     9,    10,    11,    -1,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    -1,    24,
      25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,    -1,
805 806 807 808 809 810 811 812 813 814 815 816 817 818
      -1,    -1,    -1,    -1,    -1,    -1,    41,    -1,    -1,    -1,
      -1,    -1,    -1,    48,    49,     5,     6,     7,     8,     9,
      10,    11,    -1,    13,    14,    15,    16,    17,    18,    19,
      20,    21,    22,    -1,    24,    25,    26,    27,    28,    -1,
      -1,    31,    -1,    -1,    -1,    -1,    -1,    37,    -1,    -1,
      -1,    41,    -1,    -1,    -1,    -1,    -1,    47,    48,     5,
       6,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    -1,    24,    25,
      26,    27,    28,    -1,    -1,    31,    -1,    -1,    -1,    -1,
      36,    -1,    -1,    -1,    -1,    41,     5,     6,     7,     8,
       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
      19,    20,    21,    22,    -1,    24,    25,    26,    27,    28,
      -1,    -1,    31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    41
819
};
Linus Torvalds's avatar
Linus Torvalds committed
820

821 822
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
823
static const yytype_uint8 yystos[] =
824
{
825
       0,    54,    55,    56,     0,    55,     1,     5,     6,     7,
826 827
       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
828
      28,    29,    30,    31,    41,    57,    60,    64,    65,    66,
829 830 831 832 833 834 835 836 837 838
      67,    68,    69,    73,    84,    99,   101,    44,    45,    37,
      51,    96,    23,    37,    51,    87,    59,    37,    87,    47,
      47,    44,    37,    47,    48,    61,    62,    63,    70,    74,
      75,    66,    96,    37,    97,    98,    58,    87,     1,    64,
      88,    89,    90,    60,    64,    87,    65,    37,     1,    74,
      71,    72,    73,    44,    46,    74,    30,    32,   100,    33,
      47,    50,    45,    46,    60,    44,    45,    37,    41,    47,
      52,    70,    76,    77,    91,    92,    93,    94,    45,     1,
      90,    74,    48,    49,    49,    49,    49,    73,    63,    95,
       1,    65,    78,    79,    80,    81,    34,    45,    98,    94,
839 840
       1,    37,    76,    34,    76,    95,    33,    47,    44,    46,
      49,    44,    31,    50,    85,    86,    49,    37,    41,    47,
841 842 843
      70,    82,    83,    49,    36,    46,    49,    49,     1,    78,
      93,    34,     1,    41,    82,    82,    33,    47,    36,    81,
      49,    49,    49,    49,     1,    78,    49,    49
844
};
Linus Torvalds's avatar
Linus Torvalds committed
845 846 847

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
848
#define YYEMPTY		(-2)
Linus Torvalds's avatar
Linus Torvalds committed
849
#define YYEOF		0
850

Linus Torvalds's avatar
Linus Torvalds committed
851
#define YYACCEPT	goto yyacceptlab
852 853 854 855 856 857
#define YYABORT		goto yyabortlab
#define YYERROR		goto yyerrorlab


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
Linus Torvalds's avatar
Linus Torvalds committed
858
   Once GCC version 2 has supplanted version 1, this can go.  */
859

Linus Torvalds's avatar
Linus Torvalds committed
860
#define YYFAIL		goto yyerrlab
861

Linus Torvalds's avatar
Linus Torvalds committed
862
#define YYRECOVERING()  (!!yyerrstatus)
863 864

#define YYBACKUP(Token, Value)					\
Linus Torvalds's avatar
Linus Torvalds committed
865 866
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
867 868 869 870
    {								\
      yychar = (Token);						\
      yylval = (Value);						\
      yytoken = YYTRANSLATE (yychar);				\
871
      YYPOPSTACK (1);						\
Linus Torvalds's avatar
Linus Torvalds committed
872 873 874
      goto yybackup;						\
    }								\
  else								\
875 876
    {								\
      yyerror (YY_("syntax error: cannot back up")); \
877 878
      YYERROR;							\
    }								\
879
while (YYID (0))
Linus Torvalds's avatar
Linus Torvalds committed
880

881

Linus Torvalds's avatar
Linus Torvalds committed
882 883 884
#define YYTERROR	1
#define YYERRCODE	256

885 886 887 888 889 890 891 892 893

/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
    do									\
894
      if (YYID (N))                                                    \
895 896 897 898 899 900 901 902 903 904 905 906 907
	{								\
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
	}								\
      else								\
	{								\
	  (Current).first_line   = (Current).last_line   =		\
	    YYRHSLOC (Rhs, 0).last_line;				\
	  (Current).first_column = (Current).last_column =		\
	    YYRHSLOC (Rhs, 0).last_column;				\
	}								\
908
    while (YYID (0))
Linus Torvalds's avatar
Linus Torvalds committed
909 910
#endif

911 912 913 914 915 916 917 918 919

/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
#  define YY_LOCATION_PRINT(File, Loc)			\
     fprintf (File, "%d.%d-%d.%d",			\
920 921
	      (Loc).first_line, (Loc).first_column,	\
	      (Loc).last_line,  (Loc).last_column)
922 923 924
# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
Linus Torvalds's avatar
Linus Torvalds committed
925
#endif
926 927 928 929


/* YYLEX -- calling `yylex' with the right arguments.  */

Linus Torvalds's avatar
Linus Torvalds committed
930
#ifdef YYLEX_PARAM
931
# define YYLEX yylex (YYLEX_PARAM)
Linus Torvalds's avatar
Linus Torvalds committed
932
#else
933
# define YYLEX yylex ()
Linus Torvalds's avatar
Linus Torvalds committed
934
#endif
935 936 937 938 939 940 941 942 943 944 945 946 947

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
948 949 950 951 952 953 954 955 956 957 958 959
} while (YYID (0))

# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
do {									  \
  if (yydebug)								  \
    {									  \
      YYFPRINTF (stderr, "%s ", Title);					  \
      yy_symbol_print (stderr,						  \
		  Type, Value); \
      YYFPRINTF (stderr, "\n");						  \
    }									  \
} while (YYID (0))
960

961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018

/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
#endif
{
  if (!yyvaluep)
    return;
# ifdef YYPRINT
  if (yytype < YYNTOKENS)
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
  YYUSE (yyoutput);
# endif
  switch (yytype)
    {
      default:
	break;
    }
}


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
#endif
{
  if (yytype < YYNTOKENS)
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
  YYFPRINTF (yyoutput, ")");
}
1019 1020 1021 1022 1023 1024

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

1025 1026
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
1027
static void
1028
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1029 1030
#else
static void
1031 1032 1033
yy_stack_print (yybottom, yytop)
    yytype_int16 *yybottom;
    yytype_int16 *yytop;
Linus Torvalds's avatar
Linus Torvalds committed
1034
#endif
1035 1036
{
  YYFPRINTF (stderr, "Stack now");
1037 1038 1039 1040 1041
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
1042 1043
  YYFPRINTF (stderr, "\n");
}
Linus Torvalds's avatar
Linus Torvalds committed
1044

1045 1046 1047 1048
# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
1049
} while (YYID (0))
Linus Torvalds's avatar
Linus Torvalds committed
1050 1051


1052 1053 1054
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/
Linus Torvalds's avatar
Linus Torvalds committed
1055

1056 1057
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
1058
static void
1059
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1060 1061
#else
static void
1062 1063
yy_reduce_print (yyvsp, yyrule)
    YYSTYPE *yyvsp;
1064
    int yyrule;
Linus Torvalds's avatar
Linus Torvalds committed
1065
#endif
1066
{
1067
  int yynrhs = yyr2[yyrule];
1068
  int yyi;
1069 1070 1071 1072 1073 1074
  unsigned long int yylno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
	     yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
1075
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1076 1077 1078
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
		       &(yyvsp[(yyi + 1) - (yynrhs)])
		       		       );
1079
      YYFPRINTF (stderr, "\n");
1080
    }
1081
}
Linus Torvalds's avatar
Linus Torvalds committed
1082

1083 1084 1085
# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
1086 1087
    yy_reduce_print (yyvsp, Rule); \
} while (YYID (0))
Linus Torvalds's avatar
Linus Torvalds committed
1088

1089 1090 1091 1092 1093 1094 1095 1096 1097
/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
Linus Torvalds's avatar
Linus Torvalds committed
1098 1099


1100
/* YYINITDEPTH -- initial size of the parser's stacks.  */
Linus Torvalds's avatar
Linus Torvalds committed
1101
#ifndef	YYINITDEPTH
1102
# define YYINITDEPTH 200
Linus Torvalds's avatar
Linus Torvalds committed
1103 1104
#endif

1105 1106
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).
Linus Torvalds's avatar
Linus Torvalds committed
1107

1108
   Do not make this value too large; the results are undefined if
1109
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1110
   evaluated with infinite-precision integer arithmetic.  */
Linus Torvalds's avatar
Linus Torvalds committed
1111 1112

#ifndef YYMAXDEPTH
1113
# define YYMAXDEPTH 10000
Linus Torvalds's avatar
Linus Torvalds committed
1114
#endif
1115

Linus Torvalds's avatar
Linus Torvalds committed
1116

1117 1118 1119 1120

#if YYERROR_VERBOSE

# ifndef yystrlen
1121
#  if defined __GLIBC__ && defined _STRING_H
1122 1123 1124
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
1125 1126
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
1127 1128
static YYSIZE_T
yystrlen (const char *yystr)
1129 1130
#else
static YYSIZE_T
1131
yystrlen (yystr)
1132 1133
    const char *yystr;
#endif
1134
{
1135 1136
  YYSIZE_T yylen;
  for (yylen = 0; yystr[yylen]; yylen++)
1137
    continue;
1138
  return yylen;
1139 1140 1141 1142 1143
}
#  endif
# endif

# ifndef yystpcpy
1144
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1145 1146 1147 1148
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
1149 1150
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
1151 1152
static char *
yystpcpy (char *yydest, const char *yysrc)
1153 1154
#else
static char *
1155
yystpcpy (yydest, yysrc)
1156 1157 1158
    char *yydest;
    const char *yysrc;
#endif
Linus Torvalds's avatar
Linus Torvalds committed
1159
{
1160 1161
  char *yyd = yydest;
  const char *yys = yysrc;
Linus Torvalds's avatar
Linus Torvalds committed
1162

1163 1164 1165 1166
  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
Linus Torvalds's avatar
Linus Torvalds committed
1167
}
1168 1169 1170
#  endif
# endif

1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
   quotes and backslashes, so that it's suitable for yyerror.  The
   heuristic is that double-quoting is unnecessary unless the string
   contains an apostrophe, a comma, or backslash (other than
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
   null, do not copy; instead, return the length of what the result
   would have been.  */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
  if (*yystr == '"')
    {
      YYSIZE_T yyn = 0;
      char const *yyp = yystr;

      for (;;)
	switch (*++yyp)
	  {
	  case '\'':
	  case ',':
	    goto do_not_strip_quotes;

	  case '\\':
	    if (*++yyp != '\\')
	      goto do_not_strip_quotes;
	    /* Fall through.  */
	  default:
	    if (yyres)
	      yyres[yyn] = *yyp;
	    yyn++;
	    break;

	  case '"':
	    if (yyres)
	      yyres[yyn] = '\0';
	    return yyn;
	  }
    do_not_strip_quotes: ;
    }
Linus Torvalds's avatar
Linus Torvalds committed
1211

1212 1213
  if (! yyres)
    return yystrlen (yystr);
1214

1215 1216 1217
  return yystpcpy (yyres, yystr) - yyres;
}
# endif
Linus Torvalds's avatar
Linus Torvalds committed
1218

1219 1220 1221 1222 1223 1224 1225 1226 1227
/* Copy into YYRESULT an error message about the unexpected token
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
   including the terminating null byte.  If YYRESULT is null, do not
   copy anything; just return the number of bytes that would be
   copied.  As a special case, return 0 if an ordinary "syntax error"
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
   size calculation.  */
static YYSIZE_T
yysyntax_error (char *yyresult, int yystate, int yychar)
Linus Torvalds's avatar
Linus Torvalds committed
1228
{
1229
  int yyn = yypact[yystate];
Linus Torvalds's avatar
Linus Torvalds committed
1230

1231 1232
  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
    return 0;
1233 1234
  else
    {
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323
      int yytype = YYTRANSLATE (yychar);
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
      YYSIZE_T yysize = yysize0;
      YYSIZE_T yysize1;
      int yysize_overflow = 0;
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
      int yyx;

# if 0
      /* This is so xgettext sees the translatable formats that are
	 constructed on the fly.  */
      YY_("syntax error, unexpected %s");
      YY_("syntax error, unexpected %s, expecting %s");
      YY_("syntax error, unexpected %s, expecting %s or %s");
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
      char *yyfmt;
      char const *yyf;
      static char const yyunexpected[] = "syntax error, unexpected %s";
      static char const yyexpecting[] = ", expecting %s";
      static char const yyor[] = " or %s";
      char yyformat[sizeof yyunexpected
		    + sizeof yyexpecting - 1
		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
		       * (sizeof yyor - 1))];
      char const *yyprefix = yyexpecting;

      /* Start YYX at -YYN if negative to avoid negative indexes in
	 YYCHECK.  */
      int yyxbegin = yyn < 0 ? -yyn : 0;

      /* Stay within bounds of both yycheck and yytname.  */
      int yychecklim = YYLAST - yyn + 1;
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
      int yycount = 1;

      yyarg[0] = yytname[yytype];
      yyfmt = yystpcpy (yyformat, yyunexpected);

      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	  {
	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
	      {
		yycount = 1;
		yysize = yysize0;
		yyformat[sizeof yyunexpected - 1] = '\0';
		break;
	      }
	    yyarg[yycount++] = yytname[yyx];
	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
	    yysize_overflow |= (yysize1 < yysize);
	    yysize = yysize1;
	    yyfmt = yystpcpy (yyfmt, yyprefix);
	    yyprefix = yyor;
	  }

      yyf = YY_(yyformat);
      yysize1 = yysize + yystrlen (yyf);
      yysize_overflow |= (yysize1 < yysize);
      yysize = yysize1;

      if (yysize_overflow)
	return YYSIZE_MAXIMUM;

      if (yyresult)
	{
	  /* Avoid sprintf, as that infringes on the user's name space.
	     Don't have undefined behavior even if the translation
	     produced a string with the wrong number of "%s"s.  */
	  char *yyp = yyresult;
	  int yyi = 0;
	  while ((*yyp = *yyf) != '\0')
	    {
	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
		{
		  yyp += yytnamerr (yyp, yyarg[yyi++]);
		  yyf += 2;
		}
	      else
		{
		  yyp++;
		  yyf++;
		}
	    }
	}
      return yysize;
1324
    }
Linus Torvalds's avatar
Linus Torvalds committed
1325
}
1326 1327
#endif /* YYERROR_VERBOSE */

Linus Torvalds's avatar
Linus Torvalds committed
1328

1329 1330 1331 1332
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

1333 1334 1335
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
1336 1337 1338 1339 1340 1341 1342 1343
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yymsg, yytype, yyvaluep)
    const char *yymsg;
    int yytype;
    YYSTYPE *yyvaluep;
Linus Torvalds's avatar
Linus Torvalds committed
1344
#endif
1345
{
1346
  YYUSE (yyvaluep);
1347 1348 1349 1350 1351 1352 1353 1354 1355

  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  switch (yytype)
    {

      default:
1356
	break;
1357 1358
    }
}
Linus Torvalds's avatar
Linus Torvalds committed
1359

1360
/* Prevent warnings from -Wmissing-prototypes.  */
Linus Torvalds's avatar
Linus Torvalds committed
1361
#ifdef YYPARSE_PARAM
1362
#if defined __STDC__ || defined __cplusplus
1363
int yyparse (void *YYPARSE_PARAM);
1364
#else
1365
int yyparse ();
1366
#endif
1367
#else /* ! YYPARSE_PARAM */
1368
#if defined __STDC__ || defined __cplusplus
Linus Torvalds's avatar
Linus Torvalds committed
1369
int yyparse (void);
1370 1371
#else
int yyparse ();
Linus Torvalds's avatar
Linus Torvalds committed
1372
#endif
1373 1374 1375
#endif /* ! YYPARSE_PARAM */


1376
/* The lookahead symbol.  */
1377
int yychar;
Linus Torvalds's avatar
Linus Torvalds committed
1378

1379
/* The semantic value of the lookahead symbol.  */
1380 1381 1382 1383 1384 1385 1386
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;



1387 1388 1389
/*-------------------------.
| yyparse or yypush_parse.  |
`-------------------------*/
1390 1391

#ifdef YYPARSE_PARAM
1392 1393 1394 1395 1396 1397 1398 1399 1400
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
    void *YYPARSE_PARAM;
#endif
1401
#else /* ! YYPARSE_PARAM */
1402 1403
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
1404 1405 1406
int
yyparse (void)
#else
Linus Torvalds's avatar
Linus Torvalds committed
1407
int
1408 1409 1410 1411
yyparse ()

#endif
#endif
Linus Torvalds's avatar
Linus Torvalds committed
1412
{
1413 1414


1415 1416 1417
    int yystate;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus;
1418

1419 1420 1421
    /* The stacks and their tools:
       `yyss': related to states.
       `yyvs': related to semantic values.
1422

1423 1424
       Refer to the stacks thru separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */
Linus Torvalds's avatar
Linus Torvalds committed
1425

1426 1427 1428 1429
    /* The state stack.  */
    yytype_int16 yyssa[YYINITDEPTH];
    yytype_int16 *yyss;
    yytype_int16 *yyssp;
Linus Torvalds's avatar
Linus Torvalds committed
1430

1431 1432 1433 1434
    /* The semantic value stack.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs;
    YYSTYPE *yyvsp;
Linus Torvalds's avatar
Linus Torvalds committed
1435

1436
    YYSIZE_T yystacksize;
Linus Torvalds's avatar
Linus Torvalds committed
1437

1438 1439 1440 1441
  int yyn;
  int yyresult;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken;
1442 1443 1444
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;
Linus Torvalds's avatar
Linus Torvalds committed
1445

1446 1447 1448 1449 1450 1451 1452 1453
#if YYERROR_VERBOSE
  /* Buffer for error messages, and its allocated size.  */
  char yymsgbuf[128];
  char *yymsg = yymsgbuf;
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif

#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
Linus Torvalds's avatar
Linus Torvalds committed
1454

1455 1456 1457
  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;
Linus Torvalds's avatar
Linus Torvalds committed
1458

1459 1460 1461 1462 1463
  yytoken = 0;
  yyss = yyssa;
  yyvs = yyvsa;
  yystacksize = YYINITDEPTH;

1464
  YYDPRINTF ((stderr, "Starting parse\n"));
Linus Torvalds's avatar
Linus Torvalds committed
1465 1466 1467 1468

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
1469
  yychar = YYEMPTY; /* Cause a token to be read.  */
Linus Torvalds's avatar
Linus Torvalds committed
1470 1471 1472 1473 1474

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */
1475
  yyssp = yyss;
Linus Torvalds's avatar
Linus Torvalds committed
1476 1477
  yyvsp = yyvs;

1478
  goto yysetstate;
Linus Torvalds's avatar
Linus Torvalds committed
1479

1480 1481 1482 1483 1484
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
1485
     have just been pushed.  So pushing a state here evens the stacks.  */
1486 1487 1488 1489 1490 1491 1492
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
Linus Torvalds's avatar
Linus Torvalds committed
1493
      /* Get the current used size of the three stacks, in elements.  */
1494
      YYSIZE_T yysize = yyssp - yyss + 1;
Linus Torvalds's avatar
Linus Torvalds committed
1495 1496

#ifdef yyoverflow
1497
      {
1498
	/* Give user a chance to reallocate the stack.  Use copies of
1499 1500 1501
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
1502
	yytype_int16 *yyss1 = yyss;
1503 1504 1505 1506 1507

	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  This used to be a
	   conditional around just the two extra args, but that might
	   be undefined if yyoverflow is a macro.  */
1508
	yyoverflow (YY_("memory exhausted"),
1509 1510 1511 1512 1513 1514 1515
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),
		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
Linus Torvalds's avatar
Linus Torvalds committed
1516
#else /* no yyoverflow */
1517
# ifndef YYSTACK_RELOCATE
1518
      goto yyexhaustedlab;
1519
# else
Linus Torvalds's avatar
Linus Torvalds committed
1520
      /* Extend the stack our own way.  */
1521
      if (YYMAXDEPTH <= yystacksize)
1522
	goto yyexhaustedlab;
Linus Torvalds's avatar
Linus Torvalds committed
1523
      yystacksize *= 2;
1524
      if (YYMAXDEPTH < yystacksize)
Linus Torvalds's avatar
Linus Torvalds committed
1525
	yystacksize = YYMAXDEPTH;
1526 1527

      {
1528
	yytype_int16 *yyss1 = yyss;
1529 1530 1531
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
1532
	  goto yyexhaustedlab;
1533 1534
	YYSTACK_RELOCATE (yyss_alloc, yyss);
	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1535 1536 1537 1538 1539
#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
Linus Torvalds's avatar
Linus Torvalds committed
1540 1541
#endif /* no yyoverflow */

1542 1543
      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
Linus Torvalds's avatar
Linus Torvalds committed
1544

1545 1546 1547 1548
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
Linus Torvalds's avatar
Linus Torvalds committed
1549 1550 1551
	YYABORT;
    }

1552
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Linus Torvalds's avatar
Linus Torvalds committed
1553

1554 1555 1556
  if (yystate == YYFINAL)
    YYACCEPT;

Linus Torvalds's avatar
Linus Torvalds committed
1557
  goto yybackup;
1558 1559 1560 1561 1562

/*-----------.
| yybackup.  |
`-----------*/
yybackup:
Linus Torvalds's avatar
Linus Torvalds committed
1563

1564
  /* Do appropriate processing given the current state.  Read a
1565
     lookahead token if we need one and don't already have one.  */
Linus Torvalds's avatar
Linus Torvalds committed
1566

1567
  /* First try to decide what to do without reference to lookahead token.  */
Linus Torvalds's avatar
Linus Torvalds committed
1568
  yyn = yypact[yystate];
1569
  if (yyn == YYPACT_NINF)
Linus Torvalds's avatar
Linus Torvalds committed
1570 1571
    goto yydefault;

1572
  /* Not known => get a lookahead token if don't already have one.  */
Linus Torvalds's avatar
Linus Torvalds committed
1573

1574
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
Linus Torvalds's avatar
Linus Torvalds committed
1575 1576
  if (yychar == YYEMPTY)
    {
1577
      YYDPRINTF ((stderr, "Reading a token: "));
Linus Torvalds's avatar
Linus Torvalds committed
1578 1579 1580
      yychar = YYLEX;
    }

1581
  if (yychar <= YYEOF)
Linus Torvalds's avatar
Linus Torvalds committed
1582
    {
1583 1584
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
Linus Torvalds's avatar
Linus Torvalds committed
1585 1586 1587
    }
  else
    {
1588 1589
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Linus Torvalds's avatar
Linus Torvalds committed
1590 1591
    }

1592 1593 1594 1595
  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Linus Torvalds's avatar
Linus Torvalds committed
1596 1597
    goto yydefault;
  yyn = yytable[yyn];
1598
  if (yyn <= 0)
Linus Torvalds's avatar
Linus Torvalds committed
1599
    {
1600
      if (yyn == 0 || yyn == YYTABLE_NINF)
Linus Torvalds's avatar
Linus Torvalds committed
1601 1602 1603 1604 1605
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

1606 1607 1608 1609 1610
  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

1611
  /* Shift the lookahead token.  */
1612
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Linus Torvalds's avatar
Linus Torvalds committed
1613

1614 1615
  /* Discard the shifted token.  */
  yychar = YYEMPTY;
Linus Torvalds's avatar
Linus Torvalds committed
1616

1617
  yystate = yyn;
Linus Torvalds's avatar
Linus Torvalds committed
1618 1619 1620 1621 1622
  *++yyvsp = yylval;

  goto yynewstate;


1623 1624 1625 1626
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
Linus Torvalds's avatar
Linus Torvalds committed
1627 1628 1629
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
1630
  goto yyreduce;
Linus Torvalds's avatar
Linus Torvalds committed
1631

1632 1633 1634 1635

/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
Linus Torvalds's avatar
Linus Torvalds committed
1636
yyreduce:
1637
  /* yyn is the number of a rule to reduce with.  */
Linus Torvalds's avatar
Linus Torvalds committed
1638 1639
  yylen = yyr2[yyn];

1640 1641
  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.
Linus Torvalds's avatar
Linus Torvalds committed
1642

1643 1644 1645 1646 1647 1648
     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];
Linus Torvalds's avatar
Linus Torvalds committed
1649 1650


1651 1652 1653 1654
  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 4:
1655 1656 1657

/* Line 1455 of yacc.c  */
#line 109 "scripts/genksyms/parse.y"
1658 1659 1660 1661
    { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
    break;

  case 5:
1662 1663 1664

/* Line 1455 of yacc.c  */
#line 111 "scripts/genksyms/parse.y"
1665
    { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
1666 1667 1668
    break;

  case 6:
1669 1670 1671

/* Line 1455 of yacc.c  */
#line 115 "scripts/genksyms/parse.y"
1672 1673 1674 1675
    { is_typedef = 1; ;}
    break;

  case 7:
1676 1677 1678

/* Line 1455 of yacc.c  */
#line 116 "scripts/genksyms/parse.y"
1679
    { (yyval) = (yyvsp[(4) - (4)]); ;}
1680 1681
    break;

1682
  case 8:
1683 1684 1685

/* Line 1455 of yacc.c  */
#line 117 "scripts/genksyms/parse.y"
1686
    { is_typedef = 1; ;}
1687 1688
    break;

1689
  case 9:
1690 1691 1692

/* Line 1455 of yacc.c  */
#line 118 "scripts/genksyms/parse.y"
1693
    { (yyval) = (yyvsp[(3) - (3)]); ;}
1694 1695 1696
    break;

  case 14:
1697 1698 1699

/* Line 1455 of yacc.c  */
#line 123 "scripts/genksyms/parse.y"
1700 1701 1702 1703
    { (yyval) = (yyvsp[(2) - (2)]); ;}
    break;

  case 15:
1704 1705 1706

/* Line 1455 of yacc.c  */
#line 124 "scripts/genksyms/parse.y"
1707 1708 1709 1710
    { (yyval) = (yyvsp[(2) - (2)]); ;}
    break;

  case 16:
1711 1712 1713

/* Line 1455 of yacc.c  */
#line 129 "scripts/genksyms/parse.y"
1714
    { if (current_name) {
1715 1716
		    struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
		    (*(yyvsp[(3) - (3)]))->next = NULL;
Linus Torvalds's avatar
Linus Torvalds committed
1717 1718 1719 1720 1721
		    add_symbol(current_name,
			       is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
			       decl, is_extern);
		    current_name = NULL;
		  }
1722
		  (yyval) = (yyvsp[(3) - (3)]);
1723 1724 1725
		;}
    break;

1726
  case 17:
1727 1728 1729

/* Line 1455 of yacc.c  */
#line 142 "scripts/genksyms/parse.y"
1730 1731 1732
    { (yyval) = NULL; ;}
    break;

1733
  case 19:
1734 1735 1736

/* Line 1455 of yacc.c  */
#line 148 "scripts/genksyms/parse.y"
1737 1738
    { struct string_list *decl = *(yyvsp[(1) - (1)]);
		  *(yyvsp[(1) - (1)]) = NULL;
Linus Torvalds's avatar
Linus Torvalds committed
1739 1740 1741
		  add_symbol(current_name,
			     is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
		  current_name = NULL;
1742
		  (yyval) = (yyvsp[(1) - (1)]);
1743 1744 1745
		;}
    break;

1746
  case 20:
1747 1748 1749

/* Line 1455 of yacc.c  */
#line 156 "scripts/genksyms/parse.y"
1750 1751 1752 1753
    { struct string_list *decl = *(yyvsp[(3) - (3)]);
		  *(yyvsp[(3) - (3)]) = NULL;
		  free_list(*(yyvsp[(2) - (3)]), NULL);
		  *(yyvsp[(2) - (3)]) = decl_spec;
Linus Torvalds's avatar
Linus Torvalds committed
1754 1755 1756
		  add_symbol(current_name,
			     is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
		  current_name = NULL;
1757
		  (yyval) = (yyvsp[(3) - (3)]);
1758 1759 1760
		;}
    break;

1761
  case 21:
1762 1763 1764

/* Line 1455 of yacc.c  */
#line 169 "scripts/genksyms/parse.y"
1765
    { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
1766 1767
    break;

1768
  case 22:
1769 1770 1771

/* Line 1455 of yacc.c  */
#line 174 "scripts/genksyms/parse.y"
1772 1773 1774
    { decl_spec = NULL; ;}
    break;

1775
  case 24:
1776 1777 1778

/* Line 1455 of yacc.c  */
#line 179 "scripts/genksyms/parse.y"
1779
    { decl_spec = *(yyvsp[(1) - (1)]); ;}
1780 1781
    break;

1782
  case 25:
1783 1784 1785

/* Line 1455 of yacc.c  */
#line 180 "scripts/genksyms/parse.y"
1786
    { decl_spec = *(yyvsp[(2) - (2)]); ;}
1787 1788
    break;

1789
  case 26:
1790 1791 1792

/* Line 1455 of yacc.c  */
#line 185 "scripts/genksyms/parse.y"
1793
    { /* Version 2 checksumming ignores storage class, as that
Linus Torvalds's avatar
Linus Torvalds committed
1794
		     is really irrelevant to the linkage.  */
1795 1796
		  remove_node((yyvsp[(1) - (1)]));
		  (yyval) = (yyvsp[(1) - (1)]);
1797 1798 1799
		;}
    break;

1800
  case 31:
1801 1802 1803

/* Line 1455 of yacc.c  */
#line 197 "scripts/genksyms/parse.y"
1804
    { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
1805 1806
    break;

1807
  case 32:
1808 1809 1810

/* Line 1455 of yacc.c  */
#line 198 "scripts/genksyms/parse.y"
1811
    { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
1812 1813
    break;

1814
  case 37:
1815 1816 1817

/* Line 1455 of yacc.c  */
#line 210 "scripts/genksyms/parse.y"
1818
    { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
1819 1820
    break;

1821
  case 38:
1822 1823 1824

/* Line 1455 of yacc.c  */
#line 212 "scripts/genksyms/parse.y"
1825
    { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
1826 1827
    break;

1828
  case 39:
1829 1830 1831

/* Line 1455 of yacc.c  */
#line 214 "scripts/genksyms/parse.y"
1832
    { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
1833 1834
    break;

1835
  case 40:
1836 1837 1838

/* Line 1455 of yacc.c  */
#line 218 "scripts/genksyms/parse.y"
1839
    { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
Linus Torvalds's avatar
Linus Torvalds committed
1840
		  r = copy_node(i); r->tag = SYM_STRUCT;
1841
		  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
Linus Torvalds's avatar
Linus Torvalds committed
1842
		  add_symbol(i->string, SYM_STRUCT, s, is_extern);
1843
		  (yyval) = (yyvsp[(3) - (3)]);
1844 1845 1846
		;}
    break;

1847
  case 41:
1848 1849 1850

/* Line 1455 of yacc.c  */
#line 225 "scripts/genksyms/parse.y"
1851
    { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
Linus Torvalds's avatar
Linus Torvalds committed
1852
		  r = copy_node(i); r->tag = SYM_UNION;
1853
		  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
Linus Torvalds's avatar
Linus Torvalds committed
1854
		  add_symbol(i->string, SYM_UNION, s, is_extern);
1855
		  (yyval) = (yyvsp[(3) - (3)]);
1856 1857 1858
		;}
    break;

1859
  case 42:
1860 1861 1862

/* Line 1455 of yacc.c  */
#line 232 "scripts/genksyms/parse.y"
1863
    { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
Linus Torvalds's avatar
Linus Torvalds committed
1864
		  r = copy_node(i); r->tag = SYM_ENUM;
1865
		  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
Linus Torvalds's avatar
Linus Torvalds committed
1866
		  add_symbol(i->string, SYM_ENUM, s, is_extern);
1867
		  (yyval) = (yyvsp[(3) - (3)]);
1868 1869 1870
		;}
    break;

1871
  case 43:
1872 1873 1874 1875

/* Line 1455 of yacc.c  */
#line 242 "scripts/genksyms/parse.y"
    { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;}
1876 1877
    break;

1878
  case 44:
1879 1880 1881

/* Line 1455 of yacc.c  */
#line 244 "scripts/genksyms/parse.y"
1882
    { (yyval) = (yyvsp[(2) - (2)]); ;}
1883 1884
    break;

1885
  case 45:
1886 1887 1888

/* Line 1455 of yacc.c  */
#line 245 "scripts/genksyms/parse.y"
1889
    { (yyval) = (yyvsp[(2) - (2)]); ;}
1890 1891
    break;

1892
  case 56:
1893 1894 1895

/* Line 1455 of yacc.c  */
#line 259 "scripts/genksyms/parse.y"
1896
    { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
1897 1898
    break;

1899
  case 57:
1900 1901 1902

/* Line 1455 of yacc.c  */
#line 264 "scripts/genksyms/parse.y"
1903
    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1904 1905
    break;

1906
  case 58:
1907 1908 1909

/* Line 1455 of yacc.c  */
#line 268 "scripts/genksyms/parse.y"
1910 1911 1912
    { (yyval) = NULL; ;}
    break;

1913
  case 61:
1914 1915 1916

/* Line 1455 of yacc.c  */
#line 274 "scripts/genksyms/parse.y"
1917
    { (yyval) = (yyvsp[(2) - (2)]); ;}
1918 1919
    break;

1920
  case 65:
1921 1922 1923

/* Line 1455 of yacc.c  */
#line 280 "scripts/genksyms/parse.y"
1924
    { /* restrict has no effect in prototypes so ignore it */
1925 1926
		  remove_node((yyvsp[(1) - (1)]));
		  (yyval) = (yyvsp[(1) - (1)]);
1927 1928 1929
		;}
    break;

1930
  case 66:
1931 1932 1933

/* Line 1455 of yacc.c  */
#line 287 "scripts/genksyms/parse.y"
1934
    { (yyval) = (yyvsp[(2) - (2)]); ;}
1935 1936
    break;

1937
  case 68:
1938 1939 1940

/* Line 1455 of yacc.c  */
#line 293 "scripts/genksyms/parse.y"
1941
    { if (current_name != NULL) {
Linus Torvalds's avatar
Linus Torvalds committed
1942 1943 1944
		    error_with_pos("unexpected second declaration name");
		    YYERROR;
		  } else {
1945 1946
		    current_name = (*(yyvsp[(1) - (1)]))->string;
		    (yyval) = (yyvsp[(1) - (1)]);
Linus Torvalds's avatar
Linus Torvalds committed
1947
		  }
1948 1949 1950 1951
		;}
    break;

  case 69:
1952 1953 1954

/* Line 1455 of yacc.c  */
#line 302 "scripts/genksyms/parse.y"
1955
    { (yyval) = (yyvsp[(4) - (4)]); ;}
1956 1957 1958
    break;

  case 70:
1959 1960 1961

/* Line 1455 of yacc.c  */
#line 304 "scripts/genksyms/parse.y"
1962
    { (yyval) = (yyvsp[(4) - (4)]); ;}
1963 1964 1965
    break;

  case 71:
1966 1967 1968

/* Line 1455 of yacc.c  */
#line 306 "scripts/genksyms/parse.y"
1969
    { (yyval) = (yyvsp[(2) - (2)]); ;}
1970 1971 1972
    break;

  case 72:
1973 1974 1975

/* Line 1455 of yacc.c  */
#line 308 "scripts/genksyms/parse.y"
1976
    { (yyval) = (yyvsp[(3) - (3)]); ;}
1977 1978
    break;

1979
  case 73:
1980 1981 1982

/* Line 1455 of yacc.c  */
#line 310 "scripts/genksyms/parse.y"
1983
    { (yyval) = (yyvsp[(3) - (3)]); ;}
1984 1985
    break;

1986
  case 74:
1987 1988 1989

/* Line 1455 of yacc.c  */
#line 316 "scripts/genksyms/parse.y"
1990
    { (yyval) = (yyvsp[(2) - (2)]); ;}
1991 1992 1993
    break;

  case 78:
1994 1995 1996

/* Line 1455 of yacc.c  */
#line 324 "scripts/genksyms/parse.y"
1997
    { (yyval) = (yyvsp[(4) - (4)]); ;}
1998 1999 2000
    break;

  case 79:
2001 2002 2003

/* Line 1455 of yacc.c  */
#line 326 "scripts/genksyms/parse.y"
2004
    { (yyval) = (yyvsp[(4) - (4)]); ;}
2005 2006 2007
    break;

  case 80:
2008 2009 2010

/* Line 1455 of yacc.c  */
#line 328 "scripts/genksyms/parse.y"
2011
    { (yyval) = (yyvsp[(2) - (2)]); ;}
2012 2013 2014
    break;

  case 81:
2015 2016 2017

/* Line 1455 of yacc.c  */
#line 330 "scripts/genksyms/parse.y"
2018
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2019 2020
    break;

2021
  case 82:
2022 2023 2024

/* Line 1455 of yacc.c  */
#line 332 "scripts/genksyms/parse.y"
2025
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2026 2027
    break;

2028
  case 83:
2029 2030 2031

/* Line 1455 of yacc.c  */
#line 336 "scripts/genksyms/parse.y"
2032
    { (yyval) = (yyvsp[(2) - (2)]); ;}
2033 2034
    break;

2035
  case 85:
2036 2037 2038

/* Line 1455 of yacc.c  */
#line 338 "scripts/genksyms/parse.y"
2039
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2040 2041
    break;

2042
  case 86:
2043 2044 2045

/* Line 1455 of yacc.c  */
#line 342 "scripts/genksyms/parse.y"
2046
    { (yyval) = NULL; ;}
2047 2048 2049
    break;

  case 89:
2050 2051 2052

/* Line 1455 of yacc.c  */
#line 349 "scripts/genksyms/parse.y"
2053
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2054 2055
    break;

2056
  case 90:
2057 2058 2059

/* Line 1455 of yacc.c  */
#line 354 "scripts/genksyms/parse.y"
2060
    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
2061 2062
    break;

2063
  case 91:
2064 2065 2066

/* Line 1455 of yacc.c  */
#line 359 "scripts/genksyms/parse.y"
2067
    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
2068 2069 2070
    break;

  case 93:
2071 2072 2073

/* Line 1455 of yacc.c  */
#line 364 "scripts/genksyms/parse.y"
2074
    { (yyval) = NULL; ;}
2075 2076 2077
    break;

  case 94:
2078 2079 2080

/* Line 1455 of yacc.c  */
#line 366 "scripts/genksyms/parse.y"
2081 2082 2083 2084 2085
    { /* For version 2 checksums, we don't want to remember
		     private parameter names.  */
		  remove_node((yyvsp[(1) - (1)]));
		  (yyval) = (yyvsp[(1) - (1)]);
		;}
2086 2087 2088
    break;

  case 95:
2089 2090 2091

/* Line 1455 of yacc.c  */
#line 374 "scripts/genksyms/parse.y"
2092 2093 2094
    { remove_node((yyvsp[(1) - (1)]));
		  (yyval) = (yyvsp[(1) - (1)]);
		;}
2095 2096 2097
    break;

  case 96:
2098 2099 2100

/* Line 1455 of yacc.c  */
#line 378 "scripts/genksyms/parse.y"
2101
    { (yyval) = (yyvsp[(4) - (4)]); ;}
2102 2103 2104
    break;

  case 97:
2105 2106 2107

/* Line 1455 of yacc.c  */
#line 380 "scripts/genksyms/parse.y"
2108
    { (yyval) = (yyvsp[(4) - (4)]); ;}
2109 2110 2111
    break;

  case 98:
2112 2113 2114

/* Line 1455 of yacc.c  */
#line 382 "scripts/genksyms/parse.y"
2115
    { (yyval) = (yyvsp[(2) - (2)]); ;}
2116 2117 2118
    break;

  case 99:
2119 2120 2121

/* Line 1455 of yacc.c  */
#line 384 "scripts/genksyms/parse.y"
2122
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2123 2124 2125
    break;

  case 100:
2126 2127 2128

/* Line 1455 of yacc.c  */
#line 386 "scripts/genksyms/parse.y"
2129
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2130 2131
    break;

2132
  case 101:
2133 2134 2135

/* Line 1455 of yacc.c  */
#line 391 "scripts/genksyms/parse.y"
2136 2137 2138 2139 2140
    { struct string_list *decl = *(yyvsp[(2) - (3)]);
		  *(yyvsp[(2) - (3)]) = NULL;
		  add_symbol(current_name, SYM_NORMAL, decl, is_extern);
		  (yyval) = (yyvsp[(3) - (3)]);
		;}
2141 2142
    break;

2143
  case 102:
2144 2145 2146

/* Line 1455 of yacc.c  */
#line 399 "scripts/genksyms/parse.y"
2147
    { (yyval) = NULL; ;}
2148 2149 2150
    break;

  case 104:
2151 2152 2153

/* Line 1455 of yacc.c  */
#line 406 "scripts/genksyms/parse.y"
2154
    { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
2155 2156 2157
    break;

  case 105:
2158 2159 2160

/* Line 1455 of yacc.c  */
#line 410 "scripts/genksyms/parse.y"
2161
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2162 2163
    break;

2164
  case 106:
2165 2166 2167

/* Line 1455 of yacc.c  */
#line 411 "scripts/genksyms/parse.y"
2168
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2169 2170
    break;

2171
  case 107:
2172 2173 2174

/* Line 1455 of yacc.c  */
#line 415 "scripts/genksyms/parse.y"
2175
    { (yyval) = NULL; ;}
2176 2177 2178
    break;

  case 110:
2179 2180 2181

/* Line 1455 of yacc.c  */
#line 421 "scripts/genksyms/parse.y"
2182
    { (yyval) = (yyvsp[(2) - (2)]); ;}
2183 2184 2185
    break;

  case 111:
2186 2187 2188

/* Line 1455 of yacc.c  */
#line 426 "scripts/genksyms/parse.y"
2189
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2190 2191
    break;

2192
  case 112:
2193 2194 2195

/* Line 1455 of yacc.c  */
#line 428 "scripts/genksyms/parse.y"
2196
    { (yyval) = (yyvsp[(2) - (2)]); ;}
2197 2198
    break;

2199
  case 113:
2200 2201 2202

/* Line 1455 of yacc.c  */
#line 432 "scripts/genksyms/parse.y"
2203
    { (yyval) = NULL; ;}
2204 2205 2206
    break;

  case 116:
2207 2208 2209

/* Line 1455 of yacc.c  */
#line 438 "scripts/genksyms/parse.y"
2210 2211 2212 2213
    { (yyval) = (yyvsp[(3) - (3)]); ;}
    break;

  case 117:
2214 2215 2216

/* Line 1455 of yacc.c  */
#line 442 "scripts/genksyms/parse.y"
2217
    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
2218 2219 2220
    break;

  case 118:
2221 2222 2223

/* Line 1455 of yacc.c  */
#line 443 "scripts/genksyms/parse.y"
2224
    { (yyval) = (yyvsp[(2) - (2)]); ;}
2225 2226
    break;

2227
  case 120:
2228 2229 2230

/* Line 1455 of yacc.c  */
#line 448 "scripts/genksyms/parse.y"
2231
    { (yyval) = (yyvsp[(2) - (2)]); ;}
2232 2233 2234
    break;

  case 121:
2235 2236 2237

/* Line 1455 of yacc.c  */
#line 452 "scripts/genksyms/parse.y"
2238
    { (yyval) = NULL; ;}
2239 2240
    break;

2241
  case 123:
2242 2243 2244 2245

/* Line 1455 of yacc.c  */
#line 457 "scripts/genksyms/parse.y"
    { (yyval) = (yyvsp[(3) - (3)]); ;}
2246 2247 2248
    break;

  case 124:
2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286

/* Line 1455 of yacc.c  */
#line 458 "scripts/genksyms/parse.y"
    { (yyval) = (yyvsp[(4) - (4)]); ;}
    break;

  case 127:

/* Line 1455 of yacc.c  */
#line 467 "scripts/genksyms/parse.y"
    {
			const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
			add_symbol(name, SYM_ENUM_CONST, NULL, 0);
		;}
    break;

  case 128:

/* Line 1455 of yacc.c  */
#line 472 "scripts/genksyms/parse.y"
    {
			const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
			struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)]));
			add_symbol(name, SYM_ENUM_CONST, expr, 0);
		;}
    break;

  case 129:

/* Line 1455 of yacc.c  */
#line 479 "scripts/genksyms/parse.y"
    { (yyval) = (yyvsp[(2) - (2)]); ;}
    break;

  case 130:

/* Line 1455 of yacc.c  */
#line 483 "scripts/genksyms/parse.y"
2287
    { (yyval) = NULL; ;}
2288 2289
    break;

2290 2291 2292 2293
  case 132:

/* Line 1455 of yacc.c  */
#line 489 "scripts/genksyms/parse.y"
2294 2295
    { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
    break;
2296

Linus Torvalds's avatar
Linus Torvalds committed
2297

2298 2299 2300

/* Line 1455 of yacc.c  */
#line 2301 "scripts/genksyms/parse.c"
2301 2302 2303
      default: break;
    }
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2304

2305 2306
  YYPOPSTACK (yylen);
  yylen = 0;
2307
  YY_STACK_PRINT (yyss, yyssp);
Linus Torvalds's avatar
Linus Torvalds committed
2308 2309 2310

  *++yyvsp = yyval;

2311 2312 2313
  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */
Linus Torvalds's avatar
Linus Torvalds committed
2314 2315 2316

  yyn = yyr1[yyn];

2317 2318
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Linus Torvalds's avatar
Linus Torvalds committed
2319 2320
    yystate = yytable[yystate];
  else
2321
    yystate = yydefgoto[yyn - YYNTOKENS];
Linus Torvalds's avatar
Linus Torvalds committed
2322 2323 2324 2325

  goto yynewstate;


2326 2327 2328 2329 2330 2331
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
Linus Torvalds's avatar
Linus Torvalds committed
2332 2333
    {
      ++yynerrs;
2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349
#if ! YYERROR_VERBOSE
      yyerror (YY_("syntax error"));
#else
      {
	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
	  {
	    YYSIZE_T yyalloc = 2 * yysize;
	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
	    if (yymsg != yymsgbuf)
	      YYSTACK_FREE (yymsg);
	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
	    if (yymsg)
	      yymsg_alloc = yyalloc;
	    else
2350
	      {
2351 2352
		yymsg = yymsgbuf;
		yymsg_alloc = sizeof yymsgbuf;
2353
	      }
2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368
	  }

	if (0 < yysize && yysize <= yymsg_alloc)
	  {
	    (void) yysyntax_error (yymsg, yystate, yychar);
	    yyerror (yymsg);
	  }
	else
	  {
	    yyerror (YY_("syntax error"));
	    if (yysize != 0)
	      goto yyexhaustedlab;
	  }
      }
#endif
Linus Torvalds's avatar
Linus Torvalds committed
2369 2370
    }

2371

Linus Torvalds's avatar
Linus Torvalds committed
2372 2373 2374

  if (yyerrstatus == 3)
    {
2375
      /* If just tried and failed to reuse lookahead token after an
2376 2377 2378
	 error, discard it.  */

      if (yychar <= YYEOF)
2379 2380
	{
	  /* Return failure if at end of input.  */
2381
	  if (yychar == YYEOF)
2382 2383
	    YYABORT;
	}
2384 2385
      else
	{
2386 2387
	  yydestruct ("Error: discarding",
		      yytoken, &yylval);
2388 2389
	  yychar = YYEMPTY;
	}
Linus Torvalds's avatar
Linus Torvalds committed
2390 2391
    }

2392
  /* Else will try to reuse lookahead token after shifting the error
2393 2394
     token.  */
  goto yyerrlab1;
Linus Torvalds's avatar
Linus Torvalds committed
2395 2396


2397 2398 2399 2400
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:
Linus Torvalds's avatar
Linus Torvalds committed
2401

2402 2403 2404 2405
  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (/*CONSTCOND*/ 0)
2406
     goto yyerrorlab;
Linus Torvalds's avatar
Linus Torvalds committed
2407

2408 2409 2410 2411 2412
  /* Do not reclaim the symbols of the rule which action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
2413 2414 2415
  yystate = *yyssp;
  goto yyerrlab1;

Linus Torvalds's avatar
Linus Torvalds committed
2416

2417 2418 2419 2420 2421
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
Linus Torvalds's avatar
Linus Torvalds committed
2422

2423
  for (;;)
Linus Torvalds's avatar
Linus Torvalds committed
2424
    {
2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}
Linus Torvalds's avatar
Linus Torvalds committed
2436

2437 2438 2439
      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;
Linus Torvalds's avatar
Linus Torvalds committed
2440 2441


2442 2443 2444
      yydestruct ("Error: popping",
		  yystos[yystate], yyvsp);
      YYPOPSTACK (1);
2445 2446
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
Linus Torvalds's avatar
Linus Torvalds committed
2447 2448 2449
    }

  *++yyvsp = yylval;
2450 2451


2452
  /* Shift the error token.  */
2453
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
Linus Torvalds's avatar
Linus Torvalds committed
2454 2455 2456 2457

  yystate = yyn;
  goto yynewstate;

2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472

/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

2473
#if !defined(yyoverflow) || YYERROR_VERBOSE
2474 2475 2476 2477 2478
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here.  |
`-------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
2479 2480
  yyresult = 2;
  /* Fall through.  */
Linus Torvalds's avatar
Linus Torvalds committed
2481 2482
#endif

2483
yyreturn:
2484
  if (yychar != YYEMPTY)
2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496
     yydestruct ("Cleanup: discarding lookahead",
		 yytoken, &yylval);
  /* Do not reclaim the symbols of the rule which action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
		  yystos[*yyssp], yyvsp);
      YYPOPSTACK (1);
    }
2497 2498 2499
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
Linus Torvalds's avatar
Linus Torvalds committed
2500
#endif
2501 2502 2503 2504 2505 2506
#if YYERROR_VERBOSE
  if (yymsg != yymsgbuf)
    YYSTACK_FREE (yymsg);
#endif
  /* Make sure YYID is used.  */
  return YYID (yyresult);
Linus Torvalds's avatar
Linus Torvalds committed
2507
}
2508 2509


2510 2511 2512

/* Line 1675 of yacc.c  */
#line 493 "scripts/genksyms/parse.y"
Linus Torvalds's avatar
Linus Torvalds committed
2513 2514 2515 2516 2517 2518 2519


static void
yyerror(const char *e)
{
  error_with_pos("%s", e);
}
2520