views:

88

answers:

3

Hi,

I'm trying to implement a language (or family of languages) whose grammar can be changed dynamically. I have found no examples that serve as study cases.

Can you give me some reference to any that are actually used in the real world (even from the academic world)?

Does it make sense to implement a Domain-Specific Languages with a dynamic grammar?

What do you think?

Thanks.

+4  A: 
Jörg W Mittag
+1 for π language, great!
Yassin
+3  A: 

The Katahdin programming language offers syntax and semantic changes at runtime. It's an unsupported thesis language so don't expect to use it in production. Still, Chris Seaton's thesis may be a good resource for implementing similar ideas in your own language.

Seaton is cited in this paper describing a macro system for the Fortress programming language. The authors' goal is to make syntactic extension indistinguishable from core syntax.

Corbin March
How could I forget about Katahdin! There's also a related, similar one, whose name escapes me at the moment.
Jörg W Mittag
+1 for citing Katahdin
Yassin
A: 

I really like the syntax of Agda, which is extremely flexible. It allows for arbitrary distfix operators which essentially allows for, what looks like new language features.

Although I haven't looked closely into her work I know Annika Aasa has done some work on letting programmers specify new syntax. You'll find her work on Google Scholar.

Fwiw, I think developing domain-specific languages as a library in a language with a very flexible syntax makes a lot of sense. It's sometimes referred to as an embedded domain-specific language, in case you didn't know.

svenningsson