tcr / corollary

Cross-compiler from Haskell to Rust, plus parser-haskell.
73 stars 5 forks source link

Document strategy for Lexer.hs and Parser.hs #37

Open tcr opened 7 years ago

tcr commented 7 years ago

These files are generated using the Haskell-native parsers, Happy and Alex. So the original code is in Haskell and the output requires a Haskell compiler.

These files are then reformatted with hident to avoid having to add braces to the parser (for now I guess).

Because these are part of language-c and not corrode, it doesn't seem important to translate these to Rust and Rust-based parsers yet, i.e. the goal is to have Corrode patchable in Rust and thuslanguage-c can be opaque. But inevitably it'd be nice to have them not require Haskell preprocessing.