]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/vhdl.micro
Add mail syntax highlighting
[micro.git] / runtime / syntax / vhdl.micro
1 ## vhdl
2 syntax "vhdl" "\.vhdl?$"
3
4 ## types
5 color type (i) "\b(string|integer|natural|positive|(un)?signed|std_u?logic(_vector)?|bit(_vector)?|boolean|u?x01z?|array|range)\b"
6
7 ## identifiers (component-, library-names etc.)
8 color identifier (i) "library[[:space:]]+[a-zA-Z_0-9]+"
9 color identifier (i) "use[[:space:]]+[a-zA-Z_0-9\.]+"
10 color identifier (i) "component[[:space:]]+[a-zA-Z_0-9]+"
11 color identifier (i) "(architecture|configuration)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+of[[:space:]]+[a-zA-Z_0-9]+"
12 color identifier (i) "(entity|package)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+is"
13 color identifier (i) "end[[:space:]]+((architecture|entity|component|process|package|generate)[[:space:]]+)?[a-zA-Z_0-9]+"
14
15 ## reserved words
16 color statement (i) "\b(abs|access|after|alias|all|and|architecture|assert|attribute)\b"
17 color statement (i) "\b(begin|block|body|buffer|bus|case|component|configuration|constant)\b"
18 color statement (i) "\b(disconnect|downto|else|elsif|end|entity|exit)\b"
19 color statement (i) "\b(file|for|function|generate|generic|guarded)\b"
20 color statement (i) "\b(if|impure|in|inertial|inout|is)\b"
21 color statement (i) "\b(label|library|linkage|literal|loop|map|mod)\b"
22 color statement (i) "\b(nand|new|next|nor|not|null|of|on|open|or|others|out)\b"
23 color statement (i) "\b(package|port|postponed|procedure|process|pure)\b"
24 color statement (i) "\b(range|record|register|reject|rem|report|return|rol|ror)\b"
25 color statement (i) "\b(select|severity|shared|signal|sla|sll|sra|srl|subtype)\b"
26 color statement (i) "\b(then|to|transport|type|unaffected|units|until|use)\b"
27 color statement (i) "\b(variable|wait|when|while|with|xnor|xor)\b"
28
29 ## attributes
30 color statement (i) "'(base|left|right|high|low|pos|val|succ|pred|leftof|rightof|image|(last_)?value)"
31 color statement (i) "'((reverse_)?range|length|ascending|event|stable)"
32 color statement (i) "'(simple|path|instance)_name"
33
34 ## library functions
35 color statement (i) "\b(std_match|(rising|falling)_edge|is_x)\b"
36 color statement (i) "\bto_(unsigned|signed|integer|u?x01z?|stdu?logic(vector)?)\b"
37
38 ## operators
39 color statement "(\+|-|\*|/|&|<|>|=|\.|:)"
40
41 ## constants
42 color constant.number (i) "'([0-1]|u|x|z|w|l|h|-)'" "[box]?"([0-1a-fA-F]|u|x|z|w|l|h|-)+""
43 color constant.number (i) "\b[0-9\._]+(e[-]?[0-9]+)?( ?[fpnum]?s)?\b"
44 color constant (i) "\b(true|false)\b"
45 ## severity levels
46 color constant (i) "\b(note|warning|error|failure)\b"
47 color constant.string ""[^"]*""
48
49 ## Comment highlighting
50 color comment "--.*"