xref: /vim-8.2.3635/runtime/syntax/pov.vim (revision 89bcfda6)
1071d4279SBram Moolenaar" Vim syntax file
28e5af3e5SBram Moolenaar" Language: PoV-Ray(tm) 3.7 Scene Description Language
38e5af3e5SBram Moolenaar" Maintainer: David Necas (Yeti) <[email protected]>
48e5af3e5SBram Moolenaar" Last Change: 2011-04-23
5071d4279SBram Moolenaar" Required Vim Version: 6.0
6071d4279SBram Moolenaar
7071d4279SBram Moolenaar" Setup
8*89bcfda6SBram Moolenaar" quit when a syntax file was already loaded
9071d4279SBram Moolenaarif exists("b:current_syntax")
10071d4279SBram Moolenaar  finish
11071d4279SBram Moolenaarendif
12071d4279SBram Moolenaar
13071d4279SBram Moolenaarsyn case match
14071d4279SBram Moolenaar
15071d4279SBram Moolenaar" Top level stuff
16071d4279SBram Moolenaarsyn keyword povCommands global_settings
178e5af3e5SBram Moolenaarsyn 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
18071d4279SBram Moolenaarsyn keyword povCSG clipped_by composite contained_by difference intersection merge union
19071d4279SBram Moolenaarsyn keyword povAppearance interior material media texture interior_texture texture_list
20071d4279SBram Moolenaarsyn keyword povGlobalSettings ambient_light assumed_gamma charset hf_gray_16 irid_wavelength max_intersections max_trace_level number_of_waves radiosity noise_generator
21071d4279SBram Moolenaarsyn keyword povTransform inverse matrix rotate scale translate transform
22071d4279SBram Moolenaar
23071d4279SBram Moolenaar" Descriptors
248e5af3e5SBram Moolenaarsyn keyword povDescriptors finish inside_vector normal pigment uv_mapping uv_vectors vertex_vectors
258e5af3e5SBram Moolenaarsyn 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
268e5af3e5SBram Moolenaarsyn keyword povDescriptors color colour rgb rgbt rgbf rgbft srgb srgbf srgbt srgbft
278e5af3e5SBram Moolenaarsyn match povDescriptors "\<\(red\|green\|blue\|gray\)\>"
28071d4279SBram Moolenaarsyn 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
298e5af3e5SBram Moolenaarsyn keyword povDescriptors ambient brilliance conserve_energy crand diffuse fresnel irid metallic phong phong_size refraction reflection reflection_exponent roughness specular subsurface
308e5af3e5SBram Moolenaarsyn keyword povDescriptors cylinder fisheye mesh_camera omnimax orthographic panoramic perspective spherical ultra_wide_angle
318e5af3e5SBram Moolenaarsyn 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
32071d4279SBram Moolenaarsyn keyword povDescriptors density_file
33071d4279SBram Moolenaarsyn keyword povDescriptors area_light shadowless spotlight parallel
34071d4279SBram Moolenaarsyn keyword povDescriptors absorption confidence density emission intervals ratio samples scattering variance
35071d4279SBram Moolenaarsyn keyword povDescriptors distance fog_alt fog_offset fog_type turb_depth
36071d4279SBram Moolenaarsyn 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
37071d4279SBram Moolenaarsyn keyword povDescriptors target
38071d4279SBram Moolenaar
39071d4279SBram Moolenaar" Modifiers
40071d4279SBram Moolenaarsyn keyword povModifiers caustics dispersion dispersion_samples fade_color fade_colour fade_distance fade_power ior
41071d4279SBram Moolenaarsyn keyword povModifiers bounded_by double_illuminate hierarchy hollow no_shadow open smooth sturm threshold water_level
428e5af3e5SBram Moolenaarsyn keyword povModifiers importance no_radiosity
43071d4279SBram Moolenaarsyn keyword povModifiers hypercomplex max_iteration precision quaternion slice
44071d4279SBram Moolenaarsyn keyword povModifiers conic_sweep linear_sweep
45071d4279SBram Moolenaarsyn keyword povModifiers flatness type u_steps v_steps
468e5af3e5SBram Moolenaarsyn keyword povModifiers aa_level aa_threshold adaptive area_illumination falloff jitter looks_like media_attenuation media_interaction method point_at radius tightness
478e5af3e5SBram Moolenaarsyn keyword povModifiers angle aperture bokeh blur_samples confidence direction focal_point h_angle location look_at right sky up v_angle variance
488e5af3e5SBram Moolenaarsyn keyword povModifiers all bump_size gamma interpolate map_type once premultiplied slope_map use_alpha use_color use_colour use_index
498e5af3e5SBram Moolenaarsyn match povModifiers "\<\(filter\|transmit\)\>"
50071d4279SBram Moolenaarsyn 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
51071d4279SBram Moolenaarsyn keyword povModifiers eccentricity extinction
52071d4279SBram Moolenaarsyn keyword povModifiers arc_angle falloff_angle width
53071d4279SBram Moolenaarsyn 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
54071d4279SBram Moolenaar
55071d4279SBram Moolenaar" Words not marked `reserved' in documentation, but...
568e5af3e5SBram Moolenaarsyn keyword povBMPType alpha exr gif hdr iff jpeg pgm png pot ppm sys tga tiff
57071d4279SBram Moolenaarsyn keyword povFontType ttf contained
58071d4279SBram Moolenaarsyn keyword povDensityType df3 contained
59071d4279SBram Moolenaarsyn keyword povCharset ascii utf8 contained
60071d4279SBram Moolenaar
61071d4279SBram Moolenaar" Math functions on floats, vectors and strings
628e5af3e5SBram Moolenaarsyn 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
63071d4279SBram Moolenaarsyn keyword povFunctions min_extent max_extent trace vcross vrotate vaxis_rotate vnormalize vturbulence
648e5af3e5SBram Moolenaarsyn keyword povFunctions chr concat datetime now substr str strupr strlwr
65071d4279SBram Moolenaarsyn keyword povJuliaFunctions acosh asinh atan cosh cube pwr reciprocal sinh sqr tanh
66071d4279SBram Moolenaar
67071d4279SBram Moolenaar" Specialities
688e5af3e5SBram Moolenaarsyn 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
698e5af3e5SBram Moolenaarsyn match povConsts "\<[tuvxyz]\>"
708e5af3e5SBram Moolenaarsyn match povDotItem "\.\@<=\(blue\|green\|gray\|filter\|red\|transmit\|hf\|t\|u\|v\|x\|y\|z\)\>" display
71071d4279SBram Moolenaar
72071d4279SBram Moolenaar" Comments
73071d4279SBram Moolenaarsyn region povComment start="/\*" end="\*/" contains=povTodo,povComment
74071d4279SBram Moolenaarsyn match povComment "//.*" contains=povTodo
75071d4279SBram Moolenaarsyn match povCommentError "\*/"
76071d4279SBram Moolenaarsyn sync ccomment povComment
77071d4279SBram Moolenaarsyn sync minlines=50
78071d4279SBram Moolenaarsyn keyword povTodo TODO FIXME XXX NOT contained
79071d4279SBram Moolenaarsyn cluster povPRIVATE add=povTodo
80071d4279SBram Moolenaar
81071d4279SBram Moolenaar" Language directives
828e5af3e5SBram Moolenaarsyn match povConditionalDir "#\s*\(else\|end\|for\|if\|ifdef\|ifndef\|switch\|while\)\>"
83071d4279SBram Moolenaarsyn match povLabelDir "#\s*\(break\|case\|default\|range\)\>"
848e5af3e5SBram Moolenaarsyn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>" nextgroup=povDeclareOption skipwhite
858e5af3e5SBram Moolenaarsyn keyword povDeclareOption deprecated once contained nextgroup=povDeclareOption skipwhite
86071d4279SBram Moolenaarsyn match povIncludeDir "#\s*include\>"
87071d4279SBram Moolenaarsyn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>"
888e5af3e5SBram Moolenaarsyn keyword povFileDataType uint8 sint8 unit16be uint16le sint16be sint16le sint32le sint32be
89071d4279SBram Moolenaarsyn match povMessageDir "#\s*\(debug\|error\|render\|statistics\|warning\)\>"
90071d4279SBram Moolenaarsyn region povFileOpen start="#\s*fopen\>" skip=+"[^"]*"+ matchgroup=povOpenType end="\<\(read\|write\|append\)\>" contains=ALLBUT,PovParenError,PovBraceError,@PovPRIVATE transparent keepend
91071d4279SBram Moolenaar
92071d4279SBram Moolenaar" Literal strings
938e5af3e5SBram Moolenaarsyn match povSpecialChar "\\u\x\{4}\|\\\d\d\d\|\\." contained
94071d4279SBram Moolenaarsyn region povString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=povSpecialChar oneline
95071d4279SBram Moolenaarsyn cluster povPRIVATE add=povSpecialChar
96071d4279SBram Moolenaar
97071d4279SBram Moolenaar" Catch errors caused by wrong parenthesization
98071d4279SBram Moolenaarsyn region povParen start='(' end=')' contains=ALLBUT,povParenError,@povPRIVATE transparent
99071d4279SBram Moolenaarsyn match povParenError ")"
100071d4279SBram Moolenaarsyn region povBrace start='{' end='}' contains=ALLBUT,povBraceError,@povPRIVATE transparent
101071d4279SBram Moolenaarsyn match povBraceError "}"
102071d4279SBram Moolenaar
103071d4279SBram Moolenaar" Numbers
104071d4279SBram Moolenaarsyn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="
105071d4279SBram Moolenaar
106071d4279SBram Moolenaar" Define the default highlighting
107071d4279SBram Moolenaarhi def link povComment Comment
108071d4279SBram Moolenaarhi def link povTodo Todo
109071d4279SBram Moolenaarhi def link povNumber Number
110071d4279SBram Moolenaarhi def link povString String
111071d4279SBram Moolenaarhi def link povFileOpen Constant
112071d4279SBram Moolenaarhi def link povConsts Constant
1138e5af3e5SBram Moolenaarhi def link povDotItem povSpecial
114071d4279SBram Moolenaarhi def link povBMPType povSpecial
115071d4279SBram Moolenaarhi def link povCharset povSpecial
116071d4279SBram Moolenaarhi def link povDensityType povSpecial
117071d4279SBram Moolenaarhi def link povFontType povSpecial
118071d4279SBram Moolenaarhi def link povOpenType povSpecial
119071d4279SBram Moolenaarhi def link povSpecialChar povSpecial
120071d4279SBram Moolenaarhi def link povSpecial Special
121071d4279SBram Moolenaarhi def link povConditionalDir PreProc
122071d4279SBram Moolenaarhi def link povLabelDir PreProc
123071d4279SBram Moolenaarhi def link povDeclareDir Define
1248e5af3e5SBram Moolenaarhi def link povDeclareOption Define
125071d4279SBram Moolenaarhi def link povIncludeDir Include
126071d4279SBram Moolenaarhi def link povFileDir PreProc
1278e5af3e5SBram Moolenaarhi def link povFileDataType Special
128071d4279SBram Moolenaarhi def link povMessageDir Debug
129071d4279SBram Moolenaarhi def link povAppearance povDescriptors
130071d4279SBram Moolenaarhi def link povObjects povDescriptors
131071d4279SBram Moolenaarhi def link povGlobalSettings povDescriptors
132071d4279SBram Moolenaarhi def link povDescriptors Type
133071d4279SBram Moolenaarhi def link povJuliaFunctions PovFunctions
134071d4279SBram Moolenaarhi def link povModifiers povFunctions
135071d4279SBram Moolenaarhi def link povFunctions Function
136071d4279SBram Moolenaarhi def link povCommands Operator
137071d4279SBram Moolenaarhi def link povTransform Operator
138071d4279SBram Moolenaarhi def link povCSG Operator
139071d4279SBram Moolenaarhi def link povParenError povError
140071d4279SBram Moolenaarhi def link povBraceError povError
141071d4279SBram Moolenaarhi def link povCommentError povError
142071d4279SBram Moolenaarhi def link povError Error
143071d4279SBram Moolenaar
144071d4279SBram Moolenaarlet b:current_syntax = "pov"
145