Experiment with scannerless parsing for VersionParser
zafarkhaja opened this issue · 3 comments
Character-based parsing is a tedious and error-prone process. It also makes it difficult to handle lexical ambiguities and implement a good error handling especially in a LL(k) parser. So, need to try a different approach (Scannerless GLR Parsing?) to this which seems more suitable.
If I were to build you a JAVACC-based parser, would you be interested?
Hey @RobertFischer, I appreciate your reaching out. But...
I had thought about parser generators before when I started writing the library and I gave it some more thoughts last weekend. Honestly, back then and still now it feels like parser generators are overkill for this kind of grammar, I mean small and simple. So, I'm leaning towards defining regular expressions for each non-terminal and implementing a LL(1)
parser on those non-terminals. This would spare me character-based parsing and lexical ambiguities, plus this would still allow for some sane error messages.
Closing for now. Will revisit when it comes to refactoring the parsers.