Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] A question about CDT

Hi All

 

I am a new CDT developer. Now I faced a difficult problem.

 

Eclipse C editor can check syntax errors. I am trying to implement a kind of editor that should support a C-like language(standard c language + some other grammar).I want the editor to check the syntax error. But the grammar may be a mixed grammar. It mainly includes all C grammar but it also mixes some C++ grammar in it.

For example, the language should support statements like:
extern "**" int a;

But as I know, this kind of statement is only supported in C++ language. So Can I just extend any extension point and reuse the existing C parser or C++ parser, overriding some methods so as to add any new grammar rules to achieve this? Or I have to re-implement a new parser?

Thanks!


Back to the top