I made this learning OCaml, so this will not be the most idiomatic nor the best looking code you'll ever see. However it works and I'm stoked about it!
The filename is nacc.ml as as (cheeky) play on yacc and means "Not a(nother) compiler compiler".