annotate runtime/syntax/spyce.vim @ 1086:1a511b7b69eb v7.0.212

updated for version 7.0-212
author vimboss
date Thu, 08 Mar 2007 12:36:46 +0000
parents 3fc0f57ecb91
children 7bc41231fbc7
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: SPYCE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Rimon Barr <rimon AT acm DOT org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://spyce.sourceforge.net
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " we define it here so that included files can test for it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 let main_syntax='spyce'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Read the HTML syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 let b:did_indent = 1 " don't perform HTML indentation!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 let html_no_rendering = 1 " do not render <b>,<i>, etc...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 so <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 runtime! syntax/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " include python
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn include @Python <sfile>:p:h/python.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn include @Html <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " spyce definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword spyceDirectiveKeyword include compact module import contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword spyceDirectiveArg name names file contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region spyceDirectiveString start=+"+ end=+"+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match spyceBeginErrorS ,\[\[,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match spyceBeginErrorA ,<%,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match spyceEndErrorS ,\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match spyceEndErrorA ,%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match spyceEscBeginS ,\\\[\[,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match spyceEscBeginA ,\\<%,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match spyceEscEndS ,\\\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match spyceEscEndA ,\\%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match spyceEscEndCommentS ,--\\\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match spyceEscEndCommentA ,--\\%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn cluster htmlPreproc contains=@spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 hi link spyceDirectiveKeyword Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 hi link spyceDirectiveArg Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 hi link spyceDirectiveString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 hi link spyceDirectiveValue String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 hi link spyceDelim Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 hi link spyceStmtDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 hi link spyceChunkDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 hi link spyceEvalDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 hi link spyceLambdaDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 hi link spyceCommentDelim Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 hi link spyceBeginErrorS Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 hi link spyceBeginErrorA Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 hi link spyceEndErrorS Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 hi link spyceEndErrorA Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 hi link spyceStmtS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 hi link spyceStmtA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 hi link spyceChunkS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 hi link spyceChunkA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 hi link spyceEvalS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 hi link spyceEvalA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 hi link spyceDirectiveS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 hi link spyceDirectiveA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 hi link spyceCommentS Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 hi link spyceCommentA Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 hi link spyceLambdaS Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 hi link spyceLambdaA Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 hi link spyce Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 let b:current_syntax = "spyce"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 if main_syntax == 'spyce'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110