On Thu, Oct 21, 2010 at 7:50 AM, Thomas Heller <thom.hel...@googlemail.com> wrote: > On Thursday 21 October 2010 05:11:49 Eric Niebler wrote: >> On 10/20/2010 7:49 AM, Thomas Heller wrote: <snip> >> > Here it goes: >> > namespace detail >> > { >> > >> > template < >> > >> > typename Grammar, typename Visitor, typename IsRule = void> >> > >> > struct algorithm_case >> > >> > : Grammar >> > >> > {}; >> >> Why inherit from Grammar here instead of: >> : proto::when< >> >> Grammar >> , typename Visitor::template visit<Grammar> >> >> >> ? > > Because I wanted to have an "escape" point. There might be some valid > usecase, that does not want to dispatch to the Visitor/Actions. This is btw > the reason i didn't reuse or_, but introduced the rules template. To > distinguish between: 1) "regular" proto grammars --> no dispatch 2) the > rules, which do the dispatch.
Ok ... after rereading your mini phoenix you solve that problem with default_actions. Very neat as well! _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto