| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<language name="Stan" |
| 4 |
section="Scientific" |
| 5 |
version="5" |
| 6 |
kateversion="5.0" |
| 7 |
indenter="cstyle" |
| 8 |
extensions="*.stan;*.stanfunctions" |
| 9 |
license="MIT"> |
| 10 |
<highlighting> |
| 11 |
<list name="controlflow"> |
| 12 |
<item>break</item> |
| 13 |
<item>continue</item> |
| 14 |
<item>else</item> |
| 15 |
<item>for</item> |
| 16 |
<item>if</item> |
| 17 |
<item>in</item> |
| 18 |
<item>return</item> |
| 19 |
<item>while</item> |
| 20 |
<item>profile</item> |
| 21 |
</list> |
| 22 |
<list name="keywords"> |
| 23 |
<item>reject</item> |
| 24 |
<item>print</item> |
| 25 |
<item>integrate_ode</item> |
| 26 |
<item>integrate_ode_bdf</item> |
| 27 |
<item>integrate_ode_rk45</item> |
| 28 |
<item>algebra_solver</item> |
| 29 |
</list> |
| 30 |
<list name="types"> |
| 31 |
<item>lower</item> |
| 32 |
<item>upper</item> |
| 33 |
<item>offset</item> |
| 34 |
<item>multiplier</item> |
| 35 |
<item>int</item> |
| 36 |
<item>real</item> |
| 37 |
<item>vector</item> |
| 38 |
<item>complex</item> |
| 39 |
<item>ordered</item> |
| 40 |
<item>positive_ordered</item> |
| 41 |
<item>simplex</item> |
| 42 |
<item>unit_vector</item> |
| 43 |
<item>row_vector</item> |
| 44 |
<item>matrix</item> |
| 45 |
<item>array</item> |
| 46 |
<item>cholesky_factor_corr</item> |
| 47 |
<item>cholesky_factor_cov</item> |
| 48 |
<item>corr_matrix</item> |
| 49 |
<item>cov_matrix</item> |
| 50 |
<item>void</item> |
| 51 |
</list> |
| 52 |
<contexts> |
| 53 |
<context attribute="Normal Text" lineEndContext="#stay" name="Normal"> |
| 54 |
<DetectSpaces /> |
| 55 |
<DetectChar attribute="Comment" context="Hash comment" char="#"/> |
| 56 |
<Detect2Chars attribute="Comment" context="C-style comment" char="/" char1="/"/> |
| 57 |
<Detect2Chars attribute="Comment" context="Block comment" char="/" char1="*" beginRegion="Comment"/> |
| 58 |
<RegExpr attribute="Keyword" context="#stay" String="\btarget\s*\+=" /> |
| 59 |
<DetectChar attribute="Operator" context="After less-than" char="<" /> |
| 60 |
<DetectChar attribute="Punctuation" context="After comma" char="," /> |
| 61 |
<DetectChar attribute="Operator" context="After Right Paren" char=")" /> |
| 62 |
<RegExpr attribute="Keyword" context="#stay" String="\b(functions|(transformed\s+)?(data|parameters)|model|generated\s+quantities)\b" /> |
| 63 |
<keyword attribute="Control Flow" context="#stay" String="controlflow" /> |
| 64 |
<keyword attribute="Keyword" context="#stay" String="keywords" /> |
| 65 |
<keyword attribute="Data Type" context="#stay" String="types" /> |
| 66 |
<RegExpr attribute="Identifier" context="#stay" String="[A-Za-z][A-Za-z0-9_]*" /> |
| 67 |
<RegExpr attribute="Complex" context="#stay" String="(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?i" /> |
| 68 |
<Float attribute="Real" /> |
| 69 |
<Int attribute="Int" /> |
| 70 |
<DetectChar attribute="Punctuation" context="#stay" char="{" beginRegion="Brace1" /> |
| 71 |
<DetectChar attribute="Punctuation" context="#stay" char="}" endRegion="Brace1" /> |
| 72 |
<DetectChar attribute="String" context="String" char=""" /> |
| 73 |
<RegExpr attribute="Assignment" context="#stay" String="([+-]?=|\.?[*/]=)" /> |
| 74 |
<RegExpr attribute="Operator" context="#stay" String="(:|\?|\|\||&&|==|!=|<=?|>=?|\+|-|\.?\*|\.?/|%|\\|'|^)" /> |
| 75 |
<RegExpr attribute="Punctuation" context="#stay" String="[[\]()]" /> |
| 76 |
</context> |
| 77 |
<context attribute="String" lineEndContext="#stay" name="String"> |
| 78 |
<DetectChar attribute="String" context="#pop" char="""/> |
| 79 |
</context> |
| 80 |
<context attribute="Comment" lineEndContext="#pop" name="Hash comment"> |
| 81 |
<DetectSpaces /> |
| 82 |
<IncludeRules context="##Comments" /> |
| 83 |
</context> |
| 84 |
<context attribute="Comment" lineEndContext="#pop" name="C-style comment"> |
| 85 |
<DetectSpaces /> |
| 86 |
<IncludeRules context="##Comments" /> |
| 87 |
</context> |
| 88 |
<context attribute="Comment" lineEndContext="#stay" name="Block comment"> |
| 89 |
<DetectSpaces /> |
| 90 |
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/> |
| 91 |
<WordDetect attribute="Doc Tag" String="@return" context="#stay" /> |
| 92 |
<WordDetect attribute="Doc Tag" String="@param" context="#stay" /> |
| 93 |
<IncludeRules context="##Comments" /> |
| 94 |
</context> |
| 95 |
<context attribute="Normal Text" name="After comma" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop" > |
| 96 |
<DetectSpaces /> |
| 97 |
<RegExpr context="Upper Bound" String="upper\s*=" lookAhead="true" /> |
| 98 |
</context> |
| 99 |
<context attribute="Normal Text" name="After less-than" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop" > |
| 100 |
<DetectSpaces /> |
| 101 |
<RegExpr context="Upper Bound" String="upper\s*=" lookAhead="true" /> |
| 102 |
<RegExpr context="Lower Bound" String="lower\s*=" lookAhead="true" /> |
| 103 |
</context> |
| 104 |
<context attribute="Normal Text" name="After Right Paren" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop" > |
| 105 |
<DetectSpaces /> |
| 106 |
<RegExpr context="Truncation" String="T\s*\[" lookAhead="true" /> |
| 107 |
</context> |
| 108 |
<context attribute="Normal Text" name="Upper Bound" lineEndContext="#stay" > |
| 109 |
<StringDetect attribute="Keyword" String="upper" context="#stay" /> |
| 110 |
<DetectChar attribute="Punctuation" char="=" context="#pop" /> |
| 111 |
</context> |
| 112 |
<context attribute="Normal Text" name="Lower Bound" lineEndContext="#stay" > |
| 113 |
<StringDetect attribute="Keyword" String="lower" context="#stay" /> |
| 114 |
<DetectChar attribute="Punctuation" char="=" context="#pop" /> |
| 115 |
</context> |
| 116 |
<context attribute="Normal Text" name="Truncation" lineEndContext="#stay" > |
| 117 |
<DetectChar attribute="Keyword" char="T" context="#stay" /> |
| 118 |
<DetectChar attribute="Punctuation" char="[" context="#pop" /> |
| 119 |
</context> |
| 120 |
</contexts> |
| 121 |
<itemDatas> |
| 122 |
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> |
| 123 |
<itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/> |
| 124 |
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> |
| 125 |
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/> |
| 126 |
<itemData name="Int" defStyleNum="dsDecVal" spellChecking="false"/> |
| 127 |
<itemData name="Real" defStyleNum="dsFloat" spellChecking="false"/> |
| 128 |
<itemData name="Complex" defStyleNum="dsFloat" spellChecking="false"/> |
| 129 |
<itemData name="String" defStyleNum="dsString"/> |
| 130 |
<itemData name="Comment" defStyleNum="dsComment"/> |
| 131 |
<itemData name="Assignment" defStyleNum="dsNormal" spellChecking="false"/> |
| 132 |
<itemData name="Operator" defStyleNum="dsNormal" spellChecking="false"/> |
| 133 |
<itemData name="Punctuation" defStyleNum="dsNormal" spellChecking="false"/> |
| 134 |
<itemData name="Identifier" defStyleNum="dsNormal" spellChecking="false" /> |
| 135 |
<itemData name="Doc Tag" defStyleNum="dsAnnotation" spellChecking="false" /> |
| 136 |
</itemDatas> |
| 137 |
</highlighting> |
| 138 |
<general> |
| 139 |
<comments> |
| 140 |
<comment name="singleLine" start="//" /> |
| 141 |
<comment name="multiLine" start="/*" end="*/" region="Comment" /> |
| 142 |
</comments> |
| 143 |
<keywords casesensitive="1" /> |
| 144 |
</general> |
| 145 |
</language> |
| 146 |
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; --> |