annotate runtime/syntax/gp.vim @ 32955:2cbc8ebb8de5

runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884) Commit: https://github.com/vim/vim/commit/c6d533b0ad565a610a48386b0ad72cc591010fcb Author: Karim Belabas <Karim.belabas@math.u-bordeaux.fr> Date: Tue Aug 22 20:25:06 2023 +0200 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (https://github.com/vim/vim/issues/12884) - add missing defaults - add missing control structures (incl. parallelism) - add missing scope declarations - whitespace edits (remove extra tabs)
author Christian Brabandt <cb@256bit.org>
date Tue, 22 Aug 2023 20:30:04 +0200
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
2 " Language: gp (version 2.15)
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
4 " Last change: 2023 Aug 22
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
5 " URL: http://pari.math.u-bordeaux.fr
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3281
diff changeset
7 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3281
diff changeset
8 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
12 let s:cpo_save = &cpo
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
13 set cpo&vim
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
14
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
15 " control statements
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax keyword gpStatement break return next
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
17 syntax keyword gpConditional if iferr
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
18 syntax keyword gpRepeat until while for forcomposite fordiv
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
19 syntax keyword gpRepeat fordivfactored foreach forell forfactored
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
20 syntax keyword gpRepeat forpart forperm forprime forprimestep forqfvec
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
21 syntax keyword gpRepeat forsquarefree forstep forsubgroup forsubset
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
22 syntax keyword gpRepeat forvec
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
23 syntax keyword gpRepeat parfor parforeach parforprime parforprimestep
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
24 syntax keyword gpRepeat parforvec
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
25 " storage class
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
26 syntax keyword gpScope my local global export exportall
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
27 " defaults
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
28 syntax keyword gpInterfaceKey breakloop colors compatible
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
29 syntax keyword gpInterfaceKey datadir debug debugfiles debugmem
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
30 syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
31 syntax keyword gpInterfaceKey graphcolormap graphcolors
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
32 syntax keyword gpInterfaceKey help histfile histsize
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
33 syntax keyword gpInterfaceKey lines linewrap log logfile nbthreads
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
34 syntax keyword gpInterfaceKey new_galois_format output parisize parisizemax
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
35 syntax keyword gpInterfaceKey path plothsizes prettyprinter primelimit prompt
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
36 syntax keyword gpInterfaceKey prompt_cont psfile readline realbitprecision
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
37 syntax keyword gpInterfaceKey realprecision recover secure seriesprecision
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
38 syntax keyword gpInterfaceKey simplify sopath strictmatch TeXstyle
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
39 syntax keyword gpInterfaceKey threadsize threadsizemax timer
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
41 syntax match gpInterface "^\s*\\[a-z].*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syntax keyword gpInterface default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syntax keyword gpInput read input
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " String and Character constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " Highlight special (backslash'ed) characters differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syntax match gpSpecial contained "\\[ent\\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 "comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syntax region gpComment start="/\*" end="\*/" contains=gpTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syntax match gpComment "\\\\.*" contains=gpTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syntax keyword gpTodo contained TODO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syntax sync ccomment gpComment minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 "catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syntax match gpParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syntax match gpInParen contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
67 hi def link gpConditional Conditional
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
68 hi def link gpRepeat Repeat
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
69 hi def link gpError Error
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
70 hi def link gpParenError gpError
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
71 hi def link gpInParen gpError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
72 hi def link gpStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
73 hi def link gpString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
74 hi def link gpComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
75 hi def link gpInterface Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
76 hi def link gpInput Type
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
77 hi def link gpInterfaceKey Statement
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
78 hi def link gpFunction Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
79 hi def link gpScope Type
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3281
diff changeset
80 " contained ones
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
81 hi def link gpSpecial Special
32955
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
82 hi def link gpTodo Todo
2cbc8ebb8de5 runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
83 hi def link gpArgs Type
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 let b:current_syntax = "gp"
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
86 let &cpo = s:cpo_save
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1619
diff changeset
87 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " vim: ts=8