Schemedef file – problem with comments.

Discussion Forums discussion Schemedef file – problem with comments.

This topic contains 5 replies, has 3 voices, and was last updated by  simon 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
Author Posts
Author Posts
March 20, 2012 at 2:34 pm #7872

TommyB
Member

Hello.

I’m trying to make a syntax file for Euphoria language and I stumbled upon a weird problem.

Euphoria uses “–” for line comments, but that doesn’t seem to work (comments aren’t highlighted). Funny thing is that everything else, like: “#”, “//” etc. works.

March 21, 2012 at 11:21 am #18748

simon
Key Master

Hi Tommy, can you post your schemedef and we can have a look?

March 21, 2012 at 6:13 pm #18749

TommyB
Member

Of course, here it is:

<?xml version= "1.0"?>

<Scheme>
<keyword-classes>
<keyword-class name= "key0">
as and by case constant deprecate do end else elsif enum export for
function global include if label loop not or override procedure public
switch then type to until while xor
</keyword-class>
</keyword-classes>

<schemedef name= "euphoria" title= "Euphoria" casesensitive= "false" braces= "{[()]}">
<strings>
<stringtype id= "0" start= "&quot;" end= "&quot;" multiline= "false" />
</strings>

<comments>
<line start= "--"/>
</comments>

<numbers start= "[0-9]" content= "[0-9a-f.x]"/>

<lexer name= "euphoria"/>

<use-styles>
<style name= "def" key= "32"/>
<style name="Line Comment" key="1" class="commentline" />
<style name= "idFirst" key= "3" class= "identifier"/>
<style name= "numbers" key= "4" class= "number"/>

<style name= "key0" key= "5" class= "keyword"/>

<style name="String" key="10" class="string" />
</use-styles>

<use-keywords>
<keyword key="0" name= "key0" class= "key0"/>
</use-keywords>
</schemedef>
</Scheme>

March 22, 2012 at 10:24 am #18750

TommyB
Member

Have you been able to reproduce the issue?

January 9, 2014 at 9:48 am #20062

ravecoyote
Participant

Hi TommyB,

just stumbled across the same dash problem with schemedefs.
Could you solve the problem anyhow?

Cheers
Kristo

January 29, 2014 at 3:29 pm #20069

simon
Key Master

Sorry for the delay, the answer is to change the start characters that can identify numbers/keywords:

this will avoid numbers and keywords being recognised instead of comments, which are currently lowest priority tokens (this is probably a bug now I think about it).

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.