[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Extensible syntax



> > Lisp/Scheme provide exactly this facility, but every DSL must have
> > Lisp's syntax.
> 
> No, that's not the case. See Common Lisp's LOOP macro as an example of
> a Lisp macro that switches to a more Algolish syntax. Also read
> something about Common Lisp's read macros. CLtL2 [1] has some nice
> examples.

I am aware of these. Agreed, you can do some clever things, but to
recognize a very wide range of syntaxes, you end up writing a full
parser inside a macro. I guess Lisp has a kind of 'compile time turing
completeness' so the statement 'you can do that in Lisp' is always true,
but isn't always helpful, just as with the statement 'you can implement
that in <language X> because it is turing complete'.

> Check out "Domain-Specific Language Definition Through Reflective
> Extensible Language Kernels" by Sebastian Gonzalez and Wolfgang de
> Meuter, one of the papers in
> http://prog.vub.ac.be/gpce-repls/papers.zip

This looks great :) Thanks very much.

Tom