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

	<line-comment _name = "Line Comment" style= "Comment">
		<start-regex>!|(^C)</start-regex>
	</line-comment>

	<string _name = "String" style = "String" end-at-line-end = "TRUE">
		<start-regex>&quot;</start-regex>
		<end-regex>&quot;</end-regex>
	</string>
	<string _name = "String 2" style = "String" end-at-line-end = "TRUE">
		<start-regex>&apos;</start-regex>
		<end-regex>&apos;</end-regex>
	</string>

	<keyword-list _name = "Keywords" style = "Keyword" case-sensitive="FALSE">
		<keyword>case</keyword>
		<keyword>continue</keyword>
		<keyword>cycle</keyword>
		<keyword>do</keyword>
      		<keyword>else</keyword>
      		<keyword>elseif</keyword>
      		<keyword>end</keyword>
      		<keyword>endif</keyword>
      		<keyword>enddo</keyword>
		<keyword>forall</keyword>
		<keyword>where</keyword>
		<keyword>while</keyword>
		<keyword>elsewhere</keyword>
		<keyword>data</keyword>
		<keyword>block data</keyword>
		<keyword>common</keyword>
		<keyword>program</keyword>
		<keyword>subroutine</keyword>
		<keyword>function</keyword>
		<keyword>module</keyword>
		<keyword>contains</keyword>
		<keyword>goto</keyword>
		<keyword>if</keyword>
		<keyword>then</keyword>
		<keyword>return</keyword>
		<keyword>use</keyword>
		<keyword>include</keyword>
		<keyword>implicit none</keyword>
		<keyword>CALL</keyword>
		<keyword>SELECT</keyword>

		<keyword>kind</keyword>
		<keyword>len</keyword>
		<keyword>external</keyword>
		<keyword>intrinsic</keyword>
		<keyword>save</keyword>
	</keyword-list>

	<keyword-list _name = "Read/Write" style = "Keyword" case-sensitive="FALSE">
		<keyword>backspace</keyword>
		<keyword>close</keyword>
		<keyword>inquire</keyword>
		<keyword>open</keyword>
		<keyword>rewind</keyword>
		<keyword>endfile</keyword>
		<keyword>read</keyword>
		<keyword>write</keyword>
		<keyword>print</keyword>
	</keyword-list>
	<keyword-list _name = "Input/Output" style = "Keyword" case-sensitive="FALSE">
		<keyword>unit</keyword>
		<keyword>file</keyword>
		<keyword>iostat</keyword>
		<keyword>access</keyword>
		<keyword>blank</keyword>
		<keyword>fmt</keyword>
		<keyword>form</keyword>
		<keyword>recl</keyword>
		<keyword>status</keyword>
		<keyword>exist</keyword>
		<keyword>opened</keyword>
		<keyword>number</keyword>
		<keyword>named</keyword>
		<keyword>name</keyword>
		<keyword>sequential</keyword>
		<keyword>direct</keyword>
		<keyword>rec</keyword>
		<keyword>formatted</keyword>
		<keyword>unformatted</keyword>
		<keyword>nextrec</keyword>
		<keyword>pad</keyword>
		<keyword>position</keyword>
		<keyword>action</keyword>
		<keyword>delim</keyword>
		<keyword>readwrite</keyword>
		<keyword>eor</keyword>
		<keyword>advance</keyword>
		<keyword>nml</keyword>
	</keyword-list>
	<keyword-list _name = "Intrinsics" style = "Keyword" case-sensitive="FALSE">
		<keyword>adjustl</keyword>
		<keyword>adjustr</keyword>
		<keyword>all</keyword>
		<keyword>allocated</keyword>
		<keyword>any</keyword>
		<keyword>associated</keyword>
		<keyword>bit_size</keyword>
		<keyword>btest</keyword>
		<keyword>ceiling</keyword>
		<keyword>count</keyword>
		<keyword>cshift</keyword>
		<keyword>date_and_time</keyword>
		<keyword>digits</keyword>
		<keyword>dot_product</keyword>
		<keyword>eoshift</keyword>
		<keyword>epsilon</keyword>
		<keyword>exponent</keyword>
		<keyword>floor</keyword>
		<keyword>fraction</keyword>
		<keyword>huge</keyword>
		<keyword>iand</keyword>
		<keyword>ibclr</keyword>
		<keyword>ibits</keyword>
		<keyword>ibset</keyword>
		<keyword>ieor</keyword>
		<keyword>ior</keyword>
		<keyword>ishft</keyword>
		<keyword>ishftc</keyword>
		<keyword>lbound</keyword>
		<keyword>len_trim</keyword>
		<keyword>matmul</keyword>
		<keyword>maxexponent</keyword>
		<keyword>maxloc</keyword>
		<keyword>maxval</keyword>
		<keyword>merge</keyword>
		<keyword>minexponent</keyword>
		<keyword>minloc</keyword>
		<keyword>minval</keyword>
		<keyword>modulo</keyword>
		<keyword>mvbits</keyword>
		<keyword>nearest</keyword>
		<keyword>pack</keyword>
		<keyword>present</keyword>
		<keyword>product</keyword>
		<keyword>radix</keyword>
		<keyword>random_number</keyword>
		<keyword>random_seed</keyword>
		<keyword>range</keyword>
		<keyword>repeat</keyword>
		<keyword>reshape</keyword>
		<keyword>rrspacing</keyword>
		<keyword>scale</keyword>
		<keyword>selected_int_kind</keyword>
		<keyword>selected_real_kind</keyword>
		<keyword>scan</keyword>
		<keyword>shape</keyword>
		<keyword>size</keyword>
		<keyword>spacing</keyword>
		<keyword>spread</keyword>
		<keyword>set_exponent</keyword>
		<keyword>tiny</keyword>
		<keyword>transpose</keyword>
		<keyword>trim</keyword>
		<keyword>ubound</keyword>
		<keyword>unpack</keyword>
		<keyword>verify</keyword>
		<keyword>precision</keyword>
		<keyword>sum</keyword>
		<keyword>system_clock</keyword>
		<keyword>abs</keyword>
		<keyword>acos</keyword>
		<keyword>aimag</keyword>
		<keyword>aint</keyword>
		<keyword>anint</keyword>
		<keyword>asin</keyword>
		<keyword>atan</keyword>
		<keyword>atan2</keyword>
		<keyword>cos</keyword>
		<keyword>sin</keyword>
		<keyword>tan</keyword>
		<keyword>sinh</keyword>
		<keyword>cosh</keyword>
		<keyword>tanh</keyword>
		<keyword>exp</keyword>
		<keyword>log</keyword>
		<keyword>log10</keyword>
		<keyword>sign</keyword>
		<keyword>sqrt</keyword>
		<keyword>int</keyword>
		<keyword>cmplx</keyword>
		<keyword>nint</keyword>
		<keyword>min</keyword>
		<keyword>max</keyword>
		<keyword>conjg</keyword>
		<keyword>char</keyword>
		<keyword>ichar</keyword>
		<keyword>index</keyword>
		<keyword>cabs</keyword>
		<keyword>ccos</keyword>
		<keyword>cexp</keyword>
		<keyword>clog</keyword>
		<keyword>csin</keyword>
		<keyword>csqrt</keyword>
		<keyword>dacos</keyword>
		<keyword>dasin</keyword>
		<keyword>datan</keyword>
		<keyword>datan2</keyword>
		<keyword>dcos</keyword>
		<keyword>dcosh</keyword>
		<keyword>ddim</keyword>
		<keyword>dexp</keyword>
		<keyword>dint</keyword>
		<keyword>dlog</keyword>
		<keyword>dlog10</keyword>
		<keyword>dmod</keyword>
		<keyword>dabs</keyword>
		<keyword>dnint</keyword>
		<keyword>dsign</keyword>
		<keyword>dsin</keyword>
		<keyword>dsinh</keyword>
		<keyword>dsqrt</keyword>
		<keyword>dtan</keyword>
		<keyword>dtanh</keyword>
		<keyword>iabs</keyword>
		<keyword>idim</keyword>
		<keyword>idnint</keyword>
		<keyword>isign</keyword>
		<keyword>idint</keyword>
		<keyword>ifix</keyword>
		<keyword>amax0</keyword>
		<keyword>amax1</keyword>
		<keyword>dmax1</keyword>
		<keyword>max0</keyword>
		<keyword>max1</keyword>
		<keyword>amin0</keyword>
		<keyword>amin1</keyword>
		<keyword>dmin1</keyword>
		<keyword>min0</keyword>
		<keyword>min1</keyword>
		<keyword>amod</keyword>
		<keyword>float</keyword>
		<keyword>sngl</keyword>
		<keyword>alog</keyword>
		<keyword>alog10</keyword>
		<keyword>cdabs</keyword>
		<keyword>cdcos</keyword>
		<keyword>cdexp</keyword>
		<keyword>cdlog</keyword>
		<keyword>cdsin</keyword>
		<keyword>cdsqrt</keyword>
		<keyword>cqabs</keyword>
		<keyword>cqcos</keyword>
		<keyword>cqexp</keyword>
		<keyword>cqlog</keyword>
		<keyword>cqsin</keyword>
		<keyword>cqsqrt</keyword>
		<keyword>qacos</keyword>
		<keyword>qasin</keyword>
		<keyword>qatan</keyword>
		<keyword>qatan2</keyword>
		<keyword>qcos</keyword>
		<keyword>qcosh</keyword>
		<keyword>qdim</keyword>
		<keyword>qexp</keyword>
		<keyword>iqint</keyword>
		<keyword>qlog</keyword>
		<keyword>qlog10</keyword>
		<keyword>qmod</keyword>
		<keyword>qabs</keyword>
		<keyword>qnint</keyword>
		<keyword>qsign</keyword>
		<keyword>qsin</keyword>
		<keyword>qsinh</keyword>
		<keyword>qsqrt</keyword>
		<keyword>qtan</keyword>
		<keyword>qtanh</keyword>
		<keyword>qmax1</keyword>
		<keyword>qmin1</keyword>
		<keyword>dimag</keyword>
		<keyword>qimag</keyword>
		<keyword>dcmplx</keyword>
		<keyword>qcmplx</keyword>
		<keyword>dconjg</keyword>
		<keyword>qconjg</keyword>
		<keyword>gamma</keyword>
		<keyword>dgamma</keyword>
		<keyword>qgamma</keyword>
		<keyword>algama</keyword>
		<keyword>dlgama</keyword>
		<keyword>qlgama</keyword>
		<keyword>erf</keyword>
		<keyword>derf</keyword>
		<keyword>qerf</keyword>
		<keyword>erfc</keyword>
		<keyword>derfc</keyword>
		<keyword>qerfc</keyword>
		<keyword>dfloat</keyword>
	</keyword-list>

	<keyword-list _name = "Types" style = "Data Type" case-sensitive="FALSE">
		<keyword>REAL</keyword>
		<keyword>INTEGER</keyword>
		<keyword>CHARACTER</keyword>
		<keyword>LOGICAL</keyword>
		<keyword>COMPLEX</keyword>
		<keyword>DOUBLE PRECISION</keyword>
		<keyword>DOUBLE COMPLEX</keyword>
		<keyword>BYTE</keyword>
		<keyword>dimension</keyword>
		<keyword>parameter</keyword>
		<keyword>intent</keyword>
		<keyword>private</keyword>
		<keyword>optional</keyword>
		<keyword>pointer</keyword>
		<keyword>target</keyword>
		<keyword>allocatable</keyword>
	</keyword-list>


	<pattern-item _name = "Decimal" style = "Decimal">
		<regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
	</pattern-item>

	<pattern-item _name = "Floating Point Number" style = "Floating Point">
		<regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
	</pattern-item>

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

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

</language>
