diff options
Diffstat (limited to '3rdparty')
-rw-r--r-- | 3rdparty/libconfig/extra/gen/clangwarnings.patch | 2 | ||||
-rw-r--r-- | 3rdparty/libconfig/extra/gen/scanner.l | 4 | ||||
-rw-r--r-- | 3rdparty/libconfig/grammar.c | 475 | ||||
-rw-r--r-- | 3rdparty/libconfig/grammar.h | 13 | ||||
-rw-r--r-- | 3rdparty/libconfig/libconfig.c | 7 | ||||
-rw-r--r-- | 3rdparty/libconfig/scanner.c | 248 | ||||
-rw-r--r-- | 3rdparty/libconfig/scanner.h | 2 |
7 files changed, 406 insertions, 345 deletions
diff --git a/3rdparty/libconfig/extra/gen/clangwarnings.patch b/3rdparty/libconfig/extra/gen/clangwarnings.patch index 65aef9a08..4240f84d2 100644 --- a/3rdparty/libconfig/extra/gen/clangwarnings.patch +++ b/3rdparty/libconfig/extra/gen/clangwarnings.patch @@ -2,7 +2,7 @@ diff --git a/grammar.c b/grammar.c index 3595578..26444f8 100644 --- a/grammar.c +++ b/grammar.c -@@ -1187,9 +1187,7 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx, +@@ -1211,9 +1211,7 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx, YYUSE (ctx); YYUSE (scan_ctx); diff --git a/3rdparty/libconfig/extra/gen/scanner.l b/3rdparty/libconfig/extra/gen/scanner.l index bf527e596..7c71f047e 100644 --- a/3rdparty/libconfig/extra/gen/scanner.l +++ b/3rdparty/libconfig/extra/gen/scanner.l @@ -97,7 +97,7 @@ static int fromihex(const char *s) { true [Tt][Rr][Uu][Ee] false [Ff][Aa][Ll][Ss][Ee] -name [A-Za-z\*][-A-Za-z0-9_\*']* +name [A-Za-z0-9\*][-A-Za-z0-9_\*'.]* integer [-+]?[0-9]+ integer64 [-+]?[0-9]+L(L)? hex 0[Xx][0-9A-Fa-f]+ @@ -181,12 +181,12 @@ include_open ^[ \t]*@include[ \t]+\" \} { return(TOK_GROUP_END); } {true} { yylval->ival = 1; return(TOK_BOOLEAN); } {false} { yylval->ival = 0; return(TOK_BOOLEAN); } -{name} { yylval->sval = yytext; return(TOK_NAME); } {float} { yylval->fval = atof(yytext); return(TOK_FLOAT); } {integer} { yylval->ival = atoi(yytext); return(TOK_INTEGER); } {integer64} { yylval->llval = atoll(yytext); return(TOK_INTEGER64); } {hex} { yylval->ival = fromihex(yytext); return(TOK_HEX); } {hex64} { yylval->llval = fromhex(yytext); return(TOK_HEX64); } +{name} { yylval->sval = yytext; return(TOK_NAME); } \[ { return(TOK_ARRAY_START); } \] { return(TOK_ARRAY_END); } \( { return(TOK_LIST_START); } diff --git a/3rdparty/libconfig/grammar.c b/3rdparty/libconfig/grammar.c index 55216535b..eb00552e2 100644 --- a/3rdparty/libconfig/grammar.c +++ b/3rdparty/libconfig/grammar.c @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.5. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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 @@ -45,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.3" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -74,7 +73,7 @@ /* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ +/* Line 268 of yacc.c */ #line 32 "grammar.y" #include <string.h> @@ -128,8 +127,8 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx, -/* Line 189 of yacc.c */ -#line 133 "grammar.c" +/* Line 268 of yacc.c */ +#line 132 "grammar.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -207,7 +206,7 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx, typedef union YYSTYPE { -/* Line 214 of yacc.c */ +/* Line 293 of yacc.c */ #line 85 "grammar.y" int ival; @@ -217,8 +216,8 @@ typedef union YYSTYPE -/* Line 214 of yacc.c */ -#line 222 "grammar.c" +/* Line 293 of yacc.c */ +#line 221 "grammar.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -229,8 +228,8 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 234 "grammar.c" +/* Line 343 of yacc.c */ +#line 233 "grammar.c" #ifdef short # undef short @@ -333,11 +332,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -360,24 +359,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -406,23 +405,7 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. 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))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -442,6 +425,26 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. 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))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 6 /* YYLAST -- Last index in YYTABLE. */ @@ -583,8 +586,8 @@ static const yytype_uint8 yyr2[] = 0, 1, 0, 4 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { @@ -627,8 +630,7 @@ static const yytype_int8 yypgoto[] = /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ + number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { @@ -638,6 +640,12 @@ static const yytype_uint8 yytable[] = 45, 48, 47, 40, 0, 46, 0, 7 }; +#define yypact_value_is_default(yystate) \ + ((yystate) == (-26)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + static const yytype_int8 yycheck[] = { 3, 26, 25, 3, 4, 5, 6, 7, 8, 9, @@ -691,7 +699,6 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -733,19 +740,10 @@ while (YYID (0)) #endif -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ +/* This macro is provided for backward compatibility. */ #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) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif @@ -949,7 +947,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -1052,115 +1049,142 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } - if (yysize_overflow) - return YYSIZE_MAXIMUM; + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1197,6 +1221,7 @@ yydestruct (yymsg, yytype, yyvaluep, scanner, ctx, scan_ctx) } } + /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -1213,12 +1238,9 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1261,7 +1283,7 @@ YYSTYPE yylval; `yyss': related to states. `yyvs': related to semantic values. - Refer to the stacks through separate pointers, to allow yy overflow + Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1407,7 +1429,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1438,8 +1460,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1494,7 +1516,7 @@ yyreduce: { case 13: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 128 "grammar.y" { ctx->setting = config_setting_add(ctx->parent, (yyvsp[(1) - (1)].sval), CONFIG_TYPE_NONE); @@ -1513,7 +1535,7 @@ yyreduce: case 15: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 147 "grammar.y" { if(IN_LIST()) @@ -1532,7 +1554,7 @@ yyreduce: case 16: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 162 "grammar.y" { if(ctx->parent) @@ -1542,7 +1564,7 @@ yyreduce: case 17: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 170 "grammar.y" { if(IN_LIST()) @@ -1561,7 +1583,7 @@ yyreduce: case 18: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 185 "grammar.y" { if(ctx->parent) @@ -1571,21 +1593,21 @@ yyreduce: case 23: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 199 "grammar.y" { parsectx_append_string(ctx, (yyvsp[(1) - (1)].sval)); free((yyvsp[(1) - (1)].sval)); } break; case 24: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 200 "grammar.y" { parsectx_append_string(ctx, (yyvsp[(2) - (2)].sval)); free((yyvsp[(2) - (2)].sval)); } break; case 25: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 205 "grammar.y" { if(IN_ARRAY() || IN_LIST()) @@ -1610,7 +1632,7 @@ yyreduce: case 26: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 225 "grammar.y" { if(IN_ARRAY() || IN_LIST()) @@ -1637,7 +1659,7 @@ yyreduce: case 27: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 247 "grammar.y" { if(IN_ARRAY() || IN_LIST()) @@ -1664,7 +1686,7 @@ yyreduce: case 28: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 269 "grammar.y" { if(IN_ARRAY() || IN_LIST()) @@ -1691,7 +1713,7 @@ yyreduce: case 29: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 291 "grammar.y" { if(IN_ARRAY() || IN_LIST()) @@ -1718,7 +1740,7 @@ yyreduce: case 30: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 313 "grammar.y" { if(IN_ARRAY() || IN_LIST()) @@ -1741,7 +1763,7 @@ yyreduce: case 31: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 331 "grammar.y" { if(IN_ARRAY() || IN_LIST()) @@ -1771,7 +1793,7 @@ yyreduce: case 42: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 387 "grammar.y" { if(IN_LIST()) @@ -1790,7 +1812,7 @@ yyreduce: case 43: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 402 "grammar.y" { if(ctx->parent) @@ -1800,10 +1822,21 @@ yyreduce: -/* Line 1464 of yacc.c */ -#line 1807 "grammar.c" +/* Line 1806 of yacc.c */ +#line 1829 "grammar.c" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -1831,6 +1864,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -1838,37 +1875,36 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (scanner, ctx, scan_ctx, YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (scanner, ctx, scan_ctx, yymsg); - } - else - { - yyerror (scanner, ctx, scan_ctx, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (scanner, ctx, scan_ctx, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -1927,7 +1963,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -1986,8 +2022,13 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, scanner, ctx, scan_ctx); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, scanner, ctx, scan_ctx); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -2012,7 +2053,7 @@ yyreturn: -/* Line 1684 of yacc.c */ +/* Line 2067 of yacc.c */ #line 408 "grammar.y" diff --git a/3rdparty/libconfig/grammar.h b/3rdparty/libconfig/grammar.h index 7da95471c..d7fd02cc8 100644 --- a/3rdparty/libconfig/grammar.h +++ b/3rdparty/libconfig/grammar.h @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.5. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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 @@ -89,7 +88,7 @@ typedef union YYSTYPE { -/* Line 1685 of yacc.c */ +/* Line 2068 of yacc.c */ #line 85 "grammar.y" int ival; @@ -99,8 +98,8 @@ typedef union YYSTYPE -/* Line 1685 of yacc.c */ -#line 104 "grammar.h" +/* Line 2068 of yacc.c */ +#line 103 "grammar.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/3rdparty/libconfig/libconfig.c b/3rdparty/libconfig/libconfig.c index 358c415f5..8f2b3fb42 100644 --- a/3rdparty/libconfig/libconfig.c +++ b/3rdparty/libconfig/libconfig.c @@ -40,7 +40,7 @@ #include <string.h> #include <ctype.h> -#define PATH_TOKENS ":./" +#define PATH_TOKENS ":/" #define CHUNK_SIZE 16 #define FLOAT_PRECISION 10 @@ -537,12 +537,13 @@ static int __config_validate_name(const char *name) if(*p == '\0') return(CONFIG_FALSE); - if(! isalpha((int)*p) && (*p != '*')) + if(! isalpha((int)*p) && !isdigit((int)*p) && (*p != '*')) { return(CONFIG_FALSE); + } for(++p; *p; ++p) { - if(! (isalpha((int)*p) || isdigit((int)*p) || strchr("*_-'", (int)*p))) + if(! (isalpha((int)*p) || isdigit((int)*p) || strchr("*_-'.", (int)*p))) return(CONFIG_FALSE); } diff --git a/3rdparty/libconfig/scanner.c b/3rdparty/libconfig/scanner.c index 44a7d69dd..96c01fc5f 100644 --- a/3rdparty/libconfig/scanner.c +++ b/3rdparty/libconfig/scanner.c @@ -13,7 +13,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -198,6 +198,13 @@ typedef size_t yy_size_t; if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -374,21 +381,22 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[112] = +static yyconst flex_int16_t yy_accept[123] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 46, 44, 25, 24, 24, 5, 44, 40, 41, 32, - 44, 27, 33, 44, 34, 34, 26, 42, 44, 32, - 32, 38, 39, 28, 29, 25, 44, 3, 4, 3, + 46, 44, 25, 24, 24, 5, 44, 40, 41, 37, + 44, 27, 32, 44, 33, 33, 26, 42, 44, 37, + 37, 38, 39, 28, 29, 25, 44, 3, 4, 3, 6, 15, 14, 20, 23, 45, 17, 45, 25, 0, - 43, 32, 33, 34, 33, 0, 1, 0, 33, 0, - 35, 0, 16, 32, 32, 25, 0, 0, 2, 6, - 12, 0, 11, 10, 7, 8, 9, 20, 22, 21, - 17, 0, 18, 0, 33, 33, 0, 0, 33, 35, - 36, 32, 32, 0, 0, 0, 33, 37, 32, 30, - - 0, 13, 37, 31, 0, 0, 0, 0, 0, 19, - 0 + 43, 37, 32, 33, 32, 0, 1, 0, 32, 33, + 37, 34, 37, 16, 37, 37, 25, 0, 0, 2, + 6, 12, 0, 11, 10, 7, 8, 9, 20, 22, + 21, 17, 0, 18, 32, 0, 34, 0, 32, 32, + 37, 0, 37, 32, 34, 35, 37, 37, 0, 0, + + 32, 0, 32, 34, 0, 37, 32, 36, 37, 30, + 0, 13, 32, 36, 31, 0, 0, 0, 0, 0, + 19, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -426,49 +434,51 @@ static yyconst flex_int32_t yy_ec[256] = static yyconst flex_int32_t yy_meta[51] = { 0, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 1, 1, 3, 1, 1, 4, 4, 1, 1, + 3, 1, 1, 3, 3, 1, 4, 4, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 1, 2, 1, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 1, 1 } ; -static yyconst flex_int16_t yy_base[124] = +static yyconst flex_int16_t yy_base[134] = { 0, - 0, 49, 49, 50, 48, 49, 50, 51, 214, 213, - 218, 221, 215, 221, 221, 221, 213, 221, 221, 0, - 47, 221, 41, 55, 62, 66, 221, 221, 209, 189, - 32, 221, 221, 221, 221, 67, 170, 221, 221, 196, - 0, 221, 64, 0, 221, 61, 205, 187, 207, 205, - 221, 0, 77, 97, 99, 111, 221, 204, 103, 119, - 170, 0, 221, 46, 71, 98, 153, 126, 221, 0, - 221, 0, 221, 221, 221, 221, 221, 0, 221, 221, - 164, 146, 221, 57, 117, 124, 131, 129, 135, 221, - 138, 135, 123, 127, 0, 137, 139, 132, 131, 0, - - 117, 221, 221, 0, 112, 99, 91, 111, 157, 221, - 221, 172, 176, 180, 184, 188, 190, 194, 198, 202, - 104, 98, 68 + 0, 49, 49, 50, 48, 49, 50, 51, 244, 243, + 248, 251, 245, 251, 251, 251, 243, 251, 251, 0, + 47, 251, 41, 55, 62, 210, 251, 251, 238, 218, + 32, 251, 251, 251, 251, 67, 199, 251, 251, 225, + 0, 251, 64, 0, 251, 61, 234, 216, 236, 234, + 251, 0, 66, 87, 95, 106, 251, 233, 98, 200, + 115, 204, 123, 251, 46, 47, 70, 190, 187, 251, + 0, 251, 0, 251, 251, 251, 251, 251, 0, 251, + 251, 219, 198, 251, 117, 142, 166, 57, 113, 120, + 154, 125, 128, 135, 0, 165, 162, 128, 154, 0, + + 156, 163, 161, 251, 167, 169, 171, 152, 149, 0, + 126, 251, 174, 0, 0, 119, 117, 85, 119, 94, + 251, 251, 197, 201, 205, 209, 213, 215, 219, 223, + 227, 115, 104 } ; -static yyconst flex_int16_t yy_def[124] = +static yyconst flex_int16_t yy_def[134] = { 0, - 111, 1, 112, 112, 113, 113, 114, 114, 115, 115, - 111, 111, 111, 111, 111, 111, 116, 111, 111, 117, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 117, - 117, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 118, 111, 111, 119, 111, 111, 120, 120, 111, 116, - 111, 117, 111, 111, 111, 111, 111, 116, 111, 111, - 111, 121, 111, 117, 117, 111, 111, 111, 111, 118, - 111, 122, 111, 111, 111, 111, 111, 119, 111, 111, - 120, 120, 111, 111, 111, 111, 111, 111, 111, 111, - 121, 117, 117, 111, 123, 111, 111, 111, 117, 117, - - 111, 111, 111, 117, 111, 111, 111, 111, 111, 111, - 0, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111 + 122, 1, 123, 123, 124, 124, 125, 125, 126, 126, + 122, 122, 122, 122, 122, 122, 127, 122, 122, 128, + 122, 122, 122, 122, 128, 25, 122, 122, 122, 128, + 128, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 129, 122, 122, 130, 122, 122, 131, 131, 122, 127, + 122, 128, 122, 122, 122, 122, 122, 127, 128, 25, + 128, 128, 128, 122, 128, 128, 122, 122, 122, 122, + 129, 122, 132, 122, 122, 122, 122, 122, 130, 122, + 122, 131, 131, 122, 122, 122, 122, 122, 122, 128, + 128, 122, 128, 128, 128, 63, 128, 128, 122, 133, + + 122, 122, 122, 122, 122, 128, 128, 128, 128, 128, + 122, 122, 122, 128, 128, 122, 122, 122, 122, 122, + 122, 0, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122 } ; -static yyconst flex_int16_t yy_nxt[272] = +static yyconst flex_int16_t yy_nxt[302] = { 0, 12, 13, 14, 15, 15, 16, 17, 12, 18, 19, 20, 21, 22, 21, 23, 24, 25, 26, 27, 28, @@ -476,33 +486,37 @@ static yyconst flex_int16_t yy_nxt[272] = 20, 20, 31, 20, 20, 32, 12, 33, 20, 20, 20, 30, 20, 20, 20, 20, 31, 20, 34, 35, 36, 39, 39, 42, 42, 45, 45, 55, 55, 40, - 40, 53, 65, 54, 54, 57, 79, 56, 66, 71, - 58, 102, 37, 85, 85, 92, 59, 65, 54, 54, - 59, 56, 54, 54, 43, 43, 46, 46, 60, 92, - 67, 61, 60, 55, 55, 61, 62, 80, 72, 66, - - 73, 95, 60, 56, 93, 74, 60, 91, 75, 76, - 77, 59, 109, 54, 54, 55, 55, 56, 93, 86, - 86, 67, 84, 60, 84, 56, 61, 85, 85, 87, - 88, 108, 88, 85, 85, 89, 89, 60, 107, 56, - 86, 86, 96, 87, 96, 89, 89, 97, 97, 100, - 87, 89, 89, 97, 97, 97, 97, 104, 109, 106, - 105, 103, 110, 100, 87, 101, 99, 98, 111, 82, - 94, 104, 38, 38, 38, 38, 41, 41, 41, 41, - 44, 44, 44, 44, 47, 47, 47, 47, 50, 50, - 50, 50, 52, 52, 70, 68, 70, 70, 78, 90, - - 78, 78, 81, 81, 81, 81, 51, 51, 49, 83, - 82, 69, 68, 64, 63, 51, 49, 111, 48, 48, - 11, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111 + 40, 53, 66, 54, 54, 57, 80, 56, 67, 72, + 58, 67, 37, 89, 89, 97, 59, 66, 60, 60, + 98, 56, 55, 55, 43, 43, 46, 46, 61, 97, + 68, 62, 56, 68, 98, 120, 63, 81, 73, 121, + + 74, 85, 61, 54, 54, 75, 56, 112, 76, 77, + 78, 55, 55, 86, 90, 90, 87, 88, 100, 88, + 120, 56, 89, 89, 91, 119, 92, 86, 93, 89, + 89, 94, 94, 101, 101, 56, 90, 90, 91, 96, + 96, 103, 103, 102, 94, 94, 91, 96, 96, 96, + 96, 94, 94, 92, 110, 92, 118, 102, 103, 103, + 91, 96, 96, 96, 96, 105, 117, 106, 110, 116, + 107, 107, 101, 101, 105, 115, 105, 103, 103, 113, + 113, 114, 102, 113, 113, 107, 107, 107, 107, 115, + 113, 113, 111, 109, 108, 104, 102, 38, 38, 38, + + 38, 41, 41, 41, 41, 44, 44, 44, 44, 47, + 47, 47, 47, 50, 50, 50, 50, 52, 52, 71, + 122, 71, 71, 79, 83, 79, 79, 82, 82, 82, + 82, 99, 69, 95, 52, 51, 51, 49, 84, 83, + 70, 69, 65, 64, 52, 51, 49, 122, 48, 48, + 11, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + + 122 } ; -static yyconst flex_int16_t yy_chk[272] = +static yyconst flex_int16_t yy_chk[302] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -511,29 +525,33 @@ static yyconst flex_int16_t yy_chk[272] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 23, 23, 3, 4, 21, 31, 21, 21, 24, 46, 23, 36, 43, - 24, 123, 2, 84, 84, 64, 25, 31, 25, 25, - 26, 23, 26, 26, 5, 6, 7, 8, 25, 64, - 36, 25, 26, 53, 53, 26, 25, 46, 43, 66, - - 43, 122, 25, 53, 65, 43, 26, 121, 43, 43, - 43, 54, 108, 54, 54, 55, 55, 53, 65, 59, - 59, 66, 56, 54, 56, 55, 54, 56, 56, 59, - 60, 107, 60, 85, 85, 60, 60, 54, 106, 55, - 86, 86, 87, 59, 87, 88, 88, 87, 87, 93, - 86, 89, 89, 96, 96, 97, 97, 99, 109, 105, - 101, 98, 109, 93, 86, 94, 92, 91, 82, 81, - 68, 99, 112, 112, 112, 112, 113, 113, 113, 113, - 114, 114, 114, 114, 115, 115, 115, 115, 116, 116, - 116, 116, 117, 117, 118, 67, 118, 118, 119, 61, - - 119, 119, 120, 120, 120, 120, 58, 50, 49, 48, - 47, 40, 37, 30, 29, 17, 13, 11, 10, 9, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111 + 24, 67, 2, 88, 88, 65, 25, 31, 25, 25, + 66, 23, 53, 53, 5, 6, 7, 8, 25, 65, + 36, 25, 53, 67, 66, 120, 25, 46, 43, 120, + + 43, 54, 25, 54, 54, 43, 53, 133, 43, 43, + 43, 55, 55, 54, 59, 59, 54, 56, 132, 56, + 119, 55, 56, 56, 59, 118, 61, 54, 61, 89, + 89, 61, 61, 85, 85, 55, 90, 90, 59, 63, + 63, 92, 92, 85, 93, 93, 90, 63, 63, 63, + 63, 94, 94, 86, 98, 86, 117, 85, 86, 86, + 90, 63, 63, 63, 63, 91, 116, 91, 98, 111, + 91, 91, 101, 101, 102, 109, 102, 103, 103, 102, + 102, 108, 101, 105, 105, 106, 106, 107, 107, 109, + 113, 113, 99, 97, 96, 87, 101, 123, 123, 123, + + 123, 124, 124, 124, 124, 125, 125, 125, 125, 126, + 126, 126, 126, 127, 127, 127, 127, 128, 128, 129, + 83, 129, 129, 130, 82, 130, 130, 131, 131, 131, + 131, 69, 68, 62, 60, 58, 50, 49, 48, 47, + 40, 37, 30, 29, 26, 17, 13, 11, 10, 9, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + + 122 } ; /* Table of booleans, true if rule could match eol. */ @@ -633,7 +651,7 @@ static int fromihex(const char *s) { } -#line 637 "scanner.c" +#line 655 "scanner.c" #define INITIAL 0 #define COMMENT 1 @@ -865,11 +883,6 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 112 "scanner.l" - - -#line 872 "scanner.c" - yylval = yylval_param; if ( !yyg->yy_init ) @@ -898,6 +911,12 @@ YY_DECL libconfig_yy_load_buffer_state(yyscanner ); } + { +#line 112 "scanner.l" + + +#line 919 "scanner.c" + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -915,7 +934,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -924,13 +943,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 112 ) + if ( yy_current_state >= 123 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 111 ); + while ( yy_current_state != 122 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -941,7 +960,7 @@ yy_find_action: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - int yyl; + yy_size_t yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) @@ -1157,32 +1176,32 @@ YY_RULE_SETUP case 32: YY_RULE_SETUP #line 184 "scanner.l" -{ yylval->sval = yytext; return(TOK_NAME); } +{ yylval->fval = atof(yytext); return(TOK_FLOAT); } YY_BREAK case 33: YY_RULE_SETUP #line 185 "scanner.l" -{ yylval->fval = atof(yytext); return(TOK_FLOAT); } +{ yylval->ival = atoi(yytext); return(TOK_INTEGER); } YY_BREAK case 34: YY_RULE_SETUP #line 186 "scanner.l" -{ yylval->ival = atoi(yytext); return(TOK_INTEGER); } +{ yylval->llval = atoll(yytext); return(TOK_INTEGER64); } YY_BREAK case 35: YY_RULE_SETUP #line 187 "scanner.l" -{ yylval->llval = atoll(yytext); return(TOK_INTEGER64); } +{ yylval->ival = fromihex(yytext); return(TOK_HEX); } YY_BREAK case 36: YY_RULE_SETUP #line 188 "scanner.l" -{ yylval->ival = fromihex(yytext); return(TOK_HEX); } +{ yylval->llval = fromhex(yytext); return(TOK_HEX64); } YY_BREAK case 37: YY_RULE_SETUP #line 189 "scanner.l" -{ yylval->llval = fromhex(yytext); return(TOK_HEX64); } +{ yylval->sval = yytext; return(TOK_NAME); } YY_BREAK case 38: YY_RULE_SETUP @@ -1245,7 +1264,7 @@ YY_RULE_SETUP #line 209 "scanner.l" ECHO; YY_BREAK -#line 1249 "scanner.c" +#line 1268 "scanner.c" case YY_END_OF_BUFFER: { @@ -1375,6 +1394,7 @@ ECHO; "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of libconfig_yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1542,7 +1562,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 112 ) + if ( yy_current_state >= 123 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1571,11 +1591,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 112 ) + if ( yy_current_state >= 123 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 111); + yy_is_jam = (yy_current_state == 122); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -1997,7 +2017,7 @@ YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yy YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; diff --git a/3rdparty/libconfig/scanner.h b/3rdparty/libconfig/scanner.h index ac79ff5d1..f684433ec 100644 --- a/3rdparty/libconfig/scanner.h +++ b/3rdparty/libconfig/scanner.h @@ -17,7 +17,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif |