Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

New code completion remarks/issues

<< < (40/54) > >>

MortenMacFly:

--- Quote from: MortenMacFly on October 20, 2009, 05:01:24 pm ---Notice that there is another call to HandlePreprocessorBlocks() in void ParserThread::SkipBlock() and ParserThread::HandleClass(EClassType ct).

--- End quote ---
I've added a test case for pre-processor handling to trunk. You'll realise that a lot things are not (yet) working (check the symbols browser). A major bug is handling of comments in preprocessors. :-(

blueshake:

--- Quote ---I've added a test case for pre-processor handling to trunk. You'll realise that a lot things are not (yet) working (check the symbols browser). A major bug is handling of comments in preprocessors. :-(

--- End quote ---
hello,morten
can you give me more informations about what is wrong with preprocessors,It seems work here.

ollydbg:

--- Quote from: MortenMacFly on October 20, 2009, 05:01:24 pm ---
--- Quote from: ollydbg on October 20, 2009, 04:14:58 pm ---
--- Code: ---        else if (token==ParserConsts::hash)
        {
            token = m_Tokenizer.GetToken();
            if (token==ParserConsts::kw_include)
                HandleIncludes();
            else if (token==ParserConsts::kw_define)
                HandleDefines();
            else
                HandlePreprocessorBlocks(token);
            m_Str.Clear();
        }

--- End code ---

--- End quote ---
Notice that there is another call to HandlePreprocessorBlocks() in void ParserThread::SkipBlock() and ParserThread::HandleClass(EClassType ct).

--- End quote ---

Yes, I also noticed that, this function in those places. But this is still nothing related to Tokenizer internals.

The Tokenizer class do quite simple things:

1, it skip the unnecessory preprocessor directives, such as:


--- Code: ---#pragma XXXX

--- End code ---

2, return a correct token string

So, don't care about that. :D

ollydbg:
Here is the final patch on Tokenizer, I just do a lot of re-factoring.

1, We don't need to check whether the CurrentCharr is a "C escaped character" if we are not in a C string.
2, I remove the if condition check at the end of the DoGetToken function. see Here and the following discussion
3, I add a Macroreplace function to deal with the new Macros in GCC 4.x. You need to add macro map, see Token replacement map
4, I add some comments of these function in the source file.

I have tested this patch for several days, and works fine. :D

Feed back and test case are all welcome!!! :D


[attachment deleted by admin]

MortenMacFly:

--- Quote from: ollydbg on October 21, 2009, 03:52:44 am ---Feed back and test case are all welcome!!! :D

--- End quote ---
I cannot apply this patch on trunk. Could you please provide a patch against (current) trunk using svn diff?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version