annotate runtime/syntax/pov.vim @ 6992:942510a7c61b

Added tag v7-4-813 for changeset 814f1f569e4a
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Aug 2015 14:26:19 +0200
parents 0877b8d6370e
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
2 " Language: PoV-Ray(tm) 3.7 Scene Description Language
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2011-04-23
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Required Vim Version: 6.0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Setup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version >= 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Croak when an old Vim is sourcing us.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or use a version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Top level stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword povCommands global_settings
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
23 syn keyword povObjects array atmosphere background bicubic_patch blob box camera component cone cubic cylinder disc fog height_field isosurface julia_fractal lathe light_group light_source mesh mesh2 object ovus parametric pattern photons plane poly polygon polynomial prism quadric quartic rainbow sky_sphere smooth_triangle sor sphere sphere_sweep spline superellipsoid text torus triangle
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword povCSG clipped_by composite contained_by difference intersection merge union
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword povAppearance interior material media texture interior_texture texture_list
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword povGlobalSettings ambient_light assumed_gamma charset hf_gray_16 irid_wavelength max_intersections max_trace_level number_of_waves radiosity noise_generator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword povTransform inverse matrix rotate scale translate transform
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Descriptors
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
30 syn keyword povDescriptors finish inside_vector normal pigment uv_mapping uv_vectors vertex_vectors
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
31 syn keyword povDescriptors adc_bailout always_sample brightness count error_bound distance_maximum gray_threshold load_file low_error_factor maximum_reuse max_sample media minimum_reuse mm_per_unit nearest_count normal pretrace_end pretrace_start recursion_limit save_file
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
32 syn keyword povDescriptors color colour rgb rgbt rgbf rgbft srgb srgbf srgbt srgbft
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
33 syn match povDescriptors "\<\(red\|green\|blue\|gray\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword povDescriptors bump_map color_map colour_map image_map material_map pigment_map quick_color quick_colour normal_map texture_map image_pattern pigment_pattern
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
35 syn keyword povDescriptors ambient brilliance conserve_energy crand diffuse fresnel irid metallic phong phong_size refraction reflection reflection_exponent roughness specular subsurface
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
36 syn keyword povDescriptors cylinder fisheye mesh_camera omnimax orthographic panoramic perspective spherical ultra_wide_angle
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
37 syn keyword povDescriptors agate aoi average brick boxed bozo bumps cells checker crackle cylindrical dents facets function gradient granite hexagon julia leopard magnet mandel marble onion pavement planar quilted radial ripples slope spherical spiral1 spiral2 spotted square tiles tile2 tiling toroidal triangular waves wood wrinkles
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword povDescriptors density_file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword povDescriptors area_light shadowless spotlight parallel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword povDescriptors absorption confidence density emission intervals ratio samples scattering variance
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword povDescriptors distance fog_alt fog_offset fog_type turb_depth
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword povDescriptors b_spline bezier_spline cubic_spline evaluate face_indices form linear_spline max_gradient natural_spline normal_indices normal_vectors quadratic_spline uv_indices
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword povDescriptors target
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Modifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword povModifiers caustics dispersion dispersion_samples fade_color fade_colour fade_distance fade_power ior
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword povModifiers bounded_by double_illuminate hierarchy hollow no_shadow open smooth sturm threshold water_level
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
48 syn keyword povModifiers importance no_radiosity
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword povModifiers hypercomplex max_iteration precision quaternion slice
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword povModifiers conic_sweep linear_sweep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword povModifiers flatness type u_steps v_steps
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
52 syn keyword povModifiers aa_level aa_threshold adaptive area_illumination falloff jitter looks_like media_attenuation media_interaction method point_at radius tightness
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
53 syn keyword povModifiers angle aperture bokeh blur_samples confidence direction focal_point h_angle location look_at right sky up v_angle variance
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
54 syn keyword povModifiers all bump_size gamma interpolate map_type once premultiplied slope_map use_alpha use_color use_colour use_index
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
55 syn match povModifiers "\<\(filter\|transmit\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword povModifiers black_hole agate_turb brick_size control0 control1 cubic_wave density_map flip frequency interpolate inverse lambda metric mortar octaves offset omega phase poly_wave ramp_wave repeat scallop_wave sine_wave size strength triangle_wave thickness turbulence turb_depth type warp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword povModifiers eccentricity extinction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword povModifiers arc_angle falloff_angle width
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword povModifiers accuracy all_intersections altitude autostop circular collect coords cutaway_textures dist_exp expand_thresholds exponent exterior gather global_lights major_radius max_trace no_bump_scale no_image no_reflection orient orientation pass_through precompute projected_through range_divider solid spacing split_union tolerance
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " Words not marked `reserved' in documentation, but...
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
62 syn keyword povBMPType alpha exr gif hdr iff jpeg pgm png pot ppm sys tga tiff
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword povFontType ttf contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword povDensityType df3 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword povCharset ascii utf8 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " Math functions on floats, vectors and strings
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
68 syn keyword povFunctions abs acos acosh asc asin asinh atan atan2 atanh bitwise_and bitwise_or bitwise_xor ceil cos cosh defined degrees dimensions dimension_size div exp file_exists floor inside int internal ln log max min mod pow prod radians rand seed select sin sinh sqrt strcmp strlen sum tan tanh val vdot vlength vstr vturbulence
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword povFunctions min_extent max_extent trace vcross vrotate vaxis_rotate vnormalize vturbulence
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
70 syn keyword povFunctions chr concat datetime now substr str strupr strlwr
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword povJuliaFunctions acosh asinh atan cosh cube pwr reciprocal sinh sqr tanh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Specialities
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
74 syn keyword povConsts clock clock_delta clock_on final_clock final_frame frame_number initial_clock initial_frame input_file_name image_width image_height false no off on pi true version yes
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
75 syn match povConsts "\<[tuvxyz]\>"
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
76 syn match povDotItem "\.\@<=\(blue\|green\|gray\|filter\|red\|transmit\|hf\|t\|u\|v\|x\|y\|z\)\>" display
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn region povComment start="/\*" end="\*/" contains=povTodo,povComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match povComment "//.*" contains=povTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match povCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn sync ccomment povComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword povTodo TODO FIXME XXX NOT contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn cluster povPRIVATE add=povTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " Language directives
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
88 syn match povConditionalDir "#\s*\(else\|end\|for\|if\|ifdef\|ifndef\|switch\|while\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match povLabelDir "#\s*\(break\|case\|default\|range\)\>"
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
90 syn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>" nextgroup=povDeclareOption skipwhite
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
91 syn keyword povDeclareOption deprecated once contained nextgroup=povDeclareOption skipwhite
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match povIncludeDir "#\s*include\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>"
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
94 syn keyword povFileDataType uint8 sint8 unit16be uint16le sint16be sint16le sint32le sint32be
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match povMessageDir "#\s*\(debug\|error\|render\|statistics\|warning\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region povFileOpen start="#\s*fopen\>" skip=+"[^"]*"+ matchgroup=povOpenType end="\<\(read\|write\|append\)\>" contains=ALLBUT,PovParenError,PovBraceError,@PovPRIVATE transparent keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 " Literal strings
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
99 syn match povSpecialChar "\\u\x\{4}\|\\\d\d\d\|\\." contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn region povString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=povSpecialChar oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn cluster povPRIVATE add=povSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 " Catch errors caused by wrong parenthesization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn region povParen start='(' end=')' contains=ALLBUT,povParenError,@povPRIVATE transparent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match povParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn region povBrace start='{' end='}' contains=ALLBUT,povBraceError,@povPRIVATE transparent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match povBraceError "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 " Define the default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 hi def link povComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 hi def link povTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 hi def link povNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 hi def link povString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 hi def link povFileOpen Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 hi def link povConsts Constant
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
119 hi def link povDotItem povSpecial
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 hi def link povBMPType povSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 hi def link povCharset povSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 hi def link povDensityType povSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 hi def link povFontType povSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 hi def link povOpenType povSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 hi def link povSpecialChar povSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 hi def link povSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 hi def link povConditionalDir PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 hi def link povLabelDir PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 hi def link povDeclareDir Define
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
130 hi def link povDeclareOption Define
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 hi def link povIncludeDir Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 hi def link povFileDir PreProc
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
133 hi def link povFileDataType Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 hi def link povMessageDir Debug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 hi def link povAppearance povDescriptors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 hi def link povObjects povDescriptors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 hi def link povGlobalSettings povDescriptors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 hi def link povDescriptors Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 hi def link povJuliaFunctions PovFunctions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 hi def link povModifiers povFunctions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 hi def link povFunctions Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 hi def link povCommands Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 hi def link povTransform Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 hi def link povCSG Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 hi def link povParenError povError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 hi def link povBraceError povError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 hi def link povCommentError povError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 hi def link povError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 let b:current_syntax = "pov"