annotate runtime/syntax/snnspat.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 b7811ab264bf
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: SNNS pattern file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Davide Alberani <alberanid@bigfoot.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 28 Apr 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Version: 0.2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " URL: http://digilander.iol.it/alberanid/vim/syntax/snnspat.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " is a simulator for neural networks.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " anything that isn't part of the header, a comment or a number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " is wrong
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match snnspatError ".*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " hoping that matches any kind of notation...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match snnspatAccepted "\([-+]\=\(\d\+\.\|\.\)\=\d\+\([Ee][-+]\=\d\+\)\=\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match snnspatAccepted "\s"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match snnspatBrac "\[\s*\d\+\(\s\|\d\)*\]" contains=snnspatNumbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " the accepted fields in the header
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match snnspatNoHeader "No\. of patterns\s*:\s*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match snnspatNoHeader "No\. of input units\s*:\s*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match snnspatNoHeader "No\. of output units\s*:\s*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match snnspatNoHeader "No\. of variable input dimensions\s*:\s*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match snnspatNoHeader "No\. of variable output dimensions\s*:\s*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match snnspatNoHeader "Maximum input dimensions\s*:\s*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match snnspatNoHeader "Maximum output dimensions\s*:\s*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match snnspatGen "generated at.*" contained contains=snnspatNumbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match snnspatGen "SNNS pattern definition file [Vv]\d\.\d" contained contains=snnspatNumbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " the header, what is not an accepted field, is an error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region snnspatHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnspatNoHeader,snnspatNumbers,snnspatGen,snnspatBrac
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " numbers inside the header
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match snnspatNumbers "\d" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match snnspatComment "#.*$" contains=snnspatTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword snnspatTodo TODO XXX FIXME contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 if version >= 508 || !exists("did_snnspat_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 let did_snnspat_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 HiLink snnspatGen Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink snnspatHeader Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink snnspatNoHeader Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink snnspatNumbers Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink snnspatComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink snnspatError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink snnspatTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink snnspatAccepted NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink snnspatBrac NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 let b:current_syntax = "snnspat"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " vim: ts=8 sw=2