Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Extending the scanner in CDT 5+

Subclassing CPreprocessor is not supported, however you can influence
the scanner via the IScannerExtensionConfiguration (which is for
instance done in the languages deriving from AbstractCLikeLanguage). As
an example, if you need to configure additional keywords this will be
sufficient. If you have needs beyond what's provided by
IScannerExtensionConfiguration you should discuss them in an enhancement
request.

Markus.

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Mike Wrighton
> Sent: Thursday, May 07, 2009 6:13 PM
> To: CDT General developers list.
> Subject: [cdt-dev] Extending the scanner in CDT 5+
> Importance: Low
> 
> Hi,
> 
> Is there an easy way to extend the default scanner for a new 
> language in CDT in order to recognise new tokens? In CDT 4 
> you used to be able to define a language and return a class 
> inside createScanner() which extended DOMScanner and 
> overrided (overrode?) fetchToken() where you could add new 
> tokens. Now it seems like the lexing is done inside a Lexer 
> class hidden within CPreprocessor class. I'm guessing this is 
> a cut and paste job?
> 
> Mike
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 


Back to the top