tcr / parser-c

Haskell's language-c ported to Rust.
http://docs.rs/parser-c
31 stars 5 forks source link

Adds happy/alex forks as submodules. Adds a new regen script. #26

Closed tcr closed 7 years ago

tcr commented 7 years ago

This adds the two alex-rust and happy-rust forks. The root ./regen.sh script will pull those submodules, then regenerate the parser/lexer files. It's very aggressive with rebuilding but it leads to a reproducible outcome. I imagine in development, it might be easier to just generate the output directly from happy/alex forks and commit it rather than using this script.

I also did a cursory look at moving parser-c-core into its own crate, but the dependencies are so intertwined that I don't think that is going to happen, unless we invert the dependencies (which seems like it won't avoid long compile times.)

tcr commented 7 years ago

Will need to land after #22.

birkenfeld commented 7 years ago

I've rebased and updated the script a little (no rm -rf stack-work, since that is unnecessary I think, stack/cabal will find changed files after the update).

I've also pushed another change to the alex/happy repos to make the template output system independent, so that we don't have to commit spurious changes like the "/tmp/ghc..." file pragmas.

tcr commented 7 years ago

Great. I'll keep tabs on how well rm -rf ./stack-work continues to work—some combination reinstalling ghc and running these had issues.