Mercurial > vim
annotate runtime/syntax/pov.vim @ 23914:b56544307168
Added tag v8.2.2499 for changeset dfdd973cf0c995ddf3f304b7a9739eccd199be64
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 11 Feb 2021 19:15:04 +0100 |
parents | 43efa4f5a8ea |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2788 | 2 " Language: PoV-Ray(tm) 3.7 Scene Description Language |
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> | |
4 " Last Change: 2011-04-23 | |
7 | 5 " Required Vim Version: 6.0 |
6 | |
7 " Setup | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2788
diff
changeset
|
8 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2788
diff
changeset
|
9 if exists("b:current_syntax") |
7 | 10 finish |
11 endif | |
12 | |
13 syn case match | |
14 | |
15 " Top level stuff | |
16 syn keyword povCommands global_settings | |
2788 | 17 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 | 18 syn keyword povCSG clipped_by composite contained_by difference intersection merge union |
19 syn keyword povAppearance interior material media texture interior_texture texture_list | |
20 syn keyword povGlobalSettings ambient_light assumed_gamma charset hf_gray_16 irid_wavelength max_intersections max_trace_level number_of_waves radiosity noise_generator | |
21 syn keyword povTransform inverse matrix rotate scale translate transform | |
22 | |
23 " Descriptors | |
2788 | 24 syn keyword povDescriptors finish inside_vector normal pigment uv_mapping uv_vectors vertex_vectors |
25 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 | |
26 syn keyword povDescriptors color colour rgb rgbt rgbf rgbft srgb srgbf srgbt srgbft | |
27 syn match povDescriptors "\<\(red\|green\|blue\|gray\)\>" | |
7 | 28 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 | 29 syn keyword povDescriptors ambient brilliance conserve_energy crand diffuse fresnel irid metallic phong phong_size refraction reflection reflection_exponent roughness specular subsurface |
30 syn keyword povDescriptors cylinder fisheye mesh_camera omnimax orthographic panoramic perspective spherical ultra_wide_angle | |
31 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 | 32 syn keyword povDescriptors density_file |
33 syn keyword povDescriptors area_light shadowless spotlight parallel | |
34 syn keyword povDescriptors absorption confidence density emission intervals ratio samples scattering variance | |
35 syn keyword povDescriptors distance fog_alt fog_offset fog_type turb_depth | |
36 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 | |
37 syn keyword povDescriptors target | |
38 | |
39 " Modifiers | |
40 syn keyword povModifiers caustics dispersion dispersion_samples fade_color fade_colour fade_distance fade_power ior | |
41 syn keyword povModifiers bounded_by double_illuminate hierarchy hollow no_shadow open smooth sturm threshold water_level | |
2788 | 42 syn keyword povModifiers importance no_radiosity |
7 | 43 syn keyword povModifiers hypercomplex max_iteration precision quaternion slice |
44 syn keyword povModifiers conic_sweep linear_sweep | |
45 syn keyword povModifiers flatness type u_steps v_steps | |
2788 | 46 syn keyword povModifiers aa_level aa_threshold adaptive area_illumination falloff jitter looks_like media_attenuation media_interaction method point_at radius tightness |
47 syn keyword povModifiers angle aperture bokeh blur_samples confidence direction focal_point h_angle location look_at right sky up v_angle variance | |
48 syn keyword povModifiers all bump_size gamma interpolate map_type once premultiplied slope_map use_alpha use_color use_colour use_index | |
49 syn match povModifiers "\<\(filter\|transmit\)\>" | |
7 | 50 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 |
51 syn keyword povModifiers eccentricity extinction | |
52 syn keyword povModifiers arc_angle falloff_angle width | |
53 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 | |
54 | |
55 " Words not marked `reserved' in documentation, but... | |
2788 | 56 syn keyword povBMPType alpha exr gif hdr iff jpeg pgm png pot ppm sys tga tiff |
7 | 57 syn keyword povFontType ttf contained |
58 syn keyword povDensityType df3 contained | |
59 syn keyword povCharset ascii utf8 contained | |
60 | |
61 " Math functions on floats, vectors and strings | |
2788 | 62 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 | 63 syn keyword povFunctions min_extent max_extent trace vcross vrotate vaxis_rotate vnormalize vturbulence |
2788 | 64 syn keyword povFunctions chr concat datetime now substr str strupr strlwr |
7 | 65 syn keyword povJuliaFunctions acosh asinh atan cosh cube pwr reciprocal sinh sqr tanh |
66 | |
67 " Specialities | |
2788 | 68 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 |
69 syn match povConsts "\<[tuvxyz]\>" | |
70 syn match povDotItem "\.\@<=\(blue\|green\|gray\|filter\|red\|transmit\|hf\|t\|u\|v\|x\|y\|z\)\>" display | |
7 | 71 |
72 " Comments | |
73 syn region povComment start="/\*" end="\*/" contains=povTodo,povComment | |
74 syn match povComment "//.*" contains=povTodo | |
75 syn match povCommentError "\*/" | |
76 syn sync ccomment povComment | |
77 syn sync minlines=50 | |
78 syn keyword povTodo TODO FIXME XXX NOT contained | |
79 syn cluster povPRIVATE add=povTodo | |
80 | |
81 " Language directives | |
2788 | 82 syn match povConditionalDir "#\s*\(else\|end\|for\|if\|ifdef\|ifndef\|switch\|while\)\>" |
7 | 83 syn match povLabelDir "#\s*\(break\|case\|default\|range\)\>" |
2788 | 84 syn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>" nextgroup=povDeclareOption skipwhite |
85 syn keyword povDeclareOption deprecated once contained nextgroup=povDeclareOption skipwhite | |
7 | 86 syn match povIncludeDir "#\s*include\>" |
87 syn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>" | |
2788 | 88 syn keyword povFileDataType uint8 sint8 unit16be uint16le sint16be sint16le sint32le sint32be |
7 | 89 syn match povMessageDir "#\s*\(debug\|error\|render\|statistics\|warning\)\>" |
90 syn region povFileOpen start="#\s*fopen\>" skip=+"[^"]*"+ matchgroup=povOpenType end="\<\(read\|write\|append\)\>" contains=ALLBUT,PovParenError,PovBraceError,@PovPRIVATE transparent keepend | |
91 | |
92 " Literal strings | |
2788 | 93 syn match povSpecialChar "\\u\x\{4}\|\\\d\d\d\|\\." contained |
7 | 94 syn region povString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=povSpecialChar oneline |
95 syn cluster povPRIVATE add=povSpecialChar | |
96 | |
97 " Catch errors caused by wrong parenthesization | |
98 syn region povParen start='(' end=')' contains=ALLBUT,povParenError,@povPRIVATE transparent | |
99 syn match povParenError ")" | |
100 syn region povBrace start='{' end='}' contains=ALLBUT,povBraceError,@povPRIVATE transparent | |
101 syn match povBraceError "}" | |
102 | |
103 " Numbers | |
104 syn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\=" | |
105 | |
106 " Define the default highlighting | |
107 hi def link povComment Comment | |
108 hi def link povTodo Todo | |
109 hi def link povNumber Number | |
110 hi def link povString String | |
111 hi def link povFileOpen Constant | |
112 hi def link povConsts Constant | |
2788 | 113 hi def link povDotItem povSpecial |
7 | 114 hi def link povBMPType povSpecial |
115 hi def link povCharset povSpecial | |
116 hi def link povDensityType povSpecial | |
117 hi def link povFontType povSpecial | |
118 hi def link povOpenType povSpecial | |
119 hi def link povSpecialChar povSpecial | |
120 hi def link povSpecial Special | |
121 hi def link povConditionalDir PreProc | |
122 hi def link povLabelDir PreProc | |
123 hi def link povDeclareDir Define | |
2788 | 124 hi def link povDeclareOption Define |
7 | 125 hi def link povIncludeDir Include |
126 hi def link povFileDir PreProc | |
2788 | 127 hi def link povFileDataType Special |
7 | 128 hi def link povMessageDir Debug |
129 hi def link povAppearance povDescriptors | |
130 hi def link povObjects povDescriptors | |
131 hi def link povGlobalSettings povDescriptors | |
132 hi def link povDescriptors Type | |
133 hi def link povJuliaFunctions PovFunctions | |
134 hi def link povModifiers povFunctions | |
135 hi def link povFunctions Function | |
136 hi def link povCommands Operator | |
137 hi def link povTransform Operator | |
138 hi def link povCSG Operator | |
139 hi def link povParenError povError | |
140 hi def link povBraceError povError | |
141 hi def link povCommentError povError | |
142 hi def link povError Error | |
143 | |
144 let b:current_syntax = "pov" |