ok it works like a charm ! Thanks a lot !

For those that use Emacs for Autosar editing (and parsing) code, here is my full spp-table 

 :spp-table '(
  ("AUTOMATIC" . "")
  ("STATIC" . "static")
  ("TYPEDEF" . "")
  ("INLINE" . "inline")
  ("LOCAL_INLINE" . "static inline")
  ("_INTERRUPT_" . "__interrupt")
  ("FUNC" . ((spp-arg-list ("rettype" "memclass") 1 . 2) 
     (symbol "rettype" 3 . 4)))
  ("P2VAR" . ((spp-arg-list ("ptrtype" "memclass" "ptrclass") 1 . 2)
      (symbol "ptrtype" 3 . 4)(punctuation "*" 5 . 6))) 
  ("P2CONST" . ((spp-arg-list ("ptrtype" "memclass" "ptrclass") 1 . 2)
(CONST "const" 3 . 4)(symbol "ptrtype" 3 . 4)(punctuation "*" 5 . 6))) 
  ("CONSTP2VAR" . ((spp-arg-list ("ptrtype" "memclass" "ptrclass") 1 . 2)
   (symbol "ptrtype" 1 . 2)(punctuation "*" 3 . 4)(CONST "const" 5 . 6))) 
  ("CONSTP2CONST" . ((spp-arg-list ("ptrtype" "memclass" "ptrclass") 1 . 2)
     (CONST "const" 1 . 2)(symbol "ptrtype" 3 . 4)(punctuation "*" 5 . 6)(CONST "const" 7 . 8))) 
  ("P2FUNC" . ((spp-arg-list ("rettype" "ptrclass" "fctname") 1 . 2) 
(symbol "rettype" 1.2)(punctuation "(" 3.4)(punctuation"*" 5.6)(symbol "fctname" 7.8)(punctuation ")" 9.10)))
  ("CONST"  . ((spp-arg-list ("type" "memclass") 1 . 2) 
(CONST "const" 3 . 4)(symbol "type" 5 . 6)))
  ("VAR"  . ((spp-arg-list ("type" "memclass") 1 . 2) (symbol "type" 3 . 4)))   
  )


I may have a problem for P2FUNC but the rest works quite good !


Regards 


On 5 October 2013 12:08, David Engster <deng@randomsample.de> wrote:
David MOUSSAUD writes:
> I don't know how to write the spp-table entries for those defines:
>
> #define FUNC(rettype, memclass) rettype
>
> #define VAR(type, memclass) type

Yes, I'm afraid that's not straightforward at all. The probably easiest
way is to create a small C test file and put your #define's in
there. Then call

M-x semantic-lex-spp-describe

and you'll see all the macros Semantic currently knows. Your 'FUNC' and
'VAR' should be right at the top, and in the right column you'll see the
definitions, which for FUNC should be something like

((spp-arg-list ("rettype" "memclass") 13 . 32) (symbol "rettype" 33 . 40))

I think the point positions don't matter, so

"FUNC" . ((spp-arg-list ("rettype" "memclass") 1 . 2) (symbol "rettype" 3 . 4))

should work.

-David