Author Topic: CC fails to parse parts of boost  (Read 8886 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9662
CC fails to parse parts of boost
« 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...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9662
Re: CC fails to parse parts of boost
« Reply #1 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'
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9662
Re: CC fails to parse parts of boost
« Reply #2 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;
    };
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9662
Re: CC fails to parse parts of boost
« Reply #3 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... :-(
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CC fails to parse parts of boost
« Reply #4 on: January 23, 2010, 11:15:27 pm »
Rev.6110 must have this fixed.
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5387
Re: CC fails to parse parts of boost
« Reply #5 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