Spirit2 Boost 1.35.0 and proto

Hi, I'm trying to use spirit2, first, I downloaded boost 1.35.0 release from https://svn.boost.org/svn/boost/branches/release Then I downloaded spirit2 from https://spirit.svn.sourceforge.net/svnroot/spirit/trunk/final Tried to use it. It gave me lots of errors, so I downloaded proto from https://svn.boost.org/svn/boost/branches/proto/v3 and replaced the boost/xpressive/proto directory. It worked, except that when compiling example 6 from the lexer, it chokes on a lot of places: template <typename Lexer> struct example6_tokens : lexer_def<Lexer> { typedef typename Lexer::token_set token_set; template <typename Self> void def (Self& self) { identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; constant = "[0-9]+"; white_space = token_def<>("[ \\t\\n]+") | "\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\/" ; self = token_def<>('(') | ')' | '{' | '}' | '=' | ';'; // This chokes with conversion loses qualifiers self.add (constant, ID_CONSTANT) // This too ("if", ID_IF) ("else", ID_ELSE) ("while", ID_WHILE) (identifier, ID_IDENTIFIER) // This too ; self("WS") = white_space; // This chokes with other different errors. } token_def<std::string> identifier; token_def<unsigned int> constant; token_set white_space; }; They give these errors: D:\development\new_boost\last_svn_spirit2\boost/fusion/container/list/cons.hpp(82) : error C2440: 'initializing' : cannot convert from 'const boost::spirit::lex::terminal_holder<T,Terminal>' to 'boost::spirit::lex::terminal_holder<T,Terminal> &' with [ T=boost::spirit::lex::token_def<> *, Terminal=boost::spirit::lex::token_def<> ] Conversion loses qualifiers D:\development\new_boost\last_svn_spirit2\boost/type_traits/is_convertible.hpp(257) : see reference to function template instantiation 'boost::fusion::cons<Car,Cdr>::cons<T,boost::fusion::nil>(const boost::fusion::cons<T,Cdr> &)' being compiled with [ Car=boost::spirit::lex::terminal_holder<boost::spirit::lex::token_def<> *,boost::spirit::lex::token_def<>> &, Cdr=boost::fusion::nil, T=const boost::spirit::lex::terminal_holder<boost::spirit::lex::token_def<> *,boost::spirit::lex::token_def<>> ] D:\development\new_boost\last_svn_spirit2\boost/type_traits/is_convertible.hpp(289) : see reference to class template instantiation 'boost::detail::is_convertible_basic_impl<From,To>' being compiled with [ From=boost::fusion::cons<boost::spirit::lex::terminal_holder<boost::spirit::lex::token_def<> *,boost::spirit::lex::token_def<>>,boost::fusion::nil> &, To=boost::fusion::cons<boost::spirit::lex::terminal_holder<boost::spirit::lex::token_def<> *,boost::spirit::lex::token_def<>> &,boost::fusion::nil> ] D:\development\new_boost\last_svn_spirit2\boost/type_traits/is_convertible.hpp(366) : see reference to class template instantiation 'boost::detail::is_convertible_impl<From,To>' being compiled with [ From=boost::fusion::cons<boost::spirit::lex::terminal_holder<boost::spirit::lex::token_def<> *,boost::spirit::lex::token_def<>>,boost::fusion::nil>, To=boost::fusion::cons<boost::spirit::lex::terminal_holder<boost::spirit::lex::token_def<> *,boost::spirit::lex::token_def<>> &,boost::fusion::nil> ] And goes on. How should I proceed? Regards, -- Felipe Magno de Almeida

Felipe,
I'm trying to use spirit2, first, I downloaded boost 1.35.0 release from https://svn.boost.org/svn/boost/branches/release
Then I downloaded spirit2 from https://spirit.svn.sourceforge.net/svnroot/spirit/trunk/final
Tried to use it. It gave me lots of errors, so I downloaded proto from https://svn.boost.org/svn/boost/branches/proto/v3 and replaced the boost/xpressive/proto directory. It worked, except that when compiling example 6 from the lexer, it chokes on a lot of places:
[snip]
And goes on. How should I proceed?
Ignore it. This is a know issue and I'm working on it. Thanks for reporting anyways. BTW: we moved Spirit2 to the Boost SVN now (trunk). All further development will happen there. Regards Hartmut

