New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We are hitting the limits of the Perl 6 grammar parser #293
Comments
Thinking about this a bit further, the parser would need to have these features:
The first feature would subsume our current grammar. The remaining three will replace |
Oh! And I forgot another biggie:
The above feature is something I've envisioned several times in the past. This would be the time to try mapping it out. Note that a template parser is not a static thing; it's derived from the language the quasi is in. As far as I know, that makes quasis a bit of a weird slang, maybe a "higher-order slang" or something. |
Even though it's not a core feature in itself, it wouldn't hurt if we also took a holistic approach to error messages from the parser, and essentially solved #10 in the process. |
One thing I've realized as I've been thinking about this is that the old parser/actions did a bit too much, and those things we can shunt out as post-processing steps to a simpler parse. Examples of this so far:
|
Should also be able to displace rules, as in #421. |
We've decided not to go down this path. Instead, unquoted operators will always have the loosest possible precedence by default. (We might also think up a syntax for setting the precedence.)
Similarly, here, I don't think this is the resposibility of a post-processing step. We should find some way to do this within the parse. |
I think this one urgently needs a spike/prototype. Just something where it can be proved we can add a rule during the parse would feel like a win. (Update: Started with #485 and is-parsed-spike.) |
I think we should (experimentally, in a branch) rewrite the parser from scratch, with two main goals:
We don't have to make the new parser feature-complete at first. Just enough of a proof of concept for the above two ideas.
The text was updated successfully, but these errors were encountered: