Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number problems in json.lex. #21

Open
GoogleCodeExporter opened this issue Apr 3, 2016 · 2 comments
Open

Number problems in json.lex. #21

GoogleCodeExporter opened this issue Apr 3, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

I was looking at 
http://code.google.com/p/json-simple/source/browse/trunk/doc/json.lex

It seems to have a few problems.
  -0 is parsed using Long.valueOf which loses the sign bit.
  0123 is treated as a valid number despite the JSON grammar specifically disallowing leading 
zeroes.

http://code.google.com/p/prebake/source/browse/trunk/src/org/prebake/js/json_gra
mmar.lex 
addresses that problem and makes sure that
    nulltrue
does not lex as the tokens
    ["null", "true"]

Original issue reported on code.google.com by mikesamuel@gmail.com on 16 Apr 2010 at 8:24

@GoogleCodeExporter
Copy link
Author

Original comment by fangyid...@gmail.com on 14 Jul 2010 at 1:09

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Thanks mikesamuel.
Updated the link to the improved lex file:
http://code.google.com/p/prebake/source/browse/trunk/code/src/org/prebake/js/jso
n_grammar.lex

Original comment by fangyid...@gmail.com on 14 Jul 2010 at 1:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant