plex icon indicating copy to clipboard operation
plex copied to clipboard

Multiple entry points

Open bendmorris opened this issue 7 years ago • 0 comments

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.

bendmorris avatar May 23 '18 18:05 bendmorris