diff options
| author | Michal Marek <mmarek@suse.cz> | 2011-10-11 06:07:05 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2011-10-11 06:07:05 -0400 |
| commit | 0359de7dd501f694f01b61364c9b633eab41f494 (patch) | |
| tree | 9c52b92a50c413a7453a8861fcf17d54f3214682 /scripts/genksyms | |
| parent | 2c5925d6b7fedc8f1c325f4f85451f505ec69aca (diff) | |
genksyms: Regenerate lexer and parser
Diffstat (limited to 'scripts/genksyms')
| -rw-r--r-- | scripts/genksyms/lex.lex.c_shipped | 12 | ||||
| -rw-r--r-- | scripts/genksyms/parse.tab.c_shipped | 645 | ||||
| -rw-r--r-- | scripts/genksyms/parse.tab.h_shipped | 7 |
3 files changed, 358 insertions, 306 deletions
diff --git a/scripts/genksyms/lex.lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped index c83cf60410be..0bf4157e6161 100644 --- a/scripts/genksyms/lex.lex.c_shipped +++ b/scripts/genksyms/lex.lex.c_shipped | |||
| @@ -660,7 +660,7 @@ static int input (void ); | |||
| 660 | /* This used to be an fputs(), but since the string might contain NUL's, | 660 | /* This used to be an fputs(), but since the string might contain NUL's, |
| 661 | * we now use fwrite(). | 661 | * we now use fwrite(). |
| 662 | */ | 662 | */ |
| 663 | #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) | 663 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) |
| 664 | #endif | 664 | #endif |
| 665 | 665 | ||
| 666 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 666 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
| @@ -671,7 +671,7 @@ static int input (void ); | |||
| 671 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ | 671 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
| 672 | { \ | 672 | { \ |
| 673 | int c = '*'; \ | 673 | int c = '*'; \ |
| 674 | unsigned n; \ | 674 | int n; \ |
| 675 | for ( n = 0; n < max_size && \ | 675 | for ( n = 0; n < max_size && \ |
| 676 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ | 676 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
| 677 | buf[n] = (char) c; \ | 677 | buf[n] = (char) c; \ |
| @@ -1926,6 +1926,7 @@ void yyfree (void * ptr ) | |||
| 1926 | cur_node->tag = \ | 1926 | cur_node->tag = \ |
| 1927 | find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\ | 1927 | find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\ |
| 1928 | SYM_ENUM_CONST : SYM_NORMAL ; \ | 1928 | SYM_ENUM_CONST : SYM_NORMAL ; \ |
| 1929 | cur_node->in_source_file = in_source_file; \ | ||
| 1929 | } while (0) | 1930 | } while (0) |
| 1930 | 1931 | ||
| 1931 | #define APP _APP(yytext, yyleng) | 1932 | #define APP _APP(yytext, yyleng) |
| @@ -1975,6 +1976,13 @@ repeat: | |||
| 1975 | cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1); | 1976 | cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1); |
| 1976 | cur_line = atoi(yytext+2); | 1977 | cur_line = atoi(yytext+2); |
| 1977 | 1978 | ||
| 1979 | if (!source_file) { | ||
| 1980 | source_file = xstrdup(cur_filename); | ||
| 1981 | in_source_file = 1; | ||
| 1982 | } else { | ||
| 1983 | in_source_file = (strcmp(cur_filename, source_file) == 0); | ||
| 1984 | } | ||
| 1985 | |||
| 1978 | goto repeat; | 1986 | goto repeat; |
| 1979 | } | 1987 | } |
| 1980 | 1988 | ||
diff --git a/scripts/genksyms/parse.tab.c_shipped b/scripts/genksyms/parse.tab.c_shipped index 61d4a5d09856..ece53c79bb59 100644 --- a/scripts/genksyms/parse.tab.c_shipped +++ b/scripts/genksyms/parse.tab.c_shipped | |||
| @@ -1,9 +1,8 @@ | |||
| 1 | /* A Bison parser, made by GNU Bison 2.4.3. */ | 1 | /* A Bison parser, made by GNU Bison 2.5. */ |
| 2 | 2 | ||
| 3 | /* Skeleton implementation for Bison's Yacc-like parsers in C | 3 | /* Bison implementation for Yacc-like parsers in C |
| 4 | 4 | ||
| 5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 5 | Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. |
| 6 | 2009, 2010 Free Software Foundation, Inc. | ||
| 7 | 6 | ||
| 8 | This program is free software: you can redistribute it and/or modify | 7 | This program is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
| @@ -45,7 +44,7 @@ | |||
| 45 | #define YYBISON 1 | 44 | #define YYBISON 1 |
| 46 | 45 | ||
| 47 | /* Bison version. */ | 46 | /* Bison version. */ |
| 48 | #define YYBISON_VERSION "2.4.3" | 47 | #define YYBISON_VERSION "2.5" |
| 49 | 48 | ||
| 50 | /* Skeleton name. */ | 49 | /* Skeleton name. */ |
| 51 | #define YYSKELETON_NAME "yacc.c" | 50 | #define YYSKELETON_NAME "yacc.c" |
| @@ -96,6 +95,25 @@ remove_list(struct string_list **pb, struct string_list **pe) | |||
| 96 | free_list(b, e); | 95 | free_list(b, e); |
| 97 | } | 96 | } |
| 98 | 97 | ||
| 98 | /* Record definition of a struct/union/enum */ | ||
| 99 | static void record_compound(struct string_list **keyw, | ||
| 100 | struct string_list **ident, | ||
| 101 | struct string_list **body, | ||
| 102 | enum symbol_type type) | ||
| 103 | { | ||
| 104 | struct string_list *b = *body, *i = *ident, *r; | ||
| 105 | |||
| 106 | if (i->in_source_file) { | ||
| 107 | remove_node(keyw); | ||
| 108 | (*ident)->tag = type; | ||
| 109 | remove_list(body, ident); | ||
| 110 | return; | ||
| 111 | } | ||
| 112 | r = copy_node(i); r->tag = type; | ||
| 113 | r->next = (*keyw)->next; *body = r; (*keyw)->next = NULL; | ||
| 114 | add_symbol(i->string, type, b, is_extern); | ||
| 115 | } | ||
| 116 | |||
| 99 | 117 | ||
| 100 | 118 | ||
| 101 | 119 | ||
| @@ -283,11 +301,11 @@ YYID (yyi) | |||
| 283 | # define alloca _alloca | 301 | # define alloca _alloca |
| 284 | # else | 302 | # else |
| 285 | # define YYSTACK_ALLOC alloca | 303 | # define YYSTACK_ALLOC alloca |
| 286 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 304 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
| 287 | || defined __cplusplus || defined _MSC_VER) | 305 | || defined __cplusplus || defined _MSC_VER) |
| 288 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | 306 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 289 | # ifndef _STDLIB_H | 307 | # ifndef EXIT_SUCCESS |
| 290 | # define _STDLIB_H 1 | 308 | # define EXIT_SUCCESS 0 |
| 291 | # endif | 309 | # endif |
| 292 | # endif | 310 | # endif |
| 293 | # endif | 311 | # endif |
| @@ -310,24 +328,24 @@ YYID (yyi) | |||
| 310 | # ifndef YYSTACK_ALLOC_MAXIMUM | 328 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 311 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | 329 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 312 | # endif | 330 | # endif |
| 313 | # if (defined __cplusplus && ! defined _STDLIB_H \ | 331 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
| 314 | && ! ((defined YYMALLOC || defined malloc) \ | 332 | && ! ((defined YYMALLOC || defined malloc) \ |
| 315 | && (defined YYFREE || defined free))) | 333 | && (defined YYFREE || defined free))) |
| 316 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | 334 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 317 | # ifndef _STDLIB_H | 335 | # ifndef EXIT_SUCCESS |
| 318 | # define _STDLIB_H 1 | 336 | # define EXIT_SUCCESS 0 |
| 319 | # endif | 337 | # endif |
| 320 | # endif | 338 | # endif |
| 321 | # ifndef YYMALLOC | 339 | # ifndef YYMALLOC |
| 322 | # define YYMALLOC malloc | 340 | # define YYMALLOC malloc |
| 323 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 341 | # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
| 324 | || defined __cplusplus || defined _MSC_VER) | 342 | || defined __cplusplus || defined _MSC_VER) |
| 325 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | 343 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 326 | # endif | 344 | # endif |
| 327 | # endif | 345 | # endif |
| 328 | # ifndef YYFREE | 346 | # ifndef YYFREE |
| 329 | # define YYFREE free | 347 | # define YYFREE free |
| 330 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 348 | # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
| 331 | || defined __cplusplus || defined _MSC_VER) | 349 | || defined __cplusplus || defined _MSC_VER) |
| 332 | void free (void *); /* INFRINGES ON USER NAME SPACE */ | 350 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 333 | # endif | 351 | # endif |
| @@ -356,23 +374,7 @@ union yyalloc | |||
| 356 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ | 374 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 357 | + YYSTACK_GAP_MAXIMUM) | 375 | + YYSTACK_GAP_MAXIMUM) |
| 358 | 376 | ||
| 359 | /* Copy COUNT objects from FROM to TO. The source and destination do | 377 | # define YYCOPY_NEEDED 1 |
| 360 | not overlap. */ | ||
| 361 | # ifndef YYCOPY | ||
| 362 | # if defined __GNUC__ && 1 < __GNUC__ | ||
| 363 | # define YYCOPY(To, From, Count) \ | ||
| 364 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | ||
| 365 | # else | ||
| 366 | # define YYCOPY(To, From, Count) \ | ||
| 367 | do \< | ||
