Thanks for your reply

For this example, I have only set the macro in the semantic-lex-c-preprocessor-symbol-map. I do not have huse semantic-lex-c-preprocessor-symbol-file.

This is strange. Perhaps my emacs version has some trouble. I don't know. Moreover, if I replace EXPORTAPI with __THROW which is defined in semantic-lex-c-preprocessor-symbol-file-built-in the parse is ok.
I have looked quickly a the code, and I wonder if the value generated for semantic-lex-spp-macro-symbol-obarray is ok ?

 [0 0 EXPORTAPI 0 __THROW 0 0 0 __restrict 0 0 0 0]

Concerning active macro this would be great but user should define wich macro is used to do such thing like NDEBUG ....


2009/3/24 Eric M. Ludlam <eric@siege-engine.com>

 I tried your example, and when EXPORTAPI was in the preprocessor
table as you show below, the class parsed for me.

 If you had added a.h to the list
semantic-lex-c-preprocessor-symbol-file I suppose there might be some
sort of conflict, but I don't know what it might be since the dump of
your table includes the 'nil.

 Despite this, I added __declspec as a no-op macro to the default C
preprocessor table.  In theory, you could now have th real version of
your EXPORTAPI macro active, and you class would parse.

 I wonder if I should add CEDET as a default active macro for C/C++.
Then you could write C code like this:

#ifdef CEDET
#undef THIS
#define THAT

 as an even easier way of configuring things for CEDET.  What does
the audience at large think?


>>> kiwilex <kiwilex@gmail.com> seems to think that:
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 7bit
>Hi Eric,
>I have tested with the cvs version and I still have this trouble with cedet.
>So, I will give you a short example that illustrate this issue.
>My project has the following structure
>Root Project
>  |
>  |
>  --- Module 1
>        |
>        -------src
>        |
>        -------include
>  .....
>  |
>  ---- Module N
>For the example  I have reduce the structure to a single module.
>Let just have two include :
>a.h with the following code
>#ifdef _EXPORTS
>#define EXPORTAPI __declspec(dllexport)
>#define EXPORTAPI __declspec(dllimport)
>and b.h with the following code
>#ifndef _GUARD_H_
>#define _GUARD_H_
>#include "a.h"
>class EXPORTAPI foo
>public :
>    int foobar;
>    foo();
>    ~foo();
>I have set EXPORTAPI in the semantic-lex-c-preprocessor-symbol-map :
>semantic-lex-c-preprocessor-symbol-map is a variable defined in
>Its value is
>(("EXPORTAPI" . ""))
>But the class foo is not parsed. Here are the result from bovinate
>(("_GUARD_H_" variable
>  (:constant-flag t)
>  nil #<overlay from 27 to 36 in b.h>)
> ("a.h" include nil
>  (:filename "e:/tmp/cedet/Project/include/b.h" unlink-hook
>         (semantic--tag-unlink-secondary-overlays)
>         secondary-overlays
>         (#<overlay from 38 to 52 in b.h>)
>         dependency-file "e:/tmp/cedet/Project/include/a.h" link-hook
>         (semantic--tag-link-secondary-overlays)
>         unlink-copy-hook
>         (semantic--tag-unlink-copy-secondary-overlays))
>  #<overlay from 38 to 52 in b.h>))
>et here are the macro definition from semantic-lex-spp-describe
>Macro        Value
>_GUARD_H_    nil
>__THROW        nil
>__const        "const"
>__restrict    nil
>Thanks a lot for you support.
 [ ... ]

         Eric Ludlam:                       eric@siege-engine.com
  Siege: www.siege-engine.com          Emacs: http://cedet.sourceforge.net