Ian Jackson
2012-Apr-25 10:58 UTC
[PATCH 1/2] libxl: provide "realclean" to remove autogenerated files
This removes even the files committed into the tree. One consequence is that it becomes easier to reliably force a total rebuild. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> diff -r 841b7e3bd1f9 tools/libxl/Makefile --- a/tools/libxl/Makefile Wed Apr 25 11:44:09 2012 +0100 +++ b/tools/libxl/Makefile Wed Apr 25 11:52:58 2012 +0100 @@ -70,8 +70,9 @@ LIBXL_OBJS += _libxl_types.o libxl_flask $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h -AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h -AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c +AUTO_STEMS := $(basename $(wildcard *.[ly])) +AUTOINCS= $(addsuffix .h, $(AUTO_STEMS)) _libxl_list.h +AUTOSRCS= $(addsuffix .c, $(AUTO_STEMS)) LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \ libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o $(LIBXLU_OBJS): CFLAGS += $(CFLAGS_libxenctrl) # For xentoollog.h @@ -182,8 +183,10 @@ clean: $(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS) $(RM) -f _*.c *.pyc _libxl_paths.*.tmp $(RM) -f testidl.c.new testidl.c -# $(RM) -f $(AUTOSRCS) $(AUTOINCS) distclean: clean +realclean: distclean + $(RM) -f $(AUTOSRCS) $(AUTOINCS) + -include $(DEPS)
No intentional functional change. The following hopefully
non-functional changes:
* Regenerate parsers with Bison 2.4.1 (Debian''s 1:2.4.1.dfsg-3 i386)
* Whitespace fixes previously done to the whole of libxl are
undone as far as they effect these files;
* Remove semiautomatically-added "Local variables" stanzas from
autogenerated files.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff -r 841b7e3bd1f9 tools/libxl/libxlu_cfg_l.c
--- a/tools/libxl/libxlu_cfg_l.c Wed Apr 25 11:44:09 2012 +0100
+++ b/tools/libxl/libxlu_cfg_l.c Wed Apr 25 11:53:23 2012 +0100
@@ -34,7 +34,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -185,7 +185,7 @@ typedef struct yy_buffer_state *YY_BUFFE
/* Note: We specifically omit the test for yy_rule_can_match_eol because it
requires
* access to the local variable yy_act. Since yyless() is a macro, it
would break
- * existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex.
+ * existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex.
* One obvious solution it to make yy_act a global. I tried that, and
saw
* a 5% performance hit in a non-yylineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
@@ -197,7 +197,7 @@ typedef struct yy_buffer_state *YY_BUFFE
if ( yytext[yyl] == ''\n'' )\
--yylineno;\
}while(0)
-
+
/* Return all but the first "n" matched characters back to the input
stream. */
#define yyless(n) \
do \
@@ -259,7 +259,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -574,9 +574,9 @@ static int yy_init_globals (yyscan_t yys
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
# define yylval yyg->yylval_r
-
+
# define yylloc yyg->yylloc_r
-
+
int xlu__cfg_yylex_init (yyscan_t* scanner);
int xlu__cfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -615,9 +615,9 @@ YYSTYPE * xlu__cfg_yyget_lval (yyscan_t
void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner );
-
+
void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -845,7 +845,7 @@ yy_find_action:
int yyl;
for ( yyl = yyg->yy_more_len; yyl < yyleng; ++yyl )
if ( yytext[yyl] == ''\n'' )
-
+
do{ yylineno++;
yycolumn=0;
}while(0)
@@ -1377,7 +1377,7 @@ static int yy_get_next_buffer (yyscan_t
yyg->yy_hold_char = *++yyg->yy_c_buf_p;
if ( c == ''\n'' )
-
+
do{ yylineno++;
yycolumn=0;
}while(0)
@@ -1460,7 +1460,7 @@ static void xlu__cfg_yy_load_buffer_stat
YY_BUFFER_STATE xlu__cfg_yy_create_buffer (FILE * file, int size ,
yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) xlu__cfg_yyalloc(sizeof( struct yy_buffer_state )
,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in
xlu__cfg_yy_create_buffer()" );
@@ -1504,7 +1504,7 @@ static void xlu__cfg_yy_load_buffer_stat
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
-
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a xlu__cfg_yyrestart() or at EOF.
@@ -1530,7 +1530,7 @@ extern int isatty (int );
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+
errno = oerrno;
}
@@ -1636,9 +1636,9 @@ static void xlu__cfg_yyensure_buffer_sta
, yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in
xlu__cfg_yyensure_buffer_stack()" );
-
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct
yy_buffer_state*));
-
+
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
@@ -1667,12 +1667,12 @@ static void xlu__cfg_yyensure_buffer_sta
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE xlu__cfg_yy_scan_buffer (char * base, yy_size_t size ,
yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -1708,7 +1708,7 @@ YY_BUFFER_STATE xlu__cfg_yy_scan_buffer
*/
YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char * yystr , yyscan_t
yyscanner)
{
-
+
return xlu__cfg_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
@@ -1725,7 +1725,7 @@ YY_BUFFER_STATE xlu__cfg_yy_scan_bytes
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB''s. */
n = _yybytes_len + 2;
buf = (char *) xlu__cfg_yyalloc(n ,yyscanner );
@@ -1793,10 +1793,10 @@ YY_EXTRA_TYPE xlu__cfg_yyget_extra (yys
int xlu__cfg_yyget_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yylineno;
}
@@ -1806,10 +1806,10 @@ int xlu__cfg_yyget_lineno (yyscan_t yys
int xlu__cfg_yyget_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yycolumn;
}
@@ -1870,8 +1870,8 @@ void xlu__cfg_yyset_lineno (int line_nu
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "xlu__cfg_yyset_lineno called with no
buffer" , yyscanner);
-
+ yy_fatal_error( "xlu__cfg_yyset_lineno called with no
buffer" , yyscanner);
+
yylineno = line_number;
}
@@ -1885,8 +1885,8 @@ void xlu__cfg_yyset_column (int column_
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "xlu__cfg_yyset_column called with no
buffer" , yyscanner);
-
+ yy_fatal_error( "xlu__cfg_yyset_column called with no
buffer" , yyscanner);
+
yycolumn = column_no;
}
@@ -1939,13 +1939,13 @@ YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc;
}
-
+
void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param;
}
-
+
/* User-visible API */
/* xlu__cfg_yylex_init is special because it creates the scanner itself, so it
is
@@ -1993,20 +1993,20 @@ int xlu__cfg_yylex_init_extra(YY_EXTRA_T
errno = EINVAL;
return 1;
}
-
+
*ptr_yy_globals = (yyscan_t) xlu__cfg_yyalloc ( sizeof( struct yyguts_t ),
&dummy_yyguts );
-
+
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
-
+
/* By setting to 0xAA, we expose bugs in
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
+
xlu__cfg_yyset_extra (yy_user_defined, *ptr_yy_globals);
-
+
return yy_init_globals ( *ptr_yy_globals );
}
@@ -2122,11 +2122,3 @@ void xlu__cfg_yyfree (void * ptr , yysca
#define YYTABLES_NAME "yytables"
#line 104 "libxlu_cfg_l.l"
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r 841b7e3bd1f9 tools/libxl/libxlu_cfg_l.h
--- a/tools/libxl/libxlu_cfg_l.h Wed Apr 25 11:44:09 2012 +0100
+++ b/tools/libxl/libxlu_cfg_l.h Wed Apr 25 11:53:23 2012 +0100
@@ -38,7 +38,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -55,7 +55,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -193,7 +193,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -281,9 +281,9 @@ YYSTYPE * xlu__cfg_yyget_lval (yyscan_t
void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner );
-
+
void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -355,11 +355,3 @@ extern int xlu__cfg_yylex \
#line 356 "libxlu_cfg_l.h"
#undef xlu__cfg_yyIN_HEADER
#endif /* xlu__cfg_yyHEADER_H */
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r 841b7e3bd1f9 tools/libxl/libxlu_cfg_y.c
--- a/tools/libxl/libxlu_cfg_y.c Wed Apr 25 11:44:09 2012 +0100
+++ b/tools/libxl/libxlu_cfg_y.c Wed Apr 25 11:53:23 2012 +0100
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison''s Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ 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
@@ -29,7 +28,7 @@
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. */
@@ -47,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,41 +54,28 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 1
/* Substitute the variable and function names. */
-#define yyparse xlu__cfg_yyparse
-#define yylex xlu__cfg_yylex
-#define yyerror xlu__cfg_yyerror
-#define yylval xlu__cfg_yylval
-#define yychar xlu__cfg_yychar
-#define yydebug xlu__cfg_yydebug
-#define yynerrs xlu__cfg_yynerrs
-#define yylloc xlu__cfg_yylloc
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- IDENT = 258,
- STRING = 259,
- NUMBER = 260,
- NEWLINE = 261
- };
-#endif
-/* Tokens. */
-#define IDENT 258
-#define STRING 259
-#define NUMBER 260
-#define NEWLINE 261
-
-
-
+#define yyparse xlu__cfg_yyparse
+#define yylex xlu__cfg_yylex
+#define yyerror xlu__cfg_yyerror
+#define yylval xlu__cfg_yylval
+#define yychar xlu__cfg_yychar
+#define yydebug xlu__cfg_yydebug
+#define yynerrs xlu__cfg_yynerrs
+#define yylloc xlu__cfg_yylloc
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 19 "libxlu_cfg_y.y"
#define YYLEX_PARAM ctx->scanner
@@ -97,6 +83,9 @@
#include "libxlu_cfg_l.h"
+/* Line 189 of yacc.c */
+#line 88 "libxlu_cfg_y.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -115,19 +104,40 @@
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IDENT = 258,
+ STRING = 259,
+ NUMBER = 260,
+ NEWLINE = 261
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c */
#line 25 "libxlu_cfg_y.y"
-{
+
char *string;
XLU_ConfigSetting *setting;
-}
-/* Line 187 of yacc.c. */
-#line 127 "libxlu_cfg_y.c"
- YYSTYPE;
+
+
+
+/* Line 214 of yacc.c */
+#line 137 "libxlu_cfg_y.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -147,8 +157,8 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 152 "libxlu_cfg_y.c"
+/* Line 264 of yacc.c */
+#line 162 "libxlu_cfg_y.c"
#ifdef short
# undef short
@@ -223,14 +233,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -312,9 +322,9 @@ void free (void *); /* INFRINGES ON USER
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -349,12 +359,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -451,7 +461,7 @@ static const yytype_uint8 yyrline[] static const char
*const yytname[] {
"$end", "error", "$undefined",
"IDENT", "STRING", "NUMBER", "NEWLINE",
- "''=''", "'';''",
"''[''", "'']''",
"'',''", "$accept", "file",
"setting", "@1",
+ "''=''", "'';''",
"''[''", "'']''",
"'',''", "$accept", "file",
"setting", "$@1",
"endstmt", "value", "atom",
"valuelist", "values", "nlok", 0
};
#endif
@@ -732,17 +742,20 @@ yy_symbol_print (yyoutput, yytype, yyval
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -778,11 +791,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, c
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) , ctx);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -819,7 +832,7 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
+
#if YYERROR_VERBOSE
@@ -1030,7 +1043,7 @@ yysyntax_error (char *yyresult, int yyst
}
}
#endif /* YYERROR_VERBOSE */
-
+
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -1062,39 +1075,67 @@ yydestruct (yymsg, yytype, yyvaluep, yyl
switch (yytype)
{
case 3: /* "IDENT" */
+
+/* Line 1000 of yacc.c */
#line 40 "libxlu_cfg_y.y"
{ free((yyvaluep->string)); };
-#line 1068 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c */
+#line 1085 "libxlu_cfg_y.c"
break;
case 4: /* "STRING" */
+
+/* Line 1000 of yacc.c */
#line 40 "libxlu_cfg_y.y"
{ free((yyvaluep->string)); };
-#line 1073 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c */
+#line 1094 "libxlu_cfg_y.c"
break;
case 5: /* "NUMBER" */
+
+/* Line 1000 of yacc.c */
#line 40 "libxlu_cfg_y.y"
{ free((yyvaluep->string)); };
-#line 1078 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c */
+#line 1103 "libxlu_cfg_y.c"
break;
case 17: /* "value" */
+
+/* Line 1000 of yacc.c */
#line 43 "libxlu_cfg_y.y"
{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1083 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c */
+#line 1112 "libxlu_cfg_y.c"
break;
case 18: /* "atom" */
+
+/* Line 1000 of yacc.c */
#line 40 "libxlu_cfg_y.y"
{ free((yyvaluep->string)); };
-#line 1088 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c */
+#line 1121 "libxlu_cfg_y.c"
break;
case 19: /* "valuelist" */
+
+/* Line 1000 of yacc.c */
#line 43 "libxlu_cfg_y.y"
{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1093 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c */
+#line 1130 "libxlu_cfg_y.c"
break;
case 20: /* "values" */
+
+/* Line 1000 of yacc.c */
#line 43 "libxlu_cfg_y.y"
{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1098 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c */
+#line 1139 "libxlu_cfg_y.c"
break;
default:
@@ -1102,9 +1143,7 @@ yydestruct (yymsg, yytype, yyvaluep, yyl
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1123,10 +1162,9 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1150,24 +1188,59 @@ yyparse (ctx)
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
+ /* Number of syntax errors so far. */
+ int yynerrs;
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss'': related to states.
+ `yyvs'': related to semantic values.
+ `yyls'': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[2];
+
+ YYSIZE_T yystacksize;
+
int yyn;
int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -1175,63 +1248,37 @@ YYLTYPE yylloc;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
- /* Three stacks and their tools:
- `yyss'': related to states,
- `yyvs'': related to semantic values,
- `yyls'': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
-
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
-
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
- YYSIZE_T yystacksize = YYINITDEPTH;
-
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
- YYLTYPE yyloc;
-
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
+
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
goto yysetstate;
@@ -1270,6 +1317,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -1291,9 +1339,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1314,6 +1362,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -1322,16 +1373,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don''t already have one. */
+ lookahead token if we need one and don''t already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don''t already have one.
*/
+ /* Not known => get a lookahead token if don''t already have one.
*/
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1363,20 +1414,16 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1417,58 +1464,79 @@ yyreduce:
switch (yyn)
{
case 4:
+
+/* Line 1455 of yacc.c */
#line 50 "libxlu_cfg_y.y"
{ xlu__cfg_set_store(ctx,(yyvsp[(1) - (3)].string),(yyvsp[(3) -
(3)].setting),(yylsp[(3) - (3)]).first_line); ;}
break;
case 10:
+
+/* Line 1455 of yacc.c */
#line 58 "libxlu_cfg_y.y"
{ (yyval.setting)= xlu__cfg_set_mk(ctx,1,(yyvsp[(1) - (1)].string)); ;}
break;
case 11:
+
+/* Line 1455 of yacc.c */
#line 59 "libxlu_cfg_y.y"
{ (yyval.setting)= (yyvsp[(3) - (4)].setting); ;}
break;
case 12:
+
+/* Line 1455 of yacc.c */
#line 61 "libxlu_cfg_y.y"
{ (yyval.string)= (yyvsp[(1) - (1)].string); ;}
break;
case 13:
+
+/* Line 1455 of yacc.c */
#line 62 "libxlu_cfg_y.y"
{ (yyval.string)= (yyvsp[(1) - (1)].string); ;}
break;
case 14:
+
+/* Line 1455 of yacc.c */
#line 64 "libxlu_cfg_y.y"
{ (yyval.setting)= xlu__cfg_set_mk(ctx,0,0); ;}
break;
case 15:
+
+/* Line 1455 of yacc.c */
#line 65 "libxlu_cfg_y.y"
{ (yyval.setting)= (yyvsp[(1) - (1)].setting); ;}
break;
case 16:
+
+/* Line 1455 of yacc.c */
#line 66 "libxlu_cfg_y.y"
{ (yyval.setting)= (yyvsp[(1) - (3)].setting); ;}
break;
case 17:
+
+/* Line 1455 of yacc.c */
#line 68 "libxlu_cfg_y.y"
{ (yyval.setting)= xlu__cfg_set_mk(ctx,2,(yyvsp[(1) - (2)].string)); ;}
break;
case 18:
+
+/* Line 1455 of yacc.c */
#line 69 "libxlu_cfg_y.y"
{ xlu__cfg_set_add(ctx,(yyvsp[(1) - (5)].setting),(yyvsp[(4) -
(5)].string)); (yyval.setting)= (yyvsp[(1) - (5)].setting); ;}
break;
-/* Line 1267 of yacc.c. */
-#line 1472 "libxlu_cfg_y.c"
+
+/* Line 1455 of yacc.c */
+#line 1540 "libxlu_cfg_y.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1544,7 +1612,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -1561,7 +1629,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -1619,14 +1687,11 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
+ the lookahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
@@ -1651,7 +1716,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -1662,7 +1727,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc, ctx);
/* Do not reclaim the symbols of the rule which action triggered
@@ -1689,11 +1754,3 @@ yyreturn:
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r 841b7e3bd1f9 tools/libxl/libxlu_cfg_y.h
--- a/tools/libxl/libxlu_cfg_y.h Wed Apr 25 11:44:09 2012 +0100
+++ b/tools/libxl/libxlu_cfg_y.h Wed Apr 25 11:53:23 2012 +0100
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+
+/* 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
+
+ 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
+
+ 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 2, or (at your option)
- any later version.
-
+ 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ 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
@@ -29,10 +28,11 @@
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
@@ -45,28 +45,27 @@
NEWLINE = 261
};
#endif
-/* Tokens. */
-#define IDENT 258
-#define STRING 259
-#define NUMBER 260
-#define NEWLINE 261
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
+{
+
+/* Line 1676 of yacc.c */
#line 25 "libxlu_cfg_y.y"
-{
+
char *string;
XLU_ConfigSetting *setting;
-}
-/* Line 1489 of yacc.c. */
-#line 66 "libxlu_cfg_y.h"
- YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c */
+#line 65 "libxlu_cfg_y.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -86,10 +85,3 @@ typedef struct YYLTYPE
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r 841b7e3bd1f9 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c Wed Apr 25 11:44:09 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.c Wed Apr 25 11:53:23 2012 +0100
@@ -2517,11 +2517,3 @@ void xlu__disk_yyfree (void * ptr , yysc
#define YYTABLES_NAME "yytables"
#line 227 "libxlu_disk_l.l"
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r 841b7e3bd1f9 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h Wed Apr 25 11:44:09 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.h Wed Apr 25 11:53:23 2012 +0100
@@ -345,11 +345,3 @@ extern int xlu__disk_yylex (yyscan_t yys
#line 346 "libxlu_disk_l.h"
#undef xlu__disk_yyIN_HEADER
#endif /* xlu__disk_yyHEADER_H */
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */