7
|
1 " Vim syntax file
|
|
2 " Language: SNNS result file
|
|
3 " Maintainer: Davide Alberani <alberanid@bigfoot.com>
|
|
4 " Last Change: 28 Apr 2001
|
|
5 " Version: 0.2
|
|
6 " URL: http://digilander.iol.it/alberanid/vim/syntax/snnsres.vim
|
|
7 "
|
|
8 " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/
|
|
9 " is a simulator for neural networks.
|
|
10
|
|
11 if version < 600
|
|
12 syntax clear
|
|
13 elseif exists("b:current_syntax")
|
|
14 finish
|
|
15 endif
|
|
16
|
|
17 " the accepted fields in the header
|
|
18 syn match snnsresNoHeader "No\. of patterns\s*:\s*" contained
|
|
19 syn match snnsresNoHeader "No\. of input units\s*:\s*" contained
|
|
20 syn match snnsresNoHeader "No\. of output units\s*:\s*" contained
|
|
21 syn match snnsresNoHeader "No\. of variable input dimensions\s*:\s*" contained
|
|
22 syn match snnsresNoHeader "No\. of variable output dimensions\s*:\s*" contained
|
|
23 syn match snnsresNoHeader "Maximum input dimensions\s*:\s*" contained
|
|
24 syn match snnsresNoHeader "Maximum output dimensions\s*:\s*" contained
|
|
25 syn match snnsresNoHeader "startpattern\s*:\s*" contained
|
|
26 syn match snnsresNoHeader "endpattern\s*:\s*" contained
|
|
27 syn match snnsresNoHeader "input patterns included" contained
|
|
28 syn match snnsresNoHeader "teaching output included" contained
|
|
29 syn match snnsresGen "generated at.*" contained contains=snnsresNumbers
|
|
30 syn match snnsresGen "SNNS result file [Vv]\d\.\d" contained contains=snnsresNumbers
|
|
31
|
|
32 " the header, what is not an accepted field, is an error
|
|
33 syn region snnsresHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnsresNoHeader,snnsresNumbers,snnsresGen
|
|
34
|
|
35 " numbers inside the header
|
|
36 syn match snnsresNumbers "\d" contained
|
|
37 syn match snnsresComment "#.*$" contains=snnsresTodo
|
|
38 syn keyword snnsresTodo TODO XXX FIXME contained
|
|
39
|
|
40 if version >= 508 || !exists("did_snnsres_syn_inits")
|
|
41 if version < 508
|
|
42 let did_snnsres_syn_inits = 1
|
|
43 command -nargs=+ HiLink hi link <args>
|
|
44 else
|
|
45 command -nargs=+ HiLink hi def link <args>
|
|
46 endif
|
|
47
|
|
48 HiLink snnsresGen Statement
|
|
49 HiLink snnsresHeader Statement
|
|
50 HiLink snnsresNoHeader Define
|
|
51 HiLink snnsresNumbers Number
|
|
52 HiLink snnsresComment Comment
|
|
53 HiLink snnsresTodo Todo
|
|
54
|
|
55 delcommand HiLink
|
|
56 endif
|
|
57
|
|
58 let b:current_syntax = "snnsres"
|
|
59
|
|
60 " vim: ts=8 sw=2
|