<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="MathMap" version="1.0" _section="Sources" mimetypes="application/x-mathmap">

	<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]+\b</regex>
	</pattern-item>

	<line-comment _name = "Line Comment" style= "Comment" end-at-line-end = "TRUE">
		<start-regex>#</start-regex>
	</line-comment>

	<keyword-list _name = "Functions and Function Modifiers" style = "Keyword" case-sensitive="TRUE">
		<!-- Filter Declarations -->
		<keyword>filter</keyword>
		
		<!-- Filter Modifiers -->
		<keyword>pixel</keyword>
		<keyword>stretched</keyword>
	</keyword-list>

	<keyword-list _name = "Boolean Bitwise Operators" style = "Keyword" case-sensitive="TRUE">
		<keyword>xor</keyword>
	</keyword-list>

	<keyword-list _name = "Loop, Flow, and Exceptions Keywords" style = "Keyword" case-sensitive="TRUE">
		<keyword>while</keyword>
		<keyword>do</keyword>

		<keyword>for</keyword>

		<keyword>if</keyword>
		<keyword>then</keyword>
		<keyword>else</keyword>
		<keyword>end</keyword>
	</keyword-list>

	<keyword-list _name = "Builtin Types" style = "Data Type" case-sensitive="TRUE">
		<keyword>int</keyword>
		<keyword>float</keyword>
		<keyword>bool</keyword>
		<keyword>color</keyword>
		<keyword>image</keyword>
		<keyword>curve</keyword>
		<keyword>gradient</keyword>
	</keyword-list>

	<keyword-list _name = "Builtin Functions" style = "Others" case-sensitive="TRUE">
		<!--  Debugging -->
		<keyword>merd</keyword>
		<keyword>print</keyword>

		<!--  Arithmetic -->
		<keyword>pmod</keyword>
		<keyword>sqrt</keyword>
		<keyword>sum</keyword>

		<!-- Vector Functions -->
		<keyword>dotp</keyword>
		<keyword>crossp</keyword>
		<keyword>det</keyword>
		<keyword>normalize</keyword>
		<keyword>abs</keyword>

		<!-- Trigonometry -->
		<keyword>deg2rad</keyword>
		<keyword>rad2deg</keyword>
		<keyword>sin</keyword>
		<keyword>cos</keyword>
		<keyword>tan</keyword>
		<keyword>asin</keyword>
		<keyword>acos</keyword>
		<keyword>atan</keyword>

		<!-- Exp and friends -->
		<keyword>exp</keyword>
		<keyword>log</keyword>

		<!-- Complex -->
		<keyword>arg</keyword>
		<keyword>conj</keyword>

		<!-- Hyperbolic -->
		<keyword>sinh</keyword>
		<keyword>cosh</keyword>
		<keyword>tanh</keyword>
		<keyword>asinh</keyword>
		<keyword>acosh</keyword>
		<keyword>atanh</keyword>
		<keyword>gamma</keyword>

		<!-- Elliptic -->
		<keyword>ell_int_Kcomp</keyword>
		<keyword>ell_int_Ecomp</keyword>
		<keyword>ell_int_F</keyword>
		<keyword>ell_int_E</keyword>
		<keyword>ell_int_P</keyword>
		<keyword>ell_int_D</keyword>
		<keyword>ell_int_RC</keyword>
		<keyword>ell_int_RD</keyword>
		<keyword>ell_int_RF</keyword>
		<keyword>ell_int_RJ</keyword>
		<keyword>ell_jac_sn</keyword>
		<keyword>ell_jac_cn</keyword>
		<keyword>ell_jac_dn</keyword>

		<!-- Floor and friends -->
		<keyword>floor</keyword>
		<keyword>ceil</keyword>
		<keyword>sign</keyword>
		<keyword>min</keyword>
		<keyword>max</keyword>
		<keyword>clamp</keyword>
		<keyword>lerp</keyword>
		<keyword>scale</keyword>

		<!-- Polynomials -->
		<keyword>solve</keyword>

		<!-- Comparison -->
		<keyword>inintv</keyword>

		<!-- Colors -->
		<keyword>gray</keyword>
		<keyword>toHSVA</keyword>
		<keyword>toRGBA</keyword>
		<keyword>red</keyword>
		<keyword>green</keyword>
		<keyword>blue</keyword>
		<keyword>alpha</keyword>
		<keyword>rgbColor</keyword>
		<keyword>rgbaColor</keyword>
		<keyword>grayColor</keyword>
		<keyword>grayaColor</keyword>

		<!-- Coordinates -->
		<keyword>toXY</keyword>
		<keyword>toRA</keyword>

		<!-- Random -->
		<keyword>rand</keyword>
		<keyword>noise</keyword>
	</keyword-list>

	<keyword-list _name = "Builtin Values" style = "Keyword" case-sensitive="TRUE">
		<keyword>e</keyword>
		<keyword>pi</keyword>
		<keyword>xy</keyword>
		<keyword>ra</keyword>
		<keyword>XY</keyword>
		<keyword>WH</keyword>
		<keyword>x</keyword>
		<keyword>y</keyword>
		<keyword>X</keyword>
		<keyword>Y</keyword>
		<keyword>W</keyword>
		<keyword>H</keyword>
		<keyword>t</keyword>
		<keyword>r</keyword>
		<keyword>a</keyword>
		<keyword>R</keyword>
		<keyword>frame</keyword>
	</keyword-list>
</language>
