Replies: 3 comments
|
There're two reasons why I think it's better to stick with current solution:
I agree though that manual parser allows to get rid of dependency and perhaps improve performance (it's good to have some parser benchmarks first, perhaps) |
|
It's not just about performance, but also about maintainability. While a formalized grammar can be useful in many places (for example, for plugins in popular editors like IntelliJ IDEA), editing a regular recursive parser is still easier. You mentioned that the language's syntax is unstable, which means that describing complex syntactic constructs will be a real pain in the ass in the future, so it's better to take care of this in advance. For IDE, we can describe a regular BNF grammar. |
Easier how?
Yes and to me it's the reason to have declarative grammar! Not directly answers your message but related to the topic. I don't honestly think Neva syntax will get more complicated than now, I'm actually thinking about removing existing features (see #935 in case of curiousity) |
Uh oh!
There was an error while loading. Please reload this page.
There's no point in dragging a dependency like antlr into a project. It's easier to write a regular recursive parser or a Pratt parser. Not only will the project get rid of an obviously unnecessary dependency, but such code will also be very easy to read and write.
All reactions