Closed s5bug closed 4 years ago
Hey!
Good question.
There's no support built into the Earley library for indentation sensitivity, but perhaps a custom lexer could output such tokens for Earley to consume?
Any recommendations on how to do that effectively and efficiently?
I'm afraid I can't help you there, but perhaps someone else can?
I've opened a StackOverflow question. If I get a reasonable answer, I'll post it here and close the issue.
I've been playing around with Megaparsec and Alex, both seem equally suited to handle this situation.
Is there a way to match INDENT/DEDENT or make parsers take an indentation level?