Related articles |
---|
[4 earlier articles] |
Re: Van Wijngaarden grammars hugh@cs.kun.nl (1991-08-02) |
Van Wijngaarden grammars bevan@computer-science.manchester.ac.uk (Stephen J Bevan) (1991-08-02) |
Re: Van Wijngaarden grammars chl@cs.man.ac.uk (Charles Lindsey) (1991-08-07) |
Van Wijngaarden grammars fanf2@thor.cam.ac.uk (1996-02-24) |
Re: Van Wijngaarden grammars solution@gate.net (1996-02-26) |
Re: Van Wijngaarden grammars mparks@oz.net (Michael Parkes) (1996-02-27) |
Re: Van Wijngaarden grammars dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-02-27) |
Van Wijngaarden grammars dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-02-27) |
Re: Van Wijngaarden grammars gvcormac@undergrad.math.uwaterloo.ca (Gordon V. Cormack) (1996-03-01) |
From: | Dave Lloyd <dave@occl-cam.demon.co.uk> |
Newsgroups: | comp.compilers |
Date: | 27 Feb 1996 23:24:41 -0500 |
Organization: | Compilers Central |
References: | 96-02-297 |
Keywords: | parse |
fanf2@thor.cam.ac.uk (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: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.