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 / mac / vim55rt.sit / runtime / syntax / vrml.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  12.2 KB  |  209 lines  |  [TEXT/VIM!]

  1. " Vim syntax file
  2. " Language:        VRML97
  3. " Modified from:   VRML 1.0C by David Brown <dbrown@cgs.c4.gmeds.com>
  4. " Maintainer:      Gregory Seidman <gseidman@acm.org>
  5. " URL:             http://zing.ncsl.nist.gov/~gseidman/vim/syntax/vrml.vim
  6. " Last change:     1999 Feb 22
  7.  
  8. " syn clear
  9. " keyword definitions
  10.  
  11. syn keyword VRMLFields         ambientIntensity appearance attenuation
  12. syn keyword VRMLFields         autoOffset avatarSize axisOfRotation backUrl
  13. syn keyword VRMLFields         bboxCenter bboxSize beamWidth beginCap
  14. syn keyword VRMLFields         bottom bottomRadius bottomUrl ccw center
  15. syn keyword VRMLFields         children choice collide color colorIndex
  16. syn keyword VRMLFields         colorPerVertex convex coord coordIndex
  17. syn keyword VRMLFields         creaseAngle crossSection cutOffAngle
  18. syn keyword VRMLFields         cycleInterval description diffuseColor
  19. syn keyword VRMLFields         directOutput direction diskAngle
  20. syn keyword VRMLFields         emissiveColor enabled endCap family
  21. syn keyword VRMLFields         fieldOfView fogType fontStyle frontUrl
  22. syn keyword VRMLFields         geometry groundAngle groundColor headlight
  23. syn keyword VRMLFields         height horizontal info intensity jump
  24. syn keyword VRMLFields         justify key keyValue language leftToRight
  25. syn keyword VRMLFields         leftUrl length level location loop material
  26. syn keyword VRMLFields         maxAngle maxBack maxExtent maxFront
  27. syn keyword VRMLFields         maxPosition minAngle minBack minFront
  28. syn keyword VRMLFields         minPosition mustEvaluate normal normalIndex
  29. syn keyword VRMLFields         normalPerVertex offset on orientation
  30. syn keyword VRMLFields         parameter pitch point position priority
  31. syn keyword VRMLFields         proxy radius range repeatS repeatT rightUrl
  32. syn keyword VRMLFields         rotation scale scaleOrientation shininess
  33. syn keyword VRMLFields         side size skyAngle skyColor solid source
  34. syn keyword VRMLFields         spacing spatialize specularColor speed spine
  35. syn keyword VRMLFields         startTime stopTime string style texCoord
  36. syn keyword VRMLFields         texCoordIndex texture textureTransform title
  37. syn keyword VRMLFields         top topToBottom topUrl translation
  38. syn keyword VRMLFields         transparency type url vector visibilityLimit
  39. syn keyword VRMLFields         visibilityRange whichChoice xDimension
  40. syn keyword VRMLFields         xSpacing zDimension zSpacing
  41. syn match   VRMLFields         "\<[A-Za-z_][A-Za-z0-9_]*\>" contains=VRMLComment,VRMLProtos
  42. " syn match   VRMLFields         "\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*\<IS\>\(#.*$\)*\(,\|\s\)*\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*" contains=VRMLComment,VRMLProtos
  43. " syn region  VRMLFields         start="\<[A-Za-z_][A-Za-z0-9_]*\>" end=+\(,\|#\|\s\)+me=e-1 contains=VRMLComment,VRMLProtos
  44.  
  45. syn keyword VRMLEvents         addChildren ambientIntensity_changed
  46. syn keyword VRMLEvents         appearance_changed attenuation_changed
  47. syn keyword VRMLEvents         autoOffset_changed avatarSize_changed
  48. syn keyword VRMLEvents         axisOfRotation_changed backUrl_changed
  49. syn keyword VRMLEvents         beamWidth_changed bindTime bottomUrl_changed
  50. syn keyword VRMLEvents         center_changed children_changed
  51. syn keyword VRMLEvents         choice_changed collideTime collide_changed
  52. syn keyword VRMLEvents         color_changed coord_changed
  53. syn keyword VRMLEvents         cutOffAngle_changed cycleInterval_changed
  54. syn keyword VRMLEvents         cycleTime description_changed
  55. syn keyword VRMLEvents         diffuseColor_changed direction_changed
  56. syn keyword VRMLEvents         diskAngle_changed duration_changed
  57. syn keyword VRMLEvents         emissiveColor_changed enabled_changed
  58. syn keyword VRMLEvents         enterTime exitTime fogType_changed
  59. syn keyword VRMLEvents         fontStyle_changed fraction_changed
  60. syn keyword VRMLEvents         frontUrl_changed geometry_changed
  61. syn keyword VRMLEvents         groundAngle_changed headlight_changed
  62. syn keyword VRMLEvents         hitNormal_changed hitPoint_changed
  63. syn keyword VRMLEvents         hitTexCoord_changed intensity_changed
  64. syn keyword VRMLEvents         isActive isBound isOver jump_changed
  65. syn keyword VRMLEvents         keyValue_changed key_changed leftUrl_changed
  66. syn keyword VRMLEvents         length_changed level_changed
  67. syn keyword VRMLEvents         location_changed loop_changed
  68. syn keyword VRMLEvents         material_changed maxAngle_changed
  69. syn keyword VRMLEvents         maxBack_changed maxExtent_changed
  70. syn keyword VRMLEvents         maxFront_changed maxPosition_changed
  71. syn keyword VRMLEvents         minAngle_changed minBack_changed
  72. syn keyword VRMLEvents         minFront_changed minPosition_changed
  73. syn keyword VRMLEvents         normal_changed offset_changed on_changed
  74. syn keyword VRMLEvents         orientation_changed parameter_changed
  75. syn keyword VRMLEvents         pitch_changed point_changed position_changed
  76. syn keyword VRMLEvents         priority_changed radius_changed
  77. syn keyword VRMLEvents         removeChildren rightUrl_changed
  78. syn keyword VRMLEvents         rotation_changed scaleOrientation_changed
  79. syn keyword VRMLEvents         scale_changed set_ambientIntensity
  80. syn keyword VRMLEvents         set_appearance set_attenuation
  81. syn keyword VRMLEvents         set_autoOffset set_avatarSize
  82. syn keyword VRMLEvents         set_axisOfRotation set_backUrl set_beamWidth
  83. syn keyword VRMLEvents         set_bind set_bottomUrl set_center
  84. syn keyword VRMLEvents         set_children set_choice set_collide
  85. syn keyword VRMLEvents         set_color set_colorIndex set_coord
  86. syn keyword VRMLEvents         set_coordIndex set_crossSection
  87. syn keyword VRMLEvents         set_cutOffAngle set_cycleInterval
  88. syn keyword VRMLEvents         set_description set_diffuseColor
  89. syn keyword VRMLEvents         set_direction set_diskAngle
  90. syn keyword VRMLEvents         set_emissiveColor set_enabled set_fogType
  91. syn keyword VRMLEvents         set_fontStyle set_fraction set_frontUrl
  92. syn keyword VRMLEvents         set_geometry set_groundAngle set_headlight
  93. syn keyword VRMLEvents         set_height set_intensity set_jump set_key
  94. syn keyword VRMLEvents         set_keyValue set_leftUrl set_length
  95. syn keyword VRMLEvents         set_level set_location set_loop set_material
  96. syn keyword VRMLEvents         set_maxAngle set_maxBack set_maxExtent
  97. syn keyword VRMLEvents         set_maxFront set_maxPosition set_minAngle
  98. syn keyword VRMLEvents         set_minBack set_minFront set_minPosition
  99. syn keyword VRMLEvents         set_normal set_normalIndex set_offset set_on
  100. syn keyword VRMLEvents         set_orientation set_parameter set_pitch
  101. syn keyword VRMLEvents         set_point set_position set_priority
  102. syn keyword VRMLEvents         set_radius set_rightUrl set_rotation
  103. syn keyword VRMLEvents         set_scale set_scaleOrientation set_shininess
  104. syn keyword VRMLEvents         set_size set_skyAngle set_skyColor
  105. syn keyword VRMLEvents         set_source set_specularColor set_speed
  106. syn keyword VRMLEvents         set_spine set_startTime set_stopTime
  107. syn keyword VRMLEvents         set_string set_texCoord set_texCoordIndex
  108. syn keyword VRMLEvents         set_texture set_textureTransform set_topUrl
  109. syn keyword VRMLEvents         set_translation set_transparency set_type
  110. syn keyword VRMLEvents         set_url set_vector set_visibilityLimit
  111. syn keyword VRMLEvents         set_visibilityRange set_whichChoice
  112. syn keyword VRMLEvents         shininess_changed size_changed
  113. syn keyword VRMLEvents         skyAngle_changed skyColor_changed
  114. syn keyword VRMLEvents         source_changed specularColor_changed
  115. syn keyword VRMLEvents         speed_changed startTime_changed
  116. syn keyword VRMLEvents         stopTime_changed string_changed
  117. syn keyword VRMLEvents         texCoord_changed textureTransform_changed
  118. syn keyword VRMLEvents         texture_changed time topUrl_changed
  119. syn keyword VRMLEvents         touchTime trackPoint_changed
  120. syn keyword VRMLEvents         translation_changed transparency_changed
  121. syn keyword VRMLEvents         type_changed url_changed value_changed
  122. syn keyword VRMLEvents         vector_changed visibilityLimit_changed
  123. syn keyword VRMLEvents         visibilityRange_changed whichChoice_changed
  124. syn region  VRMLEvents         start="\S+[^0-9]+\.[A-Za-z_]+"ms=s+1 end="\(,\|$\|\s\)"me=e-1
  125.  
  126. syn keyword VRMLNodes          Anchor Appearance AudioClip Background
  127. syn keyword VRMLNodes          Billboard Box Collision Color
  128. syn keyword VRMLNodes          ColorInterpolator Cone Coordinate
  129. syn keyword VRMLNodes          CoordinateInterpolator Cylinder
  130. syn keyword VRMLNodes          CylinderSensor DirectionalLight
  131. syn keyword VRMLNodes          ElevationGrid Extrusion Fog FontStyle
  132. syn keyword VRMLNodes          Group ImageTexture IndexedFaceSet
  133. syn keyword VRMLNodes          IndexedLineSet Inline LOD Material
  134. syn keyword VRMLNodes          MovieTexture NavigationInfo Normal
  135. syn keyword VRMLNodes          NormalInterpolator OrientationInterpolator
  136. syn keyword VRMLNodes          PixelTexture PlaneSensor PointLight
  137. syn keyword VRMLNodes          PointSet PositionInterpolator
  138. syn keyword VRMLNodes          ProximitySensor ScalarInterpolator
  139. syn keyword VRMLNodes          Script Shape Sound Sphere SphereSensor
  140. syn keyword VRMLNodes          SpotLight Switch Text TextureCoordinate
  141. syn keyword VRMLNodes          TextureTransform TimeSensor TouchSensor
  142. syn keyword VRMLNodes          Transform Viewpoint VisibilitySensor
  143. syn keyword VRMLNodes          WorldInfo
  144.  
  145. " the following line doesn't catch <node><newline><openbrace> since \n
  146. " doesn't match as an atom yet :-(
  147. syn match   VRMLNodes          "[A-Za-z_][A-Za-z0-9_]*\(,\|\s\)*{"me=e-1
  148. syn region  VRMLNodes          start="\<EXTERNPROTO\>\(,\|\s\)*[A-Za-z_]"ms=e start="\<EXTERNPROTO\>\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment
  149. syn region  VRMLNodes          start="PROTO\>\(,\|\s\)*[A-Za-z_]"ms=e start="PROTO\>\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment
  150.  
  151. syn keyword VRMLTypes          SFBool SFColor MFColor SFFloat MFFloat
  152. syn keyword VRMLTypes          SFImage SFInt32 MFInt32 SFNode MFNode
  153. syn keyword VRMLTypes          SFRotation MFRotation SFString MFString
  154. syn keyword VRMLTypes          SFTime SFVec2f MFVec2f SFVec3f MFVec3f
  155.  
  156. syn keyword VRMLfTypes         field exposedField eventIn eventOut
  157.  
  158. syn keyword VRMLValues         TRUE FALSE NULL
  159.  
  160. syn keyword VRMLProtos         contained EXTERNPROTO PROTO IS
  161.  
  162. syn keyword VRMLRoutes         contained ROUTE TO
  163.  
  164. " match definitions.
  165. syn match   VRMLSpecial           contained "\\[0-9][0-9][0-9]\|\\."
  166. syn region  VRMLString            start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=VRMLSpecial
  167. syn match   VRMLCharacter         "'[^\\]'"
  168. "syn match   VRMLSpecialCharacter  "'\\.'"
  169. syn match   VRMLNumber            "[-+]\=\<[0-9]\+\(\.[0-9]\+\)\=\([eE]\{1}[-+]\=[0-9]\+\)\=\>\|0[xX][0-9a-fA-F]\+\>"
  170. syn match   VRMLNumber            "0[xX][0-9a-fA-F]\+\>"
  171. syn match   VRMLComment           "#.*$"
  172.  
  173. " newlines should count as whitespace, but they can't be matched yet :-(
  174. syn region  VRMLRouteNode         start="[^O]TO\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment
  175. syn region  VRMLRouteNode         start="ROUTE\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment
  176. syn region  VRMLInstName          start="DEF\>"hs=e+1 skip="DEF\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment
  177. syn region  VRMLInstName          start="USE\>"hs=e+1 skip="USE\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment
  178.  
  179. syn keyword VRMLInstances      contained DEF USE
  180. syn sync minlines=1
  181. syn match   VRMLBraces         "[{}]"
  182. syn match   VRMLBrackets       "[\[\]]"
  183.  
  184. if !exists("did_VRML_syntax_inits")
  185.   let did_VRML_syntax_inits = 1
  186.   " The default methods for highlighting.  Can be overridden later
  187.   hi link VRMLCharacter  VRMLString
  188.   hi link VRMLSpecialCharacter VRMLSpecial
  189.   hi link VRMLNumber     VRMLString
  190.   hi link VRMLValues     VRMLString
  191.   hi link VRMLString     String
  192.   hi link VRMLSpecial    Special
  193.   hi link VRMLComment    Comment
  194.   hi link VRMLNodes      Statement
  195.   hi link VRMLFields     Type
  196.   hi link VRMLEvents     Type
  197.   hi      VRMLfTypes     ctermfg=6 guifg=Brown
  198.   hi link VRMLInstances  PreCondit
  199.   hi link VRMLRoutes     PreCondit
  200.   hi link VRMLProtos     PreProc
  201.   hi link VRMLRouteNode  Identifier
  202.   hi link VRMLInstName   Identifier
  203.   hi link VRMLTypes      Identifier
  204. endif
  205.  
  206. let b:current_syntax = "vrml"
  207.  
  208. " vim: ts=8
  209.