|
|
|
|
|
by melloclello
3302 days ago
|
|
> It’s no secret that I really like Clojure and as a lisp, it was the easiest language for me to start the prototype with, but there’s no reason this couldn’t be done for any language with a dynamic runtime. The rest is mostly simple analysis of an AST and some clever inference. I have looked into this. It is kind of criminal that for most real world languages (Ruby[1], C[2] etc), it's not possible to just define a grammar and throw it at a standard parser generator for them - they generally have one or two quirks which make this infeasible. In my ideal alternate universe it would be considered unthinkable to publish a language without also publishing a grammar in a standard format for said language, which can then be plugged into your favourite text/semantic/tree editor. Our tools should dictate our languages, not the other way around. [1] http://programmingisterrible.com/post/42432568185/how-to-par... [2] https://en.wikipedia.org/wiki/The_lexer_hack |
|
[1] Mainly due to begin..end blocks, curly braces or indentation (as in Python)