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

multiline lexem not working

Thread ID:

Created:

Updated:

Platform:

Replies:

117412 Oct 16,2014 11:13 AM UTC Oct 24,2014 02:12 PM UTC WinForms 6
loading
Tags: EditControl
Olivier Duhart
Asked On October 16, 2014 11:13 AM UTC

Hello,

I am developing an editor for our own language. I managed to match all simple lexems like keywords or simple operators.
But I cant find the way to match multilines lexems.
I have 2 kinds of multiline patterns :

 - comments that match the classic /* .... */ pattern or single line with 2 leading dash.
 currently I tried, where Comment format is green bold 10pt Verdana :

<lexem BeginBlock="/*"              
             EndBlock="*/" 
             ContinueBlock = ".+" IsContinueRegex = "true"
             IsMultiline="true"
             Type="Comment" />

But it does not even display the /* and */ with the correct format.
the same happens wih on line comment not matching

       <lexem BeginBlock="--"  Type="Commentaire"/>

And finally for multiline strings (with single quote delimitor) not working with (except for first line)

<lexem BeginBlock="'" EndBlock="'" Type="String" IsComplex="true" 
   ContinueBlock="(.|\n)+" IsContinueRegex="true" OnlyLocalSublexems="true"
       IndentationGuideline="true" IsMultiline="true"/>  

You will find my complete configuration XML in attachment

thanks for your help,

Olivier





Attachment: config_b6b6eb65.zip

Olivier Duhart
Replied On October 16, 2014 11:54 AM UTC

I forgot to mention my syncfusion version is 12.2.0.36

Olivier

Saravanan T [Syncfusion]
Replied On October 20, 2014 03:07 PM UTC

Hi Olivier,

 

Thank you for using Syncfusion products,

 

We would like to let you know that your requirement can be achieved by using below code snippet.

 

Code Snippet [C#]:

 

<lexem BeginBlock="/*" EndBlock="*/" Type="Comment" OnlyLocalSublexems="true" IsComplex="true"

    IsCollapsable="true" CollapseName="/*...*/" AllowTriggers="false">

  <SubLexems>

    <lexem BeginBlock="/*" Type="Comment" />

    <lexem BeginBlock="\n" IsBeginRegex="true" />

  </SubLexems>

</lexem>

 

Please let us know if you need any further assistance,

 

Regards,

Saravanan T


Olivier Duhart
Replied On October 21, 2014 09:42 AM UTC

Hello,

I tried your solution but it did not work :(
I just copy-paste your snippet, replacing my comment configuration. So my config.xml is the same that I joined except the comment part.

Could you check this and maybe send me a more complete sample (XML + C# ) ?

thanks,

Olivier 




Olivier Duhart
Replied On October 22, 2014 11:30 AM UTC

I managed to colored a multiline string with


but  I never succeeded adpting this pattern foor comment coloring.

In fact even simple lexems like those below do not work :

     <lexem Type="Comment" BeginBlock="--" IsBeginRegex="false" />
 
      <lexem Type="Comment" BeginBlock="/*" IsBeginRegex="false" />

Is there something special with those beginBlock that prevent them to work ? I tried playing  with IsBeginRegex = true/ false but ntohing changed

thanks,





Olivier Duhart
Replied On October 23, 2014 09:02 AM UTC

[SOLVED]

I was missing the <splits></splits> part for activating comment highlighting

thanks for your help

Olivier

Saravanan T [Syncfusion]
Replied On October 24, 2014 02:12 PM UTC

Hi Oliver,

 

Thank you for your update,

 

We are glad to hear that the reported problem has been resolved.

 

Please let us know if you need any further assistance,

 

Regards,

Saravanan T


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

;