Re: semantic-lex-spp-project-macro-symbol-obarray in ede-cpp-root-project
Eric Ludlam <[email protected]> Sat, 11 Apr 2015 21:16:06 -0400
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
On 03/23/2015 06:30 PM, Martin Stein wrote:
> Hi,
>
> I have copied and adjusted ede-cpp-root-project for my f90 project and
> found a bug in my f90 code, which should also be present in the cpp code.
>
> I a preprocessor macro is expaneded the expansion is placed in a
> temporary buffer and the parser is called recursively. In order to get
> the parser working properly, the mode and other stuff has to be setup
> properly. However, the variable
> semantic-lex-spp-project-macro-symbol-obarray
> is not set, nor is the temporary buffer likely to be recognised to
> belong to the cpp-root project.
> I resolved this problem by also copying the obarray (along with
> semantic-lex-spp-dynamic-macro-symbol-obarray). From all I have seen,
> this should also be necessary for the C++ parser?
>
> An example to demonstrate this bug could be
>
> _macro_with_param_(_param_is_a_macro_)
>
> where _param_is_a_macro is defined by the ede-cpp-root project (either
> map or file).
Hi Martin,
I had a chance to build a test suite combining ede and spp macro
expansion, but I can't recreate the bug you predict. I am wondering if
I'm missing some detail.
For example, I have this in a C file:
#define macro_with_param(ARG) int ARG (int b);
macro_with_param(EDEPART)
and define my project like this:
(ede-cpp-root-project "TMP" :file (expand-file-name "edeconfig.h" root)
:spp-table '( ("EDEPART" . "C")
)
:spp-files '( "edeconfig.h" ))
Is that too simple? Is there something more to it?
I pushed the new test suite which is in tests/cedet/semantic/utest-c.el
with src files in tests/cedet/semantic/testwithede that are used with
the preprocessor.
Thanks
Eric
Thanks
Eric
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF