Nothing Special   »   [go: up one dir, main page]

Skip to content
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

GLR mode outputs wrong .y header for happy #252

Closed
sillydan1 opened this issue Mar 29, 2019 · 1 comment
Closed

GLR mode outputs wrong .y header for happy #252

sillydan1 opened this issue Mar 29, 2019 · 1 comment
Assignees
Labels
bug GLR Concerning the Haskell backend with --glr Haskell
Milestone

Comments

@sillydan1
Copy link

When generating a .y file with the --glr flag enabled, the .y header gets a -- module name filled in by Happy line written. This makes happy (I'm using version 1.19.9) spit out a file with incorrect syntax:

$ ghc TestTestProlg.hs

ParTestProlg.hs:5:8: error: parse error on input ‘name’

This can be quick-fixed by editing the .y file manually before running happy, but it looks like bnfc can actually do something about this. At source/src/BNFC/Backend/Haskell/CFtoHappy.hs line 77, the string output by the case of GLR can simply be set to the same as Standard.

@andreasabel andreasabel self-assigned this Mar 29, 2019
@andreasabel andreasabel added this to the 2.8.3 milestone Mar 29, 2019
@andreasabel
Copy link
Member

Ok, I am implementing your suggested fix.

@andreasabel andreasabel added the GLR Concerning the Haskell backend with --glr label Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug GLR Concerning the Haskell backend with --glr Haskell
Projects
None yet
Development

No branches or pull requests

2 participants