Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
code completion plugin parser test project with cmd
blueshake:
I update visualfc's project.
I just add the command "show".
with this command, you can show the tokens in the file you assign, not all the files' tokens.
steps:
1.show
2.input the file number according to the file list tips.
welcome to test it.
[attachment deleted by admin]
visualfc:
I make new download source cctest_v3.zip
change log:
1. load
load filename
2. dump
searchtree dump
3. log
output log filename
4. show
show one file token
--- Code: ---Hello world! C++ Parser Programing!
-> cmd: (load,files,clear) (list,tree,show,dump) (log,logoff) (help,exit) log=off
load filename load c++ file path
files show load files
clear clear all files
list show token by list
tree show token by tree
show n show signal file token by tree
dump dump token tree
log filename setup log filepath
logoff setup log = std::cout
help show this help
exit exit application
-> log d:\log.txt
log=d:\log.txt
-> load d:\project\cctest\main.cpp
load file ok! d:\project\cctest\main.cpp
-> tree
+class FileLoader {...} [24,0]
| data() [28,28]
| length() [32,32]
| fileName() [36,36]
| FileLoader::FileLoader(const char* fileName) [40,40]
| isLoad() [45,45]
| load() [50,50]
| char * FileLoader::name [61,0]
| char * FileLoader::buf [62,0]
| int FileLoader::buf_size [63,0]
+class ParserClient {...} [66,0]
| ParserClient::ParserClient() [70,70]
| ParserClient::~ParserClient() [74,74]
| parser(const char * fileName) [78,78]
| clear() [100,100]
| GetFullFileName(const cc_string & Filename,const cc_string& filename,bool isGlobal) [106,106]
| OnParseFile(const cc_string & filename, int flag) [110,110]
| printToken(std::ostream & f, Token* tk, const string & head) [114,114]
| printTokenTree(std::ostream & f, Token* tk, const string & head) [127,127]
| printList(std::ostream & f) [138,138]
| printTree(std::ostream & f) [148,148]
| printFiles(std::ostream & f) [161,161]
| printFileToken(std::ostream & f, int n) [168,168]
| TokensTree * ParserClient::tree [184,0]
| vector ParserClient::files [185,0]
showHelp(std::string & logname) [189,189]
main() [206,206]
-> dump
- "" (0)
+- "FileLoader" (1)
+- "GetFullFileName" (14)
+- "OnParseFile" (15)
+- "ParserClient" (10)
+- "buf_size" (9)
+- "clear" (13)
+- "data" (2)
+- "file" (26)
| +- "Name" (4)
| \- "s" (27)
+- "isLoad" (5)
+- "l" (6)
| +- "ength" (3)
| \- "oad" (7)
+- "main" (29)
+- "name" (8)
+- "p" (16)
| +- "arser" (12)
| \- "rint" (18)
| +- "File" (23)
| | +- "Token" (24)
| | \- "s" (22)
| +- "List" (19)
| \- "T" (20)
| +- "okenTree" (17)
| \- "ree" (21)
+- "showHelp" (28)
+- "tree" (25)
\- "~ParserClient" (11)
->exit
--- End code ---
ollydbg:
Great!
I have one question:
Is it possible to integrate with the current C::B's code? It seems you have some dummy class in cchelper.h, such as:
--- Code: ---class wxFile
{
public:
wxFile(const cc_string & fileName) : m_file(fileName)
{
}
size_t length()
{
return 0;
}
cc_string m_file;
};
--- End code ---
@morten: What about your idea? thanks.
visualfc:
--- Quote ---Is it possible to integrate with the current C::B's code? It seems you have some dummy class in cchelper.h, such as:
Code:
class wxFile
{
public:
wxFile(const cc_string & fileName) : m_file(fileName)
{
}
size_t length()
{
return 0;
}
cc_string m_file;
};
@morten: What about your idea?
--- End quote ---
I have step by step make the cc port, First compatible then transplantation, In order to avoid problems.
A cctest currentlyis only cc function test. and change the wx to stl.
Navigation
[0] Message Index
[*] Previous page
Go to full version