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

Debugging "grammar does not fit in 16-bit representation that is used with '--ghc'"? #199

Closed
saw235 opened this issue Aug 23, 2021 · 3 comments

Comments

@saw235
Copy link

saw235 commented Aug 23, 2021

Hi,

I am getting the following error but have no clue where to start debugging as my lbnf and subsequently the Par.y file is quite large. Is there a way to check where in the file is causing the error?

error "grammar does not fit in 16-bit representation that is used with '--ghc'"
@saw235 saw235 changed the title How to debug error "grammar does not fit in 16-bit representation that is used with '--ghc'"? Debugging "grammar does not fit in 16-bit representation that is used with '--ghc'"? Aug 23, 2021
@Ericson2314
Copy link
Collaborator

I do not know how to debug this, but I suppose it means you have over 2^16 of something?

@sgraf812
Copy link
Collaborator

The reason for the error is that your parser has become so large that its action table cannot be addressed using 16 bit offsets. That is problematic because happy used to use hardcode its offsets to 16 bit. I opened #266 to mourn this and the recently merged #280 provides the fix.

TLDR; try building the most recent master of happy to see whether it fixes your bug.

@sgraf812
Copy link
Collaborator

I'll optimistically close this issue; #280 likely fixed it and was released with Happy 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants