Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
285 lines (219 sloc) 7.67 KB
<?xml version="1.0"?>
<!DOCTYPE MODE SYSTEM "xmode.dtd">
<!--
Recommended catalog entry: <MODE NAME="sasylf" FILE="sasylf.xml" FILE_NAME_GLOB="*.slf"/>
-->
<MODE>
<PROPS>
<PROPERTY NAME="lineUpClosingBracket" VALUE="false" />
<PROPERTY NAME="indentThisLine" VALUE="^\s*by" /> <!-- doesn't work -->
<PROPERTY NAME="indentNextLines" VALUE="^\s*((lemma|theorem).*|case (rule\s*|.*?is)|(.*?by (induction|case analysis) on.*))"/>
<PROPERTY NAME="unindentThisLine" VALUE="^\s*(end.*|is)\s*$" />
<PROPERTY NAME="unindentNextLines" VALUE="^\s*(end.*)\s*$" />
<PROPERTY NAME="doubleBracketIndent" VALUE="false" />
<PROPERTY NAME="electricKeys" VALUE="sd" />
<PROPERTY NAME="noTabs" VALUE="false" />
<PROPERTY NAME="indentSize" VALUE="4" />
<PROPERTY NAME="commentEnd" VALUE="*/" />
<PROPERTY NAME="commentStart" VALUE="/*" />
<PROPERTY NAME="lineComment" VALUE="//" />
</PROPS>
<RULES IGNORE_CASE="TRUE">
<IMPORT DELEGATE="COMMENTS"/>
<IMPORT DELEGATE="MAGIC"/>
<EOL_SPAN_REGEXP DELEGATE="SYNTAX" AT_LINE_START="TRUE">\s*[^\s:]+\s*::=</EOL_SPAN_REGEXP>
<EOL_SPAN_REGEXP TYPE="INVALID" AT_LINE_START="TRUE">\s*[^\s:]+\s*::</EOL_SPAN_REGEXP>
<EOL_SPAN_REGEXP DELEGATE="SYNTAX" MATCH_TYPE="OPERATOR" AT_LINE_START="TRUE">\s*?[|]\s+</EOL_SPAN_REGEXP>
<EOL_SPAN_REGEXP DELEGATE="BAR" TYPE="LITERAL2" AT_LINE_START="TRUE" AT_WORD_START="TRUE">\s*-{3,}</EOL_SPAN_REGEXP>
<IMPORT DELEGATE="TOP_LEVEL"/>
<!-- keyword sequences -->
<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">case rule</SEQ>
<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">end case analysis</SEQ>
<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">end induction</SEQ>
<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">end lemma</SEQ>
<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">end theorem</SEQ>
<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">end case</SEQ>
<SPAN DELEGATE="SYNTAX" MATCH_TYPE="KEYWORD1" AT_LINE_START="TRUE">
<BEGIN>terminals</BEGIN>
<END>syntax</END>
</SPAN>
<SPAN_REGEXP DELEGATE="JUSTIFICATION" MATCH_TYPE="OPERATOR" NO_LINE_BREAK="TRUE" HASH_CHARS="by">
<BEGIN>by\s+</BEGIN>
<END>&#222;</END>
</SPAN_REGEXP>
<SPAN_REGEXP DELEGATE="FORALL" MATCH_TYPE="KEYWORD2" HASH_CHARS="forall"
NO_LINE_BREAK="TRUE" NO_WORD_BREAK="TRUE">
<BEGIN>forall\s+</BEGIN>
<END>&#222;</END>
</SPAN_REGEXP>
<IMPORT DELEGATE="OPERATORS"/>
<KEYWORDS>
<KEYWORD1>package</KEYWORD1>
<KEYWORD1>terminals</KEYWORD1>
<KEYWORD1>assumes</KEYWORD1>
<KEYWORD1>syntax</KEYWORD1>
<KEYWORD1>lemma</KEYWORD1>
<KEYWORD1>premise</KEYWORD1>
<KEYWORD1>is</KEYWORD1>
<KEYWORD1>case</KEYWORD1>
<KEYWORD1>end</KEYWORD1>
<KEYWORD2>exists</KEYWORD2>
<KEYWORD3>induction</KEYWORD3>
<KEYWORD3>exchange</KEYWORD3>
<KEYWORD3>weakening</KEYWORD3>
<KEYWORD3>rule</KEYWORD3>
<KEYWORD3>solve</KEYWORD3>
<INVALID>unproved</INVALID>
<OPERATOR>by</OPERATOR>
<OPERATOR>on</OPERATOR>
</KEYWORDS>
</RULES>
<RULES SET="OPERATORS">
<SEQ TYPE="OPERATOR">[</SEQ>
<SEQ TYPE="OPERATOR">]</SEQ>
<SEQ TYPE="OPERATOR">(</SEQ>
<SEQ TYPE="OPERATOR">)</SEQ>
<SEQ TYPE="OPERATOR">.</SEQ>
<SEQ TYPE="OPERATOR">,</SEQ>
<SEQ TYPE="OPERATOR">;</SEQ>
</RULES>
<RULES SET="TOP_LEVEL">
<IMPORT DELEGATE="MAGIC"/>
<SPAN_REGEXP DELEGATE="LITERAL3" MATCH_TYPE="KEYWORD1" HASH_CHARS="judgment"
NO_LINE_BREAK="TRUE" NO_WORD_BREAK="TRUE">
<BEGIN>judgment\s+</BEGIN>
<END>:</END>
</SPAN_REGEXP>
<SPAN DELEGATE="THEOREM" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">
<BEGIN>theorem</BEGIN>
<END>end theorem</END>
</SPAN>
<SPAN DELEGATE="THEOREM" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">
<BEGIN>lemma</BEGIN>
<END>end lemma</END>
</SPAN>
<KEYWORDS>
<KEYWORD1>and</KEYWORD1>
<KEYWORD1>judgment</KEYWORD1>
</KEYWORDS>
</RULES>
<RULES SET="THEOREM">
<IMPORT DELEGATE="COMMENTS"/>
<SPAN_REGEXP DELEGATE="THEOREM2" TYPE="LITERAL3">
<BEGIN>[^\s]+[ ]*:</BEGIN>
<END>&#222;</END>
</SPAN_REGEXP>
</RULES>
<RULES SET="THEOREM2">
<IMPORT DELEGATE="MAIN"/>
<SEQ_REGEXP TYPE="FUNCTION" AT_LINE_START="TRUE">\s*[^\s]+?\s*:\s?</SEQ_REGEXP>
</RULES>
<RULES SET="FORALL">
<IMPORT DELEGATE="FORALL2"/>
<SPAN_REGEXP MATCH_TYPE="FUNCTION" DELEGATE="FORALL2" NO_LINE_BREAK="TRUE">
<BEGIN>[^\s]+\s*:</BEGIN>
<END>&#222;</END>
</SPAN_REGEXP>
</RULES>
<RULES SET="FORALL2">
<IMPORT DELEGATE="COMMENTS"/>
<IMPORT DELEGATE="OPERATORS"/>
<IMPORT DELEGATE="MAGIC"/>
<SPAN MATCH_TYPE="KEYWORD2" DELEGATE="MAIN" AT_WORD_START="TRUE">
<BEGIN>exists\s+</BEGIN>
<END>&#222;</END>
</SPAN>
<SPAN_REGEXP DELEGATE="FORALL" MATCH_TYPE="KEYWORD2" HASH_CHARS="forall"
NO_LINE_BREAK="TRUE" NO_WORD_BREAK="TRUE">
<BEGIN>forall\s+</BEGIN>
<END>&#222;</END>
</SPAN_REGEXP>
<KEYWORDS>
<KEYWORD2>exists</KEYWORD2>
<KEYWORD2>forall</KEYWORD2>
</KEYWORDS>
</RULES>
<RULES SET="JUSTIFICATION" DEFAULT="FUNCTION">
<IMPORT DELEGATE="COMMENTS"/>
<IMPORT DELEGATE="MAGIC"/>
<SPAN DELEGATE="PARAMS" MATCH_TYPE="OPERATOR" NO_LINE_BREAK="TRUE" AT_WORD_START="TRUE">
<BEGIN>on </BEGIN>
<END>&#222;</END>
</SPAN>
<SEQ TYPE="KEYWORD3" AT_WORD_START="TRUE">induction hypothesis</SEQ>
<SEQ TYPE="KEYWORD3" AT_WORD_START="TRUE">case analysis</SEQ>
<SEQ TYPE="KEYWORD3" AT_WORD_START="TRUE">induction</SEQ>
<SEQ TYPE="KEYWORD3" AT_WORD_START="TRUE">substitution</SEQ>
<SEQ TYPE="KEYWORD3" AT_WORD_START="TRUE">inversion of</SEQ>
<IMPORT DELEGATE="TOP_LEVEL"/>
<SPAN_REGEXP DELEGATE="LITERAL3" MATCH_TYPE="KEYWORD1" HASH_CHARS="theorem"
NO_LINE_BREAK="TRUE" NO_WORD_BREAK="TRUE">
<BEGIN>theorem\s+</BEGIN>
<END>:</END>
</SPAN_REGEXP>
<SPAN_REGEXP DELEGATE="LITERAL3" MATCH_TYPE="KEYWORD1" HASH_CHARS="lemma"
NO_LINE_BREAK="TRUE" NO_WORD_BREAK="TRUE">
<BEGIN>lemma\s+</BEGIN>
<END>:</END>
</SPAN_REGEXP>
<SPAN_REGEXP TYPE="LITERAL2" MATCH_TYPE="KEYWORD3" NO_LINE_BREAK="TRUE" HASH_CHARS="rule">
<BEGIN>rule\s+</BEGIN>
<END> </END>
</SPAN_REGEXP>
<SPAN_REGEXP TYPE="LITERAL2" MATCH_TYPE="KEYWORD3" NO_LINE_BREAK="TRUE" HASH_CHARS="inversion of">
<BEGIN>inversion of\s+</BEGIN>
<END> </END>
</SPAN_REGEXP>
<KEYWORDS>
<KEYWORD3>induction</KEYWORD3>
<KEYWORD3>exchange</KEYWORD3>
<KEYWORD3>weakening</KEYWORD3>
<KEYWORD3>rule</KEYWORD3>
<KEYWORD3>solve</KEYWORD3>
<INVALID>unproved</INVALID>
<OPERATOR>on</OPERATOR>
</KEYWORDS>
</RULES>
<RULES SET="PARAMS">
<IMPORT DELEGATE="COMMENTS"/>
<SEQ_REGEXP TYPE="FUNCTION">\w[^\s,()]*</SEQ_REGEXP>
</RULES>
<RULES SET="LITERAL3">
<IMPORT DELEGATE="MAIN"/>
<SEQ_REGEXP DELEGATE="MAIN">:[^\s]+</SEQ_REGEXP>
<SEQ_REGEXP TYPE="LITERAL3">[^\s:]+</SEQ_REGEXP>
</RULES>
<RULES SET="SYNTAX" DEFAULT="LITERAL1" ESCAPE="\">
<IMPORT DELEGATE="COMMENTS"/>
<IMPORT DELEGATE="MAGIC"/>
<SEQ TYPE="OPERATOR">|</SEQ>
<SEQ TYPE="OPERATOR">[</SEQ>
<SEQ TYPE="OPERATOR">]</SEQ>
<SEQ TYPE="OPERATOR">(</SEQ>
<SEQ TYPE="OPERATOR">)</SEQ>
<SEQ TYPE="OPERATOR">.</SEQ>
<!-- special char escapes -->
<SPAN TYPE="LITERAL1" MATCH_TYPE="OPERATOR" ESCAPE="\" NO_LINE_BREAK="TRUE">
<BEGIN>"</BEGIN>
<END>"</END>
</SPAN>
<KEYWORDS>
<KEYWORD1>and</KEYWORD1>
</KEYWORDS>
</RULES>
<RULES SET="BAR" DEFAULT="LITERAL2">
<IMPORT DELEGATE="COMMENTS"/>
</RULES>
<RULES SET="MAGIC" IGNORE_CASE="FALSE">
<SEQ_REGEXP TYPE="KEYWORD4" AT_WORD_START="TRUE" HASH_CHAR="x">[xX][a-zA-Z\d']*</SEQ_REGEXP>
</RULES>
<RULES SET="COMMENTS">
<!-- Silly comment -->
<SEQ TYPE="COMMENT1">/**/</SEQ>
<SPAN TYPE="COMMENT1">
<BEGIN>/*</BEGIN>
<END>*/</END>
</SPAN>
<EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
</RULES>
</MODE>