Eric Niebler | 12 Jan 07:45

proto breaking changes (and patch for spirit2)

I've committed to boost svn head a new version of proto with improved 
transforms. This is a breaking change. There isn't documentation yet for 
the new transforms, so I made a patch that gets Spirit-2 working again. 
(At least, it works with msvc, but there appear to be other problems 
with spirit-2 and gcc which are unrelated.) Patch attached.

Cheers,

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com
Index: boost/spirit/lex/lexer/meta_grammar.hpp
===================================================================
--- boost/spirit/lex/lexer/meta_grammar.hpp	(revision 785)
+++ boost/spirit/lex/lexer/meta_grammar.hpp	(working copy)
@@ -99,11 +99,11 @@
             // semantic actions for tokens
             meta_grammar::binary_rule<
                 lex::domain, proto::tag::subscript, action,
-                token_def_meta_grammar, proto::transform::arg<proto::_>
+                token_def_meta_grammar, proto::when<proto::_, proto::_arg>
             >,
             meta_grammar::binary_rule<
                 lex::domain, proto::tag::subscript, action,
-                action_lexer_meta_grammar, proto::transform::arg<proto::_>
+                action_lexer_meta_grammar, proto::when<proto::_, proto::_arg>
             >
(Continue reading)

Hartmut Kaiser | 12 Jan 17:12

Re: proto breaking changes (and patch for spirit2)

Eric, 

> I've committed to boost svn head a new version of proto with 
> improved transforms. This is a breaking change. There isn't 
> documentation yet for the new transforms, so I made a patch 
> that gets Spirit-2 working again. 
> (At least, it works with msvc, but there appear to be other 
> problems with spirit-2 and gcc which are unrelated.) Patch attached.

I applied the patch, thanks! And I'm currently working to resolve the gcc
issues.

Regards Hartmut

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Eric Niebler | 12 Jan 19:19

Re: proto breaking changes (and patch for spirit2)

Hartmut Kaiser wrote:
> Eric, 
> 
>> I've committed to boost svn head a new version of proto with 
>> improved transforms. This is a breaking change. There isn't 
>> documentation yet for the new transforms, so I made a patch 
>> that gets Spirit-2 working again. 
>> (At least, it works with msvc, but there appear to be other 
>> problems with spirit-2 and gcc which are unrelated.) Patch attached.
> 
> I applied the patch, thanks! And I'm currently working to resolve the gcc
> issues.

Thanks Hartmut. I kept my changes to Spirit as minimal as possible. I 
leave it to you and Joel to decide if larger changes are in order to 
take better advantage of proto v3. The biggest changes are:

1) Cleaner separation of grammar and transform with proto::when<Grammar, 
Transform>.

2) A powerful lambda-like syntax for specifying transforms that uses 
function types.

Here is the toy_spirit example implemented in proto 3:
http://svn.boost.org/trac/boost/browser/trunk/libs/xpressive/proto/test/toy_spirit2.cpp

Here is an example from the toy spirit parser:

         // Directives such as no_case are handled here
         struct SpiritDirective
(Continue reading)

Joel de Guzman | 13 Jan 03:23

Re: proto breaking changes (and patch for spirit2)

Eric Niebler wrote:
> Hartmut Kaiser wrote:
>> Eric,
>>> I've committed to boost svn head a new version of proto with improved 
>>> transforms. This is a breaking change. There isn't documentation yet 
>>> for the new transforms, so I made a patch that gets Spirit-2 working 
>>> again. (At least, it works with msvc, but there appear to be other 
>>> problems with spirit-2 and gcc which are unrelated.) Patch attached.
>>
>> I applied the patch, thanks! And I'm currently working to resolve the gcc
>> issues.
> 
> 
> Thanks Hartmut. I kept my changes to Spirit as minimal as possible. I 

Thanks Hartmut!

> leave it to you and Joel to decide if larger changes are in order to 
> take better advantage of proto v3. The biggest changes are:
> 
> 1) Cleaner separation of grammar and transform with proto::when<Grammar, 
> Transform>.
> 
> 2) A powerful lambda-like syntax for specifying transforms that uses 
> function types.
> 
> Here is the toy_spirit example implemented in proto 3:
> http://svn.boost.org/trac/boost/browser/trunk/libs/xpressive/proto/test/toy_spirit2.cpp 
> 
> 
(Continue reading)


Gmane