2 ms·
Off topic: Any good resources on how to create your own language? (eg syntax, compilation, etc)
by alberth 3y ago
Off topic: Any good resources on how to create your own language?
(eg syntax, compilation, etc)
- c0wb0yc0d3r 3y agoIt's not a tutorial by any means, but the openwrt project has been working on ucode[0]. Tiny JavaScript-like interpreter. It's pretty small. You might be able to glean insight. Presumably the source for this project would be insightful as well. It appears like there is more code for berry script compared to ucode though. [0]: https://github.com/jow-/ucode https://github.com/jow-/ucode
- TeaDude 3y agoBob Nystrom's Crafting Interpreters is generally well regarded these days although I'm unaware of any of the classic "so you want to build a programming language" texts.
- t-3 3y agoThere are more than a few books and tutorials on how to write parsers and compilers and PL theory, but I know of none on how to go about actually designing a language from scratch. Perhaps most new languages can be considered slight variations on earlier languages, so there's not much point when you're almost certainly using one of ~6 styles with slight modifications? I got started on my own little project by writing "ideal" programs and then working backwards and defining the syntax and vocabulary, then writing and reworking again ad nauseam.