[spirit 2x] whats the sudden problem?

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

[spirit 2x] whats the sudden problem?

CARL BARRON-3
seens lately I can not pass member data to base_type(). must be  
something dumb as I can't
compile a grammar with out an external to the grammar start rule????  
untitled is the error
message capture, this is a stripped down version does not get thru  
error checks of template without an instancing.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel

main.cpp (507 bytes) Download Attachment
untitled (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2x] whats the sudden problem?

Joel de Guzman-2
Carl Barron wrote:
> seens lately I can not pass member data to base_type(). must be
> something dumb as I can't
> compile a grammar with out an external to the grammar start rule????  
> untitled is the error
> message capture, this is a stripped down version does not get thru error
> checks of template without an instancing.

Syntax error? Try:

template <class Iter>
struct simple_gram:qi::grammar<Iter,ascii::space_type,std::pair<int,int>() >
{
        simple_gram() : base_type(start)
        {
                using qi::int_;
                start %= int_ >> ',' int_;
        }
        qi::rule<Iter,ascii::space_type,std::pair<int,int>() > start;
};

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


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2x] whats the sudden problem?

CARL BARRON-3

On Feb 18, 2009, at 10:34 PM, Joel de Guzman wrote:

> Carl Barron wrote:
>> seens lately I can not pass member data to base_type(). must be
>> something dumb as I can't
>> compile a grammar with out an external to the grammar start rule????
>> untitled is the error
>> message capture, this is a stripped down version does not get thru  
>> error
>> checks of template without an instancing.
>
> Syntax error? Try:
>
> template <class Iter>
> struct  
> simple_gram:qi::grammar<Iter,ascii::space_type,std::pair<int,int>() >
> {
> simple_gram() : base_type(start)
> {
> using qi::int_;
> start %= int_ >> ',' int_;
> }
> qi::rule<Iter,ascii::space_type,std::pair<int,int>() > start;
> };
not much different errors are:
<quote>
Building target “test” of project “test” with configuration “Debug” —  
(4 errors)
            cd /Users/carlbarron/Xcode_work/test
     /Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -fmessage-length=0 -
pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -
Wunused-variable -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 -
isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -
fvisibility-inlines-hidden -mmacosx-version-min=10.5 -gdwarf-2 -
iquote /Users/carlbarron/Xcode_work/test/build/test.build/Debug/
test.build/test-generated-files.hmap -I/Users/carlbarron/Xcode_work/
test/build/test.build/Debug/test.build/test-own-target-headers.hmap -I/
Users/carlbarron/Xcode_work/test/build/test.build/Debug/test.build/
test-all-target-headers.hmap -iquote /Users/carlbarron/Xcode_work/test/
build/test.build/Debug/test.build/test-project-headers.hmap -F/Users/
carlbarron/Xcode_work/test/build/Debug -I/Users/carlbarron/Xcode_work/
test/build/Debug/include -I/Users/carlbarron/spirit2x -I/Users/
carlbarron/boost-trunk/trunk -I/Users/carlbarron/Xcode_work/test/build/
test.build/Debug/test.build/DerivedSources -c /Users/carlbarron/
Xcode_work/test/main.cpp -o /Users/carlbarron/Xcode_work/test/build/
test.build/Debug/test.build/Objects-normal/i386/main.o
/Users/carlbarron/Xcode_work/test/main.cpp:12: error: 'start' was not  
declared in this scope
/Users/carlbarron/Xcode_work/test/main.cpp:12: error: a function call  
cannot appear in a constant-expression
/Users/carlbarron/Xcode_work/test/main.cpp:13: error: expected ';'  
before '{' token
/Users/carlbarron/Xcode_work/test/main.cpp:17: error: expected `;'  
before 'qi'
                /Users/carlbarron/Xcode_work/test/main.cpp:12: error: 'start' was  
not declared in this scope
                /Users/carlbarron/Xcode_work/test/main.cpp:12: error: a function  
call cannot appear in a constant-expression
                /Users/carlbarron/Xcode_work/test/main.cpp:13: error: expected ';'  
before '{' token
                /Users/carlbarron/Xcode_work/test/main.cpp:17: error: expected `;'  
before 'qi'
Build failed (4 errors)
</quote>


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2x] whats the sudden problem?

Joel de Guzman-2
Carl Barron wrote:

> On Feb 18, 2009, at 10:34 PM, Joel de Guzman wrote:
>
>> Carl Barron wrote:
>>> seens lately I can not pass member data to base_type(). must be
>>> something dumb as I can't
>>> compile a grammar with out an external to the grammar start rule????
>>> untitled is the error
>>> message capture, this is a stripped down version does not get thru  
>>> error
>>> checks of template without an instancing.
>> Syntax error? Try:
>>
>> template <class Iter>
>> struct  
>> simple_gram:qi::grammar<Iter,ascii::space_type,std::pair<int,int>() >
>> {
>> simple_gram() : base_type(start)
>> {
>> using qi::int_;
>> start %= int_ >> ',' int_;
>> }
>> qi::rule<Iter,ascii::space_type,std::pair<int,int>() > start;
>> };
> not much different errors are:

Try:

     simple_gram():simple_gram::base_type(start)

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


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2x] whats the sudden problem?

CARL BARRON-3

On Feb 18, 2009, at 11:48 PM, Joel de Guzman wrote:

> Carl Barron wrote:
>> On Feb 18, 2009, at 10:34 PM, Joel de Guzman wrote:
>>
>>> Carl Barron wrote:
>>>> seens lately I can not pass member data to base_type(). must be
>>>> something dumb as I can't
>>>> compile a grammar with out an external to the grammar start  
>>>> rule????
>>>> untitled is the error
>>>> message capture, this is a stripped down version does not get thru
>>>> error
>>>> checks of template without an instancing.
>>> Syntax error? Try:
>>>
>>> template <class Iter>
>>> struct
>>> simple_gram:qi
>>> ::grammar<Iter,ascii::space_type,std::pair<int,int>() >
>>> {
>>> simple_gram() : base_type(start)
>>> {
>>> using qi::int_;
>>> start %= int_ >> ',' int_;
>>> }
>>> qi::rule<Iter,ascii::space_type,std::pair<int,int>() > start;
>>> };
>> not much different errors are:
>
> Try:
>
>     simple_gram():simple_gram::base_type(start)
>
> Regards,
  gee I knew it was a dumb error:)

  all is well...



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel