diff --git a/components/checker/Makefile.am b/components/checker/Makefile.am index 514ab5a3b..0043d6ef5 100644 --- a/components/checker/Makefile.am +++ b/components/checker/Makefile.am @@ -6,7 +6,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ checker-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + checker-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libchecker_la_SOURCES = \ diff --git a/components/cluster/Makefile.am b/components/cluster/Makefile.am index 90406efb8..2d4134b0f 100644 --- a/components/cluster/Makefile.am +++ b/components/cluster/Makefile.am @@ -6,7 +6,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ cluster-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + cluster-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libcluster_la_SOURCES = \ diff --git a/components/compat/Makefile.am b/components/compat/Makefile.am index 590da329a..e20e46e93 100644 --- a/components/compat/Makefile.am +++ b/components/compat/Makefile.am @@ -6,7 +6,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ compat-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + compat-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libcompat_la_SOURCES = \ diff --git a/components/demo/Makefile.am b/components/demo/Makefile.am index 7a1f5363f..7f5941e48 100644 --- a/components/demo/Makefile.am +++ b/components/demo/Makefile.am @@ -6,7 +6,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ demo-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + demo-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libdemo_la_SOURCES = \ diff --git a/components/ido_mysql/Makefile.am b/components/ido_mysql/Makefile.am index 058909d1f..5c8b31cf7 100644 --- a/components/ido_mysql/Makefile.am +++ b/components/ido_mysql/Makefile.am @@ -7,7 +7,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ ido_mysql-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + ido_mysql-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libido_mysql_la_SOURCES = \ diff --git a/components/livestatus/Makefile.am b/components/livestatus/Makefile.am index 8af321a16..8f2148f74 100644 --- a/components/livestatus/Makefile.am +++ b/components/livestatus/Makefile.am @@ -6,7 +6,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ livestatus-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + livestatus-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ liblivestatus_la_SOURCES = \ diff --git a/components/notification/Makefile.am b/components/notification/Makefile.am index 4c525af9b..4d5011e6f 100644 --- a/components/notification/Makefile.am +++ b/components/notification/Makefile.am @@ -6,7 +6,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ notification-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + notification-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libnotification_la_SOURCES = \ diff --git a/lib/config/Makefile.am b/lib/config/Makefile.am index 14c4a0203..de516b282 100644 --- a/lib/config/Makefile.am +++ b/lib/config/Makefile.am @@ -4,14 +4,19 @@ pkglib_LTLIBRARIES = \ libconfig.la -BUILT_SOURCES = config_parser.h +BUILT_SOURCES = \ + config_parser.h \ + base-type.cpp + +CLEANFILES = \ + base-type.cpp AM_YFLAGS = -d EXTRA_DIST = \ base-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libconfig_la_SOURCES = \ diff --git a/lib/config/config_parser.cc b/lib/config/config_parser.cc index 6857ef604..83640c768 100644 --- a/lib/config/config_parser.cc +++ b/lib/config/config_parser.cc @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 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 @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "2.7.12-4996" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,21 +58,21 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 1 /* Copy the first part of user declarations. */ +/* Line 371 of yacc.c */ +#line 68 "config_parser.cc" -/* Line 268 of yacc.c */ -#line 71 "../../../lib/config/config_parser.cc" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -82,14 +82,19 @@ # define YYERROR_VERBOSE 1 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_YY_CONFIG_PARSER_HH_INCLUDED +# define YY_YY_CONFIG_PARSER_HH_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; #endif - /* "%code requires" blocks. */ - -/* Line 288 of yacc.c */ +/* Line 387 of yacc.c */ #line 1 "config_parser.yy" /****************************************************************************** @@ -135,9 +140,8 @@ using namespace icinga; - -/* Line 288 of yacc.c */ -#line 141 "../../../lib/config/config_parser.cc" +/* Line 387 of yacc.c */ +#line 145 "config_parser.cc" /* Tokens. */ #ifndef YYTOKENTYPE @@ -213,12 +217,10 @@ using namespace icinga; - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { - -/* Line 293 of yacc.c */ +/* Line 387 of yacc.c */ #line 54 "config_parser.yy" char *text; @@ -232,9 +234,8 @@ typedef union YYSTYPE Array *array; - -/* Line 293 of yacc.c */ -#line 238 "../../../lib/config/config_parser.cc" +/* Line 387 of yacc.c */ +#line 239 "config_parser.cc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -255,9 +256,24 @@ typedef struct YYLTYPE #endif -/* Copy the second part of user declarations. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (ConfigCompiler *context); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ -/* Line 343 of yacc.c */ +#endif /* !YY_YY_CONFIG_PARSER_HH_INCLUDED */ + +/* Copy the second part of user declarations. */ +/* Line 390 of yacc.c */ #line 119 "config_parser.yy" @@ -290,9 +306,8 @@ void ConfigCompiler::Compile(void) #define scanner (context->GetScanner()) - -/* Line 343 of yacc.c */ -#line 296 "../../../lib/config/config_parser.cc" +/* Line 390 of yacc.c */ +#line 311 "config_parser.cc" #ifdef short # undef short @@ -345,24 +360,33 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if (! defined __GNUC__ || __GNUC__ < 2 \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) +# define __attribute__(Spec) /* empty */ # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif + /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint -# define YYID(n) (n) +# define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) @@ -398,6 +422,7 @@ YYID (yyi) # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -491,20 +516,20 @@ union yyalloc #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ while (YYID (0)) # endif # endif @@ -626,7 +651,7 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 1 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -653,7 +678,7 @@ static const char *const yytname[] = "object_inherits_list", "object_inherits_specifier", "expressionlist", "expressions", "expressions_inner", "expression", "operator", "array", "array_items", "array_items_inner", "simplevalue", "constterm", - "constexpression", "value", 0 + "constexpression", "value", YY_NULL }; #endif @@ -781,10 +806,10 @@ static const yytype_int16 yytable[] = 128, 92, 0, 0, 116, 0, 0, 0, 0, 13 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-43)) +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-43))) -#define yytable_value_is_error(yytable_value) \ +#define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = @@ -853,23 +878,24 @@ static const yytype_uint8 yystos[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) - +/* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 @@ -878,27 +904,28 @@ while (YYID (0)) If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ while (YYID (0)) #endif +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know @@ -906,10 +933,46 @@ while (YYID (0)) #ifndef YY_LOCATION_PRINT # 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, \ - (Loc).last_line, (Loc).last_column) + +/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ + +__attribute__((__unused__)) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static unsigned +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +#else +static unsigned +yy_location_print_ (yyo, yylocp) + FILE *yyo; + YYLTYPE const * const yylocp; +#endif +{ + unsigned res = 0; + int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; + if (0 <= yylocp->first_line) + { + res += fprintf (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += fprintf (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += fprintf (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += fprintf (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += fprintf (yyo, "-%d", end_col); + } + return res; + } + +# define YY_LOCATION_PRINT(File, Loc) \ + yy_location_print_ (File, &(Loc)) + # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -917,7 +980,6 @@ while (YYID (0)) /* YYLEX -- calling `yylex' with the right arguments. */ - #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) #else @@ -969,6 +1031,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) ConfigCompiler *context; #endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; YYUSE (yylocationp); @@ -979,11 +1043,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) # else YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1228,12 +1288,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULL; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1293,11 +1352,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1317,10 +1378,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1380,29 +1443,10 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YYUSE (yytype); } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (ConfigCompiler *context); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /*----------. @@ -1434,11 +1478,40 @@ yyparse (context) /* The lookahead symbol. */ int yychar; + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +static YYSTYPE yyval_default; +# define YY_INITIAL_VALUE(Value) = Value +#endif +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); /* Location data for the lookahead symbol. */ -YYLTYPE yylloc; +YYLTYPE yylloc = yyloc_default; + /* Number of syntax errors so far. */ int yynerrs; @@ -1452,7 +1525,7 @@ YYLTYPE yylloc; `yyvs': related to semantic values. `yyls': related to locations. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1478,7 +1551,7 @@ YYLTYPE yylloc; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1497,10 +1570,9 @@ YYLTYPE yylloc; Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yyls = yylsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yylsp = yyls = yylsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1509,21 +1581,7 @@ YYLTYPE yylloc; yyerrstatus = 0; yynerrs = 0; 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 defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 1; -#endif - + yylsp[0] = yylloc; goto yysetstate; /*------------------------------------------------------------. @@ -1669,7 +1727,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; goto yynewstate; @@ -1707,8 +1767,7 @@ yyreduce: switch (yyn) { case 9: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 160 "config_parser.yy" { context->HandleInclude((yyvsp[(2) - (2)].text), false, yylloc); @@ -1717,8 +1776,7 @@ yyreduce: break; case 10: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 165 "config_parser.yy" { context->HandleInclude((yyvsp[(2) - (2)].text), true, yylloc); @@ -1727,8 +1785,7 @@ yyreduce: break; case 11: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 171 "config_parser.yy" { context->HandleLibrary((yyvsp[(2) - (2)].text)); @@ -1737,8 +1794,7 @@ yyreduce: break; case 12: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 177 "config_parser.yy" { ScriptVariable::Set((yyvsp[(2) - (4)].text), *(yyvsp[(4) - (4)].variant)); @@ -1748,8 +1804,7 @@ yyreduce: break; case 14: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 185 "config_parser.yy" { (yyval.text) = (yyvsp[(1) - (1)].text); @@ -1757,8 +1812,7 @@ yyreduce: break; case 15: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 191 "config_parser.yy" { String name = String((yyvsp[(3) - (3)].text)); @@ -1777,8 +1831,7 @@ yyreduce: break; case 16: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 206 "config_parser.yy" { TypeRuleList::Ptr ruleList = *(yyvsp[(6) - (6)].variant); @@ -1794,8 +1847,7 @@ yyreduce: break; case 17: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 220 "config_parser.yy" { (yyval.num) = 0; @@ -1803,8 +1855,7 @@ yyreduce: break; case 18: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 224 "config_parser.yy" { (yyval.num) = 1; @@ -1812,8 +1863,7 @@ yyreduce: break; case 19: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 230 "config_parser.yy" { m_RuleLists.push(boost::make_shared()); @@ -1821,8 +1871,7 @@ yyreduce: break; case 20: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 235 "config_parser.yy" { (yyval.variant) = new Value(m_RuleLists.top()); @@ -1831,8 +1880,7 @@ yyreduce: break; case 26: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 250 "config_parser.yy" { m_RuleLists.top()->AddRequire((yyvsp[(2) - (2)].text)); @@ -1841,8 +1889,7 @@ yyreduce: break; case 27: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 255 "config_parser.yy" { m_RuleLists.top()->SetValidator((yyvsp[(2) - (2)].text)); @@ -1851,8 +1898,7 @@ yyreduce: break; case 28: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 260 "config_parser.yy" { TypeRule rule((yyvsp[(2) - (3)].type), String(), (yyvsp[(3) - (3)].text), TypeRuleList::Ptr(), yylloc); @@ -1863,8 +1909,7 @@ yyreduce: break; case 29: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 267 "config_parser.yy" { TypeRule rule((yyvsp[(2) - (6)].type), (yyvsp[(4) - (6)].text), (yyvsp[(6) - (6)].text), TypeRuleList::Ptr(), yylloc); @@ -1876,8 +1921,7 @@ yyreduce: break; case 30: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 275 "config_parser.yy" { TypeRule rule((yyvsp[(2) - (4)].type), String(), (yyvsp[(3) - (4)].text), *(yyvsp[(4) - (4)].variant), yylloc); @@ -1888,8 +1932,7 @@ yyreduce: break; case 32: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 285 "config_parser.yy" { m_Type->SetParent((yyvsp[(2) - (2)].text)); @@ -1898,8 +1941,7 @@ yyreduce: break; case 39: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 298 "config_parser.yy" { (yyval.type) = (yyvsp[(1) - (1)].type); @@ -1907,8 +1949,7 @@ yyreduce: break; case 40: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 304 "config_parser.yy" { m_Abstract = false; @@ -1916,8 +1957,7 @@ yyreduce: break; case 41: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 308 "config_parser.yy" { ConfigItemBuilder::Ptr item = boost::make_shared(yylloc); @@ -1957,8 +1997,7 @@ yyreduce: break; case 43: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 347 "config_parser.yy" { m_Abstract = true; @@ -1966,8 +2005,7 @@ yyreduce: break; case 46: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 356 "config_parser.yy" { m_Abstract = true; @@ -1975,8 +2013,7 @@ yyreduce: break; case 47: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 362 "config_parser.yy" { (yyval.slist) = NULL; @@ -1984,8 +2021,7 @@ yyreduce: break; case 48: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 366 "config_parser.yy" { (yyval.slist) = new std::vector(); @@ -1995,8 +2031,7 @@ yyreduce: break; case 49: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 372 "config_parser.yy" { if ((yyvsp[(1) - (3)].slist)) @@ -2010,8 +2045,7 @@ yyreduce: break; case 50: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 384 "config_parser.yy" { (yyval.slist) = NULL; @@ -2019,8 +2053,7 @@ yyreduce: break; case 51: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 388 "config_parser.yy" { (yyval.slist) = (yyvsp[(2) - (2)].slist); @@ -2028,8 +2061,7 @@ yyreduce: break; case 52: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 394 "config_parser.yy" { (yyval.exprl) = (yyvsp[(2) - (3)].exprl); @@ -2037,8 +2069,7 @@ yyreduce: break; case 53: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 400 "config_parser.yy" { (yyval.exprl) = (yyvsp[(1) - (1)].exprl); @@ -2046,8 +2077,7 @@ yyreduce: break; case 54: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 404 "config_parser.yy" { (yyval.exprl) = (yyvsp[(1) - (2)].exprl); @@ -2055,8 +2085,7 @@ yyreduce: break; case 55: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 409 "config_parser.yy" { (yyval.exprl) = NULL; @@ -2064,8 +2093,7 @@ yyreduce: break; case 56: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 413 "config_parser.yy" { (yyval.exprl) = new ExpressionList(); @@ -2075,8 +2103,7 @@ yyreduce: break; case 57: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 419 "config_parser.yy" { if ((yyvsp[(1) - (3)].exprl)) @@ -2090,8 +2117,7 @@ yyreduce: break; case 58: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 431 "config_parser.yy" { (yyval.expr) = new Expression((yyvsp[(1) - (3)].text), (yyvsp[(2) - (3)].op), *(yyvsp[(3) - (3)].variant), yylloc); @@ -2101,8 +2127,7 @@ yyreduce: break; case 59: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 437 "config_parser.yy" { Expression subexpr((yyvsp[(3) - (6)].text), (yyvsp[(5) - (6)].op), *(yyvsp[(6) - (6)].variant), yylloc); @@ -2118,8 +2143,7 @@ yyreduce: break; case 64: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 455 "config_parser.yy" { (yyval.op) = (yyvsp[(1) - (1)].op); @@ -2127,8 +2151,7 @@ yyreduce: break; case 65: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 461 "config_parser.yy" { (yyval.array) = (yyvsp[(2) - (3)].array); @@ -2136,8 +2159,7 @@ yyreduce: break; case 66: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 467 "config_parser.yy" { (yyval.array) = (yyvsp[(1) - (1)].array); @@ -2145,8 +2167,7 @@ yyreduce: break; case 67: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 471 "config_parser.yy" { (yyval.array) = (yyvsp[(1) - (2)].array); @@ -2154,8 +2175,7 @@ yyreduce: break; case 68: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 476 "config_parser.yy" { (yyval.array) = NULL; @@ -2163,8 +2183,7 @@ yyreduce: break; case 69: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 480 "config_parser.yy" { (yyval.array) = new Array(); @@ -2183,8 +2202,7 @@ yyreduce: break; case 70: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 495 "config_parser.yy" { if ((yyvsp[(1) - (3)].array)) @@ -2206,8 +2224,7 @@ yyreduce: break; case 71: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 515 "config_parser.yy" { (yyval.variant) = new Value((yyvsp[(1) - (1)].text)); @@ -2216,8 +2233,7 @@ yyreduce: break; case 72: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 520 "config_parser.yy" { (yyval.variant) = new Value((yyvsp[(1) - (1)].num)); @@ -2225,8 +2241,7 @@ yyreduce: break; case 73: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 524 "config_parser.yy" { (yyval.variant) = new Value(); @@ -2234,8 +2249,7 @@ yyreduce: break; case 74: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 528 "config_parser.yy" { if ((yyvsp[(1) - (1)].array) == NULL) @@ -2247,8 +2261,7 @@ yyreduce: break; case 75: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 538 "config_parser.yy" { (yyval.num) = (yyvsp[(2) - (3)].num); @@ -2256,8 +2269,7 @@ yyreduce: break; case 76: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 543 "config_parser.yy" { (yyval.num) = (yyvsp[(1) - (1)].num); @@ -2265,8 +2277,7 @@ yyreduce: break; case 77: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 547 "config_parser.yy" { (yyval.num) = ScriptVariable::Get((yyvsp[(1) - (1)].text)); @@ -2275,8 +2286,7 @@ yyreduce: break; case 78: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 552 "config_parser.yy" { (yyval.num) = (yyvsp[(1) - (3)].num) + (yyvsp[(3) - (3)].num); @@ -2284,8 +2294,7 @@ yyreduce: break; case 79: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 556 "config_parser.yy" { (yyval.num) = (yyvsp[(1) - (3)].num) - (yyvsp[(3) - (3)].num); @@ -2293,8 +2302,7 @@ yyreduce: break; case 80: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 560 "config_parser.yy" { (yyval.num) = (yyvsp[(1) - (3)].num) * (yyvsp[(3) - (3)].num); @@ -2302,8 +2310,7 @@ yyreduce: break; case 81: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 564 "config_parser.yy" { (yyval.num) = (yyvsp[(1) - (3)].num) / (yyvsp[(3) - (3)].num); @@ -2311,8 +2318,7 @@ yyreduce: break; case 82: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 568 "config_parser.yy" { (yyval.num) = (long)(yyvsp[(1) - (3)].num) & (long)(yyvsp[(3) - (3)].num); @@ -2320,8 +2326,7 @@ yyreduce: break; case 83: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 572 "config_parser.yy" { (yyval.num) = (long)(yyvsp[(1) - (3)].num) | (long)(yyvsp[(3) - (3)].num); @@ -2329,8 +2334,7 @@ yyreduce: break; case 84: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 576 "config_parser.yy" { (yyval.num) = (long)(yyvsp[(1) - (3)].num) << (long)(yyvsp[(3) - (3)].num); @@ -2338,8 +2342,7 @@ yyreduce: break; case 85: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 580 "config_parser.yy" { (yyval.num) = (long)(yyvsp[(1) - (3)].num) >> (long)(yyvsp[(3) - (3)].num); @@ -2347,8 +2350,7 @@ yyreduce: break; case 86: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 584 "config_parser.yy" { (yyval.num) = (yyvsp[(2) - (3)].num); @@ -2356,8 +2358,7 @@ yyreduce: break; case 88: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 591 "config_parser.yy" { ExpressionList::Ptr exprl = ExpressionList::Ptr((yyvsp[(1) - (1)].exprl)); @@ -2366,8 +2367,7 @@ yyreduce: break; case 89: - -/* Line 1806 of yacc.c */ +/* Line 1787 of yacc.c */ #line 596 "config_parser.yy" { (yyval.variant) = new Value((yyvsp[(1) - (1)].num)); @@ -2375,9 +2375,8 @@ yyreduce: break; - -/* Line 1806 of yacc.c */ -#line 2381 "../../../lib/config/config_parser.cc" +/* Line 1787 of yacc.c */ +#line 2380 "config_parser.cc" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2542,7 +2541,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of @@ -2571,7 +2572,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2613,8 +2614,6 @@ yyreturn: } - -/* Line 2067 of yacc.c */ +/* Line 2050 of yacc.c */ #line 600 "config_parser.yy" - diff --git a/lib/icinga/Makefile.am b/lib/icinga/Makefile.am index 62a378601..07cf03f82 100644 --- a/lib/icinga/Makefile.am +++ b/lib/icinga/Makefile.am @@ -7,7 +7,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ icinga-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + icinga-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libicinga_la_SOURCES = \ diff --git a/lib/ido/Makefile.am b/lib/ido/Makefile.am index b9057a7ec..6df48fde1 100644 --- a/lib/ido/Makefile.am +++ b/lib/ido/Makefile.am @@ -6,7 +6,12 @@ pkglib_LTLIBRARIES = \ EXTRA_DIST = \ ido-type.conf -.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig.c +BUILT_SOURCES = \ + ido-type.cpp + +CLEANFILES = $(BUILT_SOURCES) + +.conf.cpp: $(top_builddir)/tools/mkembedconfig/mkembedconfig $(top_builddir)/tools/mkembedconfig/mkembedconfig $< $@ libido_la_SOURCES = \