diff options
author | Haru <haru@dotalux.com> | 2015-10-10 21:37:48 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-10-11 05:14:59 +0200 |
commit | 34bdc27cabdc2c37e9b486013bf5ab42e8995e88 (patch) | |
tree | 5408c9abe51397df3277e4eccfb5cfce6b7f7420 /3rdparty/libconfig/extra | |
parent | 2d51cded8d5612b7ecbe171a6ca309e91d14bfd7 (diff) | |
download | hercules-34bdc27cabdc2c37e9b486013bf5ab42e8995e88.tar.gz hercules-34bdc27cabdc2c37e9b486013bf5ab42e8995e88.tar.bz2 hercules-34bdc27cabdc2c37e9b486013bf5ab42e8995e88.tar.xz hercules-34bdc27cabdc2c37e9b486013bf5ab42e8995e88.zip |
Added support to libconfig for key names containing '.' or beginnig with digits.
- Note: Since '.' (period) is a valid character for key names, it is no
longer a valid path separator for lookups. Please use '/' (forward
slash) or ':' (semicolon) instead.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to '3rdparty/libconfig/extra')
-rw-r--r-- | 3rdparty/libconfig/extra/gen/scanner.l | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |