Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Reusing and Building CPP Parser

Hi all,

I need to add an extension for C++ language with some new grammar rules and keywords, 
My language syntax looks like C/C++ code, so I think about reusing Eclipse CDT source code and adapting it to parse my language.
For example, my language looks like that:

CALL SDL_send( signal_code = STRUCTX, CAST (alias_STRUCTX) signal_ptr =
  [{
     var_iis  =  50,
     Param1 =
     <{
                countc = 1,
                is_coded = TRUE
     }>
  }] ,
  signal_load = SIZEOF(alias_STRUCTX)
);

In the previous code block, I have simply called a function with some arguments, the first argument is signal_code and the second argument is signal_ptr or buffer.  
My question is how can I add new grammar rules to CPP parser and how can I build it with these new grammar rules?
And after that, what should I do to support auto completion and highlighting for my language keywords?


Best regards,
Amr

Back to the top