annotate runtime/syntax/haste.vim @ 7283:631cd8059bf4 v7.4.947

commit https://github.com/vim/vim/commit/5311c02f25eed8f34e8a80becb98e86264f371c3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 1 20:19:26 2015 +0100 patch 7.4.947 Problem: Test_listchars fails with MingW. (Michael Soyka) Solution: Add the test to the ones that need the fileformat fixed. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Tue, 01 Dec 2015 20:30:04 +0100
parents 0b796e045c42
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
1 " Vim syntax file
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
2 " Language: HASTE - a language for VLSI IC programming
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
3 " Maintainer: M. Tranchero - maurizio.tranchero?gmail.com
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
4 " Credits: some parts have been taken from vhdl, verilog, and C syntax
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
5 " files
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
6 " Version: 0.9
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
7 " Last Change: 0.9 improvement of haste numbers detection
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
8 " Change: 0.8 error matching for wrong hierarchical connections
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
9 " Change: 0.7 added more rules to highlight pre-processor directives
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
10
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
11 " HASTE
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
12 if exists("b:current_syntax")
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
13 finish
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
14 endif
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
15 " For version 5.x: Clear all syntax items
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
16 " For version 6.x: Quit when a syntax file was already loaded
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
17 if version < 600
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
18 syntax clear
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
19 elseif exists("b:current_syntax")
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
20 finish
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
21 endif
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
22
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
23 " case is significant
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
24 syn case match
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
25
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
26 " HASTE keywords
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
27 syn keyword hasteStatement act alias arb array begin bitvec
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
28 syn keyword hasteStatement bitwidth boolvec broad case
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
29 syn keyword hasteStatement cast chan const dataprobe do edge
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
30 syn keyword hasteStatement else end export false ff fi file
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
31 syn keyword hasteStatement fit for forever func if import
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
32 syn keyword hasteStatement inprobe is les main narb narrow
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
33 syn keyword hasteStatement negedge od of or outprobe pas
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
34 syn keyword hasteStatement posedge probe proc ram ramreg
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
35 syn keyword hasteStatement repeat rom romreg sample sel si
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
36 syn keyword hasteStatement sign sizeof skip stop then true
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
37 syn keyword hasteStatement type until var wait wire
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
38 syn keyword hasteFutureExt Z ffe partial
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
39 syn keyword hasteVerilog buf reg while
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
40
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
41 " Special match for "if", "or", and "else" since "else if"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
42 " and other "else+if" combination shouldn't be highlighted.
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
43 " The right keyword is "or"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
44 syn match hasteStatement "\<\(if\|then\|else\|fi\)\>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
45 syn match hasteNone "\<else\s\+if\>$"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
46 syn match hasteNone "\<else\s\+if\>\s"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
47 syn match hasteNone "\<elseif\>\s"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
48 syn match hasteNone "\<elsif\>\s"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
49 syn match hasteStatement "\<\(case\|is\|si\)\>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
50 syn match hasteStatement "\<\(repeat\|until\)\>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
51 syn match hasteStatement "\<\(forever\|do\|od\)\>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
52 syn match hasteStatement "\<\(for\|do\|od\)\>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
53 syn match hasteStatement "\<\(do\|or\|od\)\>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
54 syn match hasteStatement "\<\(sel\|les\)\>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
55 syn match hasteError "\<\d\+[_a-zA-Z]\+\>"
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
56 syn match hasteError "\(\([[:alnum:]]\+\s*(\s\+\|)\s*,\)\)\s*\([[:alnum:]]\+\s*(\)"
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
57
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
58 " Predifined Haste types
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
59 syn keyword hasteType bool
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
60
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
61 " Values for standard Haste types
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
62 " syn match hasteVector "\'[0L1HXWZU\-\?]\'"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
63
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
64 syn match hasteVector "0b\"[01_]\+\""
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
65 syn match hasteVector "0x\"[0-9a-f_]\+\""
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
66 syn match hasteCharacter "'.'"
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
67 " syn region hasteString start=+"+ end=+"+
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
68 syn match hasteIncluded display contained "<[^>]*>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
69 syn match hasteIncluded display contained "<[^"]*>"
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
70 syn region hasteInclude start="^\s*#include\>\s*" end="$" contains=hasteIncluded,hasteString
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
71
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
72 " integer numbers
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
73 syn match hasteNumber "\d\+\^[[:alnum:]]*[-+]\{0,1\}[[:alnum:]]*"
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
74 syn match hasteNumber "-\=\<\d\+\(\^[+\-]\=\d\+\)\>"
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
75 syn match hasteNumber "-\=\<\d\+\>"
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
76 " syn match hasteNumber "0*2#[01_]\+#\(\^[+\-]\=\d\+\)\="
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
77 " syn match hasteNumber "0*16#[0-9a-f_]\+#\(\^[+\-]\=\d\+\)\="
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
78 " operators
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
79 syn keyword hasteSeparators & , . \|
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
80 syn keyword hasteExecution \|\| ; @
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
81 syn keyword hasteOperator := ? ! :
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
82 syn keyword hasteTypeConstr "[" << >> .. "]" ~
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
83 syn keyword hasteExprOp < <= >= > = # <> + - * == ##
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
84 syn keyword hasteMisc ( ) 0x 0b
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
85 "
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
86 syn match hasteSeparators "[&:\|,.]"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
87 syn match hasteOperator ":="
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
88 syn match hasteOperator ":"
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
89 syn match hasteOperator "?"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
90 syn match hasteOperator "!"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
91 syn match hasteExecution "||"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
92 syn match hasteExecution ";"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
93 syn match hasteExecution "@"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
94 syn match hasteType "\[\["
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
95 syn match hasteType "\]\]"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
96 syn match hasteType "<<"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
97 syn match hasteType ">>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
98 syn match hasteExprOp "<"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
99 syn match hasteExprOp "<="
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
100 syn match hasteExprOp ">="
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
101 syn match hasteExprOp ">"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
102 syn match hasteExprOp "<>"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
103 syn match hasteExprOp "="
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
104 syn match hasteExprOp "=="
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
105 syn match hasteExprOp "##"
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
106 " syn match hasteExprOp "#"
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
107 syn match hasteExprOp "*"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
108 syn match hasteExprOp "+"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
109
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
110 syn region hasteComment start="/\*" end="\*/" contains=@Spell
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
111 syn region hasteComment start="{" end="}" contains=@Spell
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
112 syn match hasteComment "//.*" contains=@Spell
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
113
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
114 " Define the default highlighting.
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
115 " Only when an item doesn't have highlighting yet
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
116 hi def link hasteSpecial Special
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
117 hi def link hasteStatement Statement
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
118 hi def link hasteCharacter String
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
119 hi def link hasteString String
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
120 hi def link hasteVector String
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
121 hi def link hasteBoolean String
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
122 hi def link hasteComment Comment
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
123 hi def link hasteNumber String
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
124 hi def link hasteTime String
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
125 hi def link hasteType Type
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
126 hi def link hasteGlobal Error
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
127 hi def link hasteError Error
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
128 hi def link hasteAttribute Type
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
129 "
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
130 hi def link hasteSeparators Special
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
131 hi def link hasteExecution Special
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
132 hi def link hasteTypeConstr Special
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
133 hi def link hasteOperator Type
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
134 hi def link hasteExprOp Type
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
135 hi def link hasteMisc String
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
136 hi def link hasteFutureExt Error
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
137 hi def link hasteVerilog Error
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
138 hi def link hasteDefine Macro
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
139 hi def link hasteInclude Include
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
140 " hi def link hastePreProc Preproc
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1623
diff changeset
141 " hi def link hastePreProcVar Special
1623
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
142
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
143 let b:current_syntax = "haste"
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
144
53938adac247 updated for version 7.2a
vimboss
parents:
diff changeset
145 " vim: ts=8