plex
plex copied to clipboard
Multiple entry points
Thanks for plex! Would it be feasible to support multiple entry points that reuse the same grammar? As an example, I have something like:
statement: Statement {
expression[e] TokenSemicolon => ExprStatement(e),
// other variants...
}
expression: Expr {
// some variants...
}
and want to expose parser entry points for both Expr and Statement. This might be possible via a single entry point that returns an enum but I'm wondering if there's a cleaner way.