|extensible compilers firstname.lastname@example.org (1998-03-22)|
|Re: extensible compilers email@example.com (N. D. Culver) (1998-03-24)|
|RE: extensible compilers firstname.lastname@example.org (Zhukov, Victor) (1998-03-30)|
|Re: extensible compilers email@example.com (N. D. Culver) (1998-04-03)|
|From:||"Zhukov, Victor" <firstname.lastname@example.org>|
|Date:||30 Mar 1998 21:49:58 -0500|
> N. D. Culver email@example.com wrote
> I think that the way to do an extensible compiler/language is as
> ASSUMPTION: a complete AST is retained after the parse and is
> processed by:
info about generalized AST and parser engine skipped.
The problem with extensible languages is that they are giving us more
power to express domain-specific idioms while on the other side
making program sources much less understandable and manageable.
Also, there are difficulties with pre-coding all possible 'semantic
categories' into the language, which is supposed to handle not only
a priori cases.
There is alternative approach, which tries to avoid syntax problem
by replacing parseable source codes with persistent AST-like structure
and providing alternative editing means (claimed to be even more
convenient than source code editing).
Semantics of the nodes (called intentions) is given in terms of rewriting
rules transforming an intention tree to fixed intermediate representation,
which is directly understood by code generator. Rules themselves are
expressed in the intention nodes, so you can build new node type by
giving description of how the node should be rewritten.
These rules can do a lot of domain specific optimization during rewriting.
Rules also can check types and enforce programming discipline,
serving as static checkers.
So called Intentional Programming approach is being developed at
Microsoft Research. It is quite ambitious project, aimed at solving problems
with programming languages in general by replacing them with new idiom
set. They claim to have working, self-compiling system of this structure.
More detailed info you can get from MS Research site at:
Disclaimer: I am not connected with Microsoft in any ways (except
using their products), I just like the idea.
Return to the
Search the comp.compilers archives again.