<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<!-- PostScript mode, by Slava Pestov. Based on PostScriptTokenMarker by
     Ralf Engels -->
<MODE>
	<PROPS>
		<PROPERTY NAME="lineComment" VALUE="%" />
	</PROPS>
	<RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
		<!-- Comments -->
		<EOL_SPAN TYPE="COMMENT2">%!</EOL_SPAN>
		<EOL_SPAN TYPE="COMMENT2">%?</EOL_SPAN>
		<EOL_SPAN TYPE="COMMENT2">%%</EOL_SPAN>
		<EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>

		<!-- Literals -->
		<SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
			<BEGIN>(</BEGIN>
			<END>)</END>
		</SPAN>

		<SPAN TYPE="LITERAL1" ESCAPE="\">
			<BEGIN>&lt;</BEGIN>
			<END>&gt;</END>
		</SPAN>

		<MARK_FOLLOWING TYPE="LABEL">/</MARK_FOLLOWING>

		<SEQ TYPE="OPERATOR">}</SEQ>
		<SEQ TYPE="OPERATOR">{</SEQ>
		<SEQ TYPE="OPERATOR">]</SEQ>
		<SEQ TYPE="OPERATOR">[</SEQ>

		<KEYWORDS>
			<KEYWORD1>pop</KEYWORD1>
			<KEYWORD1>exch</KEYWORD1>
			<KEYWORD1>dup</KEYWORD1>
			<KEYWORD1>copy</KEYWORD1>
			<KEYWORD1>roll</KEYWORD1>
			<KEYWORD1>clear</KEYWORD1>
			<KEYWORD1>count</KEYWORD1>
			<KEYWORD1>mark</KEYWORD1>
			<KEYWORD1>cleartomark</KEYWORD1>
			<KEYWORD1>counttomark</KEYWORD1>

			<KEYWORD1>exec</KEYWORD1>
			<KEYWORD1>if</KEYWORD1>
			<KEYWORD1>ifelse</KEYWORD1>
			<KEYWORD1>for</KEYWORD1>
			<KEYWORD1>repeat</KEYWORD1>
			<KEYWORD1>loop</KEYWORD1>
			<KEYWORD1>exit</KEYWORD1>
			<KEYWORD1>stop</KEYWORD1>
			<KEYWORD1>stopped</KEYWORD1>
			<KEYWORD1>countexecstack</KEYWORD1>
			<KEYWORD1>execstack</KEYWORD1>
			<KEYWORD1>quit</KEYWORD1>
			<KEYWORD1>start</KEYWORD1>

			<OPERATOR>add</OPERATOR>
			<OPERATOR>div</OPERATOR>
			<OPERATOR>idiv</OPERATOR>
			<OPERATOR>mod</OPERATOR>
			<OPERATOR>mul</OPERATOR>
			<OPERATOR>sub</OPERATOR>
			<OPERATOR>abs</OPERATOR>
			<OPERATOR>ned</OPERATOR>
			<OPERATOR>ceiling</OPERATOR>
			<OPERATOR>floor</OPERATOR>
			<OPERATOR>round</OPERATOR>
			<OPERATOR>truncate</OPERATOR>
			<OPERATOR>sqrt</OPERATOR>
			<OPERATOR>atan</OPERATOR>
			<OPERATOR>cos</OPERATOR>
			<OPERATOR>sin</OPERATOR>
			<OPERATOR>exp</OPERATOR>
			<OPERATOR>ln</OPERATOR>
			<OPERATOR>log</OPERATOR>
			<OPERATOR>rand</OPERATOR>
			<OPERATOR>srand</OPERATOR>
			<OPERATOR>rrand</OPERATOR>

			<LITERAL2>true</LITERAL2>
			<LITERAL2>false</LITERAL2>
			<LITERAL2>NULL</LITERAL2>
		</KEYWORDS>
	</RULES>

	<RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
		<SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
			<BEGIN>(</BEGIN>
			<END>)</END>
		</SPAN>
	</RULES>
</MODE>
