JSON negative number patch

This commit is contained in:
Olof Hagsand 2017-11-13 17:11:31 +00:00
parent 3c41a79102
commit 23e40384f7
4 changed files with 11 additions and 13 deletions

View file

@ -100,7 +100,7 @@ exp ({integer}|{real})[eE][+-]{integer}
<START>null { return J_NULL; }
<START>false { return J_FALSE; }
<START>true { return J_TRUE; }
<START>({integer}|{real}|{exp}) { clixon_json_parselval.string = strdup(yytext); return J_NUMBER;}
<START>\-?({integer}|{real}|{exp}) { clixon_json_parselval.string = strdup(yytext); return J_NUMBER;}
<START>. { return -1; }
<STRING>\" { BEGIN(START); return J_DQ; }
<STRING>\\ { BEGIN(ESCAPE); }