ollydbg wrote:t seems you have removed the "ctags" code from the CodeLite project. So all the parsing is done by your own parser?
Am I right?
Nope. codelite still uses ctags (codelite_indexer - a derived version of ctags (fixed parsing issues), using named-pipes/unix domain sockets to communicate with codelite IDE) to build an initial lookup-table.
The actual parsing of statements/expressions is done by the yacc grammar + custom code.
so if a user types this:
the parsing is done in this manner:
1) resolve str - this is done by the yacc grammar to locate local variables
2) once str is resolved into wxString, codelite uses the lookup-table to locate all members/methods (including inheritance, etc.)
3) If a match is found from the lookup table to AfterFirst() - codelite analyzes the return code (in our example: wxString) - again, the lookup table is used to find a match for the return value type
The change that I did - I added another yacc grammar and created a "File Crawler" which scans files for include statements based on your current file and then passing this list of the files found to codelite_indexer for parsing.
the parsing results are then stored in the database for future use (along with timestamp which indicates when they were last parsed, so they will be skipped next time, unless they were modified)
ollydbg wrote:is it possible to incorporate the new parser mechanism in CodeBlocks's CC plugin? thanks.
It is possible, but it needs an effort (obviously) - the parsing code + the supporting mechanism are written in a single library which can be incorporated into any application.
If you need a start points, let me know
Eran