Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: Dracula |
| 3 | " Maintainer: Scott Bordelon <slb@artisan.com> |
| 4 | " Last change: Wed Apr 25 18:50:01 PDT 2001 |
| 5 | " Extensions: drac.*,*.drac,*.drc,*.lvs,*.lpe |
| 6 | " Comment: Dracula is an industry-standard language created by CADENCE (a |
| 7 | " company specializing in Electronics Design Automation), for |
| 8 | " the purposes of Design Rule Checking, Layout vs. Schematic |
| 9 | " verification, and Layout Parameter Extraction. |
| 10 | |
| 11 | " For version 5.x: Clear all syntax items |
| 12 | " For version 6.x: Quit when a syntax file was already loaded |
| 13 | if version < 600 |
| 14 | syntax clear |
| 15 | elseif exists("b:current_syntax") |
| 16 | finish |
| 17 | endif |
| 18 | |
| 19 | " Ignore case |
| 20 | syn case ignore |
| 21 | |
| 22 | " A bunch of useful Dracula keywords |
| 23 | |
| 24 | "syn match draculaIdentifier |
| 25 | |
| 26 | syn keyword draculaStatement indisk primary outdisk printfile system |
| 27 | syn keyword draculaStatement mode scale resolution listerror keepdata |
| 28 | syn keyword draculaStatement datatype by lt gt output label range touch |
| 29 | syn keyword draculaStatement inside outside within overlap outlib |
| 30 | syn keyword draculaStatement schematic model unit parset |
| 31 | syn match draculaStatement "flag-\(non45\|acuteangle\|offgrid\)" |
| 32 | syn match draculaStatement "text-pri-only" |
| 33 | syn match draculaStatement "[=&]" |
| 34 | syn match draculaStatement "\[[^,]*\]" |
| 35 | syn match draculastatement "^ *\(sel\|width\|ext\|enc\|area\|shrink\|grow\|length\)" |
| 36 | syn match draculastatement "^ *\(or\|not\|and\|select\|size\|connect\|sconnect\|int\)" |
| 37 | syn match draculastatement "^ *\(softchk\|stamp\|element\|parasitic cap\|attribute cap\)" |
| 38 | syn match draculastatement "^ *\(flagnon45\|lextract\|equation\|lpeselect\|lpechk\|attach\)" |
| 39 | syn match draculaStatement "\(temporary\|connect\)-layer" |
| 40 | syn match draculaStatement "program-dir" |
| 41 | syn match draculaStatement "status-command" |
| 42 | syn match draculaStatement "batch-queue" |
| 43 | syn match draculaStatement "cnames-csen" |
| 44 | syn match draculaStatement "filter-lay-opt" |
| 45 | syn match draculaStatement "filter-sch-opt" |
| 46 | syn match draculaStatement "power-node" |
| 47 | syn match draculaStatement "ground-node" |
| 48 | syn match draculaStatement "subckt-name" |
| 49 | |
| 50 | syn match draculaType "\*description" |
| 51 | syn match draculaType "\*input-layer" |
| 52 | syn match draculaType "\*operation" |
| 53 | syn match draculaType "\*end" |
| 54 | |
| 55 | syn match draculaComment ";.*" |
| 56 | |
| 57 | syn match draculaPreProc "^#.*" |
| 58 | |
| 59 | "Modify the following as needed. The trade-off is performance versus |
| 60 | "functionality. |
| 61 | syn sync lines=50 |
| 62 | |
| 63 | " Define the default highlighting. |
| 64 | " For version 5.7 and earlier: only when not done already |
| 65 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 66 | if version >= 508 || !exists("did_dracula_syn_inits") |
| 67 | if version < 508 |
| 68 | let did_dracula_syn_inits = 1 |
| 69 | command -nargs=+ HiLink hi link <args> |
| 70 | else |
| 71 | command -nargs=+ HiLink hi def link <args> |
| 72 | endif |
| 73 | |
| 74 | HiLink draculaIdentifier Identifier |
| 75 | HiLink draculaStatement Statement |
| 76 | HiLink draculaType Type |
| 77 | HiLink draculaComment Comment |
| 78 | HiLink draculaPreProc PreProc |
| 79 | |
| 80 | delcommand HiLink |
| 81 | endif |
| 82 | |
| 83 | let b:current_syntax = "dracula" |
| 84 | |
| 85 | " vim: ts=8 |