z

c-ish didactic compiler experiments

z

Following along with Rui Ueyama's 9cc (book, repo).

install

git clone https://github.com/jethrodaniel/z
cd z && rake

usage

$ ./bin/z '2*10-4/4-(3*5)-(5+4)+45-20+2+10*2;'
42
$ ./bin/z -f sample/math.z 
42
$ ./bin/z -h
z compiler.

Usage: z [...options] -f progfile
Usage: z [...options] [--] 'program'
    -v, --version                    Show version
    -h, --help                       Show help
    -d, --dot                        Output graphviz
    -l, --lex                        Run lexer
    -p, --parse                      Run parser
    -c, --compile                    Run compiler
    -f FILE, --file FILE             Use FILE as input

prerequisites

  • crystal 0.35 or greater
  • rake (ruby) for building

license

MIT

references

If I have seen further, it is by standing upon the shoulders of giants.

Sir Isaac Newton, 1675

Thanks, y'all.

Owner
github statistic
  • 0
  • 0
  • 0
  • 0
  • about 9 hours ago
  • March 22, 2020
License

MIT License

Links
Synced at

Fri, 27 Nov 2020 01:47:21 GMT