main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.7 KB
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = vhdl
|
---|
4 | vhdl.displayName = 'vhdl'
|
---|
5 | vhdl.aliases = []
|
---|
6 | function vhdl(Prism) {
|
---|
7 | Prism.languages.vhdl = {
|
---|
8 | comment: /--.+/,
|
---|
9 | // support for all logic vectors
|
---|
10 | 'vhdl-vectors': {
|
---|
11 | pattern: /\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,
|
---|
12 | alias: 'number'
|
---|
13 | },
|
---|
14 | // support for operator overloading included
|
---|
15 | 'quoted-function': {
|
---|
16 | pattern: /"\S+?"(?=\()/,
|
---|
17 | alias: 'function'
|
---|
18 | },
|
---|
19 | string: /"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,
|
---|
20 | constant: /\b(?:library|use)\b/i,
|
---|
21 | // support for predefined attributes included
|
---|
22 | keyword:
|
---|
23 | /\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,
|
---|
24 | boolean: /\b(?:false|true)\b/i,
|
---|
25 | function: /\w+(?=\()/,
|
---|
26 | // decimal, based, physical, and exponential numbers supported
|
---|
27 | number: /'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,
|
---|
28 | operator:
|
---|
29 | /[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,
|
---|
30 | punctuation: /[{}[\];(),.:]/
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.