2006-08-26 02:46:29 -07:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE language SYSTEM "language.dtd">
|
2006-11-12 11:09:52 -08:00
|
|
|
<language _name="Haskell" version="1.0" _section="Sources" mimetypes="text/x-haskell" globs="*.hs">
|
2006-08-26 02:46:29 -07:00
|
|
|
|
|
|
|
<escape-char>\</escape-char>
|
|
|
|
|
|
|
|
<line-comment _name = "Line Comment" style= "Comment">
|
|
|
|
<start-regex>--</start-regex>
|
|
|
|
</line-comment>
|
|
|
|
|
|
|
|
<block-comment _name = "Block Comment" style = "Comment">
|
|
|
|
<start-regex>\{-</start-regex>
|
|
|
|
<end-regex>-\}</end-regex>
|
|
|
|
</block-comment>
|
|
|
|
|
|
|
|
<syntax-item _name = "Include/Pragma" style = "Preprocessor">
|
|
|
|
<start-regex>\{-#</start-regex>
|
|
|
|
<end-regex>#-\}</end-regex>
|
|
|
|
</syntax-item>
|
|
|
|
|
|
|
|
<pattern-item _name = "Type or Constructor" style = "Data Type">
|
|
|
|
<regex>\b[A-Z][0-9a-zA-Z._]*('|#)*</regex>
|
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<pattern-item _name = "Keysymbol" style = "Keyword">
|
|
|
|
<regex>::|->|<-|=>|=|\||\\|@|~</regex>
|
|
|
|
</pattern-item>
|
|
|
|
<!--
|
|
|
|
<pattern-item _name = "Operator" style = "Operators">
|
|
|
|
<regex>[:!#$%&*+./>=<?@\\^|~\-]+</regex>
|
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<keyword-list _name="Keysymbol" style = "Keyword">
|
|
|
|
<keyword>::</keyword>
|
|
|
|
<keyword>-></keyword>
|
|
|
|
<keyword><-</keyword>
|
|
|
|
<keyword>=></keyword>
|
|
|
|
<keyword>=</keyword>
|
|
|
|
<keyword>|</keyword>`
|
|
|
|
<keyword>\</keyword>
|
|
|
|
<keyword>@</keyword>
|
|
|
|
<keyword>~</keyword>
|
|
|
|
</keyword-list>
|
|
|
|
-->
|
|
|
|
<string _name = "String" style = "String" end-at-line-end = "true">
|
|
|
|
<start-regex>"</start-regex>
|
|
|
|
<end-regex>"</end-regex>
|
|
|
|
</string>
|
|
|
|
|
|
|
|
<string _name = "Character Constant" style = "String" end-at-line-end = "true">
|
|
|
|
<start-regex>[^A-Za-z0-9]'</start-regex>
|
|
|
|
<end-regex>'</end-regex>
|
|
|
|
</string>
|
|
|
|
|
|
|
|
<pattern-item _name = "Decimal" style = "Decimal">
|
|
|
|
<regex>\b[0-9]\b</regex>
|
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<pattern-item _name = "Floating Point Number" style = "Floating point">
|
|
|
|
<regex>\b([0-9]+.[0-9]+([eE][+-]?[0-9])?|[0-9][eE][+-]?[0-9])</regex>
|
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<pattern-item _name = "Octal Number" style = "Base-N Integer">
|
|
|
|
<regex>\b[oO][0-7]+\b</regex>
|
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<pattern-item _name = "Hex Number" style = "Base-N Integer">
|
|
|
|
<regex>\b0[xX][0-9a-fA-F]+\b</regex>
|
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<keyword-list _name = "Keyword" style = "Keyword" case-sensitive="true">
|
|
|
|
<keyword>as</keyword>
|
|
|
|
<keyword>case</keyword>
|
|
|
|
<keyword>class</keyword>
|
|
|
|
<keyword>data</keyword>
|
|
|
|
<keyword>deriving</keyword>
|
|
|
|
<keyword>do</keyword>
|
|
|
|
<keyword>else</keyword>
|
|
|
|
<keyword>forall</keyword> <!-- GHC extension -->
|
|
|
|
<keyword>hiding</keyword>
|
|
|
|
<keyword>if</keyword>
|
|
|
|
<keyword>import</keyword>
|
|
|
|
<keyword>in</keyword>
|
|
|
|
<keyword>infix</keyword>
|
|
|
|
<keyword>infixl</keyword>
|
|
|
|
<keyword>infixr</keyword>
|
|
|
|
<keyword>instance</keyword>
|
|
|
|
<keyword>let</keyword>
|
|
|
|
<keyword>module</keyword>
|
|
|
|
<keyword>newtype</keyword>
|
|
|
|
<keyword>of</keyword>
|
|
|
|
<keyword>qualified</keyword>
|
|
|
|
<keyword>then</keyword>
|
|
|
|
<keyword>where</keyword>
|
|
|
|
<keyword>with</keyword> <!-- GHC extension -->
|
|
|
|
</keyword-list>
|
|
|
|
|
|
|
|
<keyword-list _name = "Preprocessor Definition" style = "Preprocessor" case-sensitive="true"
|
|
|
|
match-empty-string-at-beginning = "false"
|
|
|
|
match-empty-string-at-end = "true"
|
|
|
|
beginning-regex = "^[ \t]*#[ \t]*">
|
|
|
|
<keyword>if</keyword>
|
|
|
|
<keyword>ifdef</keyword>
|
|
|
|
<keyword>ifndef</keyword>
|
|
|
|
<keyword>else</keyword>
|
|
|
|
<keyword>elif</keyword>
|
|
|
|
<keyword>define</keyword>
|
|
|
|
<keyword>endif</keyword>
|
|
|
|
<keyword>undef</keyword>
|
|
|
|
<keyword>error</keyword>
|
|
|
|
</keyword-list>
|
|
|
|
|
|
|
|
</language>
|