annotate runtime/syntax/prolog.vim @ 18615:c4cdc715cb68

Update runtime files Commit: https://github.com/vim/vim/commit/574ee7bc1246070dba598f9561a2776aa1a10d07 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 13 23:04:29 2019 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Wed, 13 Nov 2019 23:15:04 +0100
parents cc953757ed2a
children e2e2cc5d0856
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: PROLOG
17909
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
3 " Maintainer: Anton Kochkov <anton.kochkov@gmail.com>
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
4 " Last Change: 2019 Aug 29
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " There are two sets of highlighting in here:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " If the "prolog_highlighting_clean" variable exists, it is rather sparse.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Otherwise you get more highlighting.
17909
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
9 "
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
10 " You can also set the "prolog_highlighting_no_keyword" variable. If set,
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
11 " keywords will not be highlighted.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
13 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
14 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Prolog is case sensitive.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Very simple highlighting for comments, clause heads and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " character codes. It respects prolog strings and atoms.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
24 syn region prologCComment start=+/\*+ end=+\*/+
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
25 syn match prologComment +%.*+
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
17909
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
27 if !exists("prolog_highlighting_no_keyword")
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
28 syn keyword prologKeyword module meta_predicate multifile dynamic
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
29 endif
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
30 syn match prologCharCode +0'\\\=.+
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
31 syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
32 syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
33 syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 if !exists("prolog_highlighting_clean")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " some keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " some common predicates are also highlighted as keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " is there a better solution?
17909
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
40 if !exists("prolog_highlighting_no_keyword")
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
41 syn keyword prologKeyword abolish current_output peek_code
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
42 syn keyword prologKeyword append current_predicate put_byte
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
43 syn keyword prologKeyword arg current_prolog_flag put_char
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
44 syn keyword prologKeyword asserta fail put_code
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
45 syn keyword prologKeyword assertz findall read
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
46 syn keyword prologKeyword at_end_of_stream float read_term
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
47 syn keyword prologKeyword atom flush_output repeat
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
48 syn keyword prologKeyword atom_chars functor retract
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
49 syn keyword prologKeyword atom_codes get_byte set_input
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
50 syn keyword prologKeyword atom_concat get_char set_output
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
51 syn keyword prologKeyword atom_length get_code set_prolog_flag
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
52 syn keyword prologKeyword atomic halt set_stream_position
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
53 syn keyword prologKeyword bagof integer setof
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
54 syn keyword prologKeyword call is stream_property
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
55 syn keyword prologKeyword catch nl sub_atom
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
56 syn keyword prologKeyword char_code nonvar throw
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
57 syn keyword prologKeyword char_conversion number true
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
58 syn keyword prologKeyword clause number_chars unify_with_occurs_check
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
59 syn keyword prologKeyword close number_codes var
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
60 syn keyword prologKeyword compound once write
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
61 syn keyword prologKeyword copy_term op write_canonical
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
62 syn keyword prologKeyword current_char_conversion open write_term
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
63 syn keyword prologKeyword current_input peek_byte writeq
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
64 syn keyword prologKeyword current_op peek_char
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
65 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
17909
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
67 syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|=\.\.\|<\|>\|="
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match prologAsIs "===\|\\===\|<=\|=>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
17909
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
70 syn match prologNumber "\<\d*\>'\@!"
cc953757ed2a Runtime files update.
Bram Moolenaar <Bram@vim.org>
parents: 10140
diff changeset
71 syn match prologNumber "\<0[xX]\x*\>'\@!"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match prologCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match prologSpecialCharacter ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match prologSpecialCharacter "!"
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
75 syn match prologSpecialCharacter ":-"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
76 syn match prologSpecialCharacter "-->"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
77 syn match prologQuestion "?-.*\." contains=prologNumber
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
203
80000fb16feb updated for version 7.0060
vimboss
parents: 7
diff changeset
82 syn sync maxlines=50
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
86 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
87
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
88 " The default highlighting.
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link prologComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link prologCComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link prologCharCode Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
93 if exists ("prolog_highlighting_clean")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link prologKeyword Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link prologClauseHead Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link prologClause Normal
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
98
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
99 else
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
101 hi def link prologKeyword Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
102 hi def link prologClauseHead Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
103 hi def link prologClause Normal
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
104 hi def link prologQuestion PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
105 hi def link prologSpecialCharacter Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
106 hi def link prologNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
107 hi def link prologAsIs Normal
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
108 hi def link prologCommentError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
109 hi def link prologAtom String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
110 hi def link prologString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
111 hi def link prologOperator Operator
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
113 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 let b:current_syntax = "prolog"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " vim: ts=8