Closed Kariiem closed 4 months ago
I rebased and added a commit fixing the tests. Feel free to squash the changes in the commits where they belong.
I had a closer look at how
WORDS_BIGENDIAN
is to be used.alex
simply pulls it from the GHC-provided headerghcconfig.h
.
There are several possible headers; I don't remember why but I think at some point we concluded that MachDeps.h
is the best option.
There is also GHC.ByteOrder
, but beware that it was broken before GHC 8.10. A compatibility package ghc-byteorder
is available.
Alright, I included MachDeps.h
to import the WORDS_BIGENDIAN
define and did a final review. I'm inclined to merge this.
This PR refactors happyDoActions into several smaller functions, changes how the parsing tables are constructed, using 32-bit integers instead of 16-bit integers.