Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: MortenMacFly on January 23, 2010, 04:32:48 pm

Title: CC fails to parse parts of boost
Post by: MortenMacFly on January 23, 2010, 04:32:48 pm
...namely this file:

[BOOST v1.4.0]\boost\spirit\home\classic\attribute\closure.hpp

...causes and endless loop. Just for the record. I've now time to look into it atm...
Title: Re: CC fails to parse parts of boost
Post by: MortenMacFly on January 23, 2010, 04:46:38 pm
...some update:
Attached is the log of ParserThread. As you see: It freaks out in "HandleTypedef()" / "ReadClsNames()". There is still a major bug there.

Code
DoAddToken() : Added/updated token 'T13' (41), type ', typenametypename', actual 'typenametypename'. Parent is spirit (4)
DoAddToken() : Prepending ''
DoAddToken() : Added/updated token 'closure' (42), type '', actual ''. Parent is spirit (4)
DoParse() : Loop:m_Str='', token='typedef'
HandleTypedef() : Typedef start
HandleTypedef() : token=phoenix, peek=::
HandleTypedef() : Pushing component='phoenix::closure', typedef args=''
HandleTypedef() : token=3, peek=,
ReadClsNames() : Unexpected token '3'.
HandleTypedef() : Pushing component='3', typedef args=''
 + '3'
HandleTypedef() : token=3, peek=,
ReadClsNames() : Unexpected token '3'.
HandleTypedef() : Pushing component='3', typedef args=''
 + '3'
HandleTypedef() : token=3, peek=,
ReadClsNames() : Unexpected token '3'.
HandleTypedef() : Pushing component='3', typedef args=''
 + '3'
Title: Re: CC fails to parse parts of boost
Post by: MortenMacFly on January 23, 2010, 04:59:57 pm
...another update:
If you paste the following code (it's part of the content of closure.hpp) into an own (empty) file you can reproduce this bug.
Code
    template <
            typename DerivedT
        ,   typename T0
        ,   typename T1
        ,   typename T2

    #if BOOST_SPIRIT_CLOSURE_LIMIT > 3
        ,   typename T3
        ,   typename T4
        ,   typename T5
    #endif
    >
    struct closure :
        public phoenix::closure<
            T0, T1, T2
    #if BOOST_SPIRIT_CLOSURE_LIMIT > 3
        ,   T3, T4, T5
    #endif
        >
    {
        typedef phoenix::closure<
                T0, T1, T2
    #if BOOST_SPIRIT_CLOSURE_LIMIT > 3
            ,   T3, T4, T5
    #endif
            > phoenix_closure_t;

        typedef closure_context<DerivedT> context_t;
    };
Title: Re: CC fails to parse parts of boost
Post by: MortenMacFly on January 23, 2010, 05:02:03 pm
Code
    template <
            typename DerivedT
        ,   typename T0
        ,   typename T1
        ,   typename T2

    #if BOOST_SPIRIT_CLOSURE_LIMIT > 3
Harahar - do you see the bug? The ">" of "#if BOOST_SPIRIT_CLOSURE_LIMIT > 3" is taken as closing template bracket which is wrong!

However, I need to go now... :-(
Title: Re: CC fails to parse parts of boost
Post by: mandrav on January 23, 2010, 11:15:27 pm
Rev.6110 must have this fixed.
Title: Re: CC fails to parse parts of boost
Post by: killerbot on January 24, 2010, 09:09:49 am
Rev.6110 must have this fixed.

because it is fixed :  :D
because it is fixed by :  :D  :D  :P