annotate runtime/syntax/jovial.vim @ 32454:db97ccaaa7c8 v9.0.1558

patch 9.0.1558: wrong error for unreachable code after :throw Commit: https://github.com/vim/vim/commit/a2c0028fdf8dcf0408e27be730ac0e691ef9559b Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 14 22:05:15 2023 +0100 patch 9.0.1558: wrong error for unreachable code after :throw Problem: Wrong error for unreachable code after :throw. Solution: Adjust the error message.
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 May 2023 23:15:03 +0200
parents fd09a9c8468e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: JOVIAL J73
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Version: 1.2
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Maintainer: Paul McGinnis <paulmcg@aol.com>
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 " Last Change: 2011/06/17
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " Remark: Based on MIL-STD-1589C for JOVIAL J73 language
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 " Quit when a (custom) syntax file was already loaded
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 if exists("b:current_syntax")
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 finish
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 endif
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 syn case ignore
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 syn keyword jovialTodo TODO FIXME XXX contained
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 " JOVIAL beads - first digit is number of bits, [0-9A-V] is the bit value
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 " representing 0-31 (for 5 bits on the bead)
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn match jovialBitConstant "[1-5]B'[0-9A-V]'"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 syn match jovialNumber "\<\d\+\>"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 syn match jovialFloat "\d\+E[-+]\=\d\+"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 syn match jovialFloat "\d\+\.\d*\(E[-+]\=\d\+\)\="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 syn match jovialFloat "\.\d\+\(E[-+]\=\d\+\)\="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 syn region jovialComment start=/"/ end=/"/ contains=jovialTodo
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn region jovialComment start=/%/ end=/%/ contains=jovialTodo
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 " JOVIAL variable names. This rule is to prevent conflicts with strings.
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 " Handle special case where ' character can be part of a JOVIAL variable name.
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 syn match jovialIdentifier "[A-Z\$][A-Z0-9'\$]\+"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 syn region jovialString start="\s*'" skip=/''/ end=/'/ oneline
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 " JOVIAL compiler directives -- see Section 9 in MIL-STD-1589C
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 syn region jovialPreProc start="\s*![A-Z]\+" end=/;/
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 syn keyword jovialOperator AND OR NOT XOR EQV MOD
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 " See Section 2.1 in MIL-STD-1589C for data types
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syn keyword jovialType ITEM B C P V
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 syn match jovialType "\<S\(,R\|,T\|,Z\)\=\>"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn match jovialType "\<U\(,R\|,T\|,Z\)\=\>"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 syn match jovialType "\<F\(,R\|,T\|,Z\)\=\>"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn match jovialType "\<A\(,R\|,T\|,Z\)\=\>"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 syn keyword jovialStorageClass STATIC CONSTANT PARALLEL BLOCK N M D W
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 syn keyword jovialStructure TABLE STATUS
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 syn keyword jovialConstant NULL
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 syn keyword jovialBoolean FALSE TRUE
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 syn keyword jovialTypedef TYPE
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 syn keyword jovialStatement ABORT BEGIN BY BYREF BYRES BYVAL CASE COMPOOL
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 syn keyword jovialStatement DEF DEFAULT DEFINE ELSE END EXIT FALLTHRU FOR
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 syn keyword jovialStatement GOTO IF INLINE INSTANCE LABEL LIKE OVERLAY POS
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 syn keyword jovialStatement PROC PROGRAM REC REF RENT REP RETURN START STOP
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 syn keyword jovialStatement TERM THEN WHILE
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 " JOVIAL extensions, see section 8.2.2 in MIL-STD-1589C
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 syn keyword jovialStatement CONDITION ENCAPSULATION EXPORTS FREE HANDLER IN INTERRUPT NEW
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 syn keyword jovialStatement PROTECTED READONLY REGISTER SIGNAL TO UPDATE WITH WRITEONLY ZONE
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 " implementation specific constants and functions, see section 1.4 in MIL-STD-1589C
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 syn keyword jovialConstant BITSINBYTE BITSINWORD LOCSINWORD
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 syn keyword jovialConstant BYTESINWORD BITSINPOINTER INTPRECISION
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 syn keyword jovialConstant FLOATPRECISION FIXEDPRECISION FLOATRADIX
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 syn keyword jovialConstant MAXFLOATPRECISION MAXFIXEDPRECISION
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 syn keyword jovialConstant MAXINTSIZE MAXBYTES MAXBITS
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 syn keyword jovialConstant MAXTABLESIZE MAXSTOP MINSTOP MAXSIGDIGITS
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 syn keyword jovialFunction BYTEPOS MAXINT MININT
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 syn keyword jovialFunction IMPLFLOATPRECISION IMPLFIXEDPRECISION IMPLINTSIZE
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 syn keyword jovialFunction MINSIZE MINFRACTION MINSCALE MINRELPRECISION
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 syn keyword jovialFunction MAXFLOAT MINFLOAT FLOATRELPRECISION
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 syn keyword jovialFunction FLOATUNDERFLOW MAXFIXED MINFIXED
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 " JOVIAL built-in functions
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 syn keyword jovialFunction LOC NEXT BIT BYTE SHIFTL SHIFTR ABS SGN BITSIZE
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 syn keyword jovialFunction BYTESIZE WORDSIZE LBOUND UBOUND NWDSEN FIRST
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 syn keyword jovialFunction LAST NENT
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 " Define the default highlighting.
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 hi def link jovialBitConstant Number
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 hi def link jovialBoolean Boolean
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 hi def link jovialComment Comment
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 hi def link jovialConstant Constant
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 hi def link jovialFloat Float
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 hi def link jovialFunction Function
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 " No color highlighting for JOVIAL identifiers. See above,
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 " this is to prevent confusion with JOVIAL strings
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 "hi def link jovialIdentifier Identifier
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 hi def link jovialNumber Number
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 hi def link jovialOperator Operator
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 hi def link jovialPreProc PreProc
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 hi def link jovialStatement Statement
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 hi def link jovialStorageClass StorageClass
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 hi def link jovialString String
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 hi def link jovialStructure Structure
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 hi def link jovialTodo Todo
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 hi def link jovialType Type
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 hi def link jovialTypedef Typedef
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 let b:current_syntax = "jovial"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 " vim: ts=8