On Thu, Apr 17, 2008 at 12:41 PM, Hartmut Kaiser <hartmut.kaiser@gmail.com> wrote:
Felipe,
I'm trying to use spirit2, first, I downloaded boost 1.35.0 release from https://svn.boost.org/svn/boost/branches/release
Then I downloaded spirit2 from https://spirit.svn.sourceforge.net/svnroot/spirit/trunk/final
Tried to use it. It gave me lots of errors, so I downloaded proto from https://svn.boost.org/svn/boost/branches/proto/v3 and replaced the boost/xpressive/proto directory. It worked, except that when compiling example 6 from the lexer, it chokes on a lot of places:
[snip]
And goes on. How should I proceed?
Ignore it. This is a know issue and I'm working on it. Thanks for reporting anyways.
I used proto from https://svn.boost.org/svn/boost/branches/proto/v4 and it worked. Is it unexpected?
BTW: we moved Spirit2 to the Boost SVN now (trunk). All further development will happen there.
I searched it before, I didn't found it. Now I looked again. I see it was moved to include subdir. Will it have that layout now?
Regards Hartmut
Thanks, -- Felipe Magno de Almeida

On 04/17/08 11:08, Felipe Magno de Almeida wrote: [snip]
I used proto from https://svn.boost.org/svn/boost/branches/proto/v4 and it worked. Is it unexpected?
Hi Felipe, The libs/proto/test/Jamfile worked for me; however, the libs/proto/doc/Jamfile got several errors. Were you able to make the docs without error? -regards, Larry

On Thu, Apr 17, 2008 at 3:01 PM, Larry Evans <cppljevans@suddenlink.net> wrote:
[snip]
Hi Felipe,
Hi Larry,
The libs/proto/test/Jamfile worked for me; however, the libs/proto/doc/Jamfile got several errors. Were you able to make the docs without error?
Didn't even tried. Never got to make xsltproc work in windows.
-regards, Larry
Regards, -- Felipe Magno de Almeida

Felipe Magno de Almeida wrote:
Hi,
I'm trying to use spirit2, first, I downloaded boost 1.35.0 release from https://svn.boost.org/svn/boost/branches/release
Then I downloaded spirit2 from https://spirit.svn.sourceforge.net/svnroot/spirit/trunk/final
Tried to use it. It gave me lots of errors, so I downloaded proto from https://svn.boost.org/svn/boost/branches/proto/v3 and replaced the boost/xpressive/proto directory.
Don't use that version of proto. Use either the version in the file vault, or in svn trunk in the boost/xpressive/proto directory. -- Eric Niebler Boost Consulting www.boost-consulting.com

On Thu, Apr 17, 2008 at 12:44 PM, Eric Niebler <eric@boost-consulting.com> wrote:
[snip]
Don't use that version of proto. Use either the version in the file vault, or in svn trunk in the boost/xpressive/proto directory.
Thanks, I'll use boost from trunk then. It seems it is actually all there already. Will proto move outside the xpressive directory soon? If you need some help with manual work for that I can help. If it will actually need to be manual, a script might be good enough.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Thanks for proto, -- Felipe Magno de Almeida

Felipe Magno de Almeida wrote:
On Thu, Apr 17, 2008 at 12:44 PM, Eric Niebler <eric@boost-consulting.com> wrote:
[snip]
Don't use that version of proto. Use either the version in the file vault, or in svn trunk in the boost/xpressive/proto directory.
Thanks, I'll use boost from trunk then. It seems it is actually all there already. Will proto move outside the xpressive directory soon? If you need some help with manual work for that I can help. If it will actually need to be manual, a script might be good enough.
Yes, proto will move to boost/proto, but the changes are more profound than that. Moving Spirit-2 to the latest proto will be non-trivial. In branches/proto/v4 I've been incorporating proto's review feedback. The code changes are mostly done, but much work remains on the docs. I think once I bring the existing docs in line with the code changes, I'll commit it to trunk and incorporate the more extensive doc changes over time. -- Eric Niebler Boost Consulting www.boost-consulting.com
participants (4)
-
Eric Niebler
-
Felipe Magno de Almeida
-
Hartmut Kaiser
-
Larry Evans