Syntax Highlighting
I seem to be having a no. of issues with the regexp evaluation within the new edit control (4.1.0.50). It would appear that regexps are not being evaluated correctly.
For example
matches 1.2, although it shouldn''t
doesn''t match 1.2, although it should
utilises the first problem above and matches 1, 1.2 and 1.2e3. Not the correct behaviour, but usable.
Extending the above to
does not match 1.2e-3 as you would expect.
Am I doing something wrong here, or is the regexp evaluation broken?
David
SIGN IN To post a reply.
6 Replies
AD
Administrator
Syncfusion Team
April 28, 2006 01:41 PM UTC
Hi David,
I have attached a sample that illustrates how to apply syntax highlighting for 1.2e-3.Let me know if this meets your requirements.
Regards,
Ebenezer.P
RegularExpression.zip
RegularExpression.zip
DL
David Loomes
April 28, 2006 02:22 PM UTC
Thanks for this. It''s good as far as it goes, but if I add an additional sublexem to allow ''+'' in the exponent as well as ''-'', it stops. Other additions outside of the numeric lexem have the same effect.
The attached config file doesn''t work at all properly with your example, although it appears it should.
In general it seems that there are rules being applied other than those in the xml file. For example, if I specify 3 lexems, ''a'', ''b'' and '','', then I find ''a,b'' is highlighted correctly, as is ''a b ,''. But ''ab,'' will not be recognised. It''s as if the editor has an internal list of delimiters which it uses to split lines before looking for regexp matches. It would help a lot if there were some documentation describing exactly what''s going on.
Any assistance greatly appreciated.
David
Config1.zip
Config1.zip
AD
Administrator
Syncfusion Team
May 1, 2006 05:42 AM UTC
Hi David,
I have attached a sample that illustrates how to apply syntax highlighting for ''''+'''' in the exponent .Please refer to the following section of Essential Edit user guide for information in this regard :
Creating a Custom Language Configuration File
The Essential Edit user guide can be accessed online at this link below :
Essential Edit
Let me know if this meets your requirements.
Regards,
Ebenezer.P
RegularExpression0.zip
RegularExpression0.zip
AD
Administrator
Syncfusion Team
May 1, 2006 05:52 AM UTC
Hi David,
The Essential Edit user guide can be accessed online at this link below :
Essential Edit
Regards,
Ebenezer.P
DL
David Loomes
May 2, 2006 10:59 AM UTC
Ebenezer,
sorry but this doesn''t work at all for me. I''m using Visual Studio 2005 and Syncfusion 4.1.0.50
When I build and run this example, all of the ''.'', ''+'' and ''-'' characters are highlighted as operators, not part of the number.
If I remove the outer level lexems for these characters, the numeric lexem starts working correctly.
>Hi David,
>
>I have attached a sample that illustrates how to apply syntax highlighting for ''''+'''' in the exponent .Please refer to the following section of Essential Edit user guide for information in this regard :
>
>Creating a Custom Language Configuration File
>
>The Essential Edit user guide can be accessed online at this link below :
>
>Essential Edit
>
>Let me know if this meets your requirements.
>
>Regards,
>Ebenezer.P
>
RegularExpression0.zip
RegularExpression0.zip
DL
David Loomes
May 2, 2006 04:13 PM UTC
Creating a Custom Language Configuration File
>
Thanks for this link, it does have some of the info required in it. It confirms that ''+'' and ''='' are default split characters, although I''d guess there are others- ''.'' and white space for example.
There are also quite a few attributes used in the default xml files which are not mentioned
Indent
IndentationGuideline
AutoNameExpression
AutoNameTemplate
IsCollapseAutoNamed
ContentDivider
are just some that can be found in the examples but which are missing from the documentation. I hope this will be recrified in future because they seem to do quite useful things!
Thanks again for your efforts
David
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
DL David Loomes
- Apr 27, 2006 10:35 AM UTC
- May 2, 2006 04:13 PM UTC