Debugging "grammar does not fit in 16-bit representation that is used with '--ghc'"?
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'"
I do not know how to debug this, but I suppose it means you have over 2^16 of something?
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.
I'll optimistically close this issue; #280 likely fixed it and was released with Happy 2.0.