Re: Programming language specification languages

"Joachim Durchholz" <joachim_d@gmx.de>
6 Oct 2001 16:35:54 -0400

          From comp.compilers

Related articles
Programming language specification languages nmm1@cus.cam.ac.uk (2001-09-20)
Re: Programming language specification languages cfc@world.std.com (Chris F Clark) (2001-09-21)
Re: Programming language specification languages asloane@ics.mq.edu.au (Anthony M. Sloane) (2001-09-25)
Re: Programming language specification languages rkrayhawk@aol.com (2001-09-25)
Re: Programming language specification languages idbaxter@semdesigns.com (Ira D. Baxter) (2001-09-26)
Re: Programming language specification languages vbdis@aol.com (2001-09-26)
Re: Programming language specification languages wclodius@aol.com (2001-10-06)
Re: Programming language specification languages joachim_d@gmx.de (Joachim Durchholz) (2001-10-06)
Re: Programming language specification languages joachim_d@gmx.de (Joachim Durchholz) (2001-10-06)
Re: Programming language specification languages neelk@alum.mit.edu (2001-10-10)
Re: Programming language specification languages wclodius@aol.com (2001-10-20)
Re: Programming language specification languages nmm1@cus.cam.ac.uk (2001-10-21)
| List of all articles for this month |

From: "Joachim Durchholz" <joachim_d@gmx.de>
Newsgroups: comp.compilers
Date: 6 Oct 2001 16:35:54 -0400
Organization: Compilers Central
References: 01-09-087
Keywords: design
Posted-Date: 06 Oct 2001 16:35:54 EDT

Nick Maclaren <nmm1@cus.cam.ac.uk> wrote:
> What I want is something enough beyond BNF that I can define
> type-consistency, scoping, aliasing and value-constraint rules. The
> really fancy stuff can be said in English.


Take a look at two-level grammars (van Wijngaarden). It's a sort of
"grammars with attributes"; you stuff the types (and scoping
information etc.) into the attributes.


I'm not sure whether van Wijngaarden-style grammars are the best way
to do this today, or even when I first read about them. However, I
once saw a Pascal-style language defined with it, and I found the
grammar extremely readable even though I had no knowledge of these
grammars at the time. (Actually I don't know much about them today; in
fact I think somebody mentioned that progress has been made on the
field since the early 80ies.)


Two-level grammars are on the "context-sensitive" tier of the Chomsky
hierarchy.


Regards,
Joachim


Post a followup to this message

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