comments on spirit2 at svn...

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

comments on spirit2 at svn...

CARL BARRON-2
I did dl all the files [I think  it was not automatic] I did get latest
of a couple of days ago
of boost head via a snapshot.  boost /spirit in that snapshot does not
compile out of the box
due to some boost [not spirit] assumptions about CW and rvalue
references

The examples look instructive, and the code looks easier to write.  
Things must be pretty much
set in stone as release is approximately one month away.

I am initially impressed, and await more information. and hopefully a
compiler that it compiles with.

It does look like an almost complete rewrite of an application using
spirit 1.8x to spirit 2 is unavoidable
but perhaps that is good as this spirit 2 looks cleaner.

Will this stuff compile with gcc 3.3, it sits on this system...


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: comments on spirit2 at svn...

Joel de Guzman-2
CARL BARRON wrote:

> I did dl all the files [I think  it was not automatic] I did get latest
> of a couple of days ago
> of boost head via a snapshot.  boost /spirit in that snapshot does not
> compile out of the box
> due to some boost [not spirit] assumptions about CW and rvalue
> references
>
> The examples look instructive, and the code looks easier to write.  
> Things must be pretty much
> set in stone as release is approximately one month away.

Nothing will be set in stone until the general release, which will
happen after BoostCon. While Spirit2 will be ready at the BoostCon,
from that point until its actual 2.0 release, there will probably
still be changes from feedback, suggestions, new ideas, etc.

> I am initially impressed, and await more information. and hopefully a
> compiler that it compiles with.
>
> It does look like an almost complete rewrite of an application using
> spirit 1.8x to spirit 2 is unavoidable
> but perhaps that is good as this spirit 2 looks cleaner.

Yes. That is also a reason why Spirit2 will bundle "classic" (1.8.x)
Spirit with it.

> Will this stuff compile with gcc 3.3, it sits on this system...

Yes. I am regularly testing with g++.

Regards,
--
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

