Essential Edit: Custom syntax colouring & Scientific notation

I am using VB 2005 (.NET 2.0) to create an editor using Essential Edit V4.4 and am using custom syntax highlighting.

My xml file has the following definitions for a a number (from SyncFusions samples).




However these do not work for numbers in Scientific notation.

For example, the text 0.631e-6
would format the leading 0 and trailing 6 as numbers, the . and - as operators, and the 631e as plain text.

Does anyone know the correct lexem definition to properly handle scientific notation?

Any help would be very much appreciated.

Cheers,
Paul




2 Replies

AD Administrator Syncfusion Team March 2, 2007 07:12 PM UTC

Hi Paul,

It is possible to highlight 0.631e-6 as number using the IsComplex and OnlyLocalSublexems attribute. I have attached a sample that illustrates this. Let me know if this meets your
requirements.

Thank you for your patience.

Regards,
Ebenezer.P

sample


PW Paul Wallace March 5, 2007 02:51 PM UTC

Hi,

Yes, that works for my application, thanks.

However, if you were to type, say, 5-6 in your sample, the - would not be highlighted as an operator. This is not an issue for my application, but may be for someone else.

regards,
Paul


Loader.
Up arrow icon