Author Topic: code::completion refactoring, questions  (Read 6594 times)

gajdosm

  • Guest
code::completion refactoring, questions
« on: May 09, 2012, 06:48:06 pm »
hi guys, i'm currently planning to do some refactoring with this plugin (to make it more modular) and first have some questions:

- does the parser provide complete abstract syntax tree?
- what standards of c does it cover?
- what is the problem with templates?

i'll be happy for whatever info you can give me, thanks in advance!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: code::completion refactoring, questions
« Reply #1 on: May 09, 2012, 08:36:57 pm »
i'll be happy for whatever info you can give me, thanks in advance!
Start here:
http://wiki.codeblocks.org/index.php?title=Code_Completion_Design

...and probably here:
http://wiki.codeblocks.org/index.php?title=Code::Completion_Rewrite

There is an initial CLang plugin (in the forums and also, there is an ongoing help request to wrap the CC plugin of CodeLite into C::B's plugin framework. Eran (eranif) himself proposed that initially and there is some work done already. Please try to avoid re-inventing the wheel... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: code::completion refactoring, questions
« Reply #2 on: May 10, 2012, 09:10:40 am »
hi guys, i'm currently planning to do some refactoring with this plugin (to make it more modular)
That's great!
Quote
- does the parser provide complete abstract syntax tree?
No, the parser is quite lightweight compared to the parser in GCC/Clang. No AST is used here.
Quote
- what standards of c does it cover?
As I said before, the parser does not do a semantic analysis.
Quote
- what is the problem with templates?
The parser does not handle template correctly, as the c++ template grammar is too complex.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.