xref: /vim-8.2.3635/runtime/syntax/takout.vim (revision cf2d8dee)
1" Vim syntax file
2" Language:     TAK2, TAK3, TAK2000 thermal modeling output file
3" Maintainer:   Adrian Nagle, [email protected]
4" Last Change:  2003 May 11
5" Filenames:    *.out
6" URL:		http://www.naglenet.org/vim/syntax/takout.vim
7" MAIN URL:     http://www.naglenet.org/vim/
8
9
10
11" For version 5.x: Clear all syntax items
12" For version 6.x: Quit when a syntax file was already loaded
13if version < 600
14  syntax clear
15elseif exists("b:current_syntax")
16  finish
17endif
18
19
20
21" Ignore case
22syn case match
23
24
25
26" Load TAK syntax file
27if version < 600
28  source <sfile>:p:h/tak.vim
29else
30  runtime! syntax/tak.vim
31endif
32unlet b:current_syntax
33
34
35
36"
37"
38" Begin syntax definitions for tak output files.
39"
40
41" Define keywords for TAK output
42syn case match
43
44syn keyword takoutPos       ON SI
45syn keyword takoutNeg       OFF ENG
46
47
48
49" Define matches for TAK output
50syn match takoutTitle	     "TAK III"
51syn match takoutTitle	     "Release \d.\d\d"
52syn match takoutTitle	     " K & K  Associates *Thermal Analysis Kit III *Serial Number \d\d-\d\d\d"
53
54syn match takoutFile	     ": \w*\.TAK"hs=s+2
55
56syn match takoutInteger      "T\=[0-9]*\>"ms=s+1
57
58syn match takoutSectionDelim "[-<>]\{4,}" contains=takoutSectionTitle
59syn match takoutSectionDelim ":\=\.\{4,}:\=" contains=takoutSectionTitle
60syn match takoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1
61
62syn match takoutHeaderDelim  "=\{5,}"
63syn match takoutHeaderDelim  "|\{5,}"
64syn match takoutHeaderDelim  "+\{5,}"
65
66syn match takoutLabel	     "Input File:" contains=takoutFile
67syn match takoutLabel	     "Begin Solution: Routine"
68
69syn match takoutError	     "<<< Error >>>"
70
71
72" Define the default highlighting
73" For version 5.7 and earlier: only when not done already
74" For version 5.8 and later: only when an item doesn't have highlighting yet
75if version >= 508 || !exists("did_takout_syntax_inits")
76  if version < 508
77    let did_takout_syntax_inits = 1
78    command -nargs=+ HiLink hi link <args>
79  else
80    command -nargs=+ HiLink hi def link <args>
81  endif
82
83  HiLink takoutPos		   Statement
84  HiLink takoutNeg		   PreProc
85  HiLink takoutTitle		   Type
86  HiLink takoutFile		   takIncludeFile
87  HiLink takoutInteger		   takInteger
88
89  HiLink takoutSectionDelim	    Delimiter
90  HiLink takoutSectionTitle	   Exception
91  HiLink takoutHeaderDelim	   SpecialComment
92  HiLink takoutLabel		   Identifier
93
94  HiLink takoutError		   Error
95
96  delcommand HiLink
97endif
98
99
100let b:current_syntax = "takout"
101
102" vim: ts=8 sw=2
103