Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Several questions considering the development of CDTbased IDE

> 1) According to the CDT 4 Extension Point Reference
> (http://help.eclipse.org/help33/topic/org.eclipse.cdt.doc.isv/
> reference/extension-points/index.html)
> the org.eclipse.cdt.core.language defines extension point to 
> declare language or language variants for C/C++ languages 
> only. But the Reference also states that completely different 
> languages cannot be modeled reasonably using this extension 
> point. Is it reasonable to expect that the language with the 
> following properties will be extended through this extension 
> point? Of course the intention is to CDT 5, 6.
> Several details considering the language:
> *	High-Level constructs are C like.
> *	Function calls are C like.
> *	Operators set is a subset of C99 operators.
> *	Supports in language compilation directives.
> *	Supports miscellaneous preprocessor commands.
> *	50% keywords are just like in C. Another 50% of 
> keywords are its own ones.

To make the decision you need to look at all differences of your
language compared to C or C++ and try to configure them via
ICParserExtensionConfiguration, ICPPParserExtensionConfiguration or
IScannerExtensionConfiguration.

For example to configure the preprocessor commands you could use:
    IScannerExtensionConfiguration.getAdditionalPreprocessorKeywords()
For the keywords you can use:
    IScannerExtensionConfiguration.getAdditionalKeywords()

It is possible that you cannot map one or the other construct to C or
C++.
You can then try to define a macro that converts the special construct
into
something that can be parsed by the C/C++ parser.
    IScannerExtensionConfiguration.getAdditionalMacros()

If you have differences beyond that you try to extend one of the
extension 
configurations to cover what you need. It is best to start such an
effort
with an enhancement request on bugzilla.

Markus.


Back to the top