-
Notifications
You must be signed in to change notification settings - Fork 0
A compiler for a toy language, in Standard ML
License
darius/toy-compiler
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is supposed to be a compiler from a toy programming language to MIPS assembly code. (I never ran the output on an actual MIPS computer, though, just in simulation via an alternate backend generating C code.) I wrote it in 1997 to work out design ideas mainly from Kelsey's ``A Correspondence between Continuation Passing Style and Static Single Assignment Form'', Appel's _Compiling With Continuations_, and Kelsey and Hudak's ``Realistic compilation by program transformation''. ast.sml gives the abstract syntax of the source language. main.sml ties the compiler passes together. mips-sim.sml is the aforementioned backend, to go with runtime/ C code. I forget how to build it, except I used CM with SML/NJ, plus a parser generator, I think one called MLLex/MLYacc. (But the generated parser is also checked in to this repo, apparently.) To run tests: cd tests/ && make okay I've barely glanced over these files now in 2022; I hope there's nothing too embarrassing. Darius Bacon
About
A compiler for a toy language, in Standard ML
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published