Evaluating Superpower vs Sprache for my needs #155
Replies: 2 comments 3 replies
-
Hi! I haven't attempted an indentation-sensitive language parser with Superpower, so unfortunately I can't offer much advice, but at the outset I think I'd be looking to track indentation level in the tokenizer and to emit "fake" tokens for increase indent and decrease indent, that would then play similar roles to If you end up with something elegant, an example for the Cheers and good luck! |
Beta Was this translation helpful? Give feedback.
-
The bane of asking multiple questions in one; I also wanted your input on the compatibility between Sprache and Superpower. Would you say Superpower can do all that Sprache can, or do I have a choice to make here? What are the differences and pros/cons? |
Beta Was this translation helpful? Give feedback.
-
Greetings,
I have used Sprache prior for a small DSL (but non-trivial so Sprache helped alot with readability). At that point I was not aware of Superpower but now I have a choice as I embark on a quick implementation of the minimal nestedtext format (which to my knowledge does not have a .net implementation).
In general, would you say I would gain anything from tokenizing with that syntax, but on the other hand, can I still do everything Sprache can with Superpower?
In specific, the nestedtext syntax is one of those that rely on the indent level and judging from a sibling discussion that is not straight forward to model with either of the monad based parsers. I can do this relatively straight forward in a PEG parser, such as my javascript implementation which utilize Peggy. Has there been any further thoughts on this since the time of that discussion?
Beta Was this translation helpful? Give feedback.
All reactions