Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Is this something we can solve with the improved CC
daniloz:
Cool!!! That's something I was waiting for a while now... :D
The other thing is to parse #ifdef statements and parse only the relevant code, but this one I know is a though one... ;-)
ollydbg:
--- Quote from: daniloz on April 14, 2010, 09:25:35 am ---Cool!!! That's something I was waiting for a while now... :D
The other thing is to parse #ifdef statements and parse only the relevant code, but this one I know is a though one... ;-)
--- End quote ---
Ok, I will help if I have time.
By the way, these days, Loaden has implementing a mechanism to handle #if #ifdef like statement. He has release his code in
http://topic.csdn.net/u/20100412/21/b39c50b9-caeb-406f-a12e-023e088c78c9.html It is a Chinese programming site.
He has not finished it yet, because he has failed parsing the statement like below:
--- Code: ---#if (2 - 1) + !((3 - 2) ^ 1)
--- End code ---
Resolving the expression is not quite easy.
Ceniza:
--- Quote from: ollydbg on April 14, 2010, 09:34:31 am ---
--- Code: ---#if (2 - 1) + !((3 - 2) ^ 1)
--- End code ---
Resolving the expression is not quite easy.
--- End quote ---
If you need to make replacements, then it is not easy. If it is just parentheses, numbers and operators, then it is quite easy once you convert everything into tokens after the #if and skip all whitespace.
The code that evaluates constant expressions is in constexprevaluator.h of CCPP, but no one liked that code because of all template stuff. Re-using the productions would give you the desired result. It is just a matter of replacing all template stuff into specific types.
Anyway...
ollydbg:
@Ceniza
I know you CCPP project, and I have tried that several months ago, but as you said, it is hard to understand...
If your CCPP project can used to replace the current Tokenizer class. ( All I want is " macro replacement, and #if XXXX evaluation), it will make CC more powerful.
But I'm sorry I can't fully understand these source code structure. Can you give a more description about your CCPP? Thanks.
killerbot:
--- Quote from: daniloz on April 14, 2010, 09:16:42 am ---If I understand right what ollydbg says and if this is changed somehow in the CC to do what killerbot suggests, does it means that "find implementation" and "find declaration" would also be also to go directly to the relevant class function member in case of functions with same name in different classes?
For example, I have a Reset() function in several classes (more than 20, actually) and each time I do a "find declaration/implementation" I have to chose from a list which class I want.
So, if the whole expression of "Object.Reset()" is analyzed (as suggested by ollydbg), then the CC can go directly to the relevant Reset() function, right?
--- End quote ---
I can fully confirm this. That is indeed the idea behind my suggestion, to have these kind of things fixed. I think this would be an big improvement in our CC.
Let's hope our CC specialists can come up with a solution.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version