On 10/24/2010 2:18 AM, Thomas Heller wrote:
On Saturday 23 October 2010 19:47:59 Eric Niebler wrote:
On 10/23/2010 10:45 AM, Thomas Heller wrote:
On Saturday 23 October 2010 19:30:18 Eric Niebler wrote:
On 10/23/2010 10:12 AM, Eric Niebler wrote:
I've tweaked both the traversal example you sent around as well as my
over toy Phoenix. Tell me what you guys think.

Actually, I think it's better to leave the definition of "some_rule"
alone and wrap it in "named_rule" at the point of use. A bit cleaner.
See attached.

I like that.
With that named_rule approach, we have some kind of in code
documentation: Look, here that rule is a customization point.

Exactly.

Why not just rule? Less characters to type.

I almost called it "rule", but *everything* in Proto is a rule including
proto::or_ and proto::switch_. What makes these rules special is that
they have a name.

True. But you could look at proto::or_ and proto::switch_ or any other
already exisiting rules as anonymous rules. While rule or named_rule
explicitly name them.

Well, in parsing land, rules are always named. There's no such thing
as anonymous rules, AFAIK. What's the counterpart of "parser" in the
proto world?

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net



_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto

Reply via email to