annotate runtime/syntax/lprolog.vim @ 1624:18ee39301b82 v7.2a

updated for version 7.2a
author vimboss
date Tue, 24 Jun 2008 22:58:06 +0000
parents d6a69271cb9a
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: LambdaProlog (Teyjus)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Filenames: *.mod *.sig
659
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
4 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
5 " URL: http://www.ocaml.info/vim/syntax/lprolog.vim
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
6 " Last Change: 2006 Feb 05
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 7
diff changeset
7 " 2001 Apr 26 - Upgraded for new Vim version
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 7
diff changeset
8 " 2000 Jun 5 - Initial release
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 6.x: 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 " Lambda 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 syn match lprologBrackErr "\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match lprologParenErr ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn cluster lprologContained contains=lprologTodo,lprologModuleName,lprologTypeNames,lprologTypeName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Enclosing delimiters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region lprologEncl transparent matchgroup=lprologKeyword start="(" matchgroup=lprologKeyword end=")" contains=ALLBUT,@lprologContained,lprologParenErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region lprologEncl transparent matchgroup=lprologKeyword start="\[" matchgroup=lprologKeyword end="\]" contains=ALLBUT,@lprologContained,lprologBrackErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " General identifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match lprologIdentifier "\<\(\w\|[-+*/\\^<>=`'~?@#$&!_]\)*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match lprologVariable "\<\(\u\|_\)\(\w\|[-+*/\\^<>=`'~?@#$&!]\)*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match lprologOperator "/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region lprologComment start="/\*" end="\*/" contains=lprologComment,lprologTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region lprologComment start="%" end="$" contains=lprologTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword lprologTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match lprologInteger "\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match lprologReal "\<\(\d\+\)\=\.\d+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region lprologString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Clause definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region lprologClause start="^\w\+" end=":-\|\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Modules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn region lprologModule matchgroup=lprologKeyword start="^\<module\>" matchgroup=lprologKeyword end="\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match lprologKeyword "^\<type\>" skipwhite nextgroup=lprologTypeNames
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn region lprologTypeNames matchgroup=lprologBraceErr start="\<\w\+\>" matchgroup=lprologKeyword end="\." contained contains=lprologTypeName,lprologOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match lprologTypeName "\<\w\+\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword lprologKeyword end import accumulate accum_sig
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword lprologKeyword local localkind closed sig
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword lprologKeyword kind exportdef useonly
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword lprologKeyword infixl infixr infix prefix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword lprologKeyword prefixr postfix postfixl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword lprologSpecial pi sigma is true fail halt stop not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Operators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match lprologSpecial ":-"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match lprologSpecial "->"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match lprologSpecial "=>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match lprologSpecial "\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match lprologSpecial "!"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match lprologSpecial ","
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match lprologSpecial ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match lprologSpecial "&"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match lprologOperator "+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match lprologOperator "-"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match lprologOperator "*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match lprologOperator "\~"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match lprologOperator "\^"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match lprologOperator "<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match lprologOperator ">"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match lprologOperator "=<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match lprologOperator ">="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match lprologOperator "::"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match lprologOperator "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match lprologOperator "\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match lprologOperator ":"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match lprologOperator "|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match lprologCommentErr "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn sync maxlines=500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 " 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
101 if version >= 508 || !exists("did_lprolog_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 let did_lprolog_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 HiLink lprologComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 HiLink lprologTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 HiLink lprologKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 HiLink lprologSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 HiLink lprologOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 HiLink lprologIdentifier Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 HiLink lprologInteger Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 HiLink lprologReal Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 HiLink lprologString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 HiLink lprologCommentErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 HiLink lprologBrackErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 HiLink lprologParenErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 HiLink lprologModuleName Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 HiLink lprologTypeName Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 HiLink lprologVariable Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 HiLink lprologAtom Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 HiLink lprologClause Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 let b:current_syntax = "lprolog"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 " vim: ts=8