* [RFCv2 05/13] genksym: regen parser
2011-05-23 8:10 [RFCv2 00/13] Kbuild: factor parser rules Arnaud Lacombe
` (3 preceding siblings ...)
2011-05-23 8:10 ` [RFCv2 04/13] genksyms: migrate parser to implicit rules Arnaud Lacombe
@ 2011-05-23 8:10 ` Arnaud Lacombe
2011-05-23 8:10 ` [RFCv2 06/13] kconfig: constify `kconf_id_lookup' Arnaud Lacombe
` (10 subsequent siblings)
15 siblings, 0 replies; 32+ messages in thread
From: Arnaud Lacombe @ 2011-05-23 8:10 UTC (permalink / raw)
To: linux-kbuild; +Cc: Michal Marek, Arnaud Lacombe
---
...{keywords.c_shipped => keywords.hash.c_shipped} | 96 +++---
.../genksyms/{lex.c_shipped => lex.lex.c_shipped} | 360 +-------------------
scripts/genksyms/parse.h_shipped | 97 ------
.../{parse.c_shipped => parse.tab.c_shipped} | 200 +----------
4 files changed, 72 insertions(+), 681 deletions(-)
rename scripts/genksyms/{keywords.c_shipped => keywords.hash.c_shipped} (94%)
rename scripts/genksyms/{lex.c_shipped => lex.lex.c_shipped} (89%)
delete mode 100644 scripts/genksyms/parse.h_shipped
rename scripts/genksyms/{parse.c_shipped => parse.tab.c_shipped} (92%)
diff --git a/scripts/genksyms/keywords.c_shipped b/scripts/genksyms/keywords.hash.c_shipped
similarity index 94%
rename from scripts/genksyms/keywords.c_shipped
rename to scripts/genksyms/keywords.hash.c_shipped
index 8060e06..8206260 100644
--- a/scripts/genksyms/keywords.c_shipped
+++ b/scripts/genksyms/keywords.hash.c_shipped
@@ -1,5 +1,5 @@
/* 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) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -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>."
#endif
-#line 1 "scripts/genksyms/keywords.gperf"
+#line 4 "scripts/genksyms/keywords.gperf"
struct resword;
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; };
/* maximum key range = 64, duplicates = 0 */
@@ -99,108 +99,108 @@ is_reserved_word (register const char *str, register unsigned int len)
static const struct resword wordlist[] =
{
{""}, {""}, {""},
-#line 30 "scripts/genksyms/keywords.gperf"
+#line 33 "scripts/genksyms/keywords.gperf"
{"asm", ASM_KEYW},
{""},
-#line 12 "scripts/genksyms/keywords.gperf"
+#line 15 "scripts/genksyms/keywords.gperf"
{"__asm", ASM_KEYW},
{""},
-#line 13 "scripts/genksyms/keywords.gperf"
+#line 16 "scripts/genksyms/keywords.gperf"
{"__asm__", ASM_KEYW},
{""}, {""},
-#line 56 "scripts/genksyms/keywords.gperf"
+#line 59 "scripts/genksyms/keywords.gperf"
{"__typeof__", TYPEOF_KEYW},
{""},
-#line 16 "scripts/genksyms/keywords.gperf"
+#line 19 "scripts/genksyms/keywords.gperf"
{"__const", CONST_KEYW},
-#line 15 "scripts/genksyms/keywords.gperf"
+#line 18 "scripts/genksyms/keywords.gperf"
{"__attribute__", ATTRIBUTE_KEYW},
-#line 17 "scripts/genksyms/keywords.gperf"
+#line 20 "scripts/genksyms/keywords.gperf"
{"__const__", CONST_KEYW},
-#line 22 "scripts/genksyms/keywords.gperf"
+#line 25 "scripts/genksyms/keywords.gperf"
{"__signed__", SIGNED_KEYW},
-#line 48 "scripts/genksyms/keywords.gperf"
+#line 51 "scripts/genksyms/keywords.gperf"
{"static", STATIC_KEYW},
{""},
-#line 43 "scripts/genksyms/keywords.gperf"
+#line 46 "scripts/genksyms/keywords.gperf"
{"int", INT_KEYW},
-#line 36 "scripts/genksyms/keywords.gperf"
+#line 39 "scripts/genksyms/keywords.gperf"
{"char", CHAR_KEYW},
-#line 37 "scripts/genksyms/keywords.gperf"
+#line 40 "scripts/genksyms/keywords.gperf"
{"const", CONST_KEYW},
-#line 49 "scripts/genksyms/keywords.gperf"
+#line 52 "scripts/genksyms/keywords.gperf"
{"struct", STRUCT_KEYW},
-#line 28 "scripts/genksyms/keywords.gperf"
+#line 31 "scripts/genksyms/keywords.gperf"
{"__restrict__", RESTRICT_KEYW},
-#line 29 "scripts/genksyms/keywords.gperf"
+#line 32 "scripts/genksyms/keywords.gperf"
{"restrict", RESTRICT_KEYW},
-#line 9 "scripts/genksyms/keywords.gperf"
+#line 12 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
-#line 20 "scripts/genksyms/keywords.gperf"
+#line 23 "scripts/genksyms/keywords.gperf"
{"__inline__", INLINE_KEYW},
{""},
-#line 24 "scripts/genksyms/keywords.gperf"
+#line 27 "scripts/genksyms/keywords.gperf"
{"__volatile__", VOLATILE_KEYW},
-#line 7 "scripts/genksyms/keywords.gperf"
+#line 10 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
-#line 27 "scripts/genksyms/keywords.gperf"
+#line 30 "scripts/genksyms/keywords.gperf"
{"_restrict", RESTRICT_KEYW},
{""},
-#line 14 "scripts/genksyms/keywords.gperf"
+#line 17 "scripts/genksyms/keywords.gperf"
{"__attribute", ATTRIBUTE_KEYW},
-#line 8 "scripts/genksyms/keywords.gperf"
+#line 11 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
-#line 18 "scripts/genksyms/keywords.gperf"
+#line 21 "scripts/genksyms/keywords.gperf"
{"__extension__", EXTENSION_KEYW},
-#line 39 "scripts/genksyms/keywords.gperf"
+#line 42 "scripts/genksyms/keywords.gperf"
{"enum", ENUM_KEYW},
-#line 10 "scripts/genksyms/keywords.gperf"
+#line 13 "scripts/genksyms/keywords.gperf"
{"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW},
-#line 40 "scripts/genksyms/keywords.gperf"
+#line 43 "scripts/genksyms/keywords.gperf"
{"extern", EXTERN_KEYW},
{""},
-#line 21 "scripts/genksyms/keywords.gperf"
+#line 24 "scripts/genksyms/keywords.gperf"
{"__signed", SIGNED_KEYW},
-#line 11 "scripts/genksyms/keywords.gperf"
+#line 14 "scripts/genksyms/keywords.gperf"
{"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
-#line 51 "scripts/genksyms/keywords.gperf"
+#line 54 "scripts/genksyms/keywords.gperf"
{"union", UNION_KEYW},
-#line 55 "scripts/genksyms/keywords.gperf"
+#line 58 "scripts/genksyms/keywords.gperf"
{"typeof", TYPEOF_KEYW},
-#line 50 "scripts/genksyms/keywords.gperf"
+#line 53 "scripts/genksyms/keywords.gperf"
{"typedef", TYPEDEF_KEYW},
-#line 19 "scripts/genksyms/keywords.gperf"
+#line 22 "scripts/genksyms/keywords.gperf"
{"__inline", INLINE_KEYW},
-#line 35 "scripts/genksyms/keywords.gperf"
+#line 38 "scripts/genksyms/keywords.gperf"
{"auto", AUTO_KEYW},
-#line 23 "scripts/genksyms/keywords.gperf"
+#line 26 "scripts/genksyms/keywords.gperf"
{"__volatile", VOLATILE_KEYW},
{""}, {""},
-#line 52 "scripts/genksyms/keywords.gperf"
+#line 55 "scripts/genksyms/keywords.gperf"
{"unsigned", UNSIGNED_KEYW},
{""},
-#line 46 "scripts/genksyms/keywords.gperf"
+#line 49 "scripts/genksyms/keywords.gperf"
{"short", SHORT_KEYW},
-#line 42 "scripts/genksyms/keywords.gperf"
+#line 45 "scripts/genksyms/keywords.gperf"
{"inline", INLINE_KEYW},
{""},
-#line 54 "scripts/genksyms/keywords.gperf"
+#line 57 "scripts/genksyms/keywords.gperf"
{"volatile", VOLATILE_KEYW},
-#line 44 "scripts/genksyms/keywords.gperf"
+#line 47 "scripts/genksyms/keywords.gperf"
{"long", LONG_KEYW},
-#line 26 "scripts/genksyms/keywords.gperf"
+#line 29 "scripts/genksyms/keywords.gperf"
{"_Bool", BOOL_KEYW},
{""}, {""},
-#line 45 "scripts/genksyms/keywords.gperf"
+#line 48 "scripts/genksyms/keywords.gperf"
{"register", REGISTER_KEYW},
-#line 53 "scripts/genksyms/keywords.gperf"
+#line 56 "scripts/genksyms/keywords.gperf"
{"void", VOID_KEYW},
-#line 41 "scripts/genksyms/keywords.gperf"
+#line 44 "scripts/genksyms/keywords.gperf"
{"float", FLOAT_KEYW},
-#line 38 "scripts/genksyms/keywords.gperf"
+#line 41 "scripts/genksyms/keywords.gperf"
{"double", DOUBLE_KEYW},
{""}, {""}, {""}, {""},
-#line 47 "scripts/genksyms/keywords.gperf"
+#line 50 "scripts/genksyms/keywords.gperf"
{"signed", SIGNED_KEYW}
};
diff --git a/scripts/genksyms/lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped
similarity index 89%
rename from scripts/genksyms/lex.c_shipped
rename to scripts/genksyms/lex.lex.c_shipped
index af49390..cf37b38 100644
--- a/scripts/genksyms/lex.c_shipped
+++ b/scripts/genksyms/lex.lex.c_shipped
@@ -1,20 +1,10 @@
-#line 2 "scripts/genksyms/lex.c"
-#line 4 "scripts/genksyms/lex.c"
+#line 3 "scripts/genksyms/lex.lex.c_shipped"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
-/* %not-for-header */
-
-/* %if-c-only */
-/* %if-not-reentrant */
-
-/* %endif */
-/* %endif */
-/* %ok-for-header */
-
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
@@ -23,32 +13,16 @@
#define FLEX_BETA
#endif
-/* %if-c++-only */
-/* %endif */
-
-/* %if-c-only */
-
-/* %endif */
-
-/* %if-c-only */
-
-/* %endif */
-
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
-/* %if-c-only */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
-/* %endif */
-/* %if-tables-serialization */
-/* %endif */
/* end standard C headers. */
-/* %if-c-or-c++ */
/* flex integer type definitions */
#ifndef FLEXINT_H
@@ -112,11 +86,6 @@ typedef unsigned int flex_uint32_t;
#endif /* ! FLEXINT_H */
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
@@ -138,13 +107,8 @@ typedef unsigned int flex_uint32_t;
#define yyconst
#endif
-/* %not-for-header */
-
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* %ok-for-header */
-
-/* %not-for-header */
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
@@ -152,14 +116,6 @@ typedef unsigned int flex_uint32_t;
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-/* %ok-for-header */
-
-/* %if-reentrant */
-/* %endif */
-
-/* %if-not-reentrant */
-
-/* %endif */
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
@@ -196,15 +152,9 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-/* %if-not-reentrant */
extern int yyleng;
-/* %endif */
-/* %if-c-only */
-/* %if-not-reentrant */
extern FILE *yyin, *yyout;
-/* %endif */
-/* %endif */
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
@@ -237,12 +187,7 @@ typedef size_t yy_size_t;
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
-/* %if-c-only */
FILE *yy_input_file;
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
@@ -303,19 +248,10 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
-
-/* %if-not-reentrant */
-
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-/* %endif */
-/* %ok-for-header */
-
-/* %endif */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
@@ -332,11 +268,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* %if-c-only Standard (non-C++) definition */
-
-/* %if-not-reentrant */
-/* %not-for-header */
-
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
@@ -351,9 +282,6 @@ static int yy_start = 0; /* start state number */
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-/* %ok-for-header */
-
-/* %endif */
void yyrestart (FILE *input_file );
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
@@ -373,8 +301,6 @@ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
-/* %endif */
-
void *yyalloc (yy_size_t );
void *yyrealloc (void *,yy_size_t );
void yyfree (void * );
@@ -403,14 +329,11 @@ void yyfree (void * );
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */
#define yywrap(n) 1
#define YY_SKIP_YYWRAP
-#define FLEX_DEBUG
-
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
@@ -424,28 +347,21 @@ int yylineno = 1;
extern char *yytext;
#define yytext_ptr yytext
-/* %if-c-only Standard (non-C++) definition */
-
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[] );
-/* %endif */
-
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
(yy_c_buf_p) = yy_cp;
-/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 13
#define YY_END_OF_BUFFER 14
/* This struct is not used in this scanner,
@@ -610,13 +526,7 @@ static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
extern int yy_flex_debug;
-int yy_flex_debug = 1;
-
-static yyconst flex_int16_t yy_rule_linenum[13] =
- { 0,
- 67, 68, 69, 72, 75, 76, 77, 83, 84, 85,
- 87, 90
- } ;
+int yy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -626,7 +536,6 @@ static yyconst flex_int16_t yy_rule_linenum[13] =
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
-#line 1 "scripts/genksyms/lex.l"
/* Lexical analysis for genksyms.
Copyright 1996, 1997 Linux International.
@@ -648,23 +557,18 @@ char *yytext;
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#line 25 "scripts/genksyms/lex.l"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include "genksyms.h"
-#include "parse.h"
-
/* We've got a two-level lexer here. We let flex do basic tokenization
and then we categorize those basic tokens in the second stage. */
#define YY_DECL static int yylex1(void)
/* We don't do multiple input files. */
#define YY_NO_INPUT 1
-#line 668 "scripts/genksyms/lex.c"
#define INITIAL 0
@@ -673,28 +577,15 @@ char *yytext;
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
-/* %if-c-only */
#include <unistd.h>
-/* %endif */
-/* %if-c++-only */
-/* %endif */
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
-/* %if-c-only Reentrant structure and macros (non-C++). */
-/* %if-reentrant */
-/* %if-c-only */
-
static int yy_init_globals (void );
-/* %endif */
-/* %if-reentrant */
-/* %endif */
-/* %endif End reentrant structures and macros. */
-
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
@@ -724,9 +615,6 @@ int yyget_lineno (void );
void yyset_lineno (int line_number );
-/* %if-bison-bridge */
-/* %endif */
-
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -739,14 +627,8 @@ extern int yywrap (void );
#endif
#endif
-/* %not-for-header */
-
static void yyunput (int c,char *buf_ptr );
-/* %ok-for-header */
-
-/* %endif */
-
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@@ -756,23 +638,15 @@ static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#endif
-/* %ok-for-header */
-/* %endif */
#endif
-/* %if-c-only */
-
-/* %endif */
-
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
@@ -780,14 +654,10 @@ static int input (void );
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
-/* %if-c-only Standard (non-C++) definition */
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
-/* %endif */
-/* %if-c++-only C++ definition */
-/* %endif */
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -795,11 +665,10 @@ static int input (void );
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
-/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ unsigned n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -824,8 +693,6 @@ static int input (void );
} \
}\
\
-/* %if-c++-only C++ definition \ */\
-/* %endif */
#endif
@@ -844,39 +711,20 @@ static int input (void );
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
-/* %if-c-only */
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
#endif
-/* %if-tables-serialization structures and prototypes */
-/* %not-for-header */
-
-/* %ok-for-header */
-
-/* %not-for-header */
-
-/* %tables-yydmap generated elements */
-/* %endif */
/* end tables serialization structures and prototypes */
-/* %ok-for-header */
-
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-/* %if-c-only Standard (non-C++) definition */
extern int yylex (void);
#define YY_DECL int yylex (void)
-/* %endif */
-/* %if-c++-only C++ definition */
-/* %endif */
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -891,15 +739,12 @@ extern int yylex (void);
#define YY_BREAK break;
#endif
-/* %% [6.0] YY_RULE_SETUP definition goes here */
#define YY_RULE_SETUP \
if ( yyleng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
-/* %not-for-header */
-
/** The main scanner function which does all the work.
*/
YY_DECL
@@ -908,13 +753,7 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-/* %% [7.0] user's declarations go here */
-#line 63 "scripts/genksyms/lex.l"
-
-
-
/* Keep track of our location in the original source files. */
-#line 918 "scripts/genksyms/lex.c"
if ( !(yy_init) )
{
@@ -928,18 +767,10 @@ YY_DECL
(yy_start) = 1; /* first start state */
if ( ! yyin )
-/* %if-c-only */
yyin = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
if ( ! yyout )
-/* %if-c-only */
yyout = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack ();
@@ -952,7 +783,6 @@ YY_DECL
while ( 1 ) /* loops until end-of-file is reached */
{
-/* %% [8.0] yymore()-related code goes here */
yy_cp = (yy_c_buf_p);
/* Support of yytext. */
@@ -963,7 +793,6 @@ YY_DECL
*/
yy_bp = yy_cp;
-/* %% [9.0] code to set up and find next match goes here */
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
yy_match:
@@ -987,7 +816,6 @@ yy_match:
while ( yy_base[yy_current_state] != 266 );
yy_find_action:
-/* %% [10.0] code to find the action number goes here */
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
@@ -998,30 +826,10 @@ yy_find_action:
YY_DO_BEFORE_ACTION;
-/* %% [11.0] code for yylineno update goes here */
-
do_action: /* This label is used only to access EOF actions. */
-/* %% [12.0] debug code goes here */
- if ( yy_flex_debug )
- {
- if ( yy_act == 0 )
- fprintf( stderr, "--scanner backing up\n" );
- else if ( yy_act < 13 )
- fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
- (long)yy_rule_linenum[yy_act], yytext );
- else if ( yy_act == 13 )
- fprintf( stderr, "--accepting default rule (\"%s\")\n",
- yytext );
- else if ( yy_act == 14 )
- fprintf( stderr, "--(end of buffer or a NUL)\n" );
- else
- fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
- }
-
switch ( yy_act )
{ /* beginning of action switch */
-/* %% [13.0] actions go here */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = (yy_hold_char);
@@ -1032,42 +840,35 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 67 "scripts/genksyms/lex.l"
return FILENAME;
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 68 "scripts/genksyms/lex.l"
cur_line++;
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 69 "scripts/genksyms/lex.l"
cur_line++;
YY_BREAK
/* Ignore all other whitespace. */
case 4:
YY_RULE_SETUP
-#line 72 "scripts/genksyms/lex.l"
;
YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
-#line 75 "scripts/genksyms/lex.l"
return STRING;
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 76 "scripts/genksyms/lex.l"
return CHAR;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 77 "scripts/genksyms/lex.l"
return IDENT;
YY_BREAK
/* The Pedant requires that the other C multi-character tokens be
@@ -1076,36 +877,29 @@ return IDENT;
around them properly. */
case 8:
YY_RULE_SETUP
-#line 83 "scripts/genksyms/lex.l"
return OTHER;
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 84 "scripts/genksyms/lex.l"
return INT;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 85 "scripts/genksyms/lex.l"
return REAL;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 87 "scripts/genksyms/lex.l"
return DOTS;
YY_BREAK
/* All other tokens are single characters. */
case 12:
YY_RULE_SETUP
-#line 90 "scripts/genksyms/lex.l"
return yytext[0];
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 93 "scripts/genksyms/lex.l"
ECHO;
YY_BREAK
-#line 1109 "scripts/genksyms/lex.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1172,7 +966,6 @@ case YY_STATE_EOF(INITIAL):
else
{
-/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
yy_cp = (yy_c_buf_p);
goto yy_find_action;
}
@@ -1238,14 +1031,6 @@ case YY_STATE_EOF(INITIAL):
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
-/* %ok-for-header */
-
-/* %if-c++-only */
-/* %not-for-header */
-
-/* %ok-for-header */
-
-/* %endif */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1254,11 +1039,7 @@ case YY_STATE_EOF(INITIAL):
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-/* %if-c-only */
static int yy_get_next_buffer (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = (yytext_ptr);
@@ -1392,24 +1173,16 @@ static int yy_get_next_buffer (void)
/* yy_get_previous_state - get the state just before the EOB char was reached */
-/* %if-c-only */
-/* %not-for-header */
-
static yy_state_type yy_get_previous_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
register yy_state_type yy_current_state;
register char *yy_cp;
-/* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
-/* %% [16.0] code to find the next state goes here */
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
@@ -1433,15 +1206,10 @@ static int yy_get_next_buffer (void)
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
-/* %if-c-only */
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
register int yy_is_jam;
- /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
- register char *yy_cp = (yy_c_buf_p);
+ register char *yy_cp = (yy_c_buf_p);
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
@@ -1461,12 +1229,7 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state;
}
-/* %if-c-only */
-
static void yyunput (int c, register char * yy_bp )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
register char *yy_cp;
@@ -1498,17 +1261,11 @@ static int yy_get_next_buffer (void)
*--yy_cp = (char) c;
-/* %% [18.0] update yylineno here */
-
(yytext_ptr) = yy_bp;
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}
-/* %if-c-only */
-/* %endif */
-
-/* %if-c-only */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1516,9 +1273,6 @@ static int yy_get_next_buffer (void)
static int input (void)
#endif
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
int c;
@@ -1582,25 +1336,18 @@ static int yy_get_next_buffer (void)
*(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
-/* %% [19.0] update BOL and yylineno */
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
return c;
}
-/* %if-c-only */
#endif /* ifndef YY_NO_INPUT */
-/* %endif */
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
* @note This function does not reset the start condition to @c INITIAL .
*/
-/* %if-c-only */
void yyrestart (FILE * input_file )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
if ( ! YY_CURRENT_BUFFER ){
@@ -1617,11 +1364,7 @@ static int yy_get_next_buffer (void)
* @param new_buffer The new input buffer.
*
*/
-/* %if-c-only */
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
/* TODO. We should be able to replace this entire function body
@@ -1652,11 +1395,7 @@ static int yy_get_next_buffer (void)
(yy_did_buffer_switch_on_eof) = 1;
}
-/* %if-c-only */
static void yy_load_buffer_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
@@ -1670,11 +1409,7 @@ static void yy_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
-/* %if-c-only */
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
YY_BUFFER_STATE b;
@@ -1702,11 +1437,7 @@ static void yy_load_buffer_state (void)
* @param b a buffer created with yy_create_buffer()
*
*/
-/* %if-c-only */
void yy_delete_buffer (YY_BUFFER_STATE b )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
if ( ! b )
@@ -1721,26 +1452,15 @@ static void yy_load_buffer_state (void)
yyfree((void *) b );
}
-/* %if-c-only */
-
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
*/
-/* %if-c-only */
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
int oerrno = errno;
@@ -1759,13 +1479,8 @@ extern int isatty (int );
b->yy_bs_column = 0;
}
-/* %if-c-only */
-
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
errno = oerrno;
}
@@ -1773,11 +1488,7 @@ extern int isatty (int );
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
-/* %if-c-only */
void yy_flush_buffer (YY_BUFFER_STATE b )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
if ( ! b )
return;
@@ -1800,18 +1511,13 @@ extern int isatty (int );
yy_load_buffer_state( );
}
-/* %if-c-or-c++ */
/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
*
*/
-/* %if-c-only */
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
if (new_buffer == NULL)
return;
@@ -1836,18 +1542,12 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
-/* %endif */
-/* %if-c-or-c++ */
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*/
-/* %if-c-only */
void yypop_buffer_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
if (!YY_CURRENT_BUFFER)
return;
@@ -1862,17 +1562,11 @@ void yypop_buffer_state (void)
(yy_did_buffer_switch_on_eof) = 1;
}
}
-/* %endif */
-/* %if-c-or-c++ */
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-/* %if-c-only */
static void yyensure_buffer_stack (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
{
int num_to_alloc;
@@ -1914,9 +1608,7 @@ static void yyensure_buffer_stack (void)
(yy_buffer_stack_max) = num_to_alloc;
}
}
-/* %endif */
-/* %if-c-only */
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
@@ -1951,9 +1643,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
return b;
}
-/* %endif */
-/* %if-c-only */
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
@@ -1967,9 +1657,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
return yy_scan_bytes(yystr,strlen(yystr) );
}
-/* %endif */
-/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param bytes the byte buffer to scan
@@ -2006,21 +1694,16 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
return b;
}
-/* %endif */
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
-/* %if-c-only */
static void yy_fatal_error (yyconst char* msg )
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
-/* %endif */
-/* %if-c++-only */
-/* %endif */
/* Redefine yyless() so it works in section 3 code. */
@@ -2041,10 +1724,6 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
-/* %if-c-only */
-/* %if-reentrant */
-/* %endif */
-
/** Get the current line number.
*
*/
@@ -2087,9 +1766,6 @@ char *yyget_text (void)
return yytext;
}
-/* %if-reentrant */
-/* %endif */
-
/** Set the current line number.
* @param line_number
*
@@ -2126,14 +1802,6 @@ void yyset_debug (int bdebug )
yy_flex_debug = bdebug ;
}
-/* %endif */
-
-/* %if-reentrant */
-/* %if-bison-bridge */
-/* %endif */
-/* %endif if-c-only */
-
-/* %if-c-only */
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
@@ -2161,9 +1829,7 @@ static int yy_init_globals (void)
*/
return 0;
}
-/* %endif */
-/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
@@ -2183,11 +1849,8 @@ int yylex_destroy (void)
* yylex() is called, initialization will occur. */
yy_init_globals( );
-/* %if-reentrant */
-/* %endif */
return 0;
}
-/* %endif */
/*
* Internal utility routines.
@@ -2235,21 +1898,11 @@ void yyfree (void * ptr )
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
-/* %if-tables-serialization definitions */
-/* %define-yytables The name for this specific scanner's tables. */
#define YYTABLES_NAME "yytables"
-/* %endif */
-
-/* %ok-for-header */
-
-#line 93 "scripts/genksyms/lex.l"
-
-
/* Bring in the keyword recognizer. */
-#include "keywords.c"
-
+#include "keywords.hash.c"
/* Macros to append to our phrase collection list. */
@@ -2274,7 +1927,6 @@ void yyfree (void * ptr )
#define APP _APP(yytext, yyleng)
-
/* The second stage lexer. Here we incorporate knowledge of the state
of the parser to tailor the tokens that are returned. */
diff --git a/scripts/genksyms/parse.h_shipped b/scripts/genksyms/parse.h_shipped
deleted file mode 100644
index 5175236..0000000
--- a/scripts/genksyms/parse.h_shipped
+++ /dev/null
@@ -1,97 +0,0 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* 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.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-
-/* 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,
- 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
- };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
-
-
diff --git a/scripts/genksyms/parse.c_shipped b/scripts/genksyms/parse.tab.c_shipped
similarity index 92%
rename from scripts/genksyms/parse.c_shipped
rename to scripts/genksyms/parse.tab.c_shipped
index 1a0b860..67f19e7 100644
--- a/scripts/genksyms/parse.c_shipped
+++ b/scripts/genksyms/parse.tab.c_shipped
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
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
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -67,8 +66,6 @@
/* Copy the first part of user declarations. */
-/* Line 189 of yacc.c */
-#line 24 "scripts/genksyms/parse.y"
#include <assert.h>
@@ -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. */
#ifndef YYDEBUG
@@ -186,8 +181,6 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
-#line 191 "scripts/genksyms/parse.c"
#ifdef short
# undef short
@@ -237,7 +230,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -855,9 +848,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
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
+#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)
@@ -914,7 +916,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1653,64 +1655,46 @@ yyreduce:
{
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; ;}
break;
case 5:
-/* Line 1455 of yacc.c */
-#line 111 "scripts/genksyms/parse.y"
{ free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
break;
case 6:
-/* Line 1455 of yacc.c */
-#line 115 "scripts/genksyms/parse.y"
{ is_typedef = 1; ;}
break;
case 7:
-/* Line 1455 of yacc.c */
-#line 116 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;}
break;
case 8:
-/* Line 1455 of yacc.c */
-#line 117 "scripts/genksyms/parse.y"
{ is_typedef = 1; ;}
break;
case 9:
-/* Line 1455 of yacc.c */
-#line 118 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 14:
-/* Line 1455 of yacc.c */
-#line 123 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 15:
-/* Line 1455 of yacc.c */
-#line 124 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 16:
-/* Line 1455 of yacc.c */
-#line 129 "scripts/genksyms/parse.y"
{ if (current_name) {
struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
(*(yyvsp[(3) - (3)]))->next = NULL;
@@ -1725,15 +1709,11 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
-#line 142 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
case 19:
-/* Line 1455 of yacc.c */
-#line 148 "scripts/genksyms/parse.y"
{ struct string_list *decl = *(yyvsp[(1) - (1)]);
*(yyvsp[(1) - (1)]) = NULL;
add_symbol(current_name,
@@ -1745,8 +1725,6 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
-#line 156 "scripts/genksyms/parse.y"
{ struct string_list *decl = *(yyvsp[(3) - (3)]);
*(yyvsp[(3) - (3)]) = NULL;
free_list(*(yyvsp[(2) - (3)]), NULL);
@@ -1760,36 +1738,26 @@ yyreduce:
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)]); ;}
break;
case 22:
-/* Line 1455 of yacc.c */
-#line 174 "scripts/genksyms/parse.y"
{ decl_spec = NULL; ;}
break;
case 24:
-/* Line 1455 of yacc.c */
-#line 179 "scripts/genksyms/parse.y"
{ decl_spec = *(yyvsp[(1) - (1)]); ;}
break;
case 25:
-/* Line 1455 of yacc.c */
-#line 180 "scripts/genksyms/parse.y"
{ decl_spec = *(yyvsp[(2) - (2)]); ;}
break;
case 26:
-/* Line 1455 of yacc.c */
-#line 185 "scripts/genksyms/parse.y"
{ /* Version 2 checksumming ignores storage class, as that
is really irrelevant to the linkage. */
remove_node((yyvsp[(1) - (1)]));
@@ -1799,43 +1767,31 @@ yyreduce:
case 31:
-/* Line 1455 of yacc.c */
-#line 197 "scripts/genksyms/parse.y"
{ is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
break;
case 32:
-/* Line 1455 of yacc.c */
-#line 198 "scripts/genksyms/parse.y"
{ is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
break;
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)]); ;}
break;
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)]); ;}
break;
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)]); ;}
break;
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;
r = copy_node(i); r->tag = SYM_STRUCT;
r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1846,8 +1802,6 @@ yyreduce:
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;
r = copy_node(i); r->tag = SYM_UNION;
r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1858,8 +1812,6 @@ yyreduce:
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;
r = copy_node(i); r->tag = SYM_ENUM;
r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1870,57 +1822,41 @@ yyreduce:
case 43:
-/* Line 1455 of yacc.c */
-#line 242 "scripts/genksyms/parse.y"
{ add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 44:
-/* Line 1455 of yacc.c */
-#line 244 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 45:
-/* Line 1455 of yacc.c */
-#line 245 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 56:
-/* Line 1455 of yacc.c */
-#line 259 "scripts/genksyms/parse.y"
{ (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
break;
case 57:
-/* Line 1455 of yacc.c */
-#line 264 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break;
case 58:
-/* Line 1455 of yacc.c */
-#line 268 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
case 61:
-/* Line 1455 of yacc.c */
-#line 274 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 65:
-/* Line 1455 of yacc.c */
-#line 280 "scripts/genksyms/parse.y"
{ /* restrict has no effect in prototypes so ignore it */
remove_node((yyvsp[(1) - (1)]));
(yyval) = (yyvsp[(1) - (1)]);
@@ -1929,15 +1865,11 @@ yyreduce:
case 66:
-/* Line 1455 of yacc.c */
-#line 287 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 68:
-/* Line 1455 of yacc.c */
-#line 293 "scripts/genksyms/parse.y"
{ if (current_name != NULL) {
error_with_pos("unexpected second declaration name");
YYERROR;
@@ -1950,134 +1882,96 @@ yyreduce:
case 69:
-/* Line 1455 of yacc.c */
-#line 302 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;}
break;
case 70:
-/* Line 1455 of yacc.c */
-#line 304 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;}
break;
case 71:
-/* Line 1455 of yacc.c */
-#line 306 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 72:
-/* Line 1455 of yacc.c */
-#line 308 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 73:
-/* Line 1455 of yacc.c */
-#line 310 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 74:
-/* Line 1455 of yacc.c */
-#line 316 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 78:
-/* Line 1455 of yacc.c */
-#line 324 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;}
break;
case 79:
-/* Line 1455 of yacc.c */
-#line 326 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;}
break;
case 80:
-/* Line 1455 of yacc.c */
-#line 328 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 81:
-/* Line 1455 of yacc.c */
-#line 330 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 82:
-/* Line 1455 of yacc.c */
-#line 332 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 83:
-/* Line 1455 of yacc.c */
-#line 336 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 85:
-/* Line 1455 of yacc.c */
-#line 338 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 86:
-/* Line 1455 of yacc.c */
-#line 342 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
case 89:
-/* Line 1455 of yacc.c */
-#line 349 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 90:
-/* Line 1455 of yacc.c */
-#line 354 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break;
case 91:
-/* Line 1455 of yacc.c */
-#line 359 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break;
case 93:
-/* Line 1455 of yacc.c */
-#line 364 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
case 94:
-/* Line 1455 of yacc.c */
-#line 366 "scripts/genksyms/parse.y"
{ /* For version 2 checksums, we don't want to remember
private parameter names. */
remove_node((yyvsp[(1) - (1)]));
@@ -2087,8 +1981,6 @@ yyreduce:
case 95:
-/* Line 1455 of yacc.c */
-#line 374 "scripts/genksyms/parse.y"
{ remove_node((yyvsp[(1) - (1)]));
(yyval) = (yyvsp[(1) - (1)]);
;}
@@ -2096,43 +1988,31 @@ yyreduce:
case 96:
-/* Line 1455 of yacc.c */
-#line 378 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;}
break;
case 97:
-/* Line 1455 of yacc.c */
-#line 380 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(4) - (4)]); ;}
break;
case 98:
-/* Line 1455 of yacc.c */
-#line 382 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 99:
-/* Line 1455 of yacc.c */
-#line 384 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 100:
-/* Line 1455 of yacc.c */
-#line 386 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 101:
-/* Line 1455 of yacc.c */
-#line 391 "scripts/genksyms/parse.y"
{ struct string_list *decl = *(yyvsp[(2) - (3)]);
*(yyvsp[(2) - (3)]) = NULL;
add_symbol(current_name, SYM_NORMAL, decl, is_extern);
@@ -2142,120 +2022,86 @@ yyreduce:
case 102:
-/* Line 1455 of yacc.c */
-#line 399 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
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)]); ;}
break;
case 105:
-/* Line 1455 of yacc.c */
-#line 410 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 106:
-/* Line 1455 of yacc.c */
-#line 411 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 107:
-/* Line 1455 of yacc.c */
-#line 415 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
case 110:
-/* Line 1455 of yacc.c */
-#line 421 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 111:
-/* Line 1455 of yacc.c */
-#line 426 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 112:
-/* Line 1455 of yacc.c */
-#line 428 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 113:
-/* Line 1455 of yacc.c */
-#line 432 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
case 116:
-/* Line 1455 of yacc.c */
-#line 438 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 117:
-/* Line 1455 of yacc.c */
-#line 442 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
break;
case 118:
-/* Line 1455 of yacc.c */
-#line 443 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 120:
-/* Line 1455 of yacc.c */
-#line 448 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(2) - (2)]); ;}
break;
case 121:
-/* Line 1455 of yacc.c */
-#line 452 "scripts/genksyms/parse.y"
{ (yyval) = NULL; ;}
break;
case 123:
-/* Line 1455 of yacc.c */
-#line 457 "scripts/genksyms/parse.y"
{ (yyval) = (yyvsp[(3) - (3)]); ;}
break;
case 124:
-/* 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);
@@ -2264,8 +2110,6 @@ yyreduce:
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)]));
@@ -2275,29 +2119,21 @@ yyreduce:
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"
{ (yyval) = NULL; ;}
break;
case 132:
-/* Line 1455 of yacc.c */
-#line 489 "scripts/genksyms/parse.y"
{ export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
break;
-/* Line 1455 of yacc.c */
-#line 2301 "scripts/genksyms/parse.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2508,8 +2344,6 @@ yyreturn:
-/* Line 1675 of yacc.c */
-#line 493 "scripts/genksyms/parse.y"
static void
@@ -2518,3 +2352,5 @@ yyerror(const char *e)
error_with_pos("%s", e);
}
+#include "lex.lex.c"
+
--
1.7.3.4.574.g608b.dirty
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [RFCv2 10/13] kconfig: regen parser
2011-05-23 8:10 [RFCv2 00/13] Kbuild: factor parser rules Arnaud Lacombe
` (8 preceding siblings ...)
2011-05-23 8:10 ` [RFCv2 09/13] kconfig: migrate parser to implicit rules Arnaud Lacombe
@ 2011-05-23 8:10 ` Arnaud Lacombe
2011-05-23 8:10 ` [RFCv2 11/13] dtc: include the lexer from the parser Arnaud Lacombe
` (5 subsequent siblings)
15 siblings, 0 replies; 32+ messages in thread
From: Arnaud Lacombe @ 2011-05-23 8:10 UTC (permalink / raw)
To: linux-kbuild; +Cc: Michal Marek, Arnaud Lacombe
---
scripts/kconfig/Makefile | 6 +-
scripts/kconfig/zconf.hash.c_shipped | 273 +++++++-----
.../{lex.zconf.c_shipped => zconf.lex.c_shipped} | 493 +++++++++-----------
scripts/kconfig/zconf.tab.c_shipped | 102 ++---
4 files changed, 438 insertions(+), 436 deletions(-)
rename scripts/kconfig/{lex.zconf.c_shipped => zconf.lex.c_shipped} (81%)
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index c9ec4d6..f34f4d1 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -197,7 +197,7 @@ gconf-objs := gconf.o kconfig_load.o zconf.tab.o
endif
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
- .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
+ .tmp_gtkcheck zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
clean-files += mconf qconf gconf nconf
clean-files += config.pot linux.pot
@@ -213,7 +213,7 @@ always := dochecklxdialog
HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
# 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)
HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
@@ -309,7 +309,7 @@ $(obj)/.tmp_gtkcheck:
fi
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
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped
index 4055d5d..40df000 100644
--- a/scripts/kconfig/zconf.hash.c_shipped
+++ b/scripts/kconfig/zconf.hash.c_shipped
@@ -1,6 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.3 */
-/* Command-line: gperf */
-/* Computed positions: -k'1,3' */
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -29,10 +28,11 @@
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
+#line 10 "scripts/kconfig/zconf.gperf"
struct kconf_id;
-static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
-/* maximum key range = 50, duplicates = 0 */
+static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
+/* maximum key range = 71, duplicates = 0 */
#ifdef __GNUC__
__inline
@@ -44,34 +44,34 @@ inline
static unsigned int
kconf_id_hash (register const char *str, register unsigned int len)
{
- static unsigned char asso_values[] =
+ static const unsigned char asso_values[] =
{
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 40, 5,
- 0, 0, 5, 52, 0, 20, 52, 52, 10, 20,
- 5, 0, 35, 52, 0, 30, 0, 15, 0, 52,
- 15, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 25, 25,
+ 0, 0, 0, 5, 0, 0, 73, 73, 5, 0,
+ 10, 5, 45, 73, 20, 20, 0, 15, 15, 73,
+ 20, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 73
};
register int hval = len;
@@ -85,87 +85,87 @@ kconf_id_hash (register const char *str, register unsigned int len)
hval += asso_values[(unsigned char)str[0]];
break;
}
- return hval;
+ return hval + asso_values[(unsigned char)str[len - 1]];
}
struct kconf_id_strings_t
{
- char kconf_id_strings_str2[sizeof("on")];
- char kconf_id_strings_str3[sizeof("env")];
+ char kconf_id_strings_str2[sizeof("if")];
+ char kconf_id_strings_str3[sizeof("int")];
char kconf_id_strings_str5[sizeof("endif")];
- char kconf_id_strings_str6[sizeof("option")];
- char kconf_id_strings_str7[sizeof("endmenu")];
- char kconf_id_strings_str8[sizeof("optional")];
+ char kconf_id_strings_str7[sizeof("default")];
+ char kconf_id_strings_str8[sizeof("tristate")];
char kconf_id_strings_str9[sizeof("endchoice")];
- char kconf_id_strings_str10[sizeof("range")];
- char kconf_id_strings_str11[sizeof("choice")];
- char kconf_id_strings_str12[sizeof("default")];
+ char kconf_id_strings_str12[sizeof("def_tristate")];
char kconf_id_strings_str13[sizeof("def_bool")];
- char kconf_id_strings_str14[sizeof("help")];
- char kconf_id_strings_str16[sizeof("config")];
- char kconf_id_strings_str17[sizeof("def_tristate")];
- char kconf_id_strings_str18[sizeof("hex")];
- char kconf_id_strings_str19[sizeof("defconfig_list")];
- char kconf_id_strings_str22[sizeof("if")];
- char kconf_id_strings_str23[sizeof("int")];
+ char kconf_id_strings_str14[sizeof("defconfig_list")];
+ char kconf_id_strings_str17[sizeof("on")];
+ char kconf_id_strings_str18[sizeof("optional")];
+ char kconf_id_strings_str21[sizeof("option")];
+ char kconf_id_strings_str22[sizeof("endmenu")];
+ char kconf_id_strings_str23[sizeof("mainmenu")];
+ char kconf_id_strings_str25[sizeof("menuconfig")];
char kconf_id_strings_str27[sizeof("modules")];
- char kconf_id_strings_str28[sizeof("tristate")];
char kconf_id_strings_str29[sizeof("menu")];
+ char kconf_id_strings_str31[sizeof("select")];
char kconf_id_strings_str32[sizeof("comment")];
- char kconf_id_strings_str35[sizeof("menuconfig")];
- char kconf_id_strings_str36[sizeof("string")];
- char kconf_id_strings_str37[sizeof("visible")];
- char kconf_id_strings_str41[sizeof("prompt")];
- char kconf_id_strings_str42[sizeof("depends")];
- char kconf_id_strings_str44[sizeof("bool")];
- char kconf_id_strings_str46[sizeof("select")];
+ char kconf_id_strings_str33[sizeof("env")];
+ char kconf_id_strings_str35[sizeof("range")];
+ char kconf_id_strings_str36[sizeof("choice")];
+ char kconf_id_strings_str39[sizeof("bool")];
+ char kconf_id_strings_str41[sizeof("source")];
+ char kconf_id_strings_str42[sizeof("visible")];
+ char kconf_id_strings_str43[sizeof("hex")];
+ char kconf_id_strings_str46[sizeof("config")];
char kconf_id_strings_str47[sizeof("boolean")];
- char kconf_id_strings_str48[sizeof("mainmenu")];
- char kconf_id_strings_str51[sizeof("source")];
+ char kconf_id_strings_str51[sizeof("string")];
+ char kconf_id_strings_str54[sizeof("help")];
+ char kconf_id_strings_str56[sizeof("prompt")];
+ char kconf_id_strings_str72[sizeof("depends")];
};
-static struct kconf_id_strings_t kconf_id_strings_contents =
+static const struct kconf_id_strings_t kconf_id_strings_contents =
{
- "on",
- "env",
+ "if",
+ "int",
"endif",
- "option",
- "endmenu",
- "optional",
- "endchoice",
- "range",
- "choice",
"default",
- "def_bool",
- "help",
- "config",
+ "tristate",
+ "endchoice",
"def_tristate",
- "hex",
+ "def_bool",
"defconfig_list",
- "if",
- "int",
+ "on",
+ "optional",
+ "option",
+ "endmenu",
+ "mainmenu",
+ "menuconfig",
"modules",
- "tristate",
"menu",
+ "select",
"comment",
- "menuconfig",
- "string",
- "visible",
- "prompt",
- "depends",
+ "env",
+ "range",
+ "choice",
"bool",
- "select",
+ "source",
+ "visible",
+ "hex",
+ "config",
"boolean",
- "mainmenu",
- "source"
+ "string",
+ "help",
+ "prompt",
+ "depends"
};
#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
#ifdef __GNUC__
__inline
-#ifdef __GNUC_STDC_INLINE__
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
-struct kconf_id *
+const struct kconf_id *
kconf_id_lookup (register const char *str, register unsigned int len)
{
enum
@@ -174,54 +174,94 @@ kconf_id_lookup (register const char *str, register unsigned int len)
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 14,
MIN_HASH_VALUE = 2,
- MAX_HASH_VALUE = 51
+ MAX_HASH_VALUE = 72
};
- static struct kconf_id wordlist[] =
+ static const struct kconf_id wordlist[] =
{
{-1}, {-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_OPT_ENV, TF_OPTION},
+#line 25 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
+#line 36 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
{-1},
+#line 26 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND},
+ {-1},
+#line 29 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
+#line 31 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
+#line 20 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
+ {-1}, {-1},
+#line 32 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
+#line 35 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
- {-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
+#line 45 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
{-1}, {-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
- {-1}, {-1}, {-1},
+#line 43 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
+#line 28 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
+ {-1}, {-1},
+#line 42 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
+#line 17 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
+#line 15 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND},
+ {-1},
+#line 23 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
+ {-1},
+#line 44 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
+ {-1},
+#line 16 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
- {-1}, {-1},
+ {-1},
+#line 39 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
+#line 21 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
- {-1}, {-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND},
- {-1}, {-1}, {-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND},
+#line 46 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
{-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN},
+#line 40 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
+#line 19 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
+ {-1}, {-1},
+#line 33 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN},
{-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND},
+#line 18 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
+#line 41 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
+#line 37 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
+ {-1}, {-1},
+#line 22 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
+#line 34 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND},
+ {-1}, {-1}, {-1},
+#line 38 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
{-1}, {-1},
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND}
+#line 24 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND},
+ {-1},
+#line 30 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#line 27 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -242,4 +282,5 @@ kconf_id_lookup (register const char *str, register unsigned int len)
}
return 0;
}
+#line 47 "scripts/kconfig/zconf.gperf"
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/zconf.lex.c_shipped
similarity index 81%
rename from scripts/kconfig/lex.zconf.c_shipped
rename to scripts/kconfig/zconf.lex.c_shipped
index 6eb0397..2a97008 100644
--- a/scripts/kconfig/lex.zconf.c_shipped
+++ b/scripts/kconfig/zconf.lex.c_shipped
@@ -1,29 +1,10 @@
-#line 3 "scripts/kconfig/lex.zconf.c"
+#line 3 "scripts/kconfig/zconf.lex.c_shipped"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
-#define yy_create_buffer zconf_create_buffer
-#define yy_delete_buffer zconf_delete_buffer
-#define yy_flex_debug zconf_flex_debug
-#define yy_init_buffer zconf_init_buffer
-#define yy_flush_buffer zconf_flush_buffer
-#define yy_load_buffer_state zconf_load_buffer_state
-#define yy_switch_to_buffer zconf_switch_to_buffer
-#define yyin zconfin
-#define yyleng zconfleng
-#define yylex zconflex
-#define yylineno zconflineno
-#define yyout zconfout
-#define yyrestart zconfrestart
-#define yytext zconftext
-#define yywrap zconfwrap
-#define yyalloc zconfalloc
-#define yyrealloc zconfrealloc
-#define yyfree zconffree
-
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
@@ -72,6 +53,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -102,8 +84,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -154,21 +134,13 @@ typedef unsigned int flex_uint32_t;
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE zconfrestart(zconfin )
+#define YY_NEW_FILE yyrestart(yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#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
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -180,9 +152,9 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int zconfleng;
+extern int yyleng;
-extern FILE *zconfin, *zconfout;
+extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
@@ -194,13 +166,13 @@ extern FILE *zconfin, *zconfout;
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up zconftext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up zconftext again */ \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
@@ -268,8 +240,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via zconfrestart()), so that the user can continue scanning by
- * just pointing zconfin at a new input file.
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -296,51 +268,51 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when zconftext is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int zconfleng;
+int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow zconfwrap()'s to do buffer switches
- * instead of setting up a fresh zconfin. A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void zconfrestart (FILE *input_file );
-void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size );
-void zconf_delete_buffer (YY_BUFFER_STATE b );
-void zconf_flush_buffer (YY_BUFFER_STATE b );
-void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer );
-void zconfpop_buffer_state (void );
+void yyrestart (FILE *input_file );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
+void yy_delete_buffer (YY_BUFFER_STATE b );
+void yy_flush_buffer (YY_BUFFER_STATE b );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state (void );
-static void zconfensure_buffer_stack (void );
-static void zconf_load_buffer_state (void );
-static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
-void *zconfalloc (yy_size_t );
-void *zconfrealloc (void *,yy_size_t );
-void zconffree (void * );
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
-#define yy_new_buffer zconf_create_buffer
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- zconfensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
@@ -348,9 +320,9 @@ void zconffree (void * );
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- zconfensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
@@ -359,21 +331,21 @@ void zconffree (void * );
/* Begin user sect3 */
-#define zconfwrap(n) 1
+#define yywrap(n) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
-FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
-extern int zconflineno;
+extern int yylineno;
-int zconflineno = 1;
+int yylineno = 1;
-extern char *zconftext;
-#define yytext_ptr zconftext
+extern char *yytext;
+#define yytext_ptr yytext
static yyconst flex_int16_t yy_nxt[][17] =
{
{
@@ -701,11 +673,11 @@ static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up zconftext.
+ * corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- zconfleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
@@ -761,8 +733,8 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-extern int zconf_flex_debug;
-int zconf_flex_debug = 0;
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -771,7 +743,7 @@ int zconf_flex_debug = 0;
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *zconftext;
+char *yytext;
#define YY_NO_INPUT 1
/*
@@ -862,31 +834,31 @@ static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int zconflex_destroy (void );
+int yylex_destroy (void );
-int zconfget_debug (void );
+int yyget_debug (void );
-void zconfset_debug (int debug_flag );
+void yyset_debug (int debug_flag );
-YY_EXTRA_TYPE zconfget_extra (void );
+YY_EXTRA_TYPE yyget_extra (void );
-void zconfset_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra (YY_EXTRA_TYPE user_defined );
-FILE *zconfget_in (void );
+FILE *yyget_in (void );
-void zconfset_in (FILE * in_str );
+void yyset_in (FILE * in_str );
-FILE *zconfget_out (void );
+FILE *yyget_out (void );
-void zconfset_out (FILE * out_str );
+void yyset_out (FILE * out_str );
-int zconfget_leng (void );
+int yyget_leng (void );
-char *zconfget_text (void );
+char *yyget_text (void );
-int zconfget_lineno (void );
+int yyget_lineno (void );
-void zconfset_lineno (int line_number );
+void yyset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -894,9 +866,9 @@ void zconfset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int zconfwrap (void );
+extern "C" int yywrap (void );
#else
-extern int zconfwrap (void );
+extern int yywrap (void );
#endif
#endif
@@ -922,12 +894,7 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#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
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -935,7 +902,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -944,7 +911,7 @@ static int input (void );
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
errno=0; \
- while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \
+ while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
{ \
if( errno != EINTR) \
{ \
@@ -952,7 +919,7 @@ static int input (void );
break; \
} \
errno=0; \
- clearerr(zconfin); \
+ clearerr(yyin); \
}\
\
@@ -984,12 +951,12 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int zconflex (void);
+extern int yylex (void);
-#define YY_DECL int zconflex (void)
+#define YY_DECL int yylex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after zconftext and zconfleng
+/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -1026,26 +993,26 @@ YY_DECL
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! zconfin )
- zconfin = stdin;
+ if ( ! yyin )
+ yyin = stdin;
- if ( ! zconfout )
- zconfout = stdout;
+ if ( ! yyout )
+ yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- zconfensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- zconf_create_buffer(zconfin,YY_BUF_SIZE );
+ yy_create_buffer(yyin,YY_BUF_SIZE );
}
- zconf_load_buffer_state( );
+ yy_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of zconftext. */
+ /* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1092,7 +1059,7 @@ YY_RULE_SETUP
case 5:
YY_RULE_SETUP
{
- unput(zconftext[0]);
+ unput(yytext[0]);
BEGIN(COMMAND);
}
YY_BREAK
@@ -1100,16 +1067,16 @@ YY_RULE_SETUP
case 6:
YY_RULE_SETUP
{
- struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
+ const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
BEGIN(PARAM);
current_pos.file = current_file;
current_pos.lineno = current_file->lineno;
if (id && id->flags & TF_COMMAND) {
- zconflval.id = id;
+ yylval.id = id;
return id->token;
}
- alloc_string(zconftext, zconfleng);
- zconflval.string = text;
+ alloc_string(yytext, yyleng);
+ yylval.string = text;
return T_WORD;
}
YY_BREAK
@@ -1158,7 +1125,7 @@ return T_UNEQUAL;
case 16:
YY_RULE_SETUP
{
- str = zconftext[0];
+ str = yytext[0];
new_string();
BEGIN(STRING);
}
@@ -1175,13 +1142,13 @@ YY_RULE_SETUP
case 19:
YY_RULE_SETUP
{
- struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
+ const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
if (id && id->flags & TF_PARAM) {
- zconflval.id = id;
+ yylval.id = id;
return id->token;
}
- alloc_string(zconftext, zconfleng);
- zconflval.string = text;
+ alloc_string(yytext, yyleng);
+ yylval.string = text;
return T_WORD;
}
YY_BREAK
@@ -1206,49 +1173,49 @@ case YY_STATE_EOF(PARAM):
case 23:
/* rule 23 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up zconftext again */
+YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
{
- append_string(zconftext, zconfleng);
- zconflval.string = text;
+ append_string(yytext, yyleng);
+ yylval.string = text;
return T_WORD_QUOTE;
}
YY_BREAK
case 24:
YY_RULE_SETUP
{
- append_string(zconftext, zconfleng);
+ append_string(yytext, yyleng);
}
YY_BREAK
case 25:
/* rule 25 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up zconftext again */
+YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
{
- append_string(zconftext + 1, zconfleng - 1);
- zconflval.string = text;
+ append_string(yytext + 1, yyleng - 1);
+ yylval.string = text;
return T_WORD_QUOTE;
}
YY_BREAK
case 26:
YY_RULE_SETUP
{
- append_string(zconftext + 1, zconfleng - 1);
+ append_string(yytext + 1, yyleng - 1);
}
YY_BREAK
case 27:
YY_RULE_SETUP
{
- if (str == zconftext[0]) {
+ if (str == yytext[0]) {
BEGIN(PARAM);
- zconflval.string = text;
+ yylval.string = text;
return T_WORD_QUOTE;
} else
- append_string(zconftext, 1);
+ append_string(yytext, 1);
}
YY_BREAK
case 28:
@@ -1271,8 +1238,8 @@ case 29:
YY_RULE_SETUP
{
ts = 0;
- for (i = 0; i < zconfleng; i++) {
- if (zconftext[i] == '\t')
+ for (i = 0; i < yyleng; i++) {
+ if (yytext[i] == '\t')
ts = (ts & ~7) + 8;
else
ts++;
@@ -1294,9 +1261,9 @@ YY_RULE_SETUP
YY_BREAK
case 30:
/* rule 30 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up zconftext again */
+YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
{
current_file->lineno++;
@@ -1315,12 +1282,12 @@ YY_RULE_SETUP
case 32:
YY_RULE_SETUP
{
- while (zconfleng) {
- if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
+ while (yyleng) {
+ if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t'))
break;
- zconfleng--;
+ yyleng--;
}
- append_string(zconftext, zconfleng);
+ append_string(yytext, yyleng);
if (!first_ts)
first_ts = last_ts;
}
@@ -1339,7 +1306,7 @@ case YY_STATE_EOF(COMMAND):
zconf_endfile();
return T_EOL;
}
- fclose(zconfin);
+ fclose(yyin);
yyterminate();
}
YY_BREAK
@@ -1361,15 +1328,15 @@ YY_FATAL_ERROR( "flex scanner jammed" );
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed zconfin at a new source and called
- * zconflex(). If so, then we have to assure
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1422,11 +1389,11 @@ YY_FATAL_ERROR( "flex scanner jammed" );
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( zconfwrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * zconftext, we can now set up
+ * yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
@@ -1475,7 +1442,7 @@ YY_FATAL_ERROR( "flex scanner jammed" );
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of zconflex */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1553,7 +1520,7 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1585,7 +1552,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- zconfrestart(zconfin );
+ yyrestart(yyin );
}
else
@@ -1602,7 +1569,7 @@ static int yy_get_next_buffer (void)
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
@@ -1654,7 +1621,7 @@ static int yy_get_next_buffer (void)
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up zconftext */
+ /* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
@@ -1726,13 +1693,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- zconfrestart(zconfin );
+ yyrestart(yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( zconfwrap( ) )
+ if ( yywrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -1752,7 +1719,7 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve zconftext */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
@@ -1764,32 +1731,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void zconfrestart (FILE * input_file )
+ void yyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- zconfensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- zconf_create_buffer(zconfin,YY_BUF_SIZE );
+ yy_create_buffer(yyin,YY_BUF_SIZE );
}
- zconf_init_buffer(YY_CURRENT_BUFFER,input_file );
- zconf_load_buffer_state( );
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * zconfpop_buffer_state();
- * zconfpush_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- zconfensure_buffer_stack ();
+ yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1802,21 +1769,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- zconf_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (zconfwrap()) processing, but the only time this flag
- * is looked at is after zconfwrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void zconf_load_buffer_state (void)
+static void yy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -1826,35 +1793,35 @@ static void zconf_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- zconf_init_buffer(b,file );
+ yy_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with zconf_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
*
*/
- void zconf_delete_buffer (YY_BUFFER_STATE b )
+ void yy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -1864,27 +1831,27 @@ static void zconf_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- zconffree((void *) b->yy_ch_buf );
+ yyfree((void *) b->yy_ch_buf );
- zconffree((void *) b );
+ yyfree((void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a zconfrestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
- static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- zconf_flush_buffer(b );
+ yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then zconf_init_buffer was _probably_
- * called from zconfrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -1901,7 +1868,7 @@ static void zconf_load_buffer_state (void)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void zconf_flush_buffer (YY_BUFFER_STATE b )
+ void yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -1921,7 +1888,7 @@ static void zconf_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- zconf_load_buffer_state( );
+ yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1930,14 +1897,14 @@ static void zconf_load_buffer_state (void)
* @param new_buffer The new state.
*
*/
-void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- zconfensure_buffer_stack();
+ yyensure_buffer_stack();
- /* This block is copied from zconf_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1951,8 +1918,8 @@ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from zconf_switch_to_buffer. */
- zconf_load_buffer_state( );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -1960,18 +1927,18 @@ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void zconfpop_buffer_state (void)
+void yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- zconf_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- zconf_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -1979,7 +1946,7 @@ void zconfpop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void zconfensure_buffer_stack (void)
+static void yyensure_buffer_stack (void)
{
int num_to_alloc;
@@ -1990,11 +1957,11 @@ static void zconfensure_buffer_stack (void)
* immediate realloc on the next call.
*/
num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -2009,12 +1976,12 @@ static void zconfensure_buffer_stack (void)
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2028,7 +1995,7 @@ static void zconfensure_buffer_stack (void)
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -2038,9 +2005,9 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
@@ -2052,33 +2019,33 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- zconf_switch_to_buffer(b );
+ yy_switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to zconflex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * zconf_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
- return zconf_scan_bytes(yystr,strlen(yystr) );
+ return yy_scan_bytes(yystr,strlen(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 yylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -2087,18 +2054,18 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
- buf = (char *) zconfalloc(n );
+ buf = (char *) yyalloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = zconf_scan_buffer(buf,n );
+ b = yy_scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -2124,14 +2091,14 @@ static void yy_fatal_error (yyconst char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up zconftext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- zconftext[zconfleng] = (yy_hold_char); \
- (yy_c_buf_p) = zconftext + yyless_macro_arg; \
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- zconfleng = yyless_macro_arg; \
+ yyleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -2140,85 +2107,85 @@ static void yy_fatal_error (yyconst char* msg )
/** Get the current line number.
*
*/
-int zconfget_lineno (void)
+int yyget_lineno (void)
{
- return zconflineno;
+ return yylineno;
}
/** Get the input stream.
*
*/
-FILE *zconfget_in (void)
+FILE *yyget_in (void)
{
- return zconfin;
+ return yyin;
}
/** Get the output stream.
*
*/
-FILE *zconfget_out (void)
+FILE *yyget_out (void)
{
- return zconfout;
+ return yyout;
}
/** Get the length of the current token.
*
*/
-int zconfget_leng (void)
+int yyget_leng (void)
{
- return zconfleng;
+ return yyleng;
}
/** Get the current token.
*
*/
-char *zconfget_text (void)
+char *yyget_text (void)
{
- return zconftext;
+ return yytext;
}
/** Set the current line number.
* @param line_number
*
*/
-void zconfset_lineno (int line_number )
+void yyset_lineno (int line_number )
{
- zconflineno = line_number;
+ yylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
- * @see zconf_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void zconfset_in (FILE * in_str )
+void yyset_in (FILE * in_str )
{
- zconfin = in_str ;
+ yyin = in_str ;
}
-void zconfset_out (FILE * out_str )
+void yyset_out (FILE * out_str )
{
- zconfout = out_str ;
+ yyout = out_str ;
}
-int zconfget_debug (void)
+int yyget_debug (void)
{
- return zconf_flex_debug;
+ return yy_flex_debug;
}
-void zconfset_debug (int bdebug )
+void yyset_debug (int bdebug )
{
- zconf_flex_debug = bdebug ;
+ yy_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from zconflex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = 0;
@@ -2230,36 +2197,36 @@ static int yy_init_globals (void)
/* Defined in main.c */
#ifdef YY_STDINIT
- zconfin = stdin;
- zconfout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- zconfin = (FILE *) 0;
- zconfout = (FILE *) 0;
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * zconflex_init()
+ * yylex_init()
*/
return 0;
}
-/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
-int zconflex_destroy (void)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- zconf_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- zconfpop_buffer_state();
+ yypop_buffer_state();
}
/* Destroy the stack itself. */
- zconffree((yy_buffer_stack) );
+ yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * zconflex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2289,12 +2256,12 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *zconfalloc (yy_size_t size )
+void *yyalloc (yy_size_t size )
{
return (void *) malloc( size );
}
-void *zconfrealloc (void * ptr, yy_size_t size )
+void *yyrealloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
@@ -2306,9 +2273,9 @@ void *zconfrealloc (void * ptr, yy_size_t size )
return (void *) realloc( (char *) ptr, size );
}
-void zconffree (void * ptr )
+void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
@@ -2322,7 +2289,7 @@ void zconf_starthelp(void)
static void zconf_endhelp(void)
{
- zconflval.string = text;
+ yylval.string = text;
BEGIN(INITIAL);
}
@@ -2352,8 +2319,8 @@ FILE *zconf_fopen(const char *name)
void zconf_initscan(const char *name)
{
- zconfin = zconf_fopen(name);
- if (!zconfin) {
+ yyin = zconf_fopen(name);
+ if (!yyin) {
printf("can't find file %s\n", name);
exit(1);
}
@@ -2373,13 +2340,13 @@ void zconf_nextfile(const char *name)
memset(buf, 0, sizeof(*buf));
current_buf->state = YY_CURRENT_BUFFER;
- zconfin = zconf_fopen(file->name);
- if (!zconfin) {
+ yyin = zconf_fopen(file->name);
+ if (!yyin) {
printf("%s:%d: can't open file \"%s\"\n",
zconf_curname(), zconf_lineno(), file->name);
exit(1);
}
- zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
+ yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
buf->parent = current_buf;
current_buf = buf;
@@ -2410,9 +2377,9 @@ static void zconf_endfile(void)
parent = current_buf->parent;
if (parent) {
- fclose(zconfin);
- zconf_delete_buffer(YY_CURRENT_BUFFER);
- zconf_switch_to_buffer(parent->state);
+ fclose(yyin);
+ yy_delete_buffer(YY_CURRENT_BUFFER);
+ yy_switch_to_buffer(parent->state);
}
free(current_buf);
current_buf = parent;
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 4c5495e..1bff55f 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
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
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -63,14 +62,6 @@
/* Using locations. */
#define YYLSP_NEEDED 0
-/* Substitute the variable and function names. */
-#define yyparse zconfparse
-#define yylex zconflex
-#define yyerror zconferror
-#define yylval zconflval
-#define yychar zconfchar
-#define yydebug zconfdebug
-#define yynerrs zconfnerrs
/* Copy the first part of user declarations. */
@@ -98,26 +89,22 @@
int cdebug = PRINTD;
-extern int zconflex(void);
+extern int yylex(void);
static void zconfprint(const char *err, ...);
static void zconf_error(const char *err, ...);
-static void zconferror(const char *err);
-static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
+static void yyerror(const char *err);
+static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
struct symbol *symbol_hash[SYMBOL_HASHSIZE];
static struct menu *current_menu, *current_entry;
-#define YYDEBUG 0
-#if YYDEBUG
-#define YYERROR_VERBOSE
-#endif
/* Enabling traces. */
#ifndef YYDEBUG
-# define YYDEBUG 0
+# define YYDEBUG 1
#endif
/* Enabling verbose error messages. */
@@ -188,7 +175,7 @@ typedef union YYSTYPE
struct symbol *symbol;
struct expr *expr;
struct menu *menu;
- struct kconf_id *id;
+ const struct kconf_id *id;
@@ -255,7 +242,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -535,18 +522,18 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 108, 108, 108, 110, 110, 112, 114, 115, 116,
- 117, 118, 119, 123, 127, 127, 127, 127, 127, 127,
- 127, 127, 131, 132, 133, 134, 135, 136, 140, 141,
- 147, 155, 161, 169, 179, 181, 182, 183, 184, 185,
- 186, 189, 197, 203, 213, 219, 225, 228, 230, 241,
- 242, 247, 256, 261, 269, 272, 274, 275, 276, 277,
- 278, 281, 287, 298, 304, 314, 316, 321, 329, 337,
- 340, 342, 343, 344, 349, 356, 363, 368, 376, 379,
- 381, 382, 383, 386, 394, 401, 408, 414, 421, 423,
- 424, 425, 428, 436, 438, 439, 442, 449, 451, 456,
- 457, 460, 461, 462, 466, 467, 470, 471, 474, 475,
- 476, 477, 478, 479, 480, 483, 484, 487, 488
+ 0, 104, 104, 104, 106, 106, 108, 110, 111, 112,
+ 113, 114, 115, 119, 123, 123, 123, 123, 123, 123,
+ 123, 123, 127, 128, 129, 130, 131, 132, 136, 137,
+ 143, 151, 157, 165, 175, 177, 178, 179, 180, 181,
+ 182, 185, 193, 199, 209, 215, 221, 224, 226, 237,
+ 238, 243, 252, 257, 265, 268, 270, 271, 272, 273,
+ 274, 277, 283, 294, 300, 310, 312, 317, 325, 333,
+ 336, 338, 339, 340, 345, 352, 359, 364, 372, 375,
+ 377, 378, 379, 382, 390, 397, 404, 410, 417, 419,
+ 420, 421, 424, 432, 434, 435, 438, 445, 447, 452,
+ 453, 456, 457, 458, 462, 463, 466, 467, 470, 471,
+ 472, 473, 474, 475, 476, 479, 480, 483, 484
};
#endif
@@ -806,9 +793,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
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
+#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)
@@ -865,7 +861,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1753,7 +1749,7 @@ yyreduce:
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)
menu_add_option(id->token, (yyvsp[(3) - (3)].string));
else
@@ -2258,12 +2254,12 @@ void conf_parse(const char *name)
modules_sym->flags |= SYMBOL_AUTO;
rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
-#if YYDEBUG
- if (getenv("ZCONF_DEBUG"))
- zconfdebug = 1;
-#endif
- zconfparse();
- if (zconfnerrs)
+ if (getenv("ZCONF_DEBUG")) {
+ extern int yydebug;
+ yydebug = 1;
+ }
+ yyparse();
+ if (yynerrs)
exit(1);
if (!modules_sym->prop) {
struct property *prop;
@@ -2278,9 +2274,9 @@ void conf_parse(const char *name)
menu_finalize(&rootmenu);
for_all_symbols(i, sym) {
if (sym_check_deps(sym))
- zconfnerrs++;
+ yynerrs++;
}
- if (zconfnerrs)
+ if (yynerrs)
exit(1);
sym_set_change_count(1);
}
@@ -2300,12 +2296,12 @@ static const char *zconf_tokenname(int 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) {
zconf_error("unexpected '%s' within %s block",
kconf_id_strings + id->name, zconf_tokenname(starttoken));
- zconfnerrs++;
+ yynerrs++;
return false;
}
if (current_menu->file != current_file) {
@@ -2314,7 +2310,7 @@ static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
fprintf(stderr, "%s:%d: location of the '%s'\n",
current_menu->file->name, current_menu->lineno,
zconf_tokenname(starttoken));
- zconfnerrs++;
+ yynerrs++;
return false;
}
return true;
@@ -2335,7 +2331,7 @@ static void zconf_error(const char *err, ...)
{
va_list ap;
- zconfnerrs++;
+ yynerrs++;
fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno());
va_start(ap, err);
vfprintf(stderr, err, ap);
@@ -2343,11 +2339,9 @@ static void zconf_error(const char *err, ...)
fprintf(stderr, "\n");
}
-static void zconferror(const char *err)
+static void yyerror(const char *err)
{
-#if YYDEBUG
fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
-#endif
}
static void print_quoted_string(FILE *out, const char *str)
@@ -2496,7 +2490,7 @@ void zconfdump(FILE *out)
}
}
-#include "lex.zconf.c"
+#include "zconf.lex.c"
#include "util.c"
#include "confdata.c"
#include "expr.c"
--
1.7.3.4.574.g608b.dirty
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [RFCv2 13/13] dtc: regen parser
2011-05-23 8:10 [RFCv2 00/13] Kbuild: factor parser rules Arnaud Lacombe
` (11 preceding siblings ...)
2011-05-23 8:10 ` [RFCv2 12/13] dtc: migrate parser to implicit rules Arnaud Lacombe
@ 2011-05-23 8:10 ` Arnaud Lacombe
2011-05-23 8:39 ` [RFCv2 00/13] Kbuild: factor parser rules Arnaud Lacombe
` (2 subsequent siblings)
15 siblings, 0 replies; 32+ messages in thread
From: Arnaud Lacombe @ 2011-05-23 8:10 UTC (permalink / raw)
To: linux-kbuild; +Cc: Michal Marek, Arnaud Lacombe, David Gibson
Cc: David Gibson <david@gibson.dropbear.id.au>
---
scripts/dtc/dtc-lexer.lex.c_shipped | 60 ++----------------
scripts/dtc/dtc-parser.tab.c_shipped | 118 ++++++----------------------------
scripts/dtc/dtc-parser.tab.h_shipped | 91 --------------------------
3 files changed, 24 insertions(+), 245 deletions(-)
delete mode 100644 scripts/dtc/dtc-parser.tab.h_shipped
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
index 50c4420..db944de 100644
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -1,6 +1,5 @@
-#line 2 "dtc-lexer.lex.c"
-#line 4 "dtc-lexer.lex.c"
+#line 3 "scripts/dtc/dtc-lexer.lex.c_shipped"
#define YY_INT_ALIGNED short int
@@ -54,6 +53,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -84,8 +84,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,15 +140,7 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#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
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -550,7 +540,6 @@ int yy_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
-#line 1 "dtc-lexer.l"
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
@@ -572,13 +561,8 @@ char *yytext;
*/
#define YY_NO_INPUT 1
-
-
-
-#line 37 "dtc-lexer.l"
#include "dtc.h"
#include "srcpos.h"
-#include "dtc-parser.tab.h"
YYLTYPE yylloc;
@@ -603,7 +587,6 @@ static int dts_version = 1;
static void push_input_file(const char *filename);
static int pop_input_file(void);
-#line 607 "dtc-lexer.lex.c"
#define INITIAL 0
#define INCLUDE 1
@@ -686,12 +669,7 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#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
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -710,7 +688,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ unsigned n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -792,10 +770,6 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 66 "dtc-lexer.l"
-
-#line 798 "dtc-lexer.lex.c"
-
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -876,7 +850,6 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 67 "dtc-lexer.l"
{
char *name = strchr(yytext, '\"') + 1;
yytext[yyleng-1] = '\0';
@@ -888,7 +861,6 @@ case YY_STATE_EOF(INCLUDE):
case YY_STATE_EOF(BYTESTRING):
case YY_STATE_EOF(PROPNODENAME):
case YY_STATE_EOF(V1):
-#line 73 "dtc-lexer.l"
{
if (!pop_input_file()) {
yyterminate();
@@ -898,7 +870,6 @@ case YY_STATE_EOF(V1):
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 79 "dtc-lexer.l"
{
DPRINT("String: %s\n", yytext);
yylval.data = data_copy_escape_string(yytext+1,
@@ -908,7 +879,6 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 86 "dtc-lexer.l"
{
DPRINT("Keyword: /dts-v1/\n");
dts_version = 1;
@@ -918,7 +888,6 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 93 "dtc-lexer.l"
{
DPRINT("Keyword: /memreserve/\n");
BEGIN_DEFAULT();
@@ -927,7 +896,6 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 99 "dtc-lexer.l"
{
DPRINT("Label: %s\n", yytext);
yylval.labelref = xstrdup(yytext);
@@ -937,7 +905,6 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 106 "dtc-lexer.l"
{
yylval.literal = xstrdup(yytext);
DPRINT("Literal: '%s'\n", yylval.literal);
@@ -946,7 +913,6 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 112 "dtc-lexer.l"
{ /* label reference */
DPRINT("Ref: %s\n", yytext+1);
yylval.labelref = xstrdup(yytext+1);
@@ -955,7 +921,6 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 118 "dtc-lexer.l"
{ /* new-style path reference */
yytext[yyleng-1] = '\0';
DPRINT("Ref: %s\n", yytext+2);
@@ -965,7 +930,6 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 125 "dtc-lexer.l"
{
yylval.byte = strtol(yytext, NULL, 16);
DPRINT("Byte: %02x\n", (int)yylval.byte);
@@ -974,7 +938,6 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 131 "dtc-lexer.l"
{
DPRINT("/BYTESTRING\n");
BEGIN_DEFAULT();
@@ -983,7 +946,6 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 137 "dtc-lexer.l"
{
DPRINT("PropNodeName: %s\n", yytext);
yylval.propnodename = xstrdup(yytext);
@@ -993,7 +955,6 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 144 "dtc-lexer.l"
{
DPRINT("Binary Include\n");
return DT_INCBIN;
@@ -1002,24 +963,20 @@ YY_RULE_SETUP
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 149 "dtc-lexer.l"
/* eat whitespace */
YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 150 "dtc-lexer.l"
/* eat C-style comments */
YY_BREAK
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 151 "dtc-lexer.l"
/* eat C++-style comments */
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 153 "dtc-lexer.l"
{
DPRINT("Char: %c (\\x%02x)\n", yytext[0],
(unsigned)yytext[0]);
@@ -1037,10 +994,8 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 168 "dtc-lexer.l"
ECHO;
YY_BREAK
-#line 1044 "dtc-lexer.lex.c"
case YY_END_OF_BUFFER:
{
@@ -1756,8 +1711,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -1996,10 +1951,6 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 168 "dtc-lexer.l"
-
-
-
static void push_input_file(const char *filename)
{
assert(filename);
@@ -2011,7 +1962,6 @@ static void push_input_file(const char *filename)
yypush_buffer_state(yy_create_buffer(yyin,YY_BUF_SIZE));
}
-
static int pop_input_file(void)
{
if (srcfile_pop() == 0)
diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped
index 9be2eea..c848aeb 100644
--- a/scripts/dtc/dtc-parser.tab.c_shipped
+++ b/scripts/dtc/dtc-parser.tab.c_shipped
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
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
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -67,8 +66,6 @@
/* Copy the first part of user declarations. */
-/* Line 189 of yacc.c */
-#line 21 "dtc-parser.y"
#include <stdio.h>
@@ -87,12 +84,10 @@ extern int treesource_error;
static unsigned long long eval_literal(const char *s, int base, int bits);
-/* Line 189 of yacc.c */
-#line 92 "dtc-parser.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
-# define YYDEBUG 0
+# define YYDEBUG 1
#endif
/* Enabling verbose error messages. */
@@ -134,8 +129,6 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
typedef union YYSTYPE
{
-/* Line 214 of yacc.c */
-#line 39 "dtc-parser.y"
char *propnodename;
char *literal;
@@ -154,8 +147,6 @@ typedef union YYSTYPE
-/* Line 214 of yacc.c */
-#line 159 "dtc-parser.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -166,8 +157,6 @@ typedef union YYSTYPE
/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
-#line 171 "dtc-parser.tab.c"
#ifdef short
# undef short
@@ -217,7 +206,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -607,9 +596,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
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
+#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)
@@ -666,7 +664,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1405,8 +1403,6 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
-#line 87 "dtc-parser.y"
{
the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
guess_boot_cpuid((yyvsp[(4) - (4)].node)));
@@ -1415,8 +1411,6 @@ yyreduce:
case 3:
-/* Line 1455 of yacc.c */
-#line 95 "dtc-parser.y"
{
(yyval.re) = NULL;
;}
@@ -1424,8 +1418,6 @@ yyreduce:
case 4:
-/* Line 1455 of yacc.c */
-#line 99 "dtc-parser.y"
{
(yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
;}
@@ -1433,8 +1425,6 @@ yyreduce:
case 5:
-/* Line 1455 of yacc.c */
-#line 106 "dtc-parser.y"
{
(yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].addr), (yyvsp[(3) - (4)].addr));
;}
@@ -1442,8 +1432,6 @@ yyreduce:
case 6:
-/* Line 1455 of yacc.c */
-#line 110 "dtc-parser.y"
{
add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.re) = (yyvsp[(2) - (2)].re);
@@ -1452,8 +1440,6 @@ yyreduce:
case 7:
-/* Line 1455 of yacc.c */
-#line 118 "dtc-parser.y"
{
(yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
;}
@@ -1461,8 +1447,6 @@ yyreduce:
case 8:
-/* Line 1455 of yacc.c */
-#line 125 "dtc-parser.y"
{
(yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
;}
@@ -1470,8 +1454,6 @@ yyreduce:
case 9:
-/* Line 1455 of yacc.c */
-#line 129 "dtc-parser.y"
{
(yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
;}
@@ -1479,8 +1461,6 @@ yyreduce:
case 10:
-/* Line 1455 of yacc.c */
-#line 133 "dtc-parser.y"
{
struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
@@ -1494,8 +1474,6 @@ yyreduce:
case 11:
-/* Line 1455 of yacc.c */
-#line 146 "dtc-parser.y"
{
(yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
;}
@@ -1503,8 +1481,6 @@ yyreduce:
case 12:
-/* Line 1455 of yacc.c */
-#line 153 "dtc-parser.y"
{
(yyval.proplist) = NULL;
;}
@@ -1512,8 +1488,6 @@ yyreduce:
case 13:
-/* Line 1455 of yacc.c */
-#line 157 "dtc-parser.y"
{
(yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
;}
@@ -1521,8 +1495,6 @@ yyreduce:
case 14:
-/* Line 1455 of yacc.c */
-#line 164 "dtc-parser.y"
{
(yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
;}
@@ -1530,8 +1502,6 @@ yyreduce:
case 15:
-/* Line 1455 of yacc.c */
-#line 168 "dtc-parser.y"
{
(yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
;}
@@ -1539,8 +1509,6 @@ yyreduce:
case 16:
-/* Line 1455 of yacc.c */
-#line 172 "dtc-parser.y"
{
add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.prop) = (yyvsp[(2) - (2)].prop);
@@ -1549,8 +1517,6 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
-#line 180 "dtc-parser.y"
{
(yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
;}
@@ -1558,8 +1524,6 @@ yyreduce:
case 18:
-/* Line 1455 of yacc.c */
-#line 184 "dtc-parser.y"
{
(yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
;}
@@ -1567,8 +1531,6 @@ yyreduce:
case 19:
-/* Line 1455 of yacc.c */
-#line 188 "dtc-parser.y"
{
(yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
;}
@@ -1576,8 +1538,6 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
-#line 192 "dtc-parser.y"
{
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
;}
@@ -1585,8 +1545,6 @@ yyreduce:
case 21:
-/* Line 1455 of yacc.c */
-#line 196 "dtc-parser.y"
{
FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
struct data d;
@@ -1607,8 +1565,6 @@ yyreduce:
case 22:
-/* Line 1455 of yacc.c */
-#line 213 "dtc-parser.y"
{
FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
struct data d = empty_data;
@@ -1622,8 +1578,6 @@ yyreduce:
case 23:
-/* Line 1455 of yacc.c */
-#line 223 "dtc-parser.y"
{
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;}
@@ -1631,8 +1585,6 @@ yyreduce:
case 24:
-/* Line 1455 of yacc.c */
-#line 230 "dtc-parser.y"
{
(yyval.data) = empty_data;
;}
@@ -1640,8 +1592,6 @@ yyreduce:
case 25:
-/* Line 1455 of yacc.c */
-#line 234 "dtc-parser.y"
{
(yyval.data) = (yyvsp[(1) - (2)].data);
;}
@@ -1649,8 +1599,6 @@ yyreduce:
case 26:
-/* Line 1455 of yacc.c */
-#line 238 "dtc-parser.y"
{
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;}
@@ -1658,8 +1606,6 @@ yyreduce:
case 27:
-/* Line 1455 of yacc.c */
-#line 245 "dtc-parser.y"
{
(yyval.data) = empty_data;
;}
@@ -1667,8 +1613,6 @@ yyreduce:
case 28:
-/* Line 1455 of yacc.c */
-#line 249 "dtc-parser.y"
{
(yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
;}
@@ -1676,8 +1620,6 @@ yyreduce:
case 29:
-/* Line 1455 of yacc.c */
-#line 253 "dtc-parser.y"
{
(yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
(yyvsp[(2) - (2)].labelref)), -1);
@@ -1686,8 +1628,6 @@ yyreduce:
case 30:
-/* Line 1455 of yacc.c */
-#line 258 "dtc-parser.y"
{
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;}
@@ -1695,8 +1635,6 @@ yyreduce:
case 31:
-/* Line 1455 of yacc.c */
-#line 265 "dtc-parser.y"
{
(yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
;}
@@ -1704,8 +1642,6 @@ yyreduce:
case 32:
-/* Line 1455 of yacc.c */
-#line 272 "dtc-parser.y"
{
(yyval.data) = empty_data;
;}
@@ -1713,8 +1649,6 @@ yyreduce:
case 33:
-/* Line 1455 of yacc.c */
-#line 276 "dtc-parser.y"
{
(yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
;}
@@ -1722,8 +1656,6 @@ yyreduce:
case 34:
-/* Line 1455 of yacc.c */
-#line 280 "dtc-parser.y"
{
(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
;}
@@ -1731,8 +1663,6 @@ yyreduce:
case 35:
-/* Line 1455 of yacc.c */
-#line 287 "dtc-parser.y"
{
(yyval.nodelist) = NULL;
;}
@@ -1740,8 +1670,6 @@ yyreduce:
case 36:
-/* Line 1455 of yacc.c */
-#line 291 "dtc-parser.y"
{
(yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
;}
@@ -1749,8 +1677,6 @@ yyreduce:
case 37:
-/* Line 1455 of yacc.c */
-#line 295 "dtc-parser.y"
{
print_error("syntax error: properties must precede subnodes");
YYERROR;
@@ -1759,8 +1685,6 @@ yyreduce:
case 38:
-/* Line 1455 of yacc.c */
-#line 303 "dtc-parser.y"
{
(yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
;}
@@ -1768,8 +1692,6 @@ yyreduce:
case 39:
-/* Line 1455 of yacc.c */
-#line 307 "dtc-parser.y"
{
add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
(yyval.node) = (yyvsp[(2) - (2)].node);
@@ -1778,8 +1700,6 @@ yyreduce:
-/* Line 1455 of yacc.c */
-#line 1783 "dtc-parser.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1990,8 +1910,6 @@ yyreturn:
-/* Line 1675 of yacc.c */
-#line 313 "dtc-parser.y"
void print_error(char const *fmt, ...)
@@ -2026,3 +1944,5 @@ static unsigned long long eval_literal(const char *s, int base, int bits)
return val;
}
+#include "dtc-lexer.lex.c"
+
diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped
deleted file mode 100644
index 95c9547..0000000
--- a/scripts/dtc/dtc-parser.tab.h_shipped
+++ /dev/null
@@ -1,91 +0,0 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* 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.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- DT_V1 = 258,
- DT_MEMRESERVE = 259,
- DT_PROPNODENAME = 260,
- DT_LITERAL = 261,
- DT_BASE = 262,
- DT_BYTE = 263,
- DT_STRING = 264,
- DT_LABEL = 265,
- DT_REF = 266,
- DT_INCBIN = 267
- };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 1676 of yacc.c */
-#line 39 "dtc-parser.y"
-
- char *propnodename;
- char *literal;
- char *labelref;
- unsigned int cbase;
- uint8_t byte;
- struct data data;
-
- uint64_t addr;
- cell_t cell;
- struct property *prop;
- struct property *proplist;
- struct node *node;
- struct node *nodelist;
- struct reserve_info *re;
-
-
-
-/* Line 1676 of yacc.c */
-#line 83 "dtc-parser.tab.h"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
-
-
--
1.7.3.4.574.g608b.dirty
^ permalink raw reply related [flat|nested] 32+ messages in thread