Comment on Does this compiler exist?
PowerSeries@lemmy.ca 11 months ago
Have you looked at the Lisps / Scheme / Racket yet? Racket in particular makes it quite nice to go #lang blah
at the top of the file and change the parsing or interpretation entirely.
For example all the documentation pages and guides are written in scribble:
docs.racket-lang.org/…/getting-started.html#(part…
#lang scribble/base @title{On the Cookie-Eating Habits of Mice} If you give a mouse a cookie, he's going to ask for a glass of milk.
And it has an entire document markup language created in it, which can output pdf or html. But you can still use @ syntax to drop in racket code to compute values. Or create templates.
I even implemented a #lang which took assembly directly (and interpreted it, it was for a class).
So if you are really after full control, you should study Lisps and their macro systems.
jeffhykin@lemm.ee 11 months ago
I’ve used racket before and I did not know about this! If you’re willing to share I’d love to hear more about how you defined that assembly lang.