AzureMarker / intellij-lalrpop

Jetbrains plugin for the LALRPOP parser-generator
MIT License
16 stars 2 forks source link

Unexpected lifetime? #2

Closed dnbln closed 4 years ago

dnbln commented 4 years ago

After rebuilding the last version, this is what happened: (This was taken from chapter 5.3 of the lalrpop book)

image

dnbln commented 4 years ago

I tried to fix this myself in 60ec21c. Should I open a PR?

AzureMarker commented 4 years ago

Thanks for catching this issue and working on a fix! I found a simpler fix in https://github.com/Mcat12/intellij-lalrpop/commit/ae1d42212be44b8ff6ad4fbb227c7e93c95232da, but I appreciate your help.

AzureMarker commented 4 years ago

Turns out the above change doesn't support characters which use escape sequences, but we can actually remove character parsing altogether because it's only usage is in an unused grammar item, patterns. Patterns may not need to be supported (only used in extern blocks, invoked as a separate parser by lalrpop, and even then I haven't seen any code which uses it), so I removed them for now.

If it turns out that we need to parse character literals, your changes will probably come in handy!