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+

What are the new tokens that you require?

In the past when we had a request like this (for POPC++ or something like that) we just added support directly to the CDT lexer and added a property to IScannerExtensionConfiguration to turn it on.


Mike Kucera
Software Developer
IBM Eclipse CDT Team
mkucera@xxxxxxxxxx

Inactive hide details for Mike Wrighton ---05/07/2009 12:54:33 PM---Ok thanks, I submitted 275335.Mike Wrighton ---05/07/2009 12:54:33 PM---Ok thanks, I submitted 275335.


From:

Mike Wrighton <mike.wrighton@xxxxxxxxxxxxxx>

To:

"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

Date:

05/07/2009 12:54 PM

Subject:

Re: [cdt-dev] Extending the scanner in CDT 5+




Ok thanks, I submitted 275335.

Mike

2009/5/7 Schorn, Markus <Markus.Schorn@xxxxxxxxxxxxx>:
> 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
>>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/cdt-dev
>
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


GIF image

GIF image


Back to the top