annotate runtime/syntax/prolog.vim @ 3070:880b7dd69331 v7.3.307

updated for version 7.3.307 Problem: Python 3 doesn't support slice assignment. Solution: Implement slices. (Brett Overesch, Roland Puntaier)
author Bram Moolenaar <bram@vim.org>
date Wed, 14 Sep 2011 15:01:58 +0200
parents 7bc41231fbc7
children 2eb30f341e8d
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>
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1620
diff changeset
4 " Last Change: 2009 Dec 04
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1620
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn region prologCComment start=+/\*+ end=+\*/+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match prologComment +%.*+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword prologKeyword module meta_predicate multifile dynamic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match prologCharCode +0'\\\=.+
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 203
diff changeset
29 syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
73fe8baea242 updated for version 7.2a
vimboss
parents: 203
diff changeset
30 syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
73fe8baea242 updated for version 7.2a
vimboss
parents: 203
diff changeset
31 syn region prologClauseHead start=+^[a-z][^(]*(+ skip=+\.[^ ]+ end=+:-\|\.$\|\.[ ]\|-->+ contains=prologComment,prologCComment,prologString
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword prologKeyword at_end_of_stream float read_term
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword prologKeyword atom_codes get_byte set_input
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword prologKeyword atom_concat get_char set_output
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword prologKeyword atom_length get_code set_prolog_flag
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword prologKeyword compound once write
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
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1620
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 "!"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match prologQuestion "?-.*\." contains=prologNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
203
80000fb16feb updated for version 7.0060
vimboss
parents: 7
diff changeset
75 syn sync maxlines=50
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " 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
81 if version >= 508 || !exists("did_prolog_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 let did_prolog_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 " The default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink prologComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink prologCComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink prologCharCode Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 if exists ("prolog_highlighting_clean")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink prologKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink prologClauseHead Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink prologKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 HiLink prologClauseHead Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 HiLink prologQuestion PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink prologSpecialCharacter Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 HiLink prologNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 HiLink prologAsIs Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 HiLink prologCommentError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 HiLink prologAtom String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 HiLink prologString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 HiLink prologOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 let b:current_syntax = "prolog"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " vim: ts=8