Re: [CEDET-devel] completion problem with conditionals in includes
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2008-11-05 02:18:20
|
Ah, I was worried about that. This is something I don't think any tagging utilities will work with since all the code involved in the smart completion and such assumes a static named space unrelated to position in the code you are completing in. Your best bet is probably to pick what is most likely the value, and set it explicitly in the c-mode-hook based on filename perhaps. Eric >>> "han...@gm..." <han...@go...> seems to think that: >Hello again, > >On 11/4/08, Eric M. Ludlam <er...@si...> wrote: >> Hi, >> >> If you are using the CVS version of CEDET, you can set >> semantic-lex-c-preprocessor-symbol-file to ave whichever tricky files > >as far as I understood the documentation this is only to replace or >insert things with the preprocessor. the thing here is that one would >have to parse the file twice, with and without E_TYPEDEFS set. since >from the construct mentioned before one part of the file is always >'disabled' for parsing: >>>#ifdef E_TYPEDEFS >>>typedef struct _E_Border E_Border; >>>... >>>#else >>>struct _E_Border.. >>>#endif > >I guess what is needed to make this work would be that semantic >searches for includes recursively, remembers the #defines from all the >'parent' files and if a file is included two times the second scan >should not overwrite the first scan. > >But no hurry :) To me this is not essential atm, just wanted to see >the state of cedet and it really got much better than last time I >tried. looking forward to see it in emacs. > >Best Regards > > > >> you have in it. I suspect this may solve your problem, though I am >> not entirely sure I grok the entire situation. >> >> Eric >> >>>>> Hannes Janetzek <han...@go...> seems to think that: >>>Hello, >>>I ran into a problem with semantics way of parsing >>>headerfiles so that completion does not work correctly. The project >>>I'm hacking on (enlightenment 0.17) first includes all typedefs and >>>then the definitions. the main header file looks like this: >>>#define E_TYPEDEFS 1 >>>#include "e_includes.h" >>>#undef E_TYPEDEFS >>>#include "e_includes.h" >>> >>>the included headers like this: >>>#ifdef E_TYPEDEFS >>>typedef struct _E_Border E_Border; >>>... >>>#else >>>struct _E_Border.. >>>#endif >>> >>>This causes semantic to exclude the typedefs. Is there a way to solve >>>this problem? [ ... ] -- Eric Ludlam: er...@si... Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net |