Re: Van Wijngaarden grammars

Dave Lloyd <>
27 Feb 1996 23:24:41 -0500

          From comp.compilers

Related articles
[4 earlier articles]
Re: Van Wijngaarden grammars (1991-08-02)
Van Wijngaarden grammars (Stephen J Bevan) (1991-08-02)
Re: Van Wijngaarden grammars (Charles Lindsey) (1991-08-07)
Van Wijngaarden grammars (1996-02-24)
Re: Van Wijngaarden grammars (1996-02-26)
Re: Van Wijngaarden grammars (Michael Parkes) (1996-02-27)
Re: Van Wijngaarden grammars (Dave Lloyd) (1996-02-27)
Van Wijngaarden grammars (Dave Lloyd) (1996-02-27)
Re: Van Wijngaarden grammars (Gordon V. Cormack) (1996-03-01)
| List of all articles for this month |

From: Dave Lloyd <>
Newsgroups: comp.compilers
Date: 27 Feb 1996 23:24:41 -0500
Organization: Compilers Central
References: 96-02-297
Keywords: parse (Tony Finch) writes:
:>Has anyone written a compiler generator that uses van Wijngaarden
:>grammars to describe the language to be compiled?

> I vaguely remember one that used a restricted form of W-grammars. The
> restrictions were equivalent to making the meta-productions
> convertable to an attribute grammers. W-grammers are equivalent to
> the most general form a grammer which can compute anything, so its not
> likely that any marketable compiler would result. It would be too
> slow from all the generality.

Our A68 parser is a fairly straight-forward conversion of the
W-grammar into a recursive descent parser. Obviously the context
conditions (wheres and whethers) are handled by direct code, but it
does make for a fast and robust parser (modulo a few things that are
more awkward for recursive descent) and very easy to write (easier I'm
sure than working out how to use a parser-generating tool). But I
suspect this is more a reflection of the fact that Algol 68 and its
definition go hand in hand - the symmmetry between source text and
internal representation is very strong.

Dave Lloyd Email:
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK

Post a followup to this message

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