The grammar for denada is so simple, that I think it would be straightforward to write a recursive descent parser. This has several advantages.
First, it simplifies the tool chain (although that isn't much of an issue). More importantly, it allows a parser to be created that is more reentrant. There are still potential issues with nex that might prevent this. But it is a first step.
Second, I think I can be clever in a hand-built parser to utilize existing JSON parsers to handle JSON related functionality (see #1).
Finally, I think it will deliver much better diagnostics when parsing. Ideally, it should provide specific feedback on expected token vs. actual token.
The grammar for denada is so simple, that I think it would be straightforward to write a recursive descent parser. This has several advantages.
First, it simplifies the tool chain (although that isn't much of an issue). More importantly, it allows a parser to be created that is more reentrant. There are still potential issues with
nex
that might prevent this. But it is a first step.Second, I think I can be clever in a hand-built parser to utilize existing JSON parsers to handle JSON related functionality (see #1).
Finally, I think it will deliver much better diagnostics when parsing. Ideally, it should provide specific feedback on expected token vs. actual token.