Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
ParserTester for codecompletion plugin
ollydbg:
@morten:
Loaden means to parse the VC header files correctly, We need to add two rules in the wxstring-wxstring replacement map.
blueshake:
@Loaden
if you want to show pictures,you can use outside repository.then cite the picture addresses here. :D
ollydbg:
In the ParserTest.cpp, if you would like to add the replacement tokens, use these statement:
--- Code: ---void Start()
{
Parser client(NULL);
wxString fileName = _T("test.cpp");
FileLoader* loader = new FileLoader(fileName);
(*loader)();
TokensTree* tree = new TokensTree();
Tokenizer::SetReplacementString(_T("_GLIBCXX_STD"), _T("std"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_BEGIN_NESTED_NAMESPACE"), _T("+namespace"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_END_NESTED_NAMESPACE"), _T("}"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_BEGIN_NAMESPACE"), _T("+namespace"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_END_NAMESPACE"), _T("}"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_END_NAMESPACE_TR1"), _T("}"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_BEGIN_NAMESPACE_TR1"), _T("-namespace tr1 {"));
// for VC2005/2008
Tokenizer::SetReplacementString(_T("_STD_BEGIN"), _T("-namespace std {"));
Tokenizer::SetReplacementString(_T("_STD_END"), _T("}"));
ParserThreadOptions opts;
opts.wantPreprocessor = false;
opts.useBuffer = false;
opts.bufferSkipBlocks = false;
opts.bufferSkipOuterBlocks = false;
opts.followLocalIncludes = false;
opts.followGlobalIncludes = false;
opts.loader = loader;
ParserThread* ph = new ParserThread(&client, fileName, true, opts, tree);
bool b = ph->Parse();
delete ph;
ShowLog();
}
--- End code ---
MortenMacFly:
--- Quote from: ollydbg on February 25, 2010, 06:15:29 am ---In the ParserTest.cpp, if you would like to add the replacement tokens, use these statement:
--- End quote ---
Why not the others, too? (The ones from the actual plugin.)
Edit: Argh, forget about it: I missed the scrollbar in your post. :lol:
ollydbg:
--- Quote from: MortenMacFly on February 25, 2010, 07:28:25 am ---Edit: Argh, forget about it: I missed the scrollbar in your post. :lol:
--- End quote ---
:D, these two replacement rules should be added to the standard CC plug-in too.
By the way, Loaden suggests that we could have different replacement string set for different compiler. :D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version