annotate runtime/syntax/prolog.vim @ 9856:12c5c2614432 v7.4.2203

commit https://github.com/vim/vim/commit/ebcccad573a7722e16cf2dd435cc62b61f61d9cc Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 12 19:17:13 2016 +0200 patch 7.4.2203 Problem: Test fails with normal features. Solution: Check is signs are supported.
author Christian Brabandt <cb@256bit.org>
date Fri, 12 Aug 2016 19:30:06 +0200
parents 2eb30f341e8d
children 43efa4f5a8ea
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
203
80000fb16feb updated for version 7.0060
vimboss
parents: 7
diff changeset
3 " Maintainers: Thomas Koehler <jean-luc@picard.franken.de>
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " Last Change: 2013 May 23
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
5 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " There are two sets of highlighting in here:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " If the "prolog_highlighting_clean" variable exists, it is rather sparse.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Otherwise you get more highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
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
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
27 syn keyword prologKeyword module meta_predicate multifile dynamic
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28 syn match prologCharCode +0'\\\=.+
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
29 syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
30 syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
31 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
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 if !exists("prolog_highlighting_clean")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " some keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " some common predicates are also highlighted as keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " is there a better solution?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword prologKeyword abolish current_output peek_code
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword prologKeyword append current_predicate put_byte
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword prologKeyword arg current_prolog_flag put_char
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword prologKeyword asserta fail put_code
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword prologKeyword assertz findall read
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
43 syn keyword prologKeyword at_end_of_stream float read_term
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword prologKeyword atom flush_output repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword prologKeyword atom_chars functor retract
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
46 syn keyword prologKeyword atom_codes get_byte set_input
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
47 syn keyword prologKeyword atom_concat get_char set_output
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
48 syn keyword prologKeyword atom_length get_code set_prolog_flag
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword prologKeyword atomic halt set_stream_position
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword prologKeyword bagof integer setof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword prologKeyword call is stream_property
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword prologKeyword catch nl sub_atom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword prologKeyword char_code nonvar throw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword prologKeyword char_conversion number true
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword prologKeyword clause number_chars unify_with_occurs_check
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword prologKeyword close number_codes var
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
57 syn keyword prologKeyword compound once write
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword prologKeyword copy_term op write_canonical
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword prologKeyword current_char_conversion open write_term
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword prologKeyword current_input peek_byte writeq
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword prologKeyword current_op peek_char
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match prologAsIs "===\|\\===\|<=\|=>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
66 syn match prologNumber "\<[0123456789]*\>'\@!"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match prologCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match prologSpecialCharacter ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match prologSpecialCharacter "!"
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
70 syn match prologSpecialCharacter ":-"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
71 syn match prologSpecialCharacter "-->"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
72 syn match prologQuestion "?-.*\." contains=prologNumber
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
203
80000fb16feb updated for version 7.0060
vimboss
parents: 7
diff changeset
77 syn sync maxlines=50
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 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 if version >= 508 || !exists("did_prolog_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 let did_prolog_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " The default highlighting.
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
92 HiLink prologComment Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
93 HiLink prologCComment Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
94 HiLink prologCharCode Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 if exists ("prolog_highlighting_clean")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
98 HiLink prologKeyword Statement
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
99 HiLink prologClauseHead Statement
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
100 HiLink prologClause Normal
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
104 HiLink prologKeyword Keyword
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
105 HiLink prologClauseHead Constant
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
106 HiLink prologClause Normal
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
107 HiLink prologQuestion PreProc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 HiLink prologSpecialCharacter Special
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
109 HiLink prologNumber Number
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
110 HiLink prologAsIs Normal
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
111 HiLink prologCommentError Error
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
112 HiLink prologAtom String
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
113 HiLink prologString String
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
114 HiLink prologOperator Operator
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 let b:current_syntax = "prolog"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " vim: ts=8