-
Notifications
You must be signed in to change notification settings - Fork 2
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
Evaluate <> and provide type resolution in lalrpop. #17
Conversation
Thanks for working on this! I'll get to work on the review soon. |
Found a weird corner-case in the grammar while testing: Given this:
The alternative in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really good! I'm excited to see no errors in my grammar files and good type inference. Just a few small things here and there, but congrats on getting this to work!
src/main/kotlin/com/mdrobnak/lalrpop/psi/ext/LpActionLiteralTextEscaper.kt
Show resolved
Hide resolved
src/main/kotlin/com/mdrobnak/lalrpop/psi/ext/LpActionLiteralTextEscaper.kt
Show resolved
Hide resolved
src/main/kotlin/com/mdrobnak/lalrpop/psi/ext/LpActionLiteralTextEscaper.kt
Show resolved
Hide resolved
RE: the odd grammar issue, yeah that's odd. I wonder how LALRPOP handles that itself. After diving into the code, it looks like the lexer emits either a Edit: created #19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thanks again for working on this.
Will need to cache the resolved lalrpop types (as of now resolves everything and that can get quite expensive).
Edit: Sorry for the quite big PR. This one has plenty of changes, related to
<>
expressions and type resolution. I only cached the types of nonterminals where there are no "parameters"; also if you think the variables / functions can have better names I would be more than happy to change them.With that, this PR is more or less ready for review.