Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: TRASYS input file |
| 3 | " Maintainer: Adrian Nagle, anagle@ball.com |
| 4 | " Last Change: 2003 May 11 |
| 5 | " Filenames: *.inp |
| 6 | " URL: http://www.naglenet.org/vim/syntax/trasys.vim |
| 7 | " MAIN URL: http://www.naglenet.org/vim/ |
| 8 | |
| 9 | |
| 10 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 11 | " quit when a syntax file was already loaded |
| 12 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 13 | finish |
| 14 | endif |
| 15 | |
| 16 | |
| 17 | " Force free-form fortran format |
| 18 | let fortran_free_source=1 |
| 19 | |
| 20 | " Load FORTRAN syntax file |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 21 | runtime! syntax/fortran.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 22 | unlet b:current_syntax |
| 23 | |
| 24 | |
| 25 | " Ignore case |
| 26 | syn case ignore |
| 27 | |
| 28 | |
| 29 | |
| 30 | " Define keywords for TRASYS |
| 31 | syn keyword trasysOptions model rsrec info maxfl nogo dmpdoc |
| 32 | syn keyword trasysOptions rsi rti rso rto bcdou cmerg emerg |
| 33 | syn keyword trasysOptions user1 nnmin erplot |
| 34 | |
| 35 | syn keyword trasysSurface icsn tx ty tz rotx roty rotz inc bcsn |
| 36 | syn keyword trasysSurface nnx nny nnz nnax nnr nnth unnx |
| 37 | syn keyword trasysSurface unny unnz unnax unnr unnth type idupsf |
| 38 | syn keyword trasysSurface imagsf act active com shade bshade axmin |
| 39 | syn keyword trasysSurface axmax zmin zmax rmin rmax thmin thmin |
| 40 | syn keyword trasysSurface thmax alpha emiss trani trans spri sprs |
| 41 | syn keyword trasysSurface refno posit com dupbcs dimensions |
| 42 | syn keyword trasysSurface dimension position prop surfn |
| 43 | |
| 44 | syn keyword trasysSurfaceType rect trap disk cyl cone sphere parab |
| 45 | syn keyword trasysSurfaceType box5 box6 shpero tor ogiv elem tape poly |
| 46 | |
| 47 | syn keyword trasysSurfaceArgs ff di top bottom in out both no only |
| 48 | |
| 49 | syn keyword trasysArgs fig smn nodea zero only ir sol |
| 50 | syn keyword trasysArgs both wband stepn initl |
| 51 | |
| 52 | syn keyword trasysOperations orbgen build |
| 53 | |
| 54 | "syn keyword trasysSubRoutine call |
| 55 | syn keyword trasysSubRoutine chgblk ndata ndatas odata odatas |
| 56 | syn keyword trasysSubRoutine pldta ffdata cmdata adsurf rbdata |
| 57 | syn keyword trasysSubRoutine rtdata pffshd orbit1 orbit2 orient |
| 58 | syn keyword trasysSubRoutine didt1 didt1s didt2 didt2s spin |
| 59 | syn keyword trasysSubRoutine spinav dicomp distab drdata gbdata |
| 60 | syn keyword trasysSubRoutine gbaprx rkdata rcdata aqdata stfaq |
| 61 | syn keyword trasysSubRoutine qodata qoinit modar modpr modtr |
| 62 | syn keyword trasysSubRoutine modprs modshd moddat rstoff rston |
| 63 | syn keyword trasysSubRoutine rsmerg ffread diread ffusr1 diusr1 |
| 64 | syn keyword trasysSubRoutine surfp didt3 didt3s romain stfrc |
| 65 | syn keyword trasysSubRoutine rornt rocstr romove flxdata title |
| 66 | |
| 67 | syn keyword trassyPrcsrSegm nplot oplot plot cmcal ffcal rbcal |
| 68 | syn keyword trassyPrcsrSegm rtcal dical drcal sfcal gbcal rccal |
| 69 | syn keyword trassyPrcsrSegm rkcal aqcal qocal |
| 70 | |
| 71 | |
| 72 | |
| 73 | " Define matches for TRASYS |
| 74 | syn match trasysOptions "list source" |
| 75 | syn match trasysOptions "save source" |
| 76 | syn match trasysOptions "no print" |
| 77 | |
| 78 | "syn match trasysSurface "^K *.* [^$]" |
| 79 | "syn match trasysSurface "^D *[0-9]*\.[0-9]\+" |
| 80 | "syn match trasysSurface "^I *.*[0-9]\+\.\=" |
| 81 | "syn match trasysSurface "^N *[0-9]\+" |
| 82 | "syn match trasysSurface "^M *[a-z[A-Z0-9]\+" |
| 83 | "syn match trasysSurface "^B[C][S] *[a-zA-Z0-9]*" |
| 84 | "syn match trasysSurface "^S *SURFN.*[0-9]" |
| 85 | syn match trasysSurface "P[0-9]* *="he=e-1 |
| 86 | |
| 87 | syn match trasysIdentifier "^L "he=e-1 |
| 88 | syn match trasysIdentifier "^K "he=e-1 |
| 89 | syn match trasysIdentifier "^D "he=e-1 |
| 90 | syn match trasysIdentifier "^I "he=e-1 |
| 91 | syn match trasysIdentifier "^N "he=e-1 |
| 92 | syn match trasysIdentifier "^M "he=e-1 |
| 93 | syn match trasysIdentifier "^B[C][S]" |
| 94 | syn match trasysIdentifier "^S "he=e-1 |
| 95 | |
| 96 | syn match trasysComment "^C.*$" |
| 97 | syn match trasysComment "^R.*$" |
| 98 | syn match trasysComment "\$.*$" |
| 99 | |
| 100 | syn match trasysHeader "^header[^,]*" |
| 101 | |
| 102 | syn match trasysMacro "^FAC" |
| 103 | |
| 104 | syn match trasysInteger "-\=\<[0-9]*\>" |
| 105 | syn match trasysFloat "-\=\<[0-9]*\.[0-9]*" |
| 106 | syn match trasysScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" |
| 107 | |
| 108 | syn match trasysBlank "' \+'"hs=s+1,he=e-1 |
| 109 | |
| 110 | syn match trasysEndData "^END OF DATA" |
| 111 | |
| 112 | if exists("thermal_todo") |
| 113 | execute 'syn match trasysTodo ' . '"^'.thermal_todo.'.*$"' |
| 114 | else |
| 115 | syn match trasysTodo "^?.*$" |
| 116 | endif |
| 117 | |
| 118 | |
| 119 | |
| 120 | " Define regions for TRASYS |
| 121 | syn region trasysComment matchgroup=trasysHeader start="^HEADER DOCUMENTATION DATA" end="^HEADER[^,]*" |
| 122 | |
| 123 | |
| 124 | |
| 125 | " Define synchronizing patterns for TRASYS |
| 126 | syn sync maxlines=500 |
| 127 | syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA" |
| 128 | |
| 129 | |
| 130 | |
| 131 | " Define the default highlighting |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 132 | " Only when an item doesn't have highlighting yet |
| 133 | command -nargs=+ HiLink hi def link <args> |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 134 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 135 | HiLink trasysOptions Special |
| 136 | HiLink trasysSurface Special |
| 137 | HiLink trasysSurfaceType Constant |
| 138 | HiLink trasysSurfaceArgs Constant |
| 139 | HiLink trasysArgs Constant |
| 140 | HiLink trasysOperations Statement |
| 141 | HiLink trasysSubRoutine Statement |
| 142 | HiLink trassyPrcsrSegm PreProc |
| 143 | HiLink trasysIdentifier Identifier |
| 144 | HiLink trasysComment Comment |
| 145 | HiLink trasysHeader Typedef |
| 146 | HiLink trasysMacro Macro |
| 147 | HiLink trasysInteger Number |
| 148 | HiLink trasysFloat Float |
| 149 | HiLink trasysScientific Float |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 150 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 151 | HiLink trasysBlank SpecialChar |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 152 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 153 | HiLink trasysEndData Macro |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 154 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 155 | HiLink trasysTodo Todo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 156 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 157 | delcommand HiLink |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 158 | |
| 159 | |
| 160 | let b:current_syntax = "trasys" |
| 161 | |
| 162 | " vim: ts=8 sw=2 |