Hi,
Thanks for the great editor :) Here's few questions concerning the schemedef and lexer:
1. I'm creating schemedef for the Euphoria programming language. What is the lexer and how can I make my own?
2. I used vhdl lexer but for some reason the following tags don't have any effect. Why?
<stringtype id="1" start="'" end="'" multiline="false" escape="\" />
<comments><line start="--" /></comments>
3. I would like to have different syntax coloring for euphoria_keywords and euphoria_datatypes. Is it possible?
4. The following setting makes single minus char act like a number:
<numbers start="[-#0-9]" content="[#0-9a-f.x]" />
Why? It should be syntax colored to number only if following chars contains numbers or #.
Here's what I've achieved so far: euphoria.schemedef
<?xml version="1.0" ?>
<Scheme>
<keyword-classes>
<keyword-class name="euphoria_keywords">
and end include to
by exit not type
constant for or while
do function procedure with
else global return without
elsif if then xor
as
</keyword-class>
<keyword-class name="euphoria_datatypes">
atom integer sequence object
</keyword-class>
</keyword-classes>
<schemedef name="euphoria" title="Euphoria" author="Tapani Talvitie" url="http://www.pnotepad.org/" version="1"
casesensitive="true" braces="{[()]}">
<!-- I'm using vhdl lexel here since I don't have a clue how to make my own lexer -->
<lexer name="vhdl" />
<strings>
<!-- Single and double quotes string, with \ as an escape character -->
<stringtype id="0" start=""" end=""" multiline="false" escape="\" />
<stringtype id="1" start="'" end="'" multiline="false" escape="\" />
</strings>
<identifiers start="[a-zA-Z]" />
<comments>
<line start="--" />
</comments>
<numbers start="[-#0-9]" content="[#0-9a-f.x]" />
<use-styles>
<style name="Default" key="32" fore="000000" bold="false" />
<style name="Line Comment" key="1" class="comment" fore="007f00" bold="false" />
<style name="Keywords" key="5" class="keyword" fore="00008b" bold="true" />
<style name="String" key="10" class="string" fore="800080" bold="false" />
<style name="String 2" key="11" class="string" fore="800080" bold="false" />
<style name="Number" key="4" class="number" fore="800080" bold="false" />
<style name="Identifier" key="3" fore="000000" bold="false" />
</use-styles>
<use-keywords>
<keyword key="0" name="Keywords" class="euphoria_keywords" />
<keyword key="1" name="Keywords" class="euphoria_datatypes" />
</use-keywords>
</schemedef>
</Scheme>
Best Regards,
-- Tapani Talvitie