annotate runtime/syntax/gvpr.vim @ 33080:51b4577d57bf

Added tag v9.0.1826 for changeset 5f201b734cb7b114a411a339a895d25ebecf7262
author Christian Brabandt <cb@256bit.org>
date Wed, 30 Aug 2023 19:45:05 +0200
parents fd37be6dc258
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24911
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Graphviz program
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com>
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: Tue, 28 Jul 2020 17:20:44 -0700
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 if exists("b:current_syntax")
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 finish
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 endif
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 let s:cpo_save = &cpo
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 set cpo&vim
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 syn keyword gvArg ARGC ARGV
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 syn keyword gvBeg BEGIN BEG_G N E END END_G
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 syn keyword gvFunc
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 \ graph fstsubg isDirect isStrict isSubg nEdges nNodes nxtsubg subg
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 \ degreeOf fstnode indegreeOf isNode isSubnode node nxtnode nxtnode_sg
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 \ outDegreeOf subnode
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 \ edge edge_sg fstedge fstedge_sg fstin fstin_sg fstout fstout_sg isEdge
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 \ isEdge_sg isSubedge nxtedge nxtedge_sg nxtin nxtin_sg nxtout nxtout_sg opp
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 \ subedge
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \ freadG fwriteG readG write[] writeG
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 \ aget aset clone cloneG compOf copy[] copyA delete[] fstAttr getDflt hasAttr
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 \ induce isAttr isIn kindOf lock[] nxtAttr setDflt
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 \ canon gsub html index ishtml length llOf match[] rindex split[] sprintf
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 \ sscanf strcmp sub substr tokens tolower toupper urOf xOf yOf
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \ closeF openF print[] printf scanf readL
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 \ atan2 cos exp log MAX MIN pow sin[] sqrt
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 \ in[] unset
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 \ colorx exit[] rand srand system
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn keyword gvCons
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 \ NULL TV_bfs TV_dfs TV_en TV_flat TV_fwd TV_ne TV_prepostdfs TV_prepostfwd
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 \ TV_prepostrev TV_postdfs TV_postfwd tv_postrev TV_rev
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn keyword gvType char double float int long unsigned void
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 \ string
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 \ edge_t graph_t node_t obj_t
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn match gvVar
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 \ "\$\(\(F\|G\|NG\|O\|T\|tgtname\|tvedge\|tvnext\|tvroot\|tvtype\)\>\)\?\(\<\)\@!"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn keyword gvWord break continue else for forr if return switch while
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 " numbers adapted from c.vim's cNumbers and friends
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 syn match gvNums transparent "\<\d\|\.\d" contains=gvNumber,gvFloat,gvOctal
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 syn match gvNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 syn match gvNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 syn match gvOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=gvOctalZero
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 syn match gvOctalZero contained "\<0"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 syn match gvFloat contained "\d\+f"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 syn match gvFloat contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 syn match gvFloat contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 syn match gvFloat contained "\d\+e[-+]\=\d\+[fl]\=\>"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 syn region gvString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gvFormat,gvSpecial extend
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 syn region gvString start="'" skip="\\\\\|\\'" end="'" contains=gvFormat,gvSpecial extend
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 " adapted from c.vim's cFormat for c_no_c99
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 syn match gvFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 syn match gvSpecial "\\." contained
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 syn region gvCComment start="//" skip="\\$" end="$" keepend
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 syn region gvCPPComment start="#" skip="\\$" end="$" keepend
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 syn region gvCXXComment start="/\*" end="\*/" fold
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 hi def link gvArg Identifier
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 hi def link gvBeg Keyword
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 hi def link gvFloat Number
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 hi def link gvFunc Identifier
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 hi def link gvCons Number
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 hi def link gvNumber Number
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 hi def link gvType Type
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 hi def link gvVar Statement
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 hi def link gvWord Keyword
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 hi def link gvString String
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 hi def link gvFormat Special
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 hi def link gvSpecial Special
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 hi def link gvCComment Comment
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 hi def link gvCPPComment Comment
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 hi def link gvCXXComment Comment
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 let b:current_syntax = "gvpr"
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 let &cpo = s:cpo_save
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 unlet s:cpo_save