1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Disallow a + before numbers (makes parsing easier, agrees with JSON)

This commit is contained in:
Stephen Dolan
2012-09-03 15:32:50 +01:00
parent cf004c2b3a
commit d8fad1ed9b

View File

@ -16,7 +16,7 @@
"."|"="|";"|"["|"]"|","|":"|"("|")"|"{"|"}"|"|"|"+"|"\$" { return yytext[0];}
\"(\\.|[^\\"])*\" |
[+-]?[0-9.]+([eE][+-]?[0-9]+)? {
-?[0-9.]+([eE][+-]?[0-9]+)? {
yylval->literal = jv_parse_sized(yytext, yyleng); return LITERAL;
}