wxGetApp not in the list CC.
confirmed trunk rev 6736.
Just noticed that:
In my D:\code\wxWidgets-2.8.11\include\wx\app.h
The declaration is like:
// this macro can be used multiple times and just allows you to use wxGetApp()
// function
#define DECLARE_APP(appname) extern appname& wxGetApp();
But once the cc's parser meets a
extern keyword, it will just skip the later statement.
see the source code: parserthread.cpp line 716
else if (token == ParserConsts::kw_extern)
{
// check for "C", "C++"
m_Str = m_Tokenizer.GetToken();
if (m_Str == ParserConsts::kw_C || m_Str == ParserConsts::kw_CPP)
{
m_Tokenizer.GetToken(); // "eat" {
DoParse(); // time for recursion ;)
}
else
{
// do nothing, just skip keyword "extern", otherwise uncomment:
//SkipToOneOfChars(ParserConsts::semicolon); // skip externs
m_Tokenizer.UngetToken();
}
m_Str.Clear();
}
So, the solution is:
some times, we will meet many instants of extern forward declaration. shall we add them to the TokensTree??? any good ideas???
Maybe we should try to look at the Eclipse parser algorithm?
I'm interested in any parsers, but did you give more directions.
I have no idea about Eclipse parser.
Does it a Jave parser? or some one has familiar with it? Does it do a full C++ grammar match? macro expansion? include expansion?
ollydbg.