From: Stephen Dolan Date: Mon, 3 Sep 2012 14:32:50 +0000 (+0100) Subject: Disallow a + before numbers (makes parsing easier, agrees with JSON) X-Git-Tag: jq-1.1~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8fad1ed9bbb53ca2c5c2c101664b235a6b55c0c;p=jq Disallow a + before numbers (makes parsing easier, agrees with JSON) --- diff --git a/c/lexer.l b/c/lexer.l index 550ad85..4acb026 100644 --- a/c/lexer.l +++ b/c/lexer.l @@ -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; }