<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="Nemerle" version="1.0" _section="Sources" mimetypes="text/x-nemerle">
	
	<escape-char>\</escape-char>

	<pattern-item _name = "Character Constant" style = "String">
		<regex>&apos;(\\)?.&apos;</regex>
	</pattern-item>
	
	<string _name = "String" style = "String" end-at-line-end = "TRUE">
		<start-regex>&quot;</start-regex>
		<end-regex>&quot;</end-regex>
	</string>

	<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>
	
	<keyword-list _name = "Core Keywords" style = "Keyword" case-sensitive="TRUE">
		<keyword>_</keyword>
		<keyword>abstract</keyword>
		<keyword>and</keyword>
		<keyword>array</keyword>
		<keyword>as</keyword>
		<keyword>base</keyword>
		<keyword>catch</keyword>
		<keyword>class</keyword>
		<keyword>def</keyword>
		<keyword>extends</keyword>
		<keyword>extern</keyword>
		<keyword>false</keyword>
		<keyword>finally</keyword>
		<keyword>fun</keyword>
		<keyword>implements</keyword>
		<keyword>interface</keyword>
		<keyword>internal</keyword>
		<keyword>macro</keyword>
		<keyword>match</keyword>
		<keyword>module</keyword>
		<keyword>mutable</keyword>
		<keyword>namespace</keyword>
		<keyword>new</keyword>
		<keyword>null</keyword>
		<keyword>out</keyword>
		<keyword>override</keyword>
		<keyword>params</keyword>
		<keyword>private</keyword>
		<keyword>protected</keyword>
		<keyword>public</keyword>
		<keyword>ref</keyword>
		<keyword>sealed</keyword>
		<keyword>static</keyword>
		<keyword>struct</keyword>
		<keyword>syntax</keyword>
		<keyword>this</keyword>
		<keyword>throw</keyword>
		<keyword>true</keyword>
		<keyword>try</keyword>
		<keyword>type</keyword>
		<keyword>typeof</keyword>
		<keyword>using</keyword>
		<keyword>variant</keyword>
		<keyword>virtual</keyword>
		<keyword>when</keyword>
		<keyword>where</keyword>
	</keyword-list>
	
	<keyword-list _name = "Keywords Defined by Macros" style = "Keyword" case-sensitive="TRUE">
		<keyword>do</keyword> 
		<keyword>while</keyword>
		<keyword>for</keyword> 
		<keyword>foreach</keyword>
		<keyword>in</keyword>
		<keyword>if</keyword>
		<keyword>else</keyword>
		<keyword>lock</keyword>
		<keyword>repeat</keyword>
		<keyword>until</keyword>
		<keyword>unless</keyword>
		<keyword>using</keyword>
		<keyword>when</keyword>
		<keyword>while</keyword>
	</keyword-list>

	<pattern-item _name = "Floating Point Number" style = "Floating Point">
		<regex>[0-9]*\.[0-9]+([eE][-+]?[0-9]+)?\b</regex>
	</pattern-item>
	
	<pattern-item _name = "Decimal" style = "Decimal">
		<regex>\b[0-9]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
	</pattern-item>

	<pattern-item _name = "Binary Number" style = "Base-N Integer">
		<regex>\b0[bB][01]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
	</pattern-item>

	<pattern-item _name = "Octal Number" style = "Base-N Integer">
		<regex>\b0[oO][0-7]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
	</pattern-item>

	<pattern-item _name = "Hex Number" style = "Base-N Integer">
		<regex>\b0[xX][0-9a-fA-F]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
	</pattern-item>

	<keyword-list _name = "Primitives" style = "Data Type" case-sensitive="TRUE">
		<keyword>bool</keyword>
		<keyword>byte</keyword>
		<keyword>char</keyword>
		<keyword>decimal</keyword>
		<keyword>double</keyword>
		<keyword>float</keyword>
		<keyword>int</keyword>
		<keyword>long</keyword>
		<keyword>object</keyword>
		<keyword>sbyte</keyword>
		<keyword>short</keyword>
		<keyword>string</keyword>
		<keyword>uint</keyword>
		<keyword>ulong</keyword>
		<keyword>ushort</keyword>
		<keyword>void</keyword>		
	</keyword-list>
	
	<keyword-list _name = "Core Types" style = "Data Type" case-sensitive="TRUE">
		<keyword>list</keyword>
	</keyword-list>

</language>
