| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<language name="Modula-2" mimetype="text/x-modula2" version="8" |
| 4 |
kateversion="5.0" section="Sources" priority="5" extensions="*.mod;*.def" |
| 5 |
casesensitive="1" author="B. Kowarsch (trijezdci@github)" license="MIT"> |
| 6 |
<!-- |
| 7 |
***************************************************************************** |
| 8 |
Multi-Dialect Modula-2 syntax highlighting profile for Kate |
| 9 |
|
| 10 |
Copyright (C) 2018 Modula-2 Software Foundation |
| 11 |
|
| 12 |
Licensed under the MIT license <https://opensource.org/licenses/MIT> |
| 13 |
|
| 14 |
This file should be placed in /usr/share.org.kde.syntax-highlighting/syntax/. |
| 15 |
|
| 16 |
1. Dialect Support |
| 17 |
|
| 18 |
This profile covers the following Modula-2 dialects: |
| 19 |
|
| 20 |
(1) PIM Modula-2 (Wirth, 1985) |
| 21 |
(2) ISO Modula-2 (ISO 10514-1) |
| 22 |
(3) Modula-2 R10 (Kowarsch & Sutcliffe, 2010) |
| 23 |
|
| 24 |
The default context recognises reserved words and built-in identifiers that |
| 25 |
are common to all dialects and tags them accordingly for highlighting. |
| 26 |
|
| 27 |
1.2 Dialect Disambiguation |
| 28 |
|
| 29 |
In order to disambiguate dialects, the profile also recognises entities that |
| 30 |
are indicative of a specific dialect, tags them accordingly for highlighting |
| 31 |
and switches the context to the dialect of which the entity is indicative. |
| 32 |
|
| 33 |
However, this approach does NOT prevent mis-identification as it is always |
| 34 |
possible that a user or library defined identifier matches an entity that |
| 35 |
is a reserved word or built-in identifier in another dialect. |
| 36 |
|
| 37 |
It is therefore advisable to place dialect tags into the top of Modula-2 |
| 38 |
source files. |
| 39 |
|
| 40 |
1.3 Dialect Tags |
| 41 |
|
| 42 |
A dialect tag is a specially formatted comment that specifies the dialect in |
| 43 |
use. The profile recognises the following dialect tags: |
| 44 |
|
| 45 |
(*!m2pim*) specifies the PIM dialect |
| 46 |
(*!m2iso*) specifies the ISO dialect |
| 47 |
(*!m2r10*) specifies the R10 dialect |
| 48 |
|
| 49 |
Dialect tags may also include a compiler extension suffix following the |
| 50 |
dialect identifier and preceded by '+' to indicate the use of compiler |
| 51 |
specific language extensions. Such suffixes are recognised but ignored. |
| 52 |
|
| 53 |
Using a dialect tag guarantees that the profile identifies the source file |
| 54 |
correctly. Attention: No whitespace is permitted within a dialect tag. |
| 55 |
|
| 56 |
These dialect tags are also recognised by Emacs, Vim/vi and the Pygments |
| 57 |
source code rendering framework. Support in other editors and frameworks is |
| 58 |
being added over time. |
| 59 |
|
| 60 |
2. Classification |
| 61 |
|
| 62 |
2.1 Reserved Words |
| 63 |
|
| 64 |
In Modula-2 terminology, keywords are called reserved words. Reserved words |
| 65 |
are tagged "Keyword" regardless of their kind or purpose. |
| 66 |
|
| 67 |
2.2 Built-in Identifiers |
| 68 |
|
| 69 |
Modula-2 distinguishes two kinds of built-in identifiers: so called standard |
| 70 |
identifiers, also called pervasive identifiers or simply pervasives; and |
| 71 |
identifiers provided by a built-in module for unsafe facilities, called |
| 72 |
SYSTEM in PIM and ISO Modula-2, and UNSAFE in Modula-2 R10. |
| 73 |
|
| 74 |
Pervasive Identifiers are tagged according to their kind as follows: |
| 75 |
|
| 76 |
(1) Constants are tagged "Const" |
| 77 |
(2) Types are tagged "Type" |
| 78 |
(3) Functions, procedures and macros are tagged "Builtin" |
| 79 |
(4) Identifiers provided by SYSTEM/UNSAFE are tagged "Unsafe" |
| 80 |
|
| 81 |
The tagging of the latter group regardless of kind or purpose follows the |
| 82 |
Modula-2 philosophy of making the use of unsafe facilities explicit and |
| 83 |
easily identifiable within the source code in order to sensitise programmers |
| 84 |
and thereby discourage and minimise their use. |
| 85 |
|
| 86 |
2.3 Numeric Literals |
| 87 |
|
| 88 |
There are three kinds of numeric literals: whole number literals, real |
| 89 |
number literals and character code literals. Numeric literals are tagged |
| 90 |
"Number" regardless of their kind. |
| 91 |
|
| 92 |
2.4 Quoted Literals |
| 93 |
|
| 94 |
There are two ways to quote a character or string: using single quotes, or |
| 95 |
using double quotes. Quoted literals are tagged "String" regardless of |
| 96 |
their type or kind. |
| 97 |
|
| 98 |
2.5 Comments and Pragmas |
| 99 |
|
| 100 |
Dialect tags, although comments, are tagged "DialectTag", any other comments |
| 101 |
are tagged "Comment", and pragmas are tagged "Pragma". |
| 102 |
|
| 103 |
2.6 Any Other Entities |
| 104 |
|
| 105 |
Any other entities are tagged "Plain Source". |
| 106 |
|
| 107 |
3. Rendering Styles |
| 108 |
|
| 109 |
By default, the above tags/attributes are assigned styles as follows: |
| 110 |
|
| 111 |
Keyword => dsKeyword, bold |
| 112 |
Const => dsBuiltin, bold |
| 113 |
Type => dsDataType, bold |
| 114 |
Builtin => dsBuiltin, bold |
| 115 |
Unsafe => dsWarning, bold |
| 116 |
Number => dsDecVal |
| 117 |
String => dsString |
| 118 |
DialectTag => dsComment, bold |
| 119 |
Comment => dsComment, italic |
| 120 |
Pragma => dsPreprocessor, bold |
| 121 |
Plain Source => dsNormal |
| 122 |
|
| 123 |
These styles can be customised in Kate via Settings->Configure Kate... |
| 124 |
***************************************************************************** |
| 125 |
--> |
| 126 |
<highlighting> |
| 127 |
<list name="workaround"> |
| 128 |
<!-- BUG: Kate ignores first entry in first context --> |
| 129 |
<!-- WORKAROUND: Use the name of this dummy list as first entry --> |
| 130 |
<item>???</item> <!-- use '???' in source to test/verify this bug --> |
| 131 |
</list> |
| 132 |
|
| 133 |
<!-- |
| 134 |
============================================================================ |
| 135 |
Common Entities - Lowest Common Denominator |
| 136 |
============================================================================ |
| 137 |
--> |
| 138 |
<!-- Common Reserved Words --> |
| 139 |
<list name="common-keywords"> |
| 140 |
<item>AND</item> |
| 141 |
<item>ARRAY</item> |
| 142 |
<item>BEGIN</item> |
| 143 |
<item>BY</item> |
| 144 |
<item>CASE</item> |
| 145 |
<item>CONST</item> |
| 146 |
<item>DEFINITION</item> |
| 147 |
<item>DIV</item> |
| 148 |
<item>DO</item> |
| 149 |
<item>ELSE</item> |
| 150 |
<item>ELSIF</item> |
| 151 |
<item>END</item> |
| 152 |
<item>EXIT</item> |
| 153 |
<item>FOR</item> |
| 154 |
<item>FROM</item> |
| 155 |
<item>IF</item> |
| 156 |
<item>IMPLEMENTATION</item> |
| 157 |
<item>IMPORT</item> |
| 158 |
<item>IN</item> |
| 159 |
<item>LOOP</item> |
| 160 |
<item>MOD</item> |
| 161 |
<item>MODULE</item> |
| 162 |
<item>NOT</item> |
| 163 |
<item>OF</item> |
| 164 |
<item>OR</item> |
| 165 |
<item>POINTER</item> |
| 166 |
<item>PROCEDURE</item> |
| 167 |
<item>RECORD</item> |
| 168 |
<item>REPEAT</item> |
| 169 |
<item>RETURN</item> |
| 170 |
<item>SET</item> |
| 171 |
<item>THEN</item> |
| 172 |
<item>TO</item> |
| 173 |
<item>TYPE</item> |
| 174 |
<item>UNTIL</item> |
| 175 |
<item>VAR</item> |
| 176 |
<item>WHILE</item> |
| 177 |
</list> |
| 178 |
|
| 179 |
<!-- Common Pervasive Constants --> |
| 180 |
<list name="common-constants"> |
| 181 |
<item>FALSE</item> |
| 182 |
<item>NIL</item> |
| 183 |
<item>TRUE</item> |
| 184 |
</list> |
| 185 |
|
| 186 |
<!-- Common Pervasive Types --> |
| 187 |
<list name="common-types"> |
| 188 |
<item>BOOLEAN</item> |
| 189 |
<item>CARDINAL</item> |
| 190 |
<item>CHAR</item> |
| 191 |
<item>INTEGER</item> |
| 192 |
<item>LONGREAL</item> |
| 193 |
<item>REAL</item> |
| 194 |
</list> |
| 195 |
|
| 196 |
<!-- Common Pervasive Procedures --> |
| 197 |
<list name="common-procedures"> |
| 198 |
<item>ABS</item> |
| 199 |
<item>CHR</item> |
| 200 |
<item>MAX</item> |
| 201 |
<item>MIN</item> |
| 202 |
<item>ODD</item> |
| 203 |
<item>ORD</item> |
| 204 |
</list> |
| 205 |
|
| 206 |
<!-- Common Unsafe Facilities --> |
| 207 |
<list name="common-unsafe"> |
| 208 |
<!-- Types --> |
| 209 |
<item>ADDRESS</item> |
| 210 |
<item>WORD</item> |
| 211 |
<!-- Procedures --> |
| 212 |
<item>ADR</item> |
| 213 |
</list> |
| 214 |
|
| 215 |
<!-- |
| 216 |
============================================================================ |
| 217 |
Dialect Indicative Entities |
| 218 |
============================================================================ |
| 219 |
--> |
| 220 |
<!-- |
| 221 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 222 |
PIM Indicators - Entities indicative of PIM Modula-2 |
| 223 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 224 |
--> |
| 225 |
<!-- There are no reswords, pervasives or builtins indicative of PIM --> |
| 226 |
|
| 227 |
<!-- PIM-only Libraries --> |
| 228 |
<list name="pim-only-libraries"> |
| 229 |
<item>InOut</item> |
| 230 |
<item>MathLib0</item> |
| 231 |
</list> |
| 232 |
|
| 233 |
<!-- |
| 234 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 235 |
ISO Indicators - Entities indicative of ISO Modula-2 |
| 236 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 237 |
--> |
| 238 |
<!-- ISO-only Reserved Words --> |
| 239 |
<list name="iso-only-keywords"> |
| 240 |
<!--NB: FORWARD is not indicative of ISO, |
| 241 |
PIM single-pass compilers also use it.--> |
| 242 |
<item>EXCEPT</item> |
| 243 |
<item>FINALLY</item> |
| 244 |
<item>PACKEDSET</item> |
| 245 |
<item>REM</item> |
| 246 |
<item>RETRY</item> |
| 247 |
</list> |
| 248 |
|
| 249 |
<!-- ISO-only Pervasive Constants --> |
| 250 |
<list name="iso-only-constants"> |
| 251 |
<item>INTERRUPTIBLE</item> |
| 252 |
<item>UNINTERRUPTIBLE</item> |
| 253 |
</list> |
| 254 |
|
| 255 |
<!-- ISO-only Pervasive Types --> |
| 256 |
<list name="iso-only-types"> |
| 257 |
<!--NB: COMPLEX and LONGCOMPLEX are not indicative of ISO, |
| 258 |
they are also part of the R10 standard library.--> |
| 259 |
<item>PROTECTION</item> |
| 260 |
</list> |
| 261 |
|
| 262 |
<!-- ISO-only Pervasive Procedures --> |
| 263 |
<list name="iso-only-procedures"> |
| 264 |
<item>CMPLX</item> |
| 265 |
<item>IM</item> |
| 266 |
<item>LFLOAT</item> |
| 267 |
<item>RE</item> |
| 268 |
</list> |
| 269 |
|
| 270 |
<!-- ISO-only Unsafe Facilities --> |
| 271 |
<list name="iso-only-unsafe"> |
| 272 |
<!-- Constants --> |
| 273 |
<item>BITSPERLOC</item> |
| 274 |
<item>BITSPERWORD</item> |
| 275 |
<!-- Types --> |
| 276 |
<item>LOC</item> |
| 277 |
<!-- Procedures --> |
| 278 |
<item>ADDADR</item> |
| 279 |
<item>DIFADR</item> |
| 280 |
<item>MAKEADR</item> |
| 281 |
<item>ROTATE</item> |
| 282 |
<item>SHIFT</item> |
| 283 |
<item>SUBADR</item> |
| 284 |
</list> |
| 285 |
|
| 286 |
<!-- ISO-only Libraries --> |
| 287 |
<list name="iso-only-libraries"> |
| 288 |
<item>IOConsts</item> |
| 289 |
<item>IOLink</item> |
| 290 |
<item>IOResult</item> |
| 291 |
<item>LongIO</item> |
| 292 |
<item>WholeIO</item> |
| 293 |
<item>RawIO</item> |
| 294 |
<item>SIOResult</item> |
| 295 |
<item>SLongIO</item> |
| 296 |
<item>SWholeIO</item> |
| 297 |
<item>SRealIO</item> |
| 298 |
<item>SRawIO</item> |
| 299 |
<item>ConvTypes</item> |
| 300 |
<item>RealStr</item> |
| 301 |
<item>WholeStr</item> |
| 302 |
<item>WholeConv</item> |
| 303 |
</list> |
| 304 |
|
| 305 |
<!-- |
| 306 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 307 |
R10 Indicators - Entities indicative of Modula-2 R10 |
| 308 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 309 |
--> |
| 310 |
<!-- R10-only Reserved Words --> |
| 311 |
<list name="r10-only-keywords"> |
| 312 |
<item>ALIAS</item> |
| 313 |
<item>ARGLIST</item> |
| 314 |
<item>BLUEPRINT</item> |
| 315 |
<item>COPY</item> |
| 316 |
<item>GENLIB</item> |
| 317 |
<item>OPAQUE</item> |
| 318 |
<item>READ</item> |
| 319 |
<item>REFERENTIAL</item> |
| 320 |
<item>RELEASE</item> |
| 321 |
<item>RETAIN</item> |
| 322 |
<item>WRITE</item> |
| 323 |
<item>YIELD</item> |
| 324 |
</list> |
| 325 |
|
| 326 |
<!-- R10-only Pervasive Types --> |
| 327 |
<list name="r10-only-types"> |
| 328 |
<!--NB: LONGCARD is not indicative of R10, |
| 329 |
some PIM and ISO compilers also use it.--> |
| 330 |
<item>OCTET</item> |
| 331 |
<item>UNICHAR</item> |
| 332 |
</list> |
| 333 |
|
| 334 |
<!-- R10-only Pervasive Procedures --> |
| 335 |
<list name="r10-only-procedures"> |
| 336 |
<item>APPEND</item> |
| 337 |
<item>CAPACITY</item> |
| 338 |
<item>COUNT</item> |
| 339 |
<item>INSERT</item> |
| 340 |
<item>LOG2</item> |
| 341 |
<item>POW2</item> |
| 342 |
<item>PRED</item> |
| 343 |
<item>PTR</item> |
| 344 |
<item>REMOVE</item> |
| 345 |
<item>SGN</item> |
| 346 |
<item>SUCC</item> |
| 347 |
</list> |
| 348 |
|
| 349 |
<!-- R10-only Pervasive Macros --> |
| 350 |
<list name="r10-only-macros"> |
| 351 |
<item>TLIMIT</item> |
| 352 |
<item>TMAX</item> |
| 353 |
<item>TMIN</item> |
| 354 |
</list> |
| 355 |
|
| 356 |
<!-- R10-only Unsafe Facilities --> |
| 357 |
<list name="r10-only-unsafe"> |
| 358 |
<!-- Module --> |
| 359 |
<item>UNSAFE</item> |
| 360 |
<!-- Types --> |
| 361 |
<item>LONGWORD</item> |
| 362 |
<item>OCTETSEQ</item> |
| 363 |
<!-- Procedures --> |
| 364 |
<item>BIT</item> |
| 365 |
<item>BWAND</item> |
| 366 |
<item>BWNOT</item> |
| 367 |
<item>BWOR</item> |
| 368 |
<item>SETBIT</item> |
| 369 |
<item>SHL</item> |
| 370 |
<item>SHR</item> |
| 371 |
</list> |
| 372 |
|
| 373 |
<!-- R10-only Libraries --> |
| 374 |
<list name="r10-only-libraries"> |
| 375 |
<item>PervasiveIO</item> |
| 376 |
<item>UnsafeIO</item> |
| 377 |
</list> |
| 378 |
|
| 379 |
<!-- |
| 380 |
============================================================================ |
| 381 |
Entities for PIM Context |
| 382 |
============================================================================ |
| 383 |
--> |
| 384 |
<!-- All PIM Reserved Words --> |
| 385 |
<list name="pim-keywords"> |
| 386 |
<item>AND</item> |
| 387 |
<item>ARRAY</item> |
| 388 |
<item>BEGIN</item> |
| 389 |
<item>BY</item> |
| 390 |
<item>CASE</item> |
| 391 |
<item>CONST</item> |
| 392 |
<item>DEFINITION</item> |
| 393 |
<item>DIV</item> |
| 394 |
<item>DO</item> |
| 395 |
<item>ELSE</item> |
| 396 |
<item>ELSIF</item> |
| 397 |
<item>END</item> |
| 398 |
<item>EXIT</item> |
| 399 |
<item>EXPORT</item> |
| 400 |
<item>FOR</item> |
| 401 |
<item>FROM</item> |
| 402 |
<item>IF</item> |
| 403 |
<item>IMPLEMENTATION</item> |
| 404 |
<item>IMPORT</item> |
| 405 |
<item>IN</item> |
| 406 |
<item>LOOP</item> |
| 407 |
<item>MOD</item> |
| 408 |
<item>MODULE</item> |
| 409 |
<item>NOT</item> |
| 410 |
<item>OF</item> |
| 411 |
<item>OR</item> |
| 412 |
<item>POINTER</item> |
| 413 |
<item>PROCEDURE</item> |
| 414 |
<item>QUALIFIED</item> |
| 415 |
<item>RECORD</item> |
| 416 |
<item>REPEAT</item> |
| 417 |
<item>RETURN</item> |
| 418 |
<item>SET</item> |
| 419 |
<item>THEN</item> |
| 420 |
<item>TO</item> |
| 421 |
<item>TYPE</item> |
| 422 |
<item>UNTIL</item> |
| 423 |
<item>VAR</item> |
| 424 |
<item>WHILE</item> |
| 425 |
<item>WITH</item> |
| 426 |
</list> |
| 427 |
|
| 428 |
<!-- All PIM Pervasive Constants --> |
| 429 |
<list name="pim-constants"> |
| 430 |
<item>FALSE</item> |
| 431 |
<item>NIL</item> |
| 432 |
<item>TRUE</item> |
| 433 |
</list> |
| 434 |
|
| 435 |
<!-- All PIM Pervasive Types --> |
| 436 |
<list name="pim-types"> |
| 437 |
<item>BOOLEAN</item> |
| 438 |
<item>BITSET</item> |
| 439 |
<item>CARDINAL</item> |
| 440 |
<item>CHAR</item> |
| 441 |
<item>INTEGER</item> |
| 442 |
<item>LONGINT</item> |
| 443 |
<item>LONGREAL</item> |
| 444 |
<item>PROC</item> |
| 445 |
<item>REAL</item> |
| 446 |
</list> |
| 447 |
|
| 448 |
<!-- All PIM Pervasive Procedures --> |
| 449 |
<list name="pim-procedures"> |
| 450 |
<item>ABS</item> |
| 451 |
<item>CAP</item> |
| 452 |
<item>CHR</item> |
| 453 |
<item>DEC</item> |
| 454 |
<item>EXCL</item> |
| 455 |
<item>FLOAT</item> |
| 456 |
<item>HALT</item> |
| 457 |
<item>HIGH</item> |
| 458 |
<item>INC</item> |
| 459 |
<item>INCL</item> |
| 460 |
<item>MAX</item> |
| 461 |
<item>MIN</item> |
| 462 |
<item>ODD</item> |
| 463 |
<item>ORD</item> |
| 464 |
<item>SIZE</item> |
| 465 |
<item>TRUNC</item> |
| 466 |
<item>VAL</item> |
| 467 |
</list> |
| 468 |
|
| 469 |
<!-- All PIM Pervasive Macros and their translations --> |
| 470 |
<list name="pim-macros"> |
| 471 |
<item>NEW</item> |
| 472 |
<!--resolves to--> |
| 473 |
<item>ALLOCATE</item> |
| 474 |
<item>DISPOSE</item> |
| 475 |
<!--resolves to--> |
| 476 |
<item>DEALLOCATE</item> |
| 477 |
</list> |
| 478 |
|
| 479 |
<!-- All PIM Unsafe Facilities --> |
| 480 |
<list name="pim-unsafe"> |
| 481 |
<!-- Module --> |
| 482 |
<item>SYSTEM</item> |
| 483 |
<!-- Types --> |
| 484 |
<item>ADDRESS</item> |
| 485 |
<item>PROCESS</item> |
| 486 |
<item>WORD</item> |
| 487 |
<!-- Procedures --> |
| 488 |
<item>ADR</item> |
| 489 |
<item>NEWPROCESS</item> |
| 490 |
<item>TRANSFER</item> |
| 491 |
<item>TSIZE</item> |
| 492 |
</list> |
| 493 |
|
| 494 |
<!-- |
| 495 |
============================================================================ |
| 496 |
Entities for ISO Context |
| 497 |
============================================================================ |
| 498 |
--> |
| 499 |
<!-- All ISO Reserved Words --> |
| 500 |
<list name="iso-keywords"> |
| 501 |
<item>AND</item> |
| 502 |
<item>ARRAY</item> |
| 503 |
<item>BEGIN</item> |
| 504 |
<item>BY</item> |
| 505 |
<item>CASE</item> |
| 506 |
<item>CONST</item> |
| 507 |
<item>DEFINITION</item> |
| 508 |
<item>DIV</item> |
| 509 |
<item>DO</item> |
| 510 |
<item>ELSE</item> |
| 511 |
<item>ELSIF</item> |
| 512 |
<item>END</item> |
| 513 |
<item>EXIT</item> |
| 514 |
<item>EXCEPT</item> |
| 515 |
<item>EXPORT</item> |
| 516 |
<item>FINALLY</item> |
| 517 |
<item>FOR</item> |
| 518 |
<item>FORWARD</item> |
| 519 |
<item>FROM</item> |
| 520 |
<item>IF</item> |
| 521 |
<item>IMPLEMENTATION</item> |
| 522 |
<item>IMPORT</item> |
| 523 |
<item>IN</item> |
| 524 |
<item>LOOP</item> |
| 525 |
<item>MOD</item> |
| 526 |
<item>MODULE</item> |
| 527 |
<item>NOT</item> |
| 528 |
<item>OF</item> |
| 529 |
<item>OR</item> |
| 530 |
<item>PACKEDSET</item> |
| 531 |
<item>POINTER</item> |
| 532 |
<item>PROCEDURE</item> |
| 533 |
<item>QUALIFIED</item> |
| 534 |
<item>RECORD</item> |
| 535 |
<item>REM</item> |
| 536 |
<item>REPEAT</item> |
| 537 |
<item>RETRY</item> |
| 538 |
<item>RETURN</item> |
| 539 |
<item>SET</item> |
| 540 |
<item>THEN</item> |
| 541 |
<item>TO</item> |
| 542 |
<item>TYPE</item> |
| 543 |
<item>UNTIL</item> |
| 544 |
<item>VAR</item> |
| 545 |
<item>WHILE</item> |
| 546 |
<item>WITH</item> |
| 547 |
</list> |
| 548 |
|
| 549 |
<!-- All ISO Pervasive Constants --> |
| 550 |
<list name="iso-constants"> |
| 551 |
<item>FALSE</item> |
| 552 |
<item>INTERRUPTIBLE</item> |
| 553 |
<item>NIL</item> |
| 554 |
<item>TRUE</item> |
| 555 |
<item>UNINTERRUPTIBLE</item> |
| 556 |
</list> |
| 557 |
|
| 558 |
<!-- All ISO Pervasive Types --> |
| 559 |
<list name="iso-types"> |
| 560 |
<item>BOOLEAN</item> |
| 561 |
<item>BITSET</item> |
| 562 |
<item>CARDINAL</item> |
| 563 |
<item>COMPLEX</item> |
| 564 |
<item>CHAR</item> |
| 565 |
<item>INTEGER</item> |
| 566 |
<item>LONGCOMPLEX</item> |
| 567 |
<item>LONGREAL</item> |
| 568 |
<item>PROC</item> |
| 569 |
<item>PROTECTION</item> |
| 570 |
<item>REAL</item> |
| 571 |
</list> |
| 572 |
|
| 573 |
<!-- All ISO Pervasive Procedures --> |
| 574 |
<list name="iso-procedures"> |
| 575 |
<item>ABS</item> |
| 576 |
<item>CAP</item> |
| 577 |
<item>CHR</item> |
| 578 |
<item>CMPLX</item> |
| 579 |
<item>DEC</item> |
| 580 |
<item>EXCL</item> |
| 581 |
<item>FLOAT</item> |
| 582 |
<item>HALT</item> |
| 583 |
<item>HIGH</item> |
| 584 |
<item>IM</item> |
| 585 |
<item>INC</item> |
| 586 |
<item>INCL</item> |
| 587 |
<item>INT</item> |
| 588 |
<item>LENGTH</item> |
| 589 |
<item>LFLOAT</item> |
| 590 |
<item>MAX</item> |
| 591 |
<item>MIN</item> |
| 592 |
<item>ODD</item> |
| 593 |
<item>ORD</item> |
| 594 |
<item>RE</item> |
| 595 |
<item>SIZE</item> |
| 596 |
<item>TRUNC</item> |
| 597 |
<item>VAL</item> |
| 598 |
</list> |
| 599 |
|
| 600 |
<!-- All ISO Pervasive Macros and teir translations --> |
| 601 |
<list name="iso-macros"> |
| 602 |
<item>NEW</item> |
| 603 |
<!--resolves to--> |
| 604 |
<item>ALLOCATE</item> |
| 605 |
<item>DISPOSE</item> |
| 606 |
<!--resolves to--> |
| 607 |
<item>DEALLOCATE</item> |
| 608 |
</list> |
| 609 |
|
| 610 |
<!-- All ISO Unsafe Facilities --> |
| 611 |
<list name="iso-unsafe"> |
| 612 |
<!-- Module --> |
| 613 |
<item>SYSTEM</item> |
| 614 |
<!-- Constants --> |
| 615 |
<item>BITSPERLOC</item> |
| 616 |
<item>BITSPERWORD</item> |
| 617 |
<!-- Types --> |
| 618 |
<item>ADDRESS</item> |
| 619 |
<item>LOC</item> |
| 620 |
<item>WORD</item> |
| 621 |
<!-- Procedures --> |
| 622 |
<item>ADDADR</item> |
| 623 |
<item>ADR</item> |
| 624 |
<item>CAST</item> |
| 625 |
<item>DIFADR</item> |
| 626 |
<item>MAKEADR</item> |
| 627 |
<item>ROTATE</item> |
| 628 |
<item>SHIFT</item> |
| 629 |
<item>SUBADR</item> |
| 630 |
<item>TSIZE</item> |
| 631 |
</list> |
| 632 |
|
| 633 |
<!-- |
| 634 |
============================================================================ |
| 635 |
Entities for R10 Context |
| 636 |
============================================================================ |
| 637 |
--> |
| 638 |
<!-- All R10 Reserved Words --> |
| 639 |
<list name="r10-keywords"> |
| 640 |
<item>ALIAS</item> |
| 641 |
<item>AND</item> |
| 642 |
<item>ARGLIST</item> |
| 643 |
<item>ARRAY</item> |
| 644 |
<item>BEGIN</item> |
| 645 |
<item>BLUEPRINT</item> |
| 646 |
<item>BY</item> |
| 647 |
<item>CASE</item> |
| 648 |
<item>CONST</item> |
| 649 |
<item>COPY</item> |
| 650 |
<item>DEFINITION</item> |
| 651 |
<item>DIV</item> |
| 652 |
<item>DO</item> |
| 653 |
<item>ELSE</item> |
| 654 |
<item>ELSIF</item> |
| 655 |
<item>END</item> |
| 656 |
<item>EXIT</item> |
| 657 |
<item>FOR</item> |
| 658 |
<item>FROM</item> |
| 659 |
<item>GENLIB</item> |
| 660 |
<item>IF</item> |
| 661 |
<item>IMPLEMENTATION</item> |
| 662 |
<item>IMPORT</item> |
| 663 |
<item>IN</item> |
| 664 |
<item>LOOP</item> |
| 665 |
<item>MOD</item> |
| 666 |
<item>MODULE</item> |
| 667 |
<item>NEW</item> |
| 668 |
<item>NOT</item> |
| 669 |
<item>OF</item> |
| 670 |
<item>OPAQUE</item> |
| 671 |
<item>OR</item> |
| 672 |
<item>POINTER</item> |
| 673 |
<item>PROCEDURE</item> |
| 674 |
<item>READ</item> |
| 675 |
<item>RECORD</item> |
| 676 |
<item>REFERENTIAL</item> |
| 677 |
<item>RELEASE</item> |
| 678 |
<item>REPEAT</item> |
| 679 |
<item>RETAIN</item> |
| 680 |
<item>RETURN</item> |
| 681 |
<item>SET</item> |
| 682 |
<item>THEN</item> |
| 683 |
<item>TO</item> |
| 684 |
<item>TYPE</item> |
| 685 |
<item>UNTIL</item> |
| 686 |
<item>VAR</item> |
| 687 |
<item>WHILE</item> |
| 688 |
<item>WRITE</item> |
| 689 |
<item>YIELD</item> |
| 690 |
</list> |
| 691 |
|
| 692 |
<!-- All R10 Pervasive Constants --> |
| 693 |
<list name="r10-constants"> |
| 694 |
<item>FALSE</item> |
| 695 |
<item>NIL</item> |
| 696 |
<item>TRUE</item> |
| 697 |
</list> |
| 698 |
|
| 699 |
<!-- All R10 Pervasive Types --> |
| 700 |
<list name="r10-types"> |
| 701 |
<item>BOOLEAN</item> |
| 702 |
<item>CARDINAL</item> |
| 703 |
<item>CHAR</item> |
| 704 |
<item>INTEGER</item> |
| 705 |
<item>LONGCARD</item> |
| 706 |
<item>LONGINT</item> |
| 707 |
<item>LONGREAL</item> |
| 708 |
<item>OCTET</item> |
| 709 |
<item>REAL</item> |
| 710 |
<item>UNICHAR</item> |
| 711 |
</list> |
| 712 |
|
| 713 |
<!-- All R10 Pervasive Procedures --> |
| 714 |
<list name="r10-procedures"> |
| 715 |
<item>ABS</item> |
| 716 |
<item>APPEND</item> |
| 717 |
<item>CAPACITY</item> |
| 718 |
<item>CHR</item> |
| 719 |
<item>COUNT</item> |
| 720 |
<item>ENTIER</item> |
| 721 |
<item>INSERT</item> |
| 722 |
<item>LENGTH</item> |
| 723 |
<item>LOG2</item> |
| 724 |
<item>MAX</item> |
| 725 |
<item>MIN</item> |
| 726 |
<item>ODD</item> |
| 727 |
<item>ORD</item> |
| 728 |
<item>POW2</item> |
| 729 |
<item>PRED</item> |
| 730 |
<item>PTR</item> |
| 731 |
<item>REMOVE</item> |
| 732 |
<item>SGN</item> |
| 733 |
<item>SUCC</item> |
| 734 |
</list> |
| 735 |
|
| 736 |
<!-- All R10 Pervasive Macros --> |
| 737 |
<list name="r10-macros"> |
| 738 |
<item>TLIMIT</item> |
| 739 |
<item>TMAX</item> |
| 740 |
<item>TMIN</item> |
| 741 |
<item>TSIZE</item> |
| 742 |
</list> |
| 743 |
|
| 744 |
<!-- All R10 Unsafe Facilities --> |
| 745 |
<list name="r10-unsafe"> |
| 746 |
<!-- Reserved Words --> |
| 747 |
<item>CAST</item> |
| 748 |
<!-- Module --> |
| 749 |
<item>UNSAFE</item> |
| 750 |
<!-- Constants --> |
| 751 |
<item>BitsPerAddress</item> |
| 752 |
<item>BitsPerByte</item> |
| 753 |
<item>BytesPerWord</item> |
| 754 |
<item>BytesPerLongWord</item> |
| 755 |
<!-- Types --> |
| 756 |
<item>ADDRESS</item> |
| 757 |
<item>BYTE</item> |
| 758 |
<item>LONGWORD</item> |
| 759 |
<item>OCTETSEQ</item> |
| 760 |
<item>WORD</item> |
| 761 |
<!-- Procedures --> |
| 762 |
<item>ADD</item> |
| 763 |
<item>ADR</item> |
| 764 |
<item>BIT</item> |
| 765 |
<item>BWAND</item> |
| 766 |
<item>BWNOT</item> |
| 767 |
<item>BWOR</item> |
| 768 |
<item>HALT</item> |
| 769 |
<item>SETBIT</item> |
| 770 |
<item>SHL</item> |
| 771 |
<item>SHR</item> |
| 772 |
<item>SUB</item> |
| 773 |
<!-- Macros --> |
| 774 |
<item>NOP</item> |
| 775 |
</list> |
| 776 |
|
| 777 |
<contexts> |
| 778 |
<!-- |
| 779 |
============================================================================ |
| 780 |
Common Context |
| 781 |
============================================================================ |
| 782 |
This context is selected by default, prior to any dialect disambiguation. |
| 783 |
============================================================================ |
| 784 |
--> |
| 785 |
<context name="Common" attribute="Plain Source" lineEndContext="#stay"> |
| 786 |
<!-- BUG: first entry is ignored, leave Dummy at first position --> |
| 787 |
<keyword attribute="Dummy" context="#stay" String="workaround"/> |
| 788 |
<!-- |
| 789 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 790 |
Dialect tags |
| 791 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 792 |
Occurence selects specified dialect. Compiler extension suffix is ignored. |
| 793 |
|
| 794 |
EBNF: |
| 795 |
|
| 796 |
dialectTag := |
| 797 |
'(*!' dialectIdent ( '+' compilerExtension )? '*)' |
| 798 |
; |
| 799 |
|
| 800 |
dialectIdent := |
| 801 |
'm2pim' | 'm2iso' | 'm2r10' |
| 802 |
; |
| 803 |
|
| 804 |
compilerExtension := |
| 805 |
LowerCaseLetter ( LowerCaseLetter | Digit )* |
| 806 |
; |
| 807 |
|
| 808 |
LowerCaseLetter := 'a' .. 'z'; |
| 809 |
|
| 810 |
Digit := '0' .. '9' ; |
| 811 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 812 |
--> |
| 813 |
<!-- PIM Dialect Tag (*!m2pim*) --> |
| 814 |
<RegExpr attribute="DialectTag" context="PIM" |
| 815 |
String="\(\*\!m2pim(\+[a-z][a-z0-9]*)?\*\)"/> |
| 816 |
|
| 817 |
<!-- ISO Dialect Tag (*!m2iso*) --> |
| 818 |
<RegExpr attribute="DialectTag" context="ISO" |
| 819 |
String="\(\*\!m2iso(\+[a-z][a-z0-9]*)?\*\)"/> |
| 820 |
|
| 821 |
<!-- R10 Dialect Tag (*!m2r10*) --> |
| 822 |
<RegExpr attribute="DialectTag" context="R10" |
| 823 |
String="\(\*\!m2r10(\+[a-z][a-z0-9]*)?\*\)"/> |
| 824 |
<!-- |
| 825 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 826 |
Entities common to all dialects, occurrence does not select any dialect |
| 827 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 828 |
--> |
| 829 |
<!-- Common Reserved Words --> |
| 830 |
<keyword attribute="Keyword" |
| 831 |
context="#stay" String="common-keywords"/> |
| 832 |
|
| 833 |
<!-- Common Pervasive Constants --> |
| 834 |
<keyword attribute="Const" |
| 835 |
context="#stay" String="common-constants"/> |
| 836 |
|
| 837 |
<!-- Common Pervasive Types --> |
| 838 |
<keyword attribute="Const" |
| 839 |
context="#stay" String="common-types"/> |
| 840 |
|
| 841 |
<!-- Common Pervasive Procedures --> |
| 842 |
<keyword attribute="Builtin" |
| 843 |
context="#stay" String="common-procedures"/> |
| 844 |
|
| 845 |
<!-- Common Unsafe Facilities --> |
| 846 |
<keyword attribute="Unsafe" |
| 847 |
context="#stay" String="common-unsafe"/> |
| 848 |
<!-- |
| 849 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 850 |
Entities indicative of a dialect, occurrence selects indicated dialect |
| 851 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 852 |
--> |
| 853 |
<!-- Dialect Indicative Reserved Words --> |
| 854 |
<keyword attribute="Keyword" |
| 855 |
context="ISO" String="iso-only-keywords"/> |
| 856 |
<keyword attribute="Keyword" |
| 857 |
context="R10" String="r10-only-keywords"/> |
| 858 |
|
| 859 |
<!-- Dialect Indicative Constants --> |
| 860 |
<keyword attribute="Const" |
| 861 |
context="ISO" String="iso-only-constants"/> |
| 862 |
|
| 863 |
<!-- Dialect Indicative Types --> |
| 864 |
<keyword attribute="Type" |
| 865 |
context="ISO" String="iso-only-types"/> |
| 866 |
<keyword attribute="Type" |
| 867 |
context="R10" String="r10-only-types"/> |
| 868 |
|
| 869 |
<!-- Dialect Indicative Procedures --> |
| 870 |
<keyword attribute="Builtin" |
| 871 |
context="ISO" String="iso-only-procedures"/> |
| 872 |
<keyword attribute="Builtin" |
| 873 |
context="R10" String="r10-only-procedures"/> |
| 874 |
|
| 875 |
<!-- Dialect Indicative Macros --> |
| 876 |
<keyword attribute="Builtin" |
| 877 |
context="R10" String="r10-only-macros"/> |
| 878 |
|
| 879 |
<!-- Dialect Indicative Unsafe Facilities --> |
| 880 |
<keyword attribute="Unsafe" context="ISO" String="iso-only-unsafe"/> |
| 881 |
<keyword attribute="Unsafe" context="R10" String="r10-only-unsafe"/> |
| 882 |
|
| 883 |
<!-- Dialect Indicative Libraries --> |
| 884 |
<keyword attribute="Plain Source" |
| 885 |
context="PIM" String="pim-only-libraries"/> |
| 886 |
<keyword attribute="Plain Source" |
| 887 |
context="ISO" String="iso-only-libraries"/> |
| 888 |
<keyword attribute="Plain Source" |
| 889 |
context="R10" String="r10-only-libraries"/> |
| 890 |
<!-- |
| 891 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 892 |
Literals common to all dialects, occurrence does not select any dialect |
| 893 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 894 |
--> |
| 895 |
<!-- Real Number Literals --> |
| 896 |
<Float attribute="Number" context="#stay"/> |
| 897 |
|
| 898 |
<!-- Decimal Whole Number Literals --> |
| 899 |
<Int attribute="Number" context="#stay"/> |
| 900 |
|
| 901 |
<!-- Double-Quoted Character and String Literals --> |
| 902 |
<DetectChar attribute="String" context="DoubleQuoted" char="""/> |
| 903 |
|
| 904 |
<!-- Single-Quoted Character and String Literals --> |
| 905 |
<DetectChar attribute="String" context="SingleQuoted" char="'"/> |
| 906 |
|
| 907 |
<!-- Opening Block Comment Delimiter --> |
| 908 |
<Detect2Chars attribute="Comment" context="BlockComment" |
| 909 |
char="(" char1="*" beginRegion="FoldableComment"/> |
| 910 |
</context><!--Common--> |
| 911 |
|
| 912 |
<!-- |
| 913 |
============================================================================ |
| 914 |
PIM Context |
| 915 |
============================================================================ |
| 916 |
This context is selected when either the PIM dialect tag (*!m2pim*) or an |
| 917 |
entity indicative of the PIM dialect is found within the source file. |
| 918 |
============================================================================ |
| 919 |
--> |
| 920 |
<context name="PIM" attribute="Plain Source" lineEndContext="#stay"> |
| 921 |
<!-- Reserved Words --> |
| 922 |
<keyword attribute="Keyword" context="#stay" String="pim-keywords"/> |
| 923 |
|
| 924 |
<!-- Pervasive Constant Identifiers --> |
| 925 |
<keyword attribute="Const" context="#stay" String="pim-constants"/> |
| 926 |
|
| 927 |
<!-- Pervasive Type Identifiers --> |
| 928 |
<keyword attribute="Type" context="#stay" String="pim-types"/> |
| 929 |
|
| 930 |
<!-- Pervasive Procedure Identifiers --> |
| 931 |
<keyword attribute="Builtin" context="#stay" String="pim-procedures"/> |
| 932 |
|
| 933 |
<!-- Pervasive Macro Identifiers and Translations --> |
| 934 |
<keyword attribute="Builtin" context="#stay" String="pim-macros"/> |
| 935 |
|
| 936 |
<!-- Built-in Unsafe Facilities --> |
| 937 |
<keyword attribute="Unsafe" context="#stay" String="pim-unsafe"/> |
| 938 |
|
| 939 |
<!-- Base-16 Whole Number Literals --> |
| 940 |
<!-- Base-8 Whole Number and Character Code Literals --> |
| 941 |
<RegExpr attribute="Number" context="#stay" String="0[0-9A-F]*H|[0-7]+[BC]"/> |
| 942 |
|
| 943 |
<!-- Real Number Literals --> |
| 944 |
<Float attribute="Number" context="#stay"/> |
| 945 |
|
| 946 |
<!-- Decimal Whole Number Literals --> |
| 947 |
<Int attribute="Number" context="#stay"/> |
| 948 |
|
| 949 |
<!-- Double-Quoted Character and String Literals --> |
| 950 |
<DetectChar attribute="String" context="DoubleQuoted" char="""/> |
| 951 |
|
| 952 |
<!-- Single-Quoted Character and String Literals --> |
| 953 |
<DetectChar attribute="String" context="SingleQuoted" char="'"/> |
| 954 |
|
| 955 |
<!-- Opening Pragma Delimiter --> |
| 956 |
<StringDetect attribute="Pragma" context="PIM-Pragma" String="(*$"/> |
| 957 |
|
| 958 |
<!-- Opening Block Comment Delimiter --> |
| 959 |
<Detect2Chars attribute="Comment" context="BlockComment" |
| 960 |
char="(" char1="*" beginRegion="FoldableComment"/> |
| 961 |
</context><!--PIM--> |
| 962 |
|
| 963 |
<!-- |
| 964 |
============================================================================ |
| 965 |
ISO Context |
| 966 |
============================================================================ |
| 967 |
This context is selected when either the ISO dialect tag (*!m2iso*) or an |
| 968 |
entity indicative of the ISO dialect is found within the source file. |
| 969 |
============================================================================ |
| 970 |
--> |
| 971 |
<context name="ISO" attribute="Plain Source" lineEndContext="#stay"> |
| 972 |
<!-- Reserved Words --> |
| 973 |
<keyword attribute="Keyword" context="#stay" String="iso-keywords"/> |
| 974 |
|
| 975 |
<!-- Pervasive Constant Identifiers --> |
| 976 |
<keyword attribute="Const" context="#stay" String="iso-constants"/> |
| 977 |
|
| 978 |
<!-- Pervasive Type Identifiers --> |
| 979 |
<keyword attribute="Type" context="#stay" String="iso-types"/> |
| 980 |
|
| 981 |
<!-- Pervasive Procedure Identifiers --> |
| 982 |
<keyword attribute="Builtin" context="#stay" String="iso-procedures"/> |
| 983 |
|
| 984 |
<!-- Pervasive Macro Identifiers and Translations --> |
| 985 |
<keyword attribute="Builtin" context="#stay" String="iso-macros"/> |
| 986 |
|
| 987 |
<!-- Built-in Unsafe Facilities --> |
| 988 |
<keyword attribute="Unsafe" context="#stay" String="iso-unsafe"/> |
| 989 |
|
| 990 |
<!-- Base-16 Whole Number Literals --> |
| 991 |
<!-- Base-8 Whole Number and Character Code Literals --> |
| 992 |
<RegExpr attribute="Number" context="#stay" String="0[0-9A-F]*H|[0-7]+[BC]"/> |
| 993 |
|
| 994 |
<!-- Real Number Literals --> |
| 995 |
<Float attribute="Number" context="#stay"/> |
| 996 |
|
| 997 |
<!-- Decimal Whole Number Literals --> |
| 998 |
<Int attribute="Number" context="#stay"/> |
| 999 |
|
| 1000 |
<!-- Double-Quoted Character and String Literals --> |
| 1001 |
<DetectChar attribute="String" context="DoubleQuoted" char="""/> |
| 1002 |
|
| 1003 |
<!-- Single-Quoted Character and String Literals --> |
| 1004 |
<DetectChar attribute="String" context="SingleQuoted" char="'"/> |
| 1005 |
|
| 1006 |
<!-- Opening Pragma Delimiter --> |
| 1007 |
<Detect2Chars attribute="Pragma" |
| 1008 |
context="ISO-Pragma" char="<" char1="*"/> |
| 1009 |
|
| 1010 |
<!-- Opening Block Comment Delimiter --> |
| 1011 |
<Detect2Chars attribute="Comment" context="BlockComment" |
| 1012 |
char="(" char1="*" beginRegion="FoldableComment"/> |
| 1013 |
</context><!--ISO--> |
| 1014 |
|
| 1015 |
<!-- |
| 1016 |
============================================================================ |
| 1017 |
R10 Context |
| 1018 |
============================================================================ |
| 1019 |
This context is selected when either the R10 dialect tag (*!m2r10*) or an |
| 1020 |
entity indicative of the R10 dialect is found within the source file. |
| 1021 |
============================================================================ |
| 1022 |
--> |
| 1023 |
<context name="R10" attribute="Plain Source" lineEndContext="#stay"> |
| 1024 |
<!-- Reserved Words --> |
| 1025 |
<keyword attribute="Keyword" context="#stay" String="r10-keywords"/> |
| 1026 |
|
| 1027 |
<!-- Built-in Constant Identifiers --> |
| 1028 |
<keyword attribute="Const" context="#stay" String="r10-constants"/> |
| 1029 |
|
| 1030 |
<!-- Built-in Type Identifiers --> |
| 1031 |
<keyword attribute="Type" context="#stay" String="r10-types"/> |
| 1032 |
|
| 1033 |
<!-- Built-in Procedure Identifiers --> |
| 1034 |
<keyword attribute="Builtin" context="#stay" String="r10-procedures"/> |
| 1035 |
|
| 1036 |
<!-- Built-in Macro Identifiers and Translations --> |
| 1037 |
<keyword attribute="Builtin" context="#stay" String="r10-macros"/> |
| 1038 |
|
| 1039 |
<!-- Facilities from Built-in Module UNSAFE --> |
| 1040 |
<keyword attribute="Unsafe" context="#stay" String="r10-unsafe"/> |
| 1041 |
|
| 1042 |
<!-- Base-2 Whole Number Literals --> |
| 1043 |
<!-- Base-16 Whole Number and Character Code Literals --> |
| 1044 |
<RegExpr attribute="Number" context="#stay" |
| 1045 |
String="0b([01]+('[01]+)?)+|0[ux]([0-9A-F]+('[0-9A-F]+)?)+"/> |
| 1046 |
|
| 1047 |
<!-- Real Number Literals --> |
| 1048 |
<Float attribute="Number" context="#stay"/> |
| 1049 |
|
| 1050 |
<!-- Decimal Whole Number Literals --> |
| 1051 |
<RegExpr attribute="Number" context="#stay" |
| 1052 |
String="([1-9][0-9]*('[0-9]+)*)|0"/> |
| 1053 |
|
| 1054 |
<!-- Double-Quoted Character and String Literals --> |
| 1055 |
<DetectChar attribute="String" context="DoubleQuoted" char="""/> |
| 1056 |
|
| 1057 |
<!-- Single-Quoted Character and String Literals --> |
| 1058 |
<DetectChar attribute="String" context="SingleQuoted" char="'"/> |
| 1059 |
|
| 1060 |
<!-- Opening Pragma Delimiter --> |
| 1061 |
<Detect2Chars attribute="Pragma" |
| 1062 |
context="ISO-Pragma" char="<" char1="*"/> |
| 1063 |
|
| 1064 |
<!-- Line Comment --> |
| 1065 |
<DetectChar attribute ="Comment" context="LineComment" char="!"/> |
| 1066 |
|
| 1067 |
<!-- Opening Block Comment Delimiter --> |
| 1068 |
<Detect2Chars attribute="Comment" context="BlockComment" |
| 1069 |
char="(" char1="*" beginRegion="FoldableComment"/> |
| 1070 |
</context><!--R10--> |
| 1071 |
|
| 1072 |
<!-- |
| 1073 |
============================================================================ |
| 1074 |
Sub-Contexts |
| 1075 |
============================================================================ |
| 1076 |
These contexts are used to process entities that are recognised by their |
| 1077 |
opening delimiters, such as quoted literals, pragmas and comments. |
| 1078 |
============================================================================ |
| 1079 |
--> |
| 1080 |
<!-- Double-Quoted Literal --> |
| 1081 |
<context name="DoubleQuoted" attribute="String" lineEndContext="#pop"> |
| 1082 |
<!-- Closing Delimiter --> |
| 1083 |
<DetectChar attribute="String" context="#pop" char="""/> |
| 1084 |
</context> |
| 1085 |
|
| 1086 |
<!-- Single-Quoted Literal --> |
| 1087 |
<context name="SingleQuoted" attribute="String" lineEndContext="#pop"> |
| 1088 |
<!-- CLosing Delimiter --> |
| 1089 |
<DetectChar attribute="String" context="#pop" char="'" /> |
| 1090 |
</context> |
| 1091 |
|
| 1092 |
<!-- PIM Pragma Body --> |
| 1093 |
<context name="PIM-Pragma" attribute="Pragma" lineEndContext="#stay"> |
| 1094 |
<!-- Closing Delimiter --> |
| 1095 |
<Detect2Chars attribute="Pragma" context="#pop" char="*" char1=")"/> |
| 1096 |
</context> |
| 1097 |
|
| 1098 |
<!-- ISO Pragma Body --> |
| 1099 |
<context name="ISO-Pragma" attribute="Pragma" lineEndContext="#stay"> |
| 1100 |
<!-- Closing Delimiter --> |
| 1101 |
<Detect2Chars attribute="Pragma" |
| 1102 |
context="#pop" char="*" char1=">"/> |
| 1103 |
</context> |
| 1104 |
|
| 1105 |
<!-- Line Comment Body --> |
| 1106 |
<context name="LineComment" attribute="Comment" lineEndContext="#pop"> |
| 1107 |
<DetectSpaces /> |
| 1108 |
<IncludeRules context="##Comments"/> |
| 1109 |
</context> |
| 1110 |
|
| 1111 |
<!-- Block Comment Body --> |
| 1112 |
<context name="BlockComment" attribute="Comment" lineEndContext="#stay"> |
| 1113 |
<!-- Opening Delimiter of Nested Comment --> |
| 1114 |
<Detect2Chars attribute="Comment" context="BlockComment" |
| 1115 |
char="(" char1="*" beginRegion="FoldableComment"/> |
| 1116 |
<!-- Closing Delimiter --> |
| 1117 |
<Detect2Chars attribute="Comment" context="#pop" |
| 1118 |
char="*" char1=")" endRegion="FoldableComment"/> |
| 1119 |
|
| 1120 |
<DetectSpaces /> |
| 1121 |
<IncludeRules context="##Comments"/> |
| 1122 |
</context> |
| 1123 |
</contexts> |
| 1124 |
|
| 1125 |
<!-- |
| 1126 |
============================================================================ |
| 1127 |
Rendering Styles |
| 1128 |
============================================================================ |
| 1129 |
--> |
| 1130 |
<itemDatas> |
| 1131 |
<!-- Style for Plain Source Text --> |
| 1132 |
<itemData name="Plain Source" |
| 1133 |
defStyleNum="dsNormal" bold="0" italic="0"/> |
| 1134 |
|
| 1135 |
<!-- Style for Reserved Words --> |
| 1136 |
<itemData name="Keyword" |
| 1137 |
defStyleNum="dsKeyword" bold="1" italic="0"/> |
| 1138 |
|
| 1139 |
<!-- Style for Pervasive Constant Identifiers --> |
| 1140 |
<itemData name="Const" |
| 1141 |
defStyleNum="dsBuiltIn" bold="1" italic="0"/> |
| 1142 |
|
| 1143 |
<!-- Style for Pervasive Type Identifiers --> |
| 1144 |
<itemData name="Type" |
| 1145 |
defStyleNum="dsDataType" bold="1" italic="0"/> |
| 1146 |
|
| 1147 |
<!-- Style for Pervasive Procedure Identifiers --> |
| 1148 |
<itemData name="Builtin" |
| 1149 |
defStyleNum="dsBuiltIn" bold="1" italic="0"/> |
| 1150 |
|
| 1151 |
<!-- Style for Unsafe Facilities --> |
| 1152 |
<itemData name="Unsafe" |
| 1153 |
defStyleNum="dsWarning" bold="1" italic="0"/> |
| 1154 |
|
| 1155 |
<!-- Style for Number Literals --> |
| 1156 |
<itemData name="Number" |
| 1157 |
defStyleNum="dsDecVal" bold="0" italic="0"/> |
| 1158 |
|
| 1159 |
<!-- Style for Quoted Literals --> |
| 1160 |
<itemData name="String" |
| 1161 |
defStyleNum="dsString" bold="0" italic="0"/> |
| 1162 |
|
| 1163 |
<!-- Style for Dialect Tags --> |
| 1164 |
<itemData name="DialectTag" |
| 1165 |
defStyleNum="dsComment" bold="1" italic="0"/> |
| 1166 |
|
| 1167 |
<!-- Style for Pragmas --> |
| 1168 |
<itemData name="Pragma" |
| 1169 |
defStyleNum="dsPreprocessor" bold="1" italic="0"/> |
| 1170 |
|
| 1171 |
<!-- Style for Comments --> |
| 1172 |
<itemData name="Comment" |
| 1173 |
defStyleNum="dsComment" bold="0" italic="1"/> |
| 1174 |
|
| 1175 |
<!-- Dummy style for testing --> |
| 1176 |
<itemData name="Dummy" defStyleNum="dsError"/> |
| 1177 |
</itemDatas> |
| 1178 |
</highlighting> |
| 1179 |
|
| 1180 |
<general> |
| 1181 |
<keywords casesensitive="1" /> |
| 1182 |
<comments> |
| 1183 |
<comment name="multiLine" start="(*" end="*)" region="FoldableComment"/> |
| 1184 |
</comments> |
| 1185 |
</general> |
| 1186 |
</language> |
| 1187 |
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; --> |
| 1188 |
<!--EOF--> |