-
Notifications
You must be signed in to change notification settings - Fork 77
Description
I see that for recursive parser, like when parsing JSON, you provide the fix combinator. What about mutually recursive
parsers, for example if I want to parse Java, there will be a parser for stmt, one for expr, but inside stmt you need to call expr and inside expr you also need to call stmt (for example Java support lambdas expressions, which themselves contain stmt).
Parsing a real programming language requires a ton of mutually recursive parsers.
The fastparse parser combinator library https://com-lihaoyi.github.io/fastparse/#GettingStarted allows for example to define those mutually recursive parsers.
BTW fastparse has also special support to skip whitespace by using Implicit. Is there something like that planned for angstrom too?
See https://com-lihaoyi.github.io/fastparse/#ExampleParsers and the NoWhitespace special import.