Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] how to extend scanner - CPreProcessor

Hi,

 

I need to add the customized token. For example,

 

#pragma custom_token

static int func(int a, int b){

ADD R2,R1 ; Assembly-language description

}

 

Similar bug is logged:

 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=275335

 

However, my requirement is to support above syntax. No syntax error should be displayed for the above snippet.

 

This can be achieved by over-riding the executeDirective() method from org.eclipse.cdt.internal.core.parser.scanner > CPreprocessor.

However, ‘CPreprocessor’ is not extendible and the required methods are invisible.

 

Please suggest on how we can extend ‘CPreprocessor’ for supporting the required syntax.

 

Any help is greatly appreciated.

 

Regards,

Swapna

 

This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.

Back to the top