home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / trasys.vim < prev    next >
Encoding:
Text File  |  2003-05-11  |  5.3 KB  |  178 lines

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