r/sml • u/atroposisdead • 1d ago
My first attempt at parsing and evaluating s-exps
Hi all,
I've been a software developer for about 10 years and I've been curious about FP for half of this time. Eventually, I picked up SML as my language of choice (OCaml is mostly some random line nose for me, and in Haskell/PureScript type classes are so pervasive, they make the language almost impenetrable for beginners).
So my goal has been to:
- lex the source code,
- parse it using parser combinators,
- (do some AST manipulations),
- evaluate it.
This is the repository where I keep my source code, and a README file. The gist of this file is:
- it's not Scheme,
- this is a WIP
- compiler: MLton + MLB basis files
- using SuccessorML as much as possible.
I try to keep the code clean, concerns separated as much as possible, meaningful signatures & structs, clear types).
ALL constructive criticism is very much welcome. I'm not an SML pro :)