AST files instead of DI interface files for faster compilation and easier distribution

Timon Gehr timon.gehr at gmx.ch
Mon Jun 18 18:47:26 PDT 2012


On 06/19/2012 02:47 AM, Chris Cain wrote:
> On Monday, 18 June 2012 at 18:05:59 UTC, Daniel wrote:
>> Same here, I wish there were a standardized pre-lexed-token "binary"
>> file-format, would benefit all text editors also, as they need to lex
>> it anyway to perform color syntax highlighting.
>
> If I were to make my own language, I'd forego a human-readable format
> and just have the "language" be defined as a big machine-readable AST.

http://de.wikipedia.org/wiki/Lisp ?

> You'd have to have an IDE, but it could display the code in just about
> any way the person wants (syntax, style, etc).
>

This could be done even if the language's source code storage format is 
human-readable.

> Syntax highlighting would be instantaneous and there would be fewer
> errors made by programmers (maybe ...). Plus it'd be unbelievably easy
> to implement things like auto-completion.

Parsing is not a huge issue. Depending on how powerful the language is, 
auto-completion may depend on full code analysis.


More information about the Digitalmars-d mailing list