We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Syntax Highlighting Problem!

Thread ID:

Created:

Updated:

Platform:

Replies:

45750 Jun 28,2006 04:22 AM UTC Oct 11,2006 11:20 AM UTC WinForms 8
loading
Tags: EditControl
Michael
Asked On June 28, 2006 04:22 AM UTC

I have to highlight the source files of an tool machine, so I have defined a new language in the config file. In this programming language a program has only a start block(N>9000) and the last code line befor the next start block is the end block, this region should be collapsable. The problem is that the parser search for a lexem block not over more lines. Is there a way to highlight this blocks? Syncfusion version: Essential Studio 4.2.0.37 The regex pattern works I have testet this pattern with a regex tester: StartBlock="\bN([1-9][0-9]{4,}|9[1-9][0-9]{2}|9[0-9]{2}[1-9]|9[0-9][1-9][0-9])\b" EndBock="(?:\bN([0-8][0-9]{3}|[0-9]{1,3})\b).*[\r\n\s]*(?=\Z|\bN([1-9][0-9]{4,}|9[1-9][0-9]{2}|9[0-9]{2}[1-9]|9[0-9][1-9][0-9])\b)" A source file look like this: N9001 (Start block) N1 G1 X+1 Y-1 N2 G50 T15 N3 G60 S456 (End block) N9002 (Start block) N1 G1 X+1 Y-1 N2 G50 T15 N3 G60 S456 (End block)

Administrator [Syncfusion]
Replied On June 28, 2006 04:22 PM UTC

Hi Michael, Our apologies for the delayed response.We are looking in to this issue and will get back to you shortly. Thanks for your patience. Regards, Ebenezer.P

Administrator [Syncfusion]
Replied On June 29, 2006 06:29 AM UTC

Hi Michael, I have attached a sample that illustrates how to apply highlighting for a source file. Let me know if this meets your requirements. Thanks for your patience. Regards, Ebenezer.P

CS30.zip

Michael
Replied On June 29, 2006 08:40 AM UTC

Hi Ebenezer P. thank you for your fast answer! Unfortunately the sample does not meet my requirements, because when you collapse the first block the second block is collapsed with and in the first block but I want two seperate blocks. I think the problem is that the regular expression Positive lookahead (?=) does not work. If the lookahead works I could check if in the next line is a N grater then 9000 then I highlight the N lower then 9000 that is befor this line. This are the blocks i want: + N9001 | N1 |- N2 + N9002 | N1 |- N2 Now I have a second problem. Axis position is decremented it looks like this X+12 X is text + is an operator and 12 is a number this works great, but you also can write X12 and there is the problem I want X as text and 12 as number. Somthing like this (?<=X)12 works in the regex tester but not in the editcontrol. Is there a way to do this. I have attached a modified sample with my current syntax file and a real source file.

Michael
Replied On June 29, 2006 08:41 AM UTC

Sorry I forgot the attachment.

modified.zip

Administrator [Syncfusion]
Replied On June 30, 2006 12:41 PM UTC

Hi Michael, Our apologies for the delayed response.We are looking in to this issue and will get back to you shortly. Thanks for your patience. Regards, Ebenezer.P

Administrator [Syncfusion]
Replied On July 10, 2006 06:27 AM UTC

Hi Michael, I have consulted the Edit development team regarding collapsable blocks.Our development team''s opinion is that it is not possible to support undefined end blocks in the current architecture,so please give some more strict rules for end blocks if you want to support collapsing in this case. I have also tested for the second issue and was able to see the problem here and have notified the development team in this regard. We have logged a bug report Defect # 2328 on this, and will try our very best to address the same at the earliest. You could track the progress of this bug fix at this link below : Defect #2328 - Issue with regular expression in configuration file Thanks for your patience. Regards, Ebenezer.P

Michael
Replied On July 11, 2006 06:56 AM UTC

Hi Ebenezer P., Thanks for your help! Regards, Michael

Administrator [Syncfusion]
Replied On October 11, 2006 11:20 AM UTC

Hi Michael,

Defect #2328 has been fixed and the fixes will be available in the next release of Essential Edit.

Thanks for your patience.

Regards,
Manohari.R

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;