GeSHi Language File for POV-Ray

This file goes into /dokuwiki/inc/geshi/.

<?php
/*************************************************************************************
 * povray.php
 * -----
 * Author: David Wagner (honeypot@handbasket.org)
 * Contributors:
 * Copyright: (c) 2007 David Wagner (honeypot@handbasket.org)
 * Release Version: 1.0.7.15
 * CVS Revision Version: $Revision: 1.13.2.4 $
 * Date Started: 2007/02/23
 * Last Modified: $Date: 2006/09/23 02:05:46 $
 *
 * POV-Ray language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2004/XX/XX (1.0.4)
 *   -  Added a couple of new keywords (Jack Lloyd)
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *  -  Figure out how many different types of keywords there are
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/
 
//editing help: http://qbnz.com/highlighter/geshi-doc.html#language-files
 
$language_data = array (
	'LANG_NAME' => 'POV-Ray 3.6 SDL ',
	'COMMENT_SINGLE' => array(1 => '//'),
	'COMMENT_MULTI' => array('/*' => '*/'),
	'CASE_KEYWORDS' => GESHI_CAPS_LOWER,
	'QUOTEMARKS' => array('"'),
	'ESCAPE_CHAR' => '\\',
	'KEYWORDS' => array(
		1 => array(//LANGUAGE DIRECTIVES; #xxx
			'#write', '#while', '#warning', '#version', '#undef', '#switch',
			'#statistics',	'#render', '#read', '#range', '#macro', '#local', '#include',
			'#ifndef', '#ifdef', '#if', '#fopen', '#fclose', '#error', '#end', '#else',
			'#default', '#declare', '#debug', '#case', '#break'
			),
		2 => array(//OBJECTS, lights, camera,...;  xxx{...}
			'triangle', 'torus', 'text', 'superellipsoid', 'sphere_sweep', 'sphere', 'sor',
			'smooth_triangle', 'prism', 'lathe', 'julia_fractal', 'height_field',
			'cylinder', 'cone', 'box', 'blob',
			'polygon', 'mesh2', 'mesh', 'disc', 'bicubic_patch',
			'quadric', 'quartic', 'poly', 'plane', 'parametric', 'object', 'isosurface', 'cubic',
			'union', 'merge', 'intersection', 'difference',
 
			'light_source', 'light_group', 'camera','sky_sphere', 
 
			'texture','clipped_by', 'bounded_by', 'material', 'interior_texture', 'interior',
			'pigment','finish', 'normal',
			'radiosity','photons',
			'global_settings','fog', 'media'
			),
		3 => array(//BUILT-IN FUNCTIONS: vector, then float functions; xxx(...)
			'vturbulence', 'vrotate', 'vnormalize', 'vcross', 'vaxis_rotate', 'trace',
			'max_extent', 'min_extent',
 
			'vlength', 'vdot', 'val', 'tanh', 'tan', 'strlen', 'strcmp', 'sqrt',
			'sinh', 'sin', 'select', 'seed', 'rand', 'radians', 'pow', 'mod',
			'min', 'max', 'ln', 'floor', 'file_exists', 'exp', 'div',
			'dimensions', 'dimension_size', 'degrees', 'defined', 'cosh', 'cos', 'ceil',
			'atanh', 'atan2', 'atan', 'asinh', 'asin', 'asc', 'acosh', 'acos', 'abs',
 
			'function', 'sum', 'prod'
			),
		4 => array(//float identfiers and dot items
			'yes', 'version', 'true', 'pi', 'on', 'off', 'no', 'image_height', 'image_width',
			'initial_frame', 'initial_clock', 'frame_number', 'final_frame', 'final_clock', 
			'false', 'clock_on', 'clock_delta', 'clock',
			'z', 'y', 'x', 'v', 'u', 't', 'red', 'green', 'blue', 'filter'
			),
		5 => array(//attributes; xxx 0.123
			'charset', 'adc_bailout', 'ambient_light', 'hf_gray_16', 'irid_wavelength',
			'max_trace_level', 'max_intersections', 'number_of_waves', 'noise_generator',
			'always_sample', 'brightness', 'count', 'error_bound', 'gray_threshold', 'low_error_factor',
			'max_sample', 'minimum_reuse', 'nearest_count', 'pretrace_end', 'pretrace_start',
			'recursion_limit',
			'metric', 
			'color', 'transmit', 
			'scale', 'rotate', 'translate'
			),
		6 => array(//boolean keywords; THESE NEED SORTING (rev) AND PROPER CLASSIFICATION
			'inverse', 'hollow', 'hierarchy', 'no_image', 'no_reflection', 'no_shadow',
			'double_illuminate', 'sturm',
			'aa_level', 'aa_threshold', 'absorption', 'accuracy', 'adaptive', 'agate', 'agate_turb',
			'all', 'all_intersections', 'alpha', 'altitude', 'ambient', 'angle', 'aperture', 'append',
			'arc_angle', 'area_light', 'array', 'ascii', 'assumed_gamma', 'autostop', 'average', 
			'b_spline', 'background', 'bezier_spline', 'black_hole', 'blur_samples', 'boxed', 'bozo', 
			'brick', 'brick_size', 'brilliance', 'bump_map', 'bump_size', 'bumps', 'caustics', 'cells', 
			'checker', 'chr', 'circular', 'collect', 'color_map', 'colour', 'colour_map', 
			'component', 'composite', 'concat', 'confidence', 'conic_sweep', 'conserve_energy', 
			'contained_by', 'control0', 'control1', 'coords', 'crackle', 'crand', 'cube', 
			'cubic_spline', 'cubic_wave', 'cutaway_textures', 'cylindrical', 'density', 'density_file', 
			'density_map', 'dents', 'df3', 'diffuse', 'direction', 'dispersion', 'dispersion_samples', 
			'dist_exp', 'distance', 'eccentricity', 'emission', 'evaluate', 'expand_thresholds', 
			'exponent', 'exterior', 'extinction', 'face_indices', 'facets', 'fade_color', 'fade_colour', 
			'fade_distance', 'fade_power', 'falloff', 'falloff_angle', 'fisheye', 'flatness', 'flip', 
			'focal_point', 'fog_alt', 'fog_offset', 'fog_type', 'form', 'frequency', 'fresnel', 
			'gather', 'gif', 'global_lights', 'gradient', 'granite', 'gray', 'hexagon', 'hypercomplex', 
			'iff', 'image_map', 'image_pattern', 'inside', 'inside_vector', 'int', 'internal', 
			'interpolate', 'intervals', 'ior', 'irid', 'jitter', 'jpeg', 'julia', 'lambda', 'leopard', 
			'linear_spline', 'linear_sweep', 'load_file', 'location', 'log', 'look_at', 'looks_like', 
			'magnet', 'major_radius', 'mandel', 'map_type', 'marble', 'material_map', 'matrix', 
			'max_gradient', 'max_iteration', 'max_trace', 'media_attenuation', 'media_interaction', 
			'metallic', 'method', 'mortar', 'natural_spline', 'no_bump_scale', 
			'normal_indices', 'normal_map', 'normal_vectors', 'octaves', 'offset', 'omega', 'omnimax', 
			'once', 'onion', 'open', 'orient', 'orientation', 'orthographic', 'panoramic', 'parallel', 
			'pass_through', 'pattern', 'perspective', 'pgm', 'phase', 'phong', 'phong_size', 
			'pigment_map', 'pigment_pattern', 'planar', 'png', 'point_at', 'poly_wave', 'pot', 'ppm', 
			'precision', 'precompute', 'projected_through', 'pwr', 'quadratic_spline', 'quaternion', 
			'quick_color', 'quick_colour', 'quilted', 'radial', 'radius', 'rainbow', 'ramp_wave', 
			'ratio', 'reciprocal', 'reflection', 'reflection_exponent', 'refraction', 'repeat', 'rgb', 
			'rgbf', 'rgbft', 'rgbt', 'right', 'ripples', 'roughness', 'samples', 'save_file', 
			'scallop_wave', 'scattering', 'shadowless', 'sine_wave', 'size', 'sky', 
			'slice', 'slope', 'slope_map', 'smooth', 'solid', 'spacing', 'specular', 
			'spherical', 'spiral1', 'spiral2', 'spline', 'split_union', 'spotlight', 'spotted', 'sqr', 
			'str', 'strength', 'strlwr', 'strupr', 'substr', 'sys', 'target', 'texture_list', 
			'texture_map', 'tga', 'thickness', 'threshold', 'tiff', 'tightness', 'tile2', 'tiles', 
			'tolerance', 'toroidal', 'transform', 'triangle_wave', 'ttf', 
			'turb_depth', 'turbulence', 'type', 'u_steps', 'ultra_wide_angle', 'up', 'use_alpha', 
			'use_color', 'use_colour', 'use_index', 'utf8', 'uv_indices', 'uv_mapping', 'uv_vectors', 
			'v_steps', 'variance', 'vertex_vectors', 'vstr', 'warp', 'water_level', 'waves', 'width', 
			'wood', 'wrinkles'
			),
		7 => array(//DEPRECATED
		'write', 'while', 'warning', 'undef', 'switch', 'statistics', 'render', 'read', 'range',
		'macro', 'local', 'include', 'ifdef', 'ifndef', 'if', 'fopen', 'fclose', 'error',
		'end', 'else', 'default', 'declare', 'debug', 'break', 'case'
			),
		),
	'SYMBOLS' => array(
		'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', '|', '?', ':', '&lt;', '&gt;', '<', '>'
		),
	'CASE_SENSITIVE' => array(
		GESHI_COMMENTS => true,
		1 => true,
		2 => true,
		3 => true,
		4 => true,
		5 => true,
		6 => true,
		7 => true
		),
	'STYLES' => array(
		'KEYWORDS' => array(
			1 => 'color: #b1b100;',
			2 => 'color: #000000; font-weight: bold;',
			3 => 'color: #000066; font-weight: bold;',
			4 => 'color: #993333;',
			5 => 'color: #999999;',
			6 => 'color: #339933;',
			7 => 'color: #999900; text-decoration: underline;'
			),
		'COMMENTS' => array(
			1 => 'color: #808080; font-style: italic;',
			2 => 'color: #339933;',
			'MULTI' => 'color: #808080; font-style: italic;'
			),
		'ESCAPE_CHAR' => array(
			0 => 'color: #000099; font-weight: bold;'
			),
		'BRACKETS' => array(
			0 => 'color: #66cc66;'
			),
		'STRINGS' => array(
			0 => 'color: #ff0000;'
			),
		'NUMBERS' => array(
			0 => 'color: #cc66cc;'
			),
		'METHODS' => array(
			1 => 'color: #202020;',
			2 => 'color: #202020;'
			),
		'SYMBOLS' => array(
			0 => 'color: #66cc66;'
			),
		'REGEXPS' => array(
			),
		'SCRIPT' => array(
			)
		),
	'URLS' => array(
		1 => '',
		2 => '',
		//3 => '',
		3 => 'http://www.povray.org/documentation/view/3.6.1/228/#{FNAME}',
		4 => ''
		),
	'OOLANG' => false,
	'OBJECT_SPLITTERS' => array(
		1 => '.',
		2 => '::'
		),
	'REGEXPS' => array(
		),
	'STRICT_MODE_APPLIES' => GESHI_NEVER,
	'SCRIPT_DELIMITERS' => array(
		),
	'HIGHLIGHT_STRICT_BLOCK' => array(
		)
);
 
?>

Dokuwiki GeSHi CSS Classes

Note the styles defined above have no effect using this wiki software since Dokuwiki defines default styles for GeSHi CSS classes in /dokuwiki/lib/styles/.

/* syntax highlighting code */
.code .br0  { color: #66cc66; }
.code .co1  { color: #808080; font-style: italic; }
.code .co2  { color: #808080; font-style: italic; }
.code .coMULTI  { color: #808080; font-style: italic; }
.code .es0  { color: #000099; font-weight: bold; }
.code .kw1  { color: #b1b100; }
.code .kw2  { color: #000000; font-weight: bold; }
.code .kw3  { color: #000066; }
.code .kw4  { color: #993333; }
.code .kw5  { color: #0000ff; }
.code .me0  { color: #006600; }
.code .nu0  { color: #cc66cc; }
.code .re0  { color: #0000ff; }
.code .re1  { color: #0000ff; }
.code .re2  { color: #0000ff; }
.code .re4  { color: #009999; }
.code .sc0  { color: #00bbdd; }
.code .sc1  { color: #ddbb00; }
.code .sc2  { color: #009900; }
.code .st0  { color: #ff0000; }

Personal Tools