Spirit and Regular expressions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Spirit and Regular expressions

Bogdan Munteanu-2
Hi all,

I am trying to move to boost 1.33.0. I downloaded the sources, built the
libraries (including Boost.regex) and then recompiled my application.
The DLLs I wrote based on Spirit + regex do not compile anymore due to the
fact Spirit is using the deprecated regex interface.

I tried also the example posted with the Spirit documentation at

http://www.boost.org/libs/spirit/example/fundamental/regular_expression.cpp

These are my (unsuccessful) attempts:

==========================================
Since I didn't need the regex sources, I commented out the line

#define BOOST_SPIRIT_NO_REGEX_LIB

MSVC 7.1 broke with the message

C:\Bogdan\test\boost_1_33_0\install\include\boost\spirit\utility\impl\regex.ipp(65)
: error C2976: 'boost::reg_expression' : too few template arguments
C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\basic_regex.hpp(610)
: see declaration of 'boost::reg_expression'
C:\Bogdan\test\boost_1_33_0\install\include\boost\spirit\utility\impl\regex.ipp(66)
: see reference to class template instantiation
'boost::spirit::impl::rx_parser<CharT>' being compiled

==========================================
I defined
#define BOOST_REGEX_NO_FWD
as indicated in regex headers (user.hpp)
I still get a bunch of compilation errors strating with:
C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\char_regex_traits.hpp(34)
: error C2976: 'boost::regex_traits' : too few template arguments
C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\regex_traits.hpp(69)
: see declaration of 'boost::regex_traits'
C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\char_regex_traits.hpp(34)
: see reference to class template instantiation
'boost::deprecated::char_regex_traits_i<charT>' being compiled

==========================================
I googled about this issue but with no success.

==========================================
Is there anything I am missing ? I really apprecite any bit of advice.

Thanks,
Bogdan

PS.
Please note that with boost 1.32.x, everything works OK.




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

RE: Spirit and Regular expressions

Hartmut Kaiser

Bogdan Munteanu wrote:

> I am trying to move to boost 1.33.0. I downloaded the
> sources, built the libraries (including Boost.regex) and then
> recompiled my application.
> The DLLs I wrote based on Spirit + regex do not compile
> anymore due to the fact Spirit is using the deprecated regex
> interface.
>
> I tried also the example posted with the Spirit documentation at
>
> http://www.boost.org/libs/spirit/example/fundamental/regular_e
> xpression.cpp
>
> These are my (unsuccessful) attempts:

Your problems should be fixed now. The fix in the Boost CVS::HEAD and
CVS::RC_1_33_0 branches. Please note, that starting from Boost V1.33.0 you
must link against the Boost.Regex libraries.

Regards Hartmut

>
> ==========================================
> Since I didn't need the regex sources, I commented out the line
>
> #define BOOST_SPIRIT_NO_REGEX_LIB
>
> MSVC 7.1 broke with the message
>
> C:\Bogdan\test\boost_1_33_0\install\include\boost\spirit\utili
> ty\impl\regex.ipp(65)
> : error C2976: 'boost::reg_expression' : too few template arguments
> C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\bas
> ic_regex.hpp(610)
> : see declaration of 'boost::reg_expression'
> C:\Bogdan\test\boost_1_33_0\install\include\boost\spirit\utili
> ty\impl\regex.ipp(66)
> : see reference to class template instantiation
> 'boost::spirit::impl::rx_parser<CharT>' being compiled
>
> ==========================================
> I defined
> #define BOOST_REGEX_NO_FWD
> as indicated in regex headers (user.hpp) I still get a bunch
> of compilation errors strating with:
> C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\cha
> r_regex_traits.hpp(34)
> : error C2976: 'boost::regex_traits' : too few template arguments
> C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\reg
> ex_traits.hpp(69)
> : see declaration of 'boost::regex_traits'
> C:\Bogdan\test\boost_1_33_0\install\include\boost\regex\v4\cha
> r_regex_traits.hpp(34)
> : see reference to class template instantiation
> 'boost::deprecated::char_regex_traits_i<charT>' being compiled
>
> ==========================================
> I googled about this issue but with no success.
>
> ==========================================
> Is there anything I am missing ? I really apprecite any bit of advice.
>
> Thanks,
> Bogdan
>
> PS.
> Please note that with boost 1.32.x, everything works OK.
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App
> Server. Download it for free - -and be entered to win a 42"
> plasma tv or your very own Sony(tm)PSP.  Click here to play:
> http://sourceforge.net/geronimo.php
> _______________________________________________
> Spirit-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/spirit-general




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit and Regular expressions

Joel de Guzman-2
Hartmut Kaiser wrote:

> Bogdan Munteanu wrote:
>
>
>>I am trying to move to boost 1.33.0. I downloaded the
>>sources, built the libraries (including Boost.regex) and then
>>recompiled my application.
>>The DLLs I wrote based on Spirit + regex do not compile
>>anymore due to the fact Spirit is using the deprecated regex
>>interface.
>>
>>I tried also the example posted with the Spirit documentation at
>>
>>http://www.boost.org/libs/spirit/example/fundamental/regular_e
>>xpression.cpp
>>
>>These are my (unsuccessful) attempts:
>
>
> Your problems should be fixed now. The fix in the Boost CVS::HEAD and
> CVS::RC_1_33_0 branches. Please note, that starting from Boost V1.33.0 you
> must link against the Boost.Regex libraries.

Thanks Hartmut! That was quick! Hey, please don't forget to
tweak the changelist.

Thanks!
--
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

RE: Re: Spirit and Regular expressions

Hartmut Kaiser
Joel de Guzman wrote:

> > Your problems should be fixed now. The fix in the Boost
> CVS::HEAD and
> > CVS::RC_1_33_0 branches. Please note, that starting from
> Boost V1.33.0
> > you must link against the Boost.Regex libraries.
>
> Thanks Hartmut! That was quick! Hey, please don't forget to
> tweak the changelist.

Done.

Regards Hartmut




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general