Boost logo

Proto :

Subject: Re: [proto] Visitor Design Pattern
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-10-21 22:09:52

On 10/22/2010 10:01 AM, Eric Niebler wrote:

>> If you want to go "meta" on parsing, then you might
>> get some inspiration on 2-level grammars (inspired by van Wijngaarden
>> grammars) with the notion of hyper-rules, etc. This document:
>> gives a better glimpse into 2-level grammars (see Annex A).
>> "Although the notation (also known as a van Wijngaarden grammar,
>> or a W-grammar) is more powerful, it is more complicated and,
>> as the authors of Algol 68 recognized, “may be difficult
>> for the uninitiated reader”.
>> I'm not really sure how this relates to the current design, but
>> I think we should be getting closer to this domain and it deserves
>> some notice.
> You're not the first to bring up vW-grammars in relation to Proto.
> Someone suggested them to implement EDSL type systems. I spent a good
> amount of time reading about them, and could get my head around it. My
> understanding is that they're powerfully descriptive, but that building
> compilers with vW-grammars is very expensive. I don't really know. I
> think I'd need to work with a domain expert to make that happen. Any
> volunteers? :-)

Heh, people make it look needlessly complicated than it really is :-)
Check out the doc I sent (Annex A). It's really, to my mind,
generic languages -- abstraction of rules and templated grammars
through metanotions and hyper-rules. I have this strong feeling that
that's the intent of Thomas and your recent designs. Essentially,
making the phoenix language a metanotion in itself that can be
extended post-hoc through generic means.


Joel de Guzman

Proto list run by eric at