summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-vhdl.min.js
blob: 8adb6a31ddd6fae3dc54fdd26b826f6e74e435ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Prism.languages.vhdl = {
  comment: /--.+/,
  'vhdl-vectors': {
    pattern: /\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,
    alias: 'number',
  },
  'quoted-function': { pattern: /"\S+?"(?=\()/, alias: 'function' },
  string: /"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,
  constant: /\b(?:library|use)\b/i,
  keyword:
    /\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,
  boolean: /\b(?:false|true)\b/i,
  function: /\w+(?=\()/,
  number: /'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,
  operator:
    /[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,
  punctuation: /[{}[\];(),.:]/,
};
/span>}, operator: { pattern: /#+|[-+*~=^@]/ }, }, }, 'function-inline': { pattern: /\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/, inside: { variable: { pattern: /(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/, inside: { punctuation: { pattern: /[,.|]/ }, operator: { pattern: /#+|[-+*~=^@]/ }, }, }, punctuation: { pattern: /\$\w:|[$:?.,|]/ }, }, alias: 'function', }, 'function-block': { pattern: /\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/, inside: { punctuation: { pattern: /[$:{}?.,|]/ } }, alias: 'function', }, 'directive-inline': { pattern: /\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/, inside: { punctuation: { pattern: /\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/, inside: { tag: { pattern: /#\d/ } }, }, }, alias: 'function', }, 'directive-block-open': { pattern: /\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/, inside: { punctuation: { pattern: /\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/, inside: { tag: { pattern: /#\d/ } }, }, attribute: { pattern: /![A-Z]+$/, inside: { punctuation: { pattern: /!/ } }, alias: 'keyword', }, }, alias: 'function', }, 'directive-block-separator': { pattern: /\}:[-\w.]+:\{/, inside: { punctuation: { pattern: /[:{}]/ } }, alias: 'function', }, 'directive-block-close': { pattern: /\}:[-\w.]+\$/, inside: { punctuation: { pattern: /[:{}$]/ } }, alias: 'function', }, })), n.languages.insertBefore( 'inside', 'punctuation', { variable: n.languages.xeora['function-inline'].inside.variable }, n.languages.xeora['function-block'] ), (n.languages.xeoracube = n.languages.xeora); })(Prism);