xsawyerx / guacamole

Guacamole is a parser toolkit for Standard Perl. It provides fully static BNF-based parsing capability to a reasonable subset of Perl.
https://metacpan.org/pod/Guacamole
20 stars 8 forks source link

Support most keywords #4

Closed xsawyerx closed 4 years ago

xsawyerx commented 4 years ago

Edit: Finished this PR.

[You can go through the commit messages themselves, as they contain more information.]

This commit adds the facility for adding keywords. Additionally, I've slowly, over these commits, have added more and more keyword support.

I'm not sure yet what to do when there are multiple arguments in which each one can be an expression, theoretically. I figured at first they will only be of type Value. Then I thought they might all be Value except the last one, which can be an Expression. Now I'm not so sure. perl isn't always consistent either. :/

Relevant ticket: #5.

My follow-up is to figure out whether we can have multiple expressions as input, which is usually the case for all keywords. I also need to test the compilation of all keywords using the perl interpreter to figure out how far it can stretch its lexing of parameters to keywords.