User forums > Nightly builds
The 16 January 2010 build (6088) is out.
blueshake:
--- Quote from: critic on January 19, 2010, 11:16:50 am ---I think this is strange behaviour of CC:
--- Code: ---std::string().append("").append("").append(""). // and etc
--- End code ---
The more recurces I use the slower CC works. Why? After last point in the example I waited about 15 seconds. And so on.
Can it be eliminated?
--- End quote ---
of course this will slow down the search process.you can see that 5 items will be searched.
critic:
But in Eclipse the same example works fine with 20 and over recursions. Is it's CC engine independent of recursions count? :?
Jenna:
Would it be possible to remember the last x search results if no reparsing has been done in the meantime and first search in the results-list (map or whatever is the best for this purpose) ?
After reparsing this list should be either cleared or updated.
MortenMacFly:
--- Quote from: ollydbg on January 19, 2010, 07:35:47 am ---I find the bug why the parser get stuck when parsing the VC 2005 header files:
--- End quote ---
Well done.
--- Quote from: ollydbg on January 19, 2010, 07:35:47 am ---So, there is a logic error in handling typedef statement....
--- End quote ---
True.
You pointed correctly to:
--- Code: ---void ParserThread::HandleTypedef(){
...
while(true)
{
token = m_Tokenizer.GetToken();
peek = m_Tokenizer.PeekToken();
......
else if (peek == ParserConsts::comma)
{
m_Tokenizer.UngetToken();
if (components.size() != 0)
{
......
}
--- End code ---
Just from a quick look I've added the other "bad" part. I'll look into it and try to reproduce.
blueshake:
@morten
you can try this patch:
--- Code: ---Index: src/plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- src/plugins/codecompletion/parser/parserthread.cpp (revision 6090)
+++ src/plugins/codecompletion/parser/parserthread.cpp (working copy)
@@ -1803,19 +1803,20 @@
else if (peek == ParserConsts::comma)
{
m_Tokenizer.UngetToken();
+
if (components.size() != 0)
{
wxString ancestor;
while (components.size() > 0)
{
- wxString token = components.front();
+ wxString tempToken = components.front();
components.pop();
if (!ancestor.IsEmpty())
ancestor << _T(' ');
- ancestor << token;
- ReadClsNames(ancestor);
+ ancestor << tempToken;
}
+ ReadClsNames(ancestor);
}
}
else if (token == ParserConsts::kw_enum)
@@ -1989,11 +1990,9 @@
else if (current == _T("*"))
{
m_IsPointer = true;
- continue;
+ //continue;
}
- else if ( wxIsalpha(current.GetChar(0))
- && ( (m_Tokenizer.PeekToken() == ParserConsts::semicolon)
- || (m_Tokenizer.PeekToken() == ParserConsts::comma)) )
+ else if ((wxIsalpha(current.GetChar(0)) || current.GetChar(0) == '_') )
{
TRACE(_T("ReadClsNames() : Adding variable '%s' as '%s' to '%s'"),
current.wx_str(),
@@ -2014,6 +2013,7 @@
m_Tokenizer.UngetToken();
break;
}
+
}
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version