Re: [proto] Externalizing grammar pattern matching

2010-11-23 Thread Eric Niebler
On 11/23/2010 2:18 PM, joel falcou wrote: > On 23/11/10 17:20, Eric Niebler wrote: >> On 11/23/2010 10:19 AM, Joel Falcou wrote: >>> So, question is: is there a way to have an extensible list of >>> when that can be extended "from the outside", something >>> like a proto::switch_ but with patterns

Re: [proto] Externalizing grammar pattern matching

2010-11-23 Thread joel falcou
On 23/11/10 17:20, Eric Niebler wrote: On 11/23/2010 10:19 AM, Joel Falcou wrote: So, question is: is there a way to have an extensible list of when that can be extended "from the outside", something like a proto::switch_ but with patterns instead of tag ? No. The best you can do is document h

Re: [proto] Externalizing grammar pattern matching

2010-11-23 Thread Eric Niebler
On 11/23/2010 10:19 AM, Joel Falcou wrote: > So, question is: is there a way to have an extensible list of > when that can be extended "from the outside", something > like a proto::switch_ but with patterns instead of tag ? No. The best you can do is document how to define a new Proto algorithm fr

[proto] Externalizing grammar pattern matching

2010-11-23 Thread Joel Falcou
Here is some classical pattern matching using proto::or_ https://gist.github.com/711891 This is pretty canonical I guess (unless my proto-fu is rusting). As stated in the comments, my main concern is that adding new pattern->value rules need to edit or_<>. Also classical. For a long time it d