Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2f76b358
Commit
2f76b358
authored
May 23, 2011
by
Arnaud Lacombe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kconfig: regen parser
Signed-off-by:
Arnaud Lacombe
<
lacombar@gmail.com
>
parent
378dbb2c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
200 additions
and
173 deletions
+200
-173
scripts/kconfig/Makefile
scripts/kconfig/Makefile
+3
-3
scripts/kconfig/zconf.hash.c_shipped
scripts/kconfig/zconf.hash.c_shipped
+157
-116
scripts/kconfig/zconf.lex.c_shipped
scripts/kconfig/zconf.lex.c_shipped
+6
-20
scripts/kconfig/zconf.tab.c_shipped
scripts/kconfig/zconf.tab.c_shipped
+34
-34
No files found.
scripts/kconfig/Makefile
View file @
2f76b358
...
@@ -204,7 +204,7 @@ ifeq ($(gconf-target),1)
...
@@ -204,7 +204,7 @@ ifeq ($(gconf-target),1)
endif
endif
clean-files
:=
lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
clean-files
:=
lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
clean-files
+=
zconf.tab.c
lex.zconf
.c zconf.hash.c gconf.glade.h
clean-files
+=
zconf.tab.c
zconf.lex
.c zconf.hash.c gconf.glade.h
clean-files
+=
mconf qconf gconf nconf
clean-files
+=
mconf qconf gconf nconf
clean-files
+=
config.pot linux.pot
clean-files
+=
config.pot linux.pot
...
@@ -220,7 +220,7 @@ always := dochecklxdialog
...
@@ -220,7 +220,7 @@ always := dochecklxdialog
HOST_EXTRACFLAGS
+=
$(
shell
$(CONFIG_SHELL)
$(srctree)
/
$(src)
/check.sh
$(HOSTCC)
$(HOSTCFLAGS)
)
HOST_EXTRACFLAGS
+=
$(
shell
$(CONFIG_SHELL)
$(srctree)
/
$(src)
/check.sh
$(HOSTCC)
$(HOSTCFLAGS)
)
# generated files seem to need this to find local include files
# generated files seem to need this to find local include files
HOSTCFLAGS_
lex.zconf
.o
:=
-I
$(src)
HOSTCFLAGS_
zconf.lex
.o
:=
-I
$(src)
HOSTCFLAGS_zconf.tab.o
:=
-I
$(src)
HOSTCFLAGS_zconf.tab.o
:=
-I
$(src)
LEX_PREFIX_zconf
:=
zconf
LEX_PREFIX_zconf
:=
zconf
...
@@ -319,7 +319,7 @@ $(obj)/.tmp_gtkcheck:
...
@@ -319,7 +319,7 @@ $(obj)/.tmp_gtkcheck:
fi
fi
endif
endif
$(obj)/zconf.tab.o
:
$(obj)/
lex.zconf
.c $(obj)/zconf.hash.c
$(obj)/zconf.tab.o
:
$(obj)/
zconf.lex
.c $(obj)/zconf.hash.c
$(obj)/kconfig_load.o
:
$(obj)/lkc_defs.h
$(obj)/kconfig_load.o
:
$(obj)/lkc_defs.h
...
...
scripts/kconfig/zconf.hash.c_shipped
View file @
2f76b358
This diff is collapsed.
Click to expand it.
scripts/kconfig/
lex.zconf
.c_shipped
→
scripts/kconfig/
zconf.lex
.c_shipped
View file @
2f76b358
#line 3 "scripts/kconfig/
lex.zconf.c
"
#line 3 "scripts/kconfig/
zconf.lex.c_shipped
"
#define YY_INT_ALIGNED short int
#define YY_INT_ALIGNED short int
...
@@ -72,6 +72,7 @@ typedef int flex_int32_t;
...
@@ -72,6 +72,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
/* Limits of integral types. */
/* Limits of integral types. */
#ifndef INT8_MIN
#ifndef INT8_MIN
...
@@ -102,8 +103,6 @@ typedef unsigned int flex_uint32_t;
...
@@ -102,8 +103,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#define UINT32_MAX (4294967295U)
#endif
#endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
#ifdef __cplusplus
...
@@ -160,15 +159,7 @@ typedef unsigned int flex_uint32_t;
...
@@ -160,15 +159,7 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
/* The state buf must be large enough to hold one state per character in the main buffer.
...
@@ -922,12 +913,7 @@ static int input (void );
...
@@ -922,12 +913,7 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif
#endif
/* Copy whatever the last rule matched to the standard output. */
/* Copy whatever the last rule matched to the standard output. */
...
@@ -1100,7 +1086,7 @@ YY_RULE_SETUP
...
@@ -1100,7 +1086,7 @@ YY_RULE_SETUP
case 6:
case 6:
YY_RULE_SETUP
YY_RULE_SETUP
{
{
struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
const
struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
BEGIN(PARAM);
BEGIN(PARAM);
current_pos.file = current_file;
current_pos.file = current_file;
current_pos.lineno = current_file->lineno;
current_pos.lineno = current_file->lineno;
...
@@ -1175,7 +1161,7 @@ YY_RULE_SETUP
...
@@ -1175,7 +1161,7 @@ YY_RULE_SETUP
case 19:
case 19:
YY_RULE_SETUP
YY_RULE_SETUP
{
{
struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
const
struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
if (id && id->flags & TF_PARAM) {
if (id && id->flags & TF_PARAM) {
zconflval.id = id;
zconflval.id = id;
return id->token;
return id->token;
...
@@ -2073,8 +2059,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
...
@@ -2073,8 +2059,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
* scan from a @e copy of @a bytes.
* scan from a @e copy of @a bytes.
* @param
yy
bytes the byte buffer to scan
* @param bytes the byte buffer to scan
* @param
_yybytes_
len the number of bytes in the buffer pointed to by @a bytes.
* @param len the number of bytes in the buffer pointed to by @a bytes.
*
*
* @return the newly allocated buffer state object.
* @return the newly allocated buffer state object.
*/
*/
...
...
scripts/kconfig/zconf.tab.c_shipped
View file @
2f76b358
/* 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"
...
@@ -102,22 +101,18 @@ extern int zconflex(void);
...
@@ -102,22 +101,18 @@ extern int zconflex(void);
static void zconfprint(const char *err, ...);
static void zconfprint(const char *err, ...);
static void zconf_error(const char *err, ...);
static void zconf_error(const char *err, ...);
static void zconferror(const char *err);
static void zconferror(const char *err);
static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
static bool zconf_endtoken(
const
struct kconf_id *id, int starttoken, int endtoken);
struct symbol *symbol_hash[SYMBOL_HASHSIZE];
struct symbol *symbol_hash[SYMBOL_HASHSIZE];
static struct menu *current_menu, *current_entry;
static struct menu *current_menu, *current_entry;
#define YYDEBUG 0
#if YYDEBUG
#define YYERROR_VERBOSE
#endif
/* Enabling traces. */
/* Enabling traces. */
#ifndef YYDEBUG
#ifndef YYDEBUG
# define YYDEBUG
0
# define YYDEBUG
1
#endif
#endif
/* Enabling verbose error messages. */
/* Enabling verbose error messages. */
...
@@ -188,7 +183,7 @@ typedef union YYSTYPE
...
@@ -188,7 +183,7 @@ typedef union YYSTYPE
struct symbol *symbol;
struct symbol *symbol;
struct expr *expr;
struct expr *expr;
struct menu *menu;
struct menu *menu;
struct kconf_id *id;
const
struct kconf_id *id;
...
@@ -255,7 +250,7 @@ typedef short int yytype_int16;
...
@@ -255,7 +250,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)
...
@@ -535,18 +530,18 @@ static const yytype_int8 yyrhs[] =
...
@@ -535,18 +530,18 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
static const yytype_uint16 yyrline[] =
{
{
0, 10
8, 108, 108, 110, 110, 112, 114, 115, 116
,
0, 10
4, 104, 104, 106, 106, 108, 110, 111, 112
,
11
7, 118, 119, 123, 127, 127, 127, 127, 127, 127
,
11
3, 114, 115, 119, 123, 123, 123, 123, 123, 123
,
12
7, 127, 131, 132, 133, 134, 135, 136, 140, 141
,
12
3, 123, 127, 128, 129, 130, 131, 132, 136, 137
,
14
7, 155, 161, 169, 179, 181, 182, 183, 184, 185
,
14
3, 151, 157, 165, 175, 177, 178, 179, 180, 181
,
18
6, 189, 197, 203, 213, 219, 225, 228, 230, 241
,
18
2, 185, 193, 199, 209, 215, 221, 224, 226, 237
,
2
42, 247, 256, 261, 269, 272, 274, 275, 276, 277
,
2
38, 243, 252, 257, 265, 268, 270, 271, 272, 273
,
27
8, 281, 287, 298, 304, 314, 316, 321, 329, 337
,
27
4, 277, 283, 294, 300, 310, 312, 317, 325, 333
,
3
40, 342, 343, 344, 349, 356, 363, 368, 376, 379
,
3
36, 338, 339, 340, 345, 352, 359, 364, 372, 375
,
3
81, 382, 383, 386, 394, 401, 408, 414, 421, 423
,
3
77, 378, 379, 382, 390, 397, 404, 410, 417, 419
,
42
4, 425, 428, 436, 438, 439, 442, 449, 451, 456
,
42
0, 421, 424, 432, 434, 435, 438, 445, 447, 452
,
45
7, 460, 461, 462, 466, 467, 470, 471, 474, 475
,
45
3, 456, 457, 458, 462, 463, 466, 467, 470, 471
,
47
6, 477, 478, 479, 480, 483, 484, 487, 488
47
2, 473, 474, 475, 476, 479, 480, 483, 484
};
};
#endif
#endif
...
@@ -806,9 +801,18 @@ static const yytype_uint8 yystos[] =
...
@@ -806,9 +801,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)
...
@@ -865,7 +869,7 @@ while (YYID (0))
...
@@ -865,7 +869,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, \
...
@@ -1753,7 +1757,7 @@ yyreduce:
...
@@ -1753,7 +1757,7 @@ yyreduce:
case 48:
case 48:
{
{
struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
const
struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
if (id && id->flags & TF_OPTION)
if (id && id->flags & TF_OPTION)
menu_add_option(id->token, (yyvsp[(3) - (3)].string));
menu_add_option(id->token, (yyvsp[(3) - (3)].string));
else
else
...
@@ -2258,10 +2262,8 @@ void conf_parse(const char *name)
...
@@ -2258,10 +2262,8 @@ void conf_parse(const char *name)
modules_sym->flags |= SYMBOL_AUTO;
modules_sym->flags |= SYMBOL_AUTO;
rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
#if YYDEBUG
if (getenv("ZCONF_DEBUG"))
if (getenv("ZCONF_DEBUG"))
zconfdebug = 1;
zconfdebug = 1;
#endif
zconfparse();
zconfparse();
if (zconfnerrs)
if (zconfnerrs)
exit(1);
exit(1);
...
@@ -2300,7 +2302,7 @@ static const char *zconf_tokenname(int token)
...
@@ -2300,7 +2302,7 @@ static const char *zconf_tokenname(int token)
return "<token>";
return "<token>";
}
}
static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
static bool zconf_endtoken(
const
struct kconf_id *id, int starttoken, int endtoken)
{
{
if (id->token != endtoken) {
if (id->token != endtoken) {
zconf_error("unexpected '%s' within %s block",
zconf_error("unexpected '%s' within %s block",
...
@@ -2345,9 +2347,7 @@ static void zconf_error(const char *err, ...)
...
@@ -2345,9 +2347,7 @@ static void zconf_error(const char *err, ...)
static void zconferror(const char *err)
static void zconferror(const char *err)
{
{
#if YYDEBUG
fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
#endif
}
}
static void print_quoted_string(FILE *out, const char *str)
static void print_quoted_string(FILE *out, const char *str)
...
@@ -2496,7 +2496,7 @@ void zconfdump(FILE *out)
...
@@ -2496,7 +2496,7 @@ void zconfdump(FILE *out)
}
}
}
}
#include "
lex.zconf
.c"
#include "
zconf.lex
.c"
#include "util.c"
#include "util.c"
#include "confdata.c"
#include "confdata.c"
#include "expr.c"
#include "expr.c"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment