|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!DOCTYPE language SYSTEM "language.dtd"> |
| 3 | +<!-- |
| 4 | + EXPRESS syntax definition based on sql-mysql.xml by Shane Wright ([email protected]) |
| 5 | + |
| 6 | + This is for Kate, the KDE editor. Rename to express.xml and place in the syntax directory (on Debian, this is /usr/share/kde4/apps/katepart/syntax ) |
| 7 | +--> |
| 8 | +< language name= "EXPRESS" version= "0.1" kateversion= "2.5" section= "Database" extensions= "*.exp;*.EXP;*.p11" mimetype= "text/x-express" casesensitive= "0" author= "Mark Pictor ([email protected])" license= ""> |
| 9 | + <highlighting> |
| 10 | + <list name="keywords"> |
| 11 | + <item> of </item> |
| 12 | + <item> or </item> |
| 13 | + <item> to </item> |
| 14 | + <item> where </item> |
| 15 | + <item> subtype </item> |
| 16 | + <item> supertype </item> |
| 17 | + <item> abstract </item> |
| 18 | + <item> oneof </item> |
| 19 | + <item> not </item> |
| 20 | + <item> in </item> |
| 21 | + <item> and </item> |
| 22 | + <item> return </item> |
| 23 | + <item> then </item> |
| 24 | + <item> derive </item> |
| 25 | + <item> optional </item> |
| 26 | + <!-- put SCHEMA and END_SCHEMA here so code folding will fold |
| 27 | + everything in a schema, and not collapse the schema itself --> |
| 28 | + <item> schema </item> |
| 29 | + <item> end_schema </item> |
| 30 | + </list> |
| 31 | + <list name="kw_begin"> <!-- kw's that can begin a foldable region --> |
| 32 | + <item> type </item> |
| 33 | + <item> entity </item> |
| 34 | + <item> function </item> |
| 35 | + <item> rule </item> |
| 36 | + <item> constant </item> |
| 37 | + <item> if </item> |
| 38 | + <item> local </item> |
| 39 | + <item> repeat </item> |
| 40 | + <item> begin </item> |
| 41 | + <item> case </item> |
| 42 | + </list> |
| 43 | + <list name="kw_end"> <!-- kw's that can end a foldable region --> |
| 44 | + <item> end </item> |
| 45 | + <item> end_type </item> |
| 46 | + <item> end_entity </item> |
| 47 | + <item> end_function </item> |
| 48 | + <item> end_rule </item> |
| 49 | + <item> end_constant </item> |
| 50 | + <item> end_if </item> |
| 51 | + <item> end_local </item> |
| 52 | + <item> end_repeat </item> |
| 53 | + <item> end_case </item> |
| 54 | + </list> |
| 55 | + <list name="kw_end_begin"> <!-- end one foldable region, begin another --> |
| 56 | + <item> else </item> |
| 57 | + </list> |
| 58 | + <list name="interface_specification"> <!-- USE FROM, REFERENCE FROM --> |
| 59 | + <item> use </item> |
| 60 | + <item> reference </item> |
| 61 | + </list> |
| 62 | + |
| 63 | + <list name="operators"> |
| 64 | + <item> : </item> |
| 65 | + <item> , </item> |
| 66 | + <item> || </item> |
| 67 | + <item> . </item> |
| 68 | + <item> = </item> |
| 69 | + <item> ** </item> |
| 70 | + <item> | </item> |
| 71 | + <item> <* </item> |
| 72 | + <item> >= </item> |
| 73 | + <item> > </item> |
| 74 | + <item> :=: </item> |
| 75 | + <item> :<>: </item> |
| 76 | + <item> [ </item> |
| 77 | + <item> { </item> |
| 78 | + <item> ( </item> |
| 79 | + <item> <= </item> |
| 80 | + <item> < </item> |
| 81 | + <item> - </item> |
| 82 | + <item> <> </item> |
| 83 | + <item> + </item> |
| 84 | + <item> / </item> |
| 85 | + <item> ] </item> |
| 86 | + <item> } </item> |
| 87 | + <item> ) </item> |
| 88 | + <item> * </item> |
| 89 | + <item> \\ </item> |
| 90 | + </list> |
| 91 | + <list name="functions"> |
| 92 | + <item> ABS </item> |
| 93 | + <item> ACOS </item> |
| 94 | + <item> ASIN </item> |
| 95 | + <item> ATAN </item> |
| 96 | + <item> BLENGTH </item> |
| 97 | + <item> COS </item> |
| 98 | + <item> EXISTS </item> |
| 99 | + <item> EXP </item> |
| 100 | + <item> FORMAT </item> |
| 101 | + <item> HIBOUND </item> |
| 102 | + <item> HIINDEX </item> |
| 103 | + <item> LENGTH </item> |
| 104 | + <item> LOBOUND </item> |
| 105 | + <item> LOINDEX </item> |
| 106 | + <item> LOG </item> |
| 107 | + <item> LOG2 </item> |
| 108 | + <item> LOG10 </item> |
| 109 | + <item> NVL </item> |
| 110 | + <item> ODD </item> |
| 111 | + <item> ROLESOF </item> |
| 112 | + <item> SIN </item> |
| 113 | + <item> SIZEOF </item> |
| 114 | + <item> SQRT </item> |
| 115 | + <item> TAN </item> |
| 116 | + <item> TYPEOF </item> |
| 117 | + <item> USEDIN </item> |
| 118 | + <item> VALUE </item> |
| 119 | + <item> VALUE_IN </item> |
| 120 | + <item> VALUE_UNIQUE </item> |
| 121 | + <item> QUERY </item> |
| 122 | + </list> |
| 123 | + <list name="constants"> |
| 124 | + <item> CONST_E </item> |
| 125 | + <item> PI </item> |
| 126 | + <item> SELF </item> |
| 127 | +<!-- <item> ? </item> --> |
| 128 | + </list> |
| 129 | + <list name="types"> |
| 130 | + <item> binary </item> |
| 131 | + <item> boolean </item> |
| 132 | + <item> integer </item> |
| 133 | + <item> logical </item> |
| 134 | + <item> number </item> |
| 135 | + <item> real </item> |
| 136 | + <item> string </item> |
| 137 | + <item> enumeration </item> |
| 138 | + <item> select </item> |
| 139 | + <item> array </item> |
| 140 | + <item> list </item> |
| 141 | + <item> bag </item> |
| 142 | + <item> set </item> |
| 143 | + <item> generic </item> |
| 144 | + </list> |
| 145 | + <contexts> |
| 146 | + <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> |
| 147 | + <DetectSpaces /> |
| 148 | + <!-- Make code folding work for SCHEMA/END_SCHEMA, TYPE/END_TYPE, etc --> |
| 149 | +<!-- <RegExpr attribute="Block" context="#stay" String="(?:^|[^\w'])(?:SCHEMA|TYPE|ENTITY|FUNCTION|RULE|CONSTANT|IF|LOCAL|REPEAT|BEGIN)" insensitive="false" beginRegion="Blk" firstNonSpace="false" /> --> |
| 150 | +<!-- <RegExpr attribute="Block" context="#stay" String="END_(?:SCHEMA|TYPE|ENTITY|FUNCTION|RULE|CONSTANT|IF|LOCAL|REPEAT)" insensitive="false" endRegion="Blk" firstNonSpace="false" /> --> |
| 151 | +<!-- <RegExpr attribute="Block" context="#stay" String="END(?:[^_]|$)" endRegion="Blk" firstNonSpace="false" /> --> |
| 152 | +<!-- <RegExpr attribute="Block" context="#stay" String="(?:^|[^\w])ELSE(?:$|[^\w])" endRegion="Blk" beginRegion="Blk" firstNonSpace="false" /> --> |
| 153 | + |
| 154 | + <!-- using the lists --> |
| 155 | + <keyword attribute="Keyword" context="#stay" String="keywords"/> |
| 156 | + <keyword attribute="Keyword" context="#stay" String="kw_begin" beginRegion="Blk" firstNonSpace="false"/> |
| 157 | + <keyword attribute="Keyword" context="#stay" String="kw_end_begin" endRegion="Blk" beginRegion="Blk" firstNonSpace="false" /> |
| 158 | + <keyword attribute="Keyword" context="#stay" String="kw_end" endRegion="Blk" firstNonSpace="false"/> |
| 159 | + |
| 160 | + <keyword attribute="Operator" context="#stay" String="operators"/> |
| 161 | + <keyword attribute="Function" context="#stay" String="functions"/> |
| 162 | + <keyword attribute="Constants" context="#stay" String="constants"/> |
| 163 | + <keyword attribute="Data Type" context="#stay" String="types"/> |
| 164 | + |
| 165 | + <keyword attribute="Interface Specification" context="Interface Specification" String="interface_specification" firstNonSpace="true" /> |
| 166 | + |
| 167 | + <DetectIdentifier /> |
| 168 | + <!-- extra data types --> |
| 169 | + <!-- numbers --> |
| 170 | + <HlCHex attribute="Hex" context="#stay"/> |
| 171 | + <Float attribute="Float" context="#stay"/> |
| 172 | + <Int attribute="Decimal" context="#stay"/> |
| 173 | + <!-- strings --> |
| 174 | + <DetectChar attribute="String" context="String" char="'"/> |
| 175 | + <DetectChar attribute="String" context="String2" char="""/> |
| 176 | + <!-- comments --> |
| 177 | + <Detect2Chars attribute="Comment" context="SingleLineComment" char="-" char1="-"/> |
| 178 | + <Detect2Chars attribute="Comment" context="MultiLineComment" char="(" char1="*" beginRegion="Comment"/> |
| 179 | + |
| 180 | + <DetectChar attribute="Constants" context="#stay" char="?"/> |
| 181 | + </context> |
| 182 | + <!-- 'string' --> |
| 183 | + <context name="String" attribute="String" lineEndContext="#stay"> |
| 184 | + <LineContinue attribute="String" context="#pop"/> |
| 185 | + <DetectChar attribute="String" context="#pop" char="'"/> |
| 186 | + </context> |
| 187 | + <!-- "string", extra context needed to enable "str'ing" and 'str"ing' --> |
| 188 | + <context name="String2" attribute="String" lineEndContext="#stay"> |
| 189 | + <LineContinue attribute="String" context="#pop"/> |
| 190 | + <HlCStringChar attribute="String Char" context="#stay"/> |
| 191 | + <DetectChar attribute="String" context="#pop" char="""/> |
| 192 | + </context> |
| 193 | + <!-- comments --> |
| 194 | + <context name="SingleLineComment" attribute="Comment" lineEndContext="#pop"/> |
| 195 | + <context name="MultiLineComment" attribute="Comment" lineEndContext="#stay"> |
| 196 | + <Detect2Chars attribute="Comment" context="#pop" char="*" char1=")" endRegion="Comment" /> |
| 197 | + </context> |
| 198 | + <context name="Interface Specification" attribute="Interface Specification" > |
| 199 | +<!-- lineEndContext="#pop" --> |
| 200 | + <DetectChar attribute="Interface Specification" context="#pop" char=";"/> |
| 201 | + </context> |
| 202 | + </contexts> |
| 203 | + <itemDatas> |
| 204 | + <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> |
| 205 | + <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> |
| 206 | + <itemData name="Block" defStyleNum="dsKeyword" spellChecking="false"/> |
| 207 | + <itemData name="Operator" defStyleNum="dsNormal" spellChecking="false"/> |
| 208 | + <itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/> |
| 209 | + <itemData name="Constants" defStyleNum="dsOthers" spellChecking="false"/> |
| 210 | + <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/> |
| 211 | + <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/> |
| 212 | + <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/> |
| 213 | + <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/> |
| 214 | + <itemData name="String" defStyleNum="dsString"/> |
| 215 | + <itemData name="String Char" defStyleNum="dsChar" spellChecking="false"/> |
| 216 | + <itemData name="Comment" defStyleNum="dsComment"/> |
| 217 | + <itemData name="Interface Specification" defStyleNum="dsOthers" spellChecking="false"/> |
| 218 | + </itemDatas> |
| 219 | + </highlighting> |
| 220 | + <general> |
| 221 | + <comments> |
| 222 | + <comment name="singleLine" start="--"/> |
| 223 | + <comment name="multiLine" start="(*" end="*)"/> |
| 224 | + </comments> |
| 225 | + <keywords casesensitive="0" additionalDeliminator="'" /> |
| 226 | + <!-- weakDeliminator="+-*/|=!<>~^:." --> |
| 227 | + </general> |
| 228 | +</language> |
| 229 | + |
0 commit comments