Related articles |
---|
Extensible grammars skaller@nospam.com.au (John Max Skaller) (2004-12-13) |
Re: Extensible grammars claus.reinke@talk21.com (Claus Reinke) (2004-12-16) |
Re: Extensible grammars skaller@nospam.com.au (John Max Skaller) (2004-12-17) |
Re: Extensible grammars skaller@nospam.com.au (John Max Skaller) (2004-12-17) |
Re: Extensible grammars Ralf.Laemmel@cwi.nl (Ralf Laemmel) (2004-12-23) |
From: | "John Max Skaller" <skaller@nospam.com.au> |
Newsgroups: | comp.compilers |
Date: | 17 Dec 2004 00:29:21 -0500 |
Organization: | Compilers Central |
References: | 04-12-058 04-12-070 |
Keywords: | parse |
Posted-Date: | 17 Dec 2004 00:29:21 EST |
On Thu, 16 Dec 2004 00:43:52 -0500, Claus Reinke wrote:
> Two-Level Types and Parameterized Modules. With Emir Pasalic.
> Expanded version of Generic Unification via Two-Level Types
> and Parameterized Modules, with new examples.
> JFP 14 (5):547-587, Sept. 2004
> http://www.cs.pdx.edu/~sheard/papers/JfpPearl.ps
Great, that's spot on topic!
> The idea has been used in several projects he has been involved
> with. One project not mentioned in the paper is Programatica
>
> http://www.cse.ogi.edu/PacSoft/projects/programatica/
> From what I've seen, the idea works, but there's a lot of clutter -
> for large sets of mutually recursive grammar rules, you need some
> way to hide the clutter.
That's my experience using polymorphic variants in Ocaml too.
> Essentially, you want the extra flexibility of open recursion and
> explicit knot-tying only when you extend the grammar, and you
> don't want to pay for that whenever you do any recursion over
> the grammar.
Yup: Open/Closed principle. It needs to be closed and ready to
use but open at the same time :)
>We're happily using Strafunski for that purpose
>
> http://www.cs.vu.nl/Strafunski/
>
> which provides support for generic AST-traversals with
> reduction strategies. So when we need a bottom-up or top-down
> or whatever-until-some-condition traversal of the AST, we don't
> need to bother with the recursive structure of the 2-level AST -
> all the boilerplate code remains behind the scenes.
Thanks! [Guess I'll have to switch to Haskell one day .. so much
fun stuff for it .. :]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.