Also, disallow 0-prefixed integers such as 0644 per the spec:
No integer other than 0 may begin with 0. 64-bit (signed integer) precision is expected.
I had to add a negative lookahead in the t_INTEGER regexp so that 0xABC is not parsed as 0 xABC. The current implementation allows an integer to be followed by a symbol or a keyword:
Also, disallow 0-prefixed integers such as
0644
per the spec:I had to add a negative lookahead in the
t_INTEGER
regexp so that0xABC
is not parsed as0 xABC
. The current implementation allows an integer to be followed by a symbol or a keyword:The spec doesn’t explicitely say this is incorrect (emphasis mine):
This fixes https://github.com/swaroopch/edn_format/issues/62.