test/Jamfile.2 problems (was Re: comments on spirit2 at svn...

Larry Evans
On 04/16/2007 09:11 AM, Joel de Guzman wrote:
[snip]
>>Will this stuff compile with gcc 3.3, it sits on this system...
>
>
> Yes. I am regularly testing with g++.
>
Joel, I'm getting:

cd
/home/evansl/prog_dev/boost-cvs/ro/boost/sandbox/spirit2/final/libs/spirit/test/
bjam --v2
...
error: No best alternative for ./char
     next alternative: required properties: (empty)
         matched
     next alternative: required properties: (empty)
         matched
error: No best alternative for ./lit
     next alternative: required properties: (empty)
         matched
     next alternative: required properties: (empty)
         matched

and then later:

...updating 6 targets...
...using
<p../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug>range_run...
testing.capture-output
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run.run
====== BEGIN OUTPUT ======

EXIT STATUS: 139
====== END OUTPUT ======

and then later:

gcc.compile.c++
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/pattern.test/gcc-4.1/debug/pattern.o
In file included from
../../../../final/boost/spirit/karma/nonterminal/rule.hpp:15,
                  from
../../../../final/boost/spirit/karma/nonterminal.hpp:13,
                  from karma/pattern.cpp:15:
../../../../final/boost/spirit/karma/nonterminal/nonterminal.hpp:14:65:
error: boost/spirit/support/nonterminal/nonterminal_base.hpp: No such
file or directory
../../../../final/boost/spirit/karma/nonterminal/nonterminal.hpp:40:
error: expected class-name before ',' token
karma/pattern.cpp: In function 'int main()':
karma/pattern.cpp:62: error: 'struct
boost::spirit::karma::rule<boost::function_output_iterator<spirit_test::string_appender<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >, void
()(main()::var_type), boost::fusion::unused_type>' has no member named '_1'
karma/pattern.cpp:75: error: 'struct
boost::spirit::karma::rule<boost::function_output_iterator<spirit_test::string_appender<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >, void ()(char, int,
double), boost::fusion::unused_type>' has no member named '_1'

Do you have any ideas of what I'm doing wrong?

-thanks,
Larry


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: test/Jamfile.2 problems (was Re: comments on spirit2at svn...

Hartmut Kaiser
Larry,

> and then later:
>
> gcc.compile.c++
> ../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/tes
> t/pattern.test/gcc-4.1/debug/pattern.o
> In file included from
> ../../../../final/boost/spirit/karma/nonterminal/rule.hpp:15,
>                   from
> ../../../../final/boost/spirit/karma/nonterminal.hpp:13,
>                   from karma/pattern.cpp:15:
> ../../../../final/boost/spirit/karma/nonterminal/nonterminal.h
> pp:14:65:
> error: boost/spirit/support/nonterminal/nonterminal_base.hpp:
> No such file or directory
> ../../../../final/boost/spirit/karma/nonterminal/nonterminal.hpp:40:
> error: expected class-name before ',' token
> karma/pattern.cpp: In function 'int main()':
> karma/pattern.cpp:62: error: 'struct
> boost::spirit::karma::rule<boost::function_output_iterator<spi
> rit_test::string_appender<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > > >, void
> ()(main()::var_type), boost::fusion::unused_type>' has no
> member named '_1'
> karma/pattern.cpp:75: error: 'struct
> boost::spirit::karma::rule<boost::function_output_iterator<spi
> rit_test::string_appender<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > > >, void
> ()(char, int, double), boost::fusion::unused_type>' has no
> member named '_1'
>
> Do you have any ideas of what I'm doing wrong?

Karma is currently known to be broken. Joel made some changes and I will
have time only next weekend to tend the broken bones...

Regards Hartmut

>
> -thanks,
> Larry
>
>
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by DB2 Express Download DB2
> Express C - the FREE version of DB2 express and take control
> of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Spirit-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/spirit-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: test/Jamfile.2 problems (was Re: comments on spirit2at svn...

Joel de Guzman-2
Hartmut Kaiser wrote:

> Karma is currently known to be broken. Joel made some changes and I will
> have time only next weekend to tend the broken bones...

Sorry Hartmut,

I did consider fixing them but I hesitated in fear that I might do
something wrong. Anyway, the "Qi" part of Spirit should be fine.

Regards,
--
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: test/Jamfile.2 problems (was Re: comments on spirit2at svn...

Larry Evans
On 04/16/2007 05:27 PM, Joel de Guzman wrote:

> Hartmut Kaiser wrote:
>
>> Karma is currently known to be broken. Joel made some changes and I will
>> have time only next weekend to tend the broken bones...
>
> Sorry Hartmut,
>
> I did consider fixing them but I hesitated in fear that I might do
> something wrong. Anyway, the "Qi" part of Spirit should be fine.
>
> Regards,
Hi Joel,

I just did svn update and then reran and got:
<--------- cut here --------------
cd ~/prog_dev/boost-cvs/ro/boost/sandbox/spirit2/final/libs/spirit/test/
bjam --v2
warning: Graph library does not contain optional GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the
note: directories containing the Expat headers and libraries, respectively.
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
warning: Python location is not configured
warning: the Boost.Python library won't be built
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(don't panic: this is a strictly optional feature).
...patience...
...patience...
...found 1840 targets...
...updating 164 targets...
MkDir1
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char.test
MkDir1
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char.test/gcc-4.1
MkDir1
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char.test/gcc-4.1/debug
gcc.compile.c++
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char.test/gcc-4.1/debug/char.o
gcc.link
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char.test/gcc-4.1/debug/char
testing.capture-output
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char.test/gcc-4.1/debug/char.run
**passed**
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char.test/gcc-4.1/debug/char.test
gcc.compile.c++
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char_class.test/gcc-4.1/debug/char_class.o
gcc.link
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char_class.test/gcc-4.1/debug/char_class
testing.capture-output
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char_class.test/gcc-4.1/debug/char_class.run
**passed**
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/char_class.test/gcc-4.1/debug/char_class.test

//many more **passed** tests, but then...
qi/range_run.cpp: In function 'void acid_test() [with Char = wchar_t]':
qi/range_run.cpp:160:   instantiated from here
qi/range_run.cpp:39: warning: overflow in implicit constant conversion
gcc.link
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run
testing.capture-output
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run.run
====== BEGIN OUTPUT ======

EXIT STATUS: 139
====== END OUTPUT ======

 
LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

 
"../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run"
   >
"../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run.output"
2>&1


 >--------- cut here --------------
Any ideas what's wrong?


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: test/Jamfile.2 problems (was Re: comments on spirit2at svn...

Larry Evans
On 06/08/2007 01:30 PM, Larry Evans wrote:
[snip]
> I just did svn update and then reran and got:
> <--------- cut here --------------
> cd ~/prog_dev/boost-cvs/ro/boost/sandbox/spirit2/final/libs/spirit/test/
> bjam --v2
[snip]
> warning: Graph library does not contain optional GraphML reader.
> qi/range_run.cpp: In function 'void acid_test() [with Char = wchar_t]':
> qi/range_run.cpp:160:   instantiated from here
> qi/range_run.cpp:39: warning: overflow in implicit constant conversion
> gcc.link
[snip]
After adding prints to range_run.cpp:

     range_run<Char> rr;
     std::cout<<":const_max="<<const_max<<"\n";
     std::cout<<":const_min="<<const_min<<"\n";
     std::cout<<":const_max-const_min="<<const_max-const_min<<"\n";
     boost::dynamic_bitset<> bset(const_max-const_min+1);

got following output:

cd
~/prog_dev/boost-cvs/ro/boost/bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/
./range_run
:const_max=
:const_min=€
:const_max-const_min=255
:const_max=
:const_min=€
:const_max-const_min=255
:const_max=ÿ
:const_min=

So there's some binary output.  I'll investigate further, but
if you have any ideas, it'd probably help.

-regards,
Larry


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

integer_traits_test flawed?(was Re: test/Jamfile.2 problems (was Re: comments on spirit2at svn...

Larry Evans
On 06/11/2007 09:30 AM, Larry Evans wrote:
> On 06/08/2007 01:30 PM, Larry Evans wrote:
[snip]

> cd
> ~/prog_dev/boost-cvs/ro/boost/bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/
> ./range_run
> :const_max=
> :const_min=€
> :const_max-const_min=255
> :const_max=
> :const_min=€
> :const_max-const_min=255
> :const_max=ÿ
> :const_min=
>
> So there's some binary output.  I'll investigate further, but
> if you have any ideas, it'd probably help.
>
Converted values to long and with more prints got:
cd
/home/evansl/prog_dev/boost-cvs/ro/boost/bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/
./range_run
acid_test<char>:
:const_max=127
:const_min=4294967168
:const_max-const_min=255
:const_max-const_min+1=256
acid_test<signed char>:
:const_max=127
:const_min=4294967168
:const_max-const_min=255
:const_max-const_min+1=256
acid_test<unsigned char>:
:const_max=255
:const_min=0
:const_max-const_min=255
:const_max-const_min+1=256
acid_test<wchar_t>:
:const_max=2147483647
:const_min=2147483648
:const_max-const_min=4294967295
:const_max-const_min+1=0

Compilation segmentation fault at Mon Jun 11 11:27:28

So, the problem's with wchar_t; however, the latest regressions:

http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/developer/integer_release.html

indicate that integer_traits_test.cpp, which does have a test for
wchar_t, is passing. Maybe this integer_traits_test needs
changing to be more complete?  I'll post this to devel list
to see.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

suggested change to range_run.cpp test (was Re: integer_traits_test flawed

Larry Evans
On 06/11/2007 11:55 AM, Larry Evans wrote:
[snip]

> Compilation segmentation fault at Mon Jun 11 11:27:28
>
> So, the problem's with wchar_t; however, the latest regressions:
>
> http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/developer/integer_release.html
>
> indicate that integer_traits_test.cpp, which does have a test for
> wchar_t, is passing. Maybe this integer_traits_test needs
> changing to be more complete?  I'll post this to devel list
> to see.

The problem is that dynamic_bitset CTOR expects std::size_t arg and
the range of wchar_t is too large.  This problem would be more
apparent if renge_run.cpp(around line 39) were changed as follows:

     typedef boost::dynamic_bitset<> dynbitset_type;
     typedef typename dynbitset_type::size_type bitset_size_type;
     bitset_size_type const bitset_size_val=const_max-const_min+1;
     BOOST_TEST(bitset_size_val > 0);//is biset_size_type large enough?
     dynbitset_type bset(bitset_size_val);

this would result in a test run with output:

gcc.compile.c++
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run.o
qi/range_run.cpp: In function 'void acid_test() [with Char = wchar_t]':
qi/range_run.cpp:168:   instantiated from here
qi/range_run.cpp:41: warning: overflow in implicit constant conversion
gcc.link
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run
testing.capture-output
../../../../../../bin.v2/sandbox/spirit2/final/libs/spirit/test/range_run.test/gcc-4.1/debug/range_run.run
====== BEGIN OUTPUT ======
qi/range_run.cpp(42): test 'bitset_size_val > 0' failed in function
'void acid_test() [with Char = wchar_t]'

EXIT STATUS: 139
====== END OUTPUT ======



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel