Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to add Keyword to CDT Parser

Hi Anitha,

what I did is just to add some keywords to have them highlighted in the editor. In addition I added those macros to replace them by an empy string for the parser to avoid errors.
If you want to add new keywords you also need to adapt the parser, so it's much more effort to do this.

To be honest I just copied how it was done for the GCC and implemented exactly the same thing with small modifications, like the specific keywords. If you need deeper information I guess you need to ask again to other developers here.

best regards, Sebastian


> Date: Tue, 11 Mar 2014 23:24:21 -0700
> From: y_anitha@xxxxxxxxx
> To: cdt-dev@xxxxxxxxxxx
> Subject: Re: [cdt-dev] How to add Keyword to CDT Parser
>
> Hi Sebastian,
>
> I have the similar setup but still not working. So here is what i am
> suspecting could be different.
>
> 1. What is the difference between IToken and IGCCToken? My Keywords are
> something completely different from what C/C++ offers. So do i need to add a
> token first and then add that keyword to it? I have a keyword which lets me
> pass variable number of parameters to my function call if my function is
> defined with that keyword slightly different from the concept of Ellipses.
>
> 2. I saw that you also have a class for IParserExtensionConfiguration and
> IScanner. What are you doing in those classes? I do not have their
> implementations right now. Do you think adding that will make a difference?
>
> Thanks once again.
>
> Regards,
> Anitha
>
>
>
> --
> View this message in context: http://eclipse.1072660.n5.nabble.com/How-to-add-Keyword-to-CDT-Parser-tp166002p166059.html
> Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev

Back to the top