Re: extending a grammar (Marc Wachowitz)
27 Mar 1996 00:08:07 -0500

          From comp.compilers

Related articles
extending a grammar (1996-03-12)
Re: extending a grammar (1996-03-21)
Re: extending a grammar platon! (1996-03-25)
Re: extending a grammar (1996-03-27)
Re: extending a grammar (1996-03-27)
| List of all articles for this month |

From: (Marc Wachowitz)
Newsgroups: comp.compilers
Date: 27 Mar 1996 00:08:07 -0500
Organization: ---
References: 96-03-082
Keywords: design, parse

M.M. van der Laan ( wrote:
> A solution might be to be able to expand the grammar by means of some
> EBNF notation, written in the language itself.

> Has anyone done this / thought of this / seen this before? Any remarks?

Dylan can be extended by adding macros, which are - unlike more
traditional Lisp macros - based on the grammar, and permit only
particular categories of syntactic extensions, rather than arbitrary
programmable replacement. It's still quite powerful - most of the
specified language syntax could be defined this way, and [circular]
examples how to do that are part of the Dylan Reference Manual (see, where the manual is
also available, or comp.lang.dylan for discussions).

Sure, the power of syntax extension can be abused, but with restraint
(e.g. style guidelines and discussion of new macros in a design
team), I'd never- theless like to have such a capability available, to
support abstractions for some application domains. I consider that
preferrable to any kind of additional preprocessor (often used for
SQL), or separate languages (usually a brain-damaged 4GL combined with
C). Who likes to do database application programming through a
low-level C interface? :-(

-- Marc Wachowitz <>

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.