Traceback (most recent call last):
File "main.py", line 63, in <module>
tree = grammar.parse(hello_json)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/parsimonious/grammar.py", line 115, in parse
return self.default_rule.parse(text, pos=pos)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/parsimonious/expressions.py", line 120, in parse
node = self.match(text, pos=pos)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/parsimonious/expressions.py", line 137, in match
raise error
parsimonious.exceptions.ParseError: Rule 'character' didn't match at '' (line 1, column 98).
More basic JSON primitives like 42 and [true, false] parse just fine, so I think it may be an issue with Parsimonious being overly greedy and ignoring the ability to match nothing. Also tried this with ()* and ()? and was still unsuccesful.
Grammar
Input
Output
More basic JSON primitives like
42
and[true, false]
parse just fine, so I think it may be an issue with Parsimonious being overly greedy and ignoring the ability to match nothing. Also tried this with()*
and()?
and was still unsuccesful.