提交 58ef81c5 编写于 作者: A Arnaud Lacombe

genksym: regen parser

Signed-off-by: NArnaud Lacombe <lacombar@gmail.com>
上级 880f4499
/* ANSI-C code produced by gperf version 3.0.4 */ /* ANSI-C code produced by gperf version 3.0.4 */
/* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ /* Command-line: gperf -t --output-file scripts/genksyms/keywords.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/genksyms/keywords.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif #endif
#line 1 "scripts/genksyms/keywords.gperf" #line 4 "scripts/genksyms/keywords.gperf"
struct resword; struct resword;
static const struct resword *is_reserved_word(register const char *str, register unsigned int len); static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
#line 5 "scripts/genksyms/keywords.gperf" #line 8 "scripts/genksyms/keywords.gperf"
struct resword { const char *name; int token; }; struct resword { const char *name; int token; };
/* maximum key range = 64, duplicates = 0 */ /* maximum key range = 64, duplicates = 0 */
...@@ -99,108 +99,108 @@ is_reserved_word (register const char *str, register unsigned int len) ...@@ -99,108 +99,108 @@ is_reserved_word (register const char *str, register unsigned int len)
static const struct resword wordlist[] = static const struct resword wordlist[] =
{ {
{""}, {""}, {""}, {""}, {""}, {""},
#line 30 "scripts/genksyms/keywords.gperf" #line 33 "scripts/genksyms/keywords.gperf"
{"asm", ASM_KEYW}, {"asm", ASM_KEYW},
{""}, {""},
#line 12 "scripts/genksyms/keywords.gperf" #line 15 "scripts/genksyms/keywords.gperf"
{"__asm", ASM_KEYW}, {"__asm", ASM_KEYW},
{""}, {""},
#line 13 "scripts/genksyms/keywords.gperf" #line 16 "scripts/genksyms/keywords.gperf"
{"__asm__", ASM_KEYW}, {"__asm__", ASM_KEYW},
{""}, {""}, {""}, {""},
#line 56 "scripts/genksyms/keywords.gperf" #line 59 "scripts/genksyms/keywords.gperf"
{"__typeof__", TYPEOF_KEYW}, {"__typeof__", TYPEOF_KEYW},
{""}, {""},
#line 16 "scripts/genksyms/keywords.gperf" #line 19 "scripts/genksyms/keywords.gperf"
{"__const", CONST_KEYW}, {"__const", CONST_KEYW},
#line 15 "scripts/genksyms/keywords.gperf" #line 18 "scripts/genksyms/keywords.gperf"
{"__attribute__", ATTRIBUTE_KEYW}, {"__attribute__", ATTRIBUTE_KEYW},
#line 17 "scripts/genksyms/keywords.gperf" #line 20 "scripts/genksyms/keywords.gperf"
{"__const__", CONST_KEYW}, {"__const__", CONST_KEYW},
#line 22 "scripts/genksyms/keywords.gperf" #line 25 "scripts/genksyms/keywords.gperf"
{"__signed__", SIGNED_KEYW}, {"__signed__", SIGNED_KEYW},
#line 48 "scripts/genksyms/keywords.gperf" #line 51 "scripts/genksyms/keywords.gperf"
{"static", STATIC_KEYW}, {"static", STATIC_KEYW},
{""}, {""},
#line 43 "scripts/genksyms/keywords.gperf" #line 46 "scripts/genksyms/keywords.gperf"
{"int", INT_KEYW}, {"int", INT_KEYW},
#line 36 "scripts/genksyms/keywords.gperf" #line 39 "scripts/genksyms/keywords.gperf"
{"char", CHAR_KEYW}, {"char", CHAR_KEYW},
#line 37 "scripts/genksyms/keywords.gperf" #line 40 "scripts/genksyms/keywords.gperf"
{"const", CONST_KEYW}, {"const", CONST_KEYW},
#line 49 "scripts/genksyms/keywords.gperf" #line 52 "scripts/genksyms/keywords.gperf"
{"struct", STRUCT_KEYW}, {"struct", STRUCT_KEYW},
#line 28 "scripts/genksyms/keywords.gperf" #line 31 "scripts/genksyms/keywords.gperf"
{"__restrict__", RESTRICT_KEYW}, {"__restrict__", RESTRICT_KEYW},
#line 29 "scripts/genksyms/keywords.gperf" #line 32 "scripts/genksyms/keywords.gperf"
{"restrict", RESTRICT_KEYW}, {"restrict", RESTRICT_KEYW},
#line 9 "scripts/genksyms/keywords.gperf" #line 12 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
#line 20 "scripts/genksyms/keywords.gperf" #line 23 "scripts/genksyms/keywords.gperf"
{"__inline__", INLINE_KEYW}, {"__inline__", INLINE_KEYW},
{""}, {""},
#line 24 "scripts/genksyms/keywords.gperf" #line 27 "scripts/genksyms/keywords.gperf"
{"__volatile__", VOLATILE_KEYW}, {"__volatile__", VOLATILE_KEYW},
#line 7 "scripts/genksyms/keywords.gperf" #line 10 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
#line 27 "scripts/genksyms/keywords.gperf" #line 30 "scripts/genksyms/keywords.gperf"
{"_restrict", RESTRICT_KEYW}, {"_restrict", RESTRICT_KEYW},
{""}, {""},
#line 14 "scripts/genksyms/keywords.gperf" #line 17 "scripts/genksyms/keywords.gperf"
{"__attribute", ATTRIBUTE_KEYW}, {"__attribute", ATTRIBUTE_KEYW},
#line 8 "scripts/genksyms/keywords.gperf" #line 11 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
#line 18 "scripts/genksyms/keywords.gperf" #line 21 "scripts/genksyms/keywords.gperf"
{"__extension__", EXTENSION_KEYW}, {"__extension__", EXTENSION_KEYW},
#line 39 "scripts/genksyms/keywords.gperf" #line 42 "scripts/genksyms/keywords.gperf"
{"enum", ENUM_KEYW}, {"enum", ENUM_KEYW},
#line 10 "scripts/genksyms/keywords.gperf" #line 13 "scripts/genksyms/keywords.gperf"
{"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW}, {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW},
#line 40 "scripts/genksyms/keywords.gperf" #line 43 "scripts/genksyms/keywords.gperf"
{"extern", EXTERN_KEYW}, {"extern", EXTERN_KEYW},
{""}, {""},
#line 21 "scripts/genksyms/keywords.gperf" #line 24 "scripts/genksyms/keywords.gperf"
{"__signed", SIGNED_KEYW}, {"__signed", SIGNED_KEYW},
#line 11 "scripts/genksyms/keywords.gperf" #line 14 "scripts/genksyms/keywords.gperf"
{"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
#line 51 "scripts/genksyms/keywords.gperf" #line 54 "scripts/genksyms/keywords.gperf"
{"union", UNION_KEYW}, {"union", UNION_KEYW},
#line 55 "scripts/genksyms/keywords.gperf" #line 58 "scripts/genksyms/keywords.gperf"
{"typeof", TYPEOF_KEYW}, {"typeof", TYPEOF_KEYW},
#line 50 "scripts/genksyms/keywords.gperf" #line 53 "scripts/genksyms/keywords.gperf"
{"typedef", TYPEDEF_KEYW}, {"typedef", TYPEDEF_KEYW},
#line 19 "scripts/genksyms/keywords.gperf" #line 22 "scripts/genksyms/keywords.gperf"
{"__inline", INLINE_KEYW}, {"__inline", INLINE_KEYW},
#line 35 "scripts/genksyms/keywords.gperf" #line 38 "scripts/genksyms/keywords.gperf"
{"auto", AUTO_KEYW}, {"auto", AUTO_KEYW},
#line 23 "scripts/genksyms/keywords.gperf" #line 26 "scripts/genksyms/keywords.gperf"
{"__volatile", VOLATILE_KEYW}, {"__volatile", VOLATILE_KEYW},
{""}, {""}, {""}, {""},
#line 52 "scripts/genksyms/keywords.gperf" #line 55 "scripts/genksyms/keywords.gperf"
{"unsigned", UNSIGNED_KEYW}, {"unsigned", UNSIGNED_KEYW},
{""}, {""},
#line 46 "scripts/genksyms/keywords.gperf" #line 49 "scripts/genksyms/keywords.gperf"
{"short", SHORT_KEYW}, {"short", SHORT_KEYW},
#line 42 "scripts/genksyms/keywords.gperf" #line 45 "scripts/genksyms/keywords.gperf"
{"inline", INLINE_KEYW}, {"inline", INLINE_KEYW},
{""}, {""},
#line 54 "scripts/genksyms/keywords.gperf" #line 57 "scripts/genksyms/keywords.gperf"
{"volatile", VOLATILE_KEYW}, {"volatile", VOLATILE_KEYW},
#line 44 "scripts/genksyms/keywords.gperf" #line 47 "scripts/genksyms/keywords.gperf"
{"long", LONG_KEYW}, {"long", LONG_KEYW},
#line 26 "scripts/genksyms/keywords.gperf" #line 29 "scripts/genksyms/keywords.gperf"
{"_Bool", BOOL_KEYW}, {"_Bool", BOOL_KEYW},
{""}, {""}, {""}, {""},
#line 45 "scripts/genksyms/keywords.gperf" #line 48 "scripts/genksyms/keywords.gperf"
{"register", REGISTER_KEYW}, {"register", REGISTER_KEYW},
#line 53 "scripts/genksyms/keywords.gperf" #line 56 "scripts/genksyms/keywords.gperf"
{"void", VOID_KEYW}, {"void", VOID_KEYW},
#line 41 "scripts/genksyms/keywords.gperf" #line 44 "scripts/genksyms/keywords.gperf"
{"float", FLOAT_KEYW}, {"float", FLOAT_KEYW},
#line 38 "scripts/genksyms/keywords.gperf" #line 41 "scripts/genksyms/keywords.gperf"
{"double", DOUBLE_KEYW}, {"double", DOUBLE_KEYW},
{""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
#line 47 "scripts/genksyms/keywords.gperf" #line 50 "scripts/genksyms/keywords.gperf"
{"signed", SIGNED_KEYW} {"signed", SIGNED_KEYW}
}; };
......
/* A Bison parser, made by GNU Bison 2.4.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C /* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
Free Software Foundation, Inc. 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -46,7 +45,7 @@ ...@@ -46,7 +45,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.4.1" #define YYBISON_VERSION "2.4.3"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
...@@ -67,8 +66,6 @@ ...@@ -67,8 +66,6 @@
/* Copy the first part of user declarations. */ /* Copy the first part of user declarations. */
/* Line 189 of yacc.c */
#line 24 "scripts/genksyms/parse.y"
#include <assert.h> #include <assert.h>
...@@ -101,8 +98,6 @@ remove_list(struct string_list **pb, struct string_list **pe) ...@@ -101,8 +98,6 @@ remove_list(struct string_list **pb, struct string_list **pe)
/* Line 189 of yacc.c */
#line 106 "scripts/genksyms/parse.c"
/* Enabling traces. */ /* Enabling traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
...@@ -186,8 +181,6 @@ typedef int YYSTYPE; ...@@ -186,8 +181,6 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 264 of yacc.c */
#line 191 "scripts/genksyms/parse.c"
#ifdef short #ifdef short
# undef short # undef short
...@@ -237,7 +230,7 @@ typedef short int yytype_int16; ...@@ -237,7 +230,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_ #ifndef YY_
# if YYENABLE_NLS # if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS # if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid) # define YY_(msgid) dgettext ("bison-runtime", msgid)
...@@ -855,9 +848,18 @@ static const yytype_uint8 yystos[] = ...@@ -855,9 +848,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily /* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC. to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */ Once GCC version 2 has supplanted version 1, this can go. However,
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
discussed. */
#define YYFAIL goto yyerrlab #define YYFAIL goto yyerrlab
#if defined YYFAIL
/* This is here to suppress warnings from the GCC cpp's
-Wunused-macros. Normally we don't worry about that warning, but
some users do, and we want to make it easy for users to remove
YYFAIL uses, which will produce warnings from Bison 2.5. */
#endif
#define YYRECOVERING() (!!yyerrstatus) #define YYRECOVERING() (!!yyerrstatus)
...@@ -914,7 +916,7 @@ while (YYID (0)) ...@@ -914,7 +916,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */ we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT #ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \ # define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \ fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \ (Loc).first_line, (Loc).first_column, \
...@@ -1653,64 +1655,46 @@ yyreduce: ...@@ -1653,64 +1655,46 @@ yyreduce:
{ {
case 4: case 4:
/* Line 1455 of yacc.c */
#line 109 "scripts/genksyms/parse.y"
{ is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;} { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
break; break;
case 5: case 5:
/* Line 1455 of yacc.c */
#line 111 "scripts/genksyms/parse.y"
{ free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;} { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
break; break;
case 6: case 6:
/* Line 1455 of yacc.c */
#line 115 "scripts/genksyms/parse.y"
{ is_typedef = 1; ;} { is_typedef = 1; ;}
break; break;
case 7: case 7:
/* Line 1455 of yacc.c */
#line 116 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 8: case 8:
/* Line 1455 of yacc.c */
#line 117 "scripts/genksyms/parse.y"
{ is_typedef = 1; ;} { is_typedef = 1; ;}
break; break;
case 9: case 9:
/* Line 1455 of yacc.c */
#line 118 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 14: case 14:
/* Line 1455 of yacc.c */
#line 123 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 15: case 15:
/* Line 1455 of yacc.c */
#line 124 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 16: case 16:
/* Line 1455 of yacc.c */
#line 129 "scripts/genksyms/parse.y"
{ if (current_name) { { if (current_name) {
struct string_list *decl = (*(yyvsp[(3) - (3)]))->next; struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
(*(yyvsp[(3) - (3)]))->next = NULL; (*(yyvsp[(3) - (3)]))->next = NULL;
...@@ -1725,15 +1709,11 @@ yyreduce: ...@@ -1725,15 +1709,11 @@ yyreduce:
case 17: case 17:
/* Line 1455 of yacc.c */
#line 142 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 19: case 19:
/* Line 1455 of yacc.c */
#line 148 "scripts/genksyms/parse.y"
{ struct string_list *decl = *(yyvsp[(1) - (1)]); { struct string_list *decl = *(yyvsp[(1) - (1)]);
*(yyvsp[(1) - (1)]) = NULL; *(yyvsp[(1) - (1)]) = NULL;
add_symbol(current_name, add_symbol(current_name,
...@@ -1745,8 +1725,6 @@ yyreduce: ...@@ -1745,8 +1725,6 @@ yyreduce:
case 20: case 20:
/* Line 1455 of yacc.c */
#line 156 "scripts/genksyms/parse.y"
{ struct string_list *decl = *(yyvsp[(3) - (3)]); { struct string_list *decl = *(yyvsp[(3) - (3)]);
*(yyvsp[(3) - (3)]) = NULL; *(yyvsp[(3) - (3)]) = NULL;
free_list(*(yyvsp[(2) - (3)]), NULL); free_list(*(yyvsp[(2) - (3)]), NULL);
...@@ -1760,36 +1738,26 @@ yyreduce: ...@@ -1760,36 +1738,26 @@ yyreduce:
case 21: case 21:
/* Line 1455 of yacc.c */
#line 169 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
break; break;
case 22: case 22:
/* Line 1455 of yacc.c */
#line 174 "scripts/genksyms/parse.y"
{ decl_spec = NULL; ;} { decl_spec = NULL; ;}
break; break;
case 24: case 24:
/* Line 1455 of yacc.c */
#line 179 "scripts/genksyms/parse.y"
{ decl_spec = *(yyvsp[(1) - (1)]); ;} { decl_spec = *(yyvsp[(1) - (1)]); ;}
break; break;
case 25: case 25:
/* Line 1455 of yacc.c */
#line 180 "scripts/genksyms/parse.y"
{ decl_spec = *(yyvsp[(2) - (2)]); ;} { decl_spec = *(yyvsp[(2) - (2)]); ;}
break; break;
case 26: case 26:
/* Line 1455 of yacc.c */
#line 185 "scripts/genksyms/parse.y"
{ /* Version 2 checksumming ignores storage class, as that { /* Version 2 checksumming ignores storage class, as that
is really irrelevant to the linkage. */ is really irrelevant to the linkage. */
remove_node((yyvsp[(1) - (1)])); remove_node((yyvsp[(1) - (1)]));
...@@ -1799,43 +1767,31 @@ yyreduce: ...@@ -1799,43 +1767,31 @@ yyreduce:
case 31: case 31:
/* Line 1455 of yacc.c */
#line 197 "scripts/genksyms/parse.y"
{ is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;} { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
break; break;
case 32: case 32:
/* Line 1455 of yacc.c */
#line 198 "scripts/genksyms/parse.y"
{ is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;} { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
break; break;
case 37: case 37:
/* Line 1455 of yacc.c */
#line 210 "scripts/genksyms/parse.y"
{ remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;} { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 38: case 38:
/* Line 1455 of yacc.c */
#line 212 "scripts/genksyms/parse.y"
{ remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;} { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 39: case 39:
/* Line 1455 of yacc.c */
#line 214 "scripts/genksyms/parse.y"
{ remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;} { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 40: case 40:
/* Line 1455 of yacc.c */
#line 218 "scripts/genksyms/parse.y"
{ struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
r = copy_node(i); r->tag = SYM_STRUCT; r = copy_node(i); r->tag = SYM_STRUCT;
r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
...@@ -1846,8 +1802,6 @@ yyreduce: ...@@ -1846,8 +1802,6 @@ yyreduce:
case 41: case 41:
/* Line 1455 of yacc.c */
#line 225 "scripts/genksyms/parse.y"
{ struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
r = copy_node(i); r->tag = SYM_UNION; r = copy_node(i); r->tag = SYM_UNION;
r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
...@@ -1858,8 +1812,6 @@ yyreduce: ...@@ -1858,8 +1812,6 @@ yyreduce:
case 42: case 42:
/* Line 1455 of yacc.c */
#line 232 "scripts/genksyms/parse.y"
{ struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
r = copy_node(i); r->tag = SYM_ENUM; r = copy_node(i); r->tag = SYM_ENUM;
r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
...@@ -1870,57 +1822,41 @@ yyreduce: ...@@ -1870,57 +1822,41 @@ yyreduce:
case 43: case 43:
/* Line 1455 of yacc.c */
#line 242 "scripts/genksyms/parse.y"
{ add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;} { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 44: case 44:
/* Line 1455 of yacc.c */
#line 244 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 45: case 45:
/* Line 1455 of yacc.c */
#line 245 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 56: case 56:
/* Line 1455 of yacc.c */
#line 259 "scripts/genksyms/parse.y"
{ (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;} { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
break; break;
case 57: case 57:
/* Line 1455 of yacc.c */
#line 264 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break; break;
case 58: case 58:
/* Line 1455 of yacc.c */
#line 268 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 61: case 61:
/* Line 1455 of yacc.c */
#line 274 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 65: case 65:
/* Line 1455 of yacc.c */
#line 280 "scripts/genksyms/parse.y"
{ /* restrict has no effect in prototypes so ignore it */ { /* restrict has no effect in prototypes so ignore it */
remove_node((yyvsp[(1) - (1)])); remove_node((yyvsp[(1) - (1)]));
(yyval) = (yyvsp[(1) - (1)]); (yyval) = (yyvsp[(1) - (1)]);
...@@ -1929,15 +1865,11 @@ yyreduce: ...@@ -1929,15 +1865,11 @@ yyreduce:
case 66: case 66:
/* Line 1455 of yacc.c */
#line 287 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 68: case 68:
/* Line 1455 of yacc.c */
#line 293 "scripts/genksyms/parse.y"
{ if (current_name != NULL) { { if (current_name != NULL) {
error_with_pos("unexpected second declaration name"); error_with_pos("unexpected second declaration name");
YYERROR; YYERROR;
...@@ -1950,134 +1882,96 @@ yyreduce: ...@@ -1950,134 +1882,96 @@ yyreduce:
case 69: case 69:
/* Line 1455 of yacc.c */
#line 302 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 70: case 70:
/* Line 1455 of yacc.c */
#line 304 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 71: case 71:
/* Line 1455 of yacc.c */
#line 306 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 72: case 72:
/* Line 1455 of yacc.c */
#line 308 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 73: case 73:
/* Line 1455 of yacc.c */
#line 310 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 74: case 74:
/* Line 1455 of yacc.c */
#line 316 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 78: case 78:
/* Line 1455 of yacc.c */
#line 324 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 79: case 79:
/* Line 1455 of yacc.c */
#line 326 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 80: case 80:
/* Line 1455 of yacc.c */
#line 328 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 81: case 81:
/* Line 1455 of yacc.c */
#line 330 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 82: case 82:
/* Line 1455 of yacc.c */
#line 332 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 83: case 83:
/* Line 1455 of yacc.c */
#line 336 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 85: case 85:
/* Line 1455 of yacc.c */
#line 338 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 86: case 86:
/* Line 1455 of yacc.c */
#line 342 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 89: case 89:
/* Line 1455 of yacc.c */
#line 349 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 90: case 90:
/* Line 1455 of yacc.c */
#line 354 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break; break;
case 91: case 91:
/* Line 1455 of yacc.c */
#line 359 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break; break;
case 93: case 93:
/* Line 1455 of yacc.c */
#line 364 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 94: case 94:
/* Line 1455 of yacc.c */
#line 366 "scripts/genksyms/parse.y"
{ /* For version 2 checksums, we don't want to remember { /* For version 2 checksums, we don't want to remember
private parameter names. */ private parameter names. */
remove_node((yyvsp[(1) - (1)])); remove_node((yyvsp[(1) - (1)]));
...@@ -2087,8 +1981,6 @@ yyreduce: ...@@ -2087,8 +1981,6 @@ yyreduce:
case 95: case 95:
/* Line 1455 of yacc.c */
#line 374 "scripts/genksyms/parse.y"
{ remove_node((yyvsp[(1) - (1)])); { remove_node((yyvsp[(1) - (1)]));
(yyval) = (yyvsp[(1) - (1)]); (yyval) = (yyvsp[(1) - (1)]);
;} ;}
...@@ -2096,43 +1988,31 @@ yyreduce: ...@@ -2096,43 +1988,31 @@ yyreduce:
case 96: case 96:
/* Line 1455 of yacc.c */
#line 378 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 97: case 97:
/* Line 1455 of yacc.c */
#line 380 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 98: case 98:
/* Line 1455 of yacc.c */
#line 382 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 99: case 99:
/* Line 1455 of yacc.c */
#line 384 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 100: case 100:
/* Line 1455 of yacc.c */
#line 386 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 101: case 101:
/* Line 1455 of yacc.c */
#line 391 "scripts/genksyms/parse.y"
{ struct string_list *decl = *(yyvsp[(2) - (3)]); { struct string_list *decl = *(yyvsp[(2) - (3)]);
*(yyvsp[(2) - (3)]) = NULL; *(yyvsp[(2) - (3)]) = NULL;
add_symbol(current_name, SYM_NORMAL, decl, is_extern); add_symbol(current_name, SYM_NORMAL, decl, is_extern);
...@@ -2142,120 +2022,86 @@ yyreduce: ...@@ -2142,120 +2022,86 @@ yyreduce:
case 102: case 102:
/* Line 1455 of yacc.c */
#line 399 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 104: case 104:
/* Line 1455 of yacc.c */
#line 406 "scripts/genksyms/parse.y"
{ remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;} { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 105: case 105:
/* Line 1455 of yacc.c */
#line 410 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 106: case 106:
/* Line 1455 of yacc.c */
#line 411 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 107: case 107:
/* Line 1455 of yacc.c */
#line 415 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 110: case 110:
/* Line 1455 of yacc.c */
#line 421 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 111: case 111:
/* Line 1455 of yacc.c */
#line 426 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 112: case 112:
/* Line 1455 of yacc.c */
#line 428 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 113: case 113:
/* Line 1455 of yacc.c */
#line 432 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 116: case 116:
/* Line 1455 of yacc.c */
#line 438 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 117: case 117:
/* Line 1455 of yacc.c */
#line 442 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break; break;
case 118: case 118:
/* Line 1455 of yacc.c */
#line 443 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 120: case 120:
/* Line 1455 of yacc.c */
#line 448 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 121: case 121:
/* Line 1455 of yacc.c */
#line 452 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 123: case 123:
/* Line 1455 of yacc.c */
#line 457 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;} { (yyval) = (yyvsp[(3) - (3)]); ;}
break; break;
case 124: case 124:
/* Line 1455 of yacc.c */
#line 458 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;} { (yyval) = (yyvsp[(4) - (4)]); ;}
break; break;
case 127: case 127:
/* Line 1455 of yacc.c */
#line 467 "scripts/genksyms/parse.y"
{ {
const char *name = strdup((*(yyvsp[(1) - (1)]))->string); const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
add_symbol(name, SYM_ENUM_CONST, NULL, 0); add_symbol(name, SYM_ENUM_CONST, NULL, 0);
...@@ -2264,8 +2110,6 @@ yyreduce: ...@@ -2264,8 +2110,6 @@ yyreduce:
case 128: case 128:
/* Line 1455 of yacc.c */
#line 472 "scripts/genksyms/parse.y"
{ {
const char *name = strdup((*(yyvsp[(1) - (3)]))->string); const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)])); struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)]));
...@@ -2275,29 +2119,21 @@ yyreduce: ...@@ -2275,29 +2119,21 @@ yyreduce:
case 129: case 129:
/* Line 1455 of yacc.c */
#line 479 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;} { (yyval) = (yyvsp[(2) - (2)]); ;}
break; break;
case 130: case 130:
/* Line 1455 of yacc.c */
#line 483 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;} { (yyval) = NULL; ;}
break; break;
case 132: case 132:
/* Line 1455 of yacc.c */
#line 489 "scripts/genksyms/parse.y"
{ export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;} { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
break; break;
/* Line 1455 of yacc.c */
#line 2301 "scripts/genksyms/parse.c"
default: break; default: break;
} }
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
...@@ -2508,8 +2344,6 @@ yyreturn: ...@@ -2508,8 +2344,6 @@ yyreturn:
/* Line 1675 of yacc.c */
#line 493 "scripts/genksyms/parse.y"
static void static void
......
/* A Bison parser, made by GNU Bison 2.4.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C /* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
Free Software Foundation, Inc. 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册