A small step-through debug interpreter for a subset of C. Check out the specification for more information.
While it's functional, the plan is to rewrite it to use the pattern layed out in the proof-of-concept STM-Fun, which showcases how to split the repl and eval apart.
You can test the program out with the C programs found in test/data/*.c
, it will go something like below,
To build the interpreter it is recommended that you use the stack
tool from https://docs.haskellstack.org. In the source code,
$ stack setup
$ stack build
You can now run the repl on a file via,
$ stack exec -- c-repl "path/to/program.c"
This specification is taken from the C-- Language Specification, and then extended a bit with some additional C features.