]> granicus.if.org Git - jq/commitdiff
Disallow a + before numbers (makes parsing easier, agrees with JSON)
authorStephen Dolan <mu@netsoc.tcd.ie>
Mon, 3 Sep 2012 14:32:50 +0000 (15:32 +0100)
committerStephen Dolan <mu@netsoc.tcd.ie>
Mon, 3 Sep 2012 14:32:50 +0000 (15:32 +0100)
c/lexer.l

index 550ad85d03d3f88b9f858e195f024fa19317486b..4acb026af7a6d4303915b48a113dc62273c92c0e 100644 (file)
--- 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; 
 }