GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SYNTAX::HIGHLIGHT::ENGINE::KATE::TEMPLATE (3)

.ds Aq ’

NAME

Syntax::Highlight::Engine::Kate::Template - a template for syntax highlighting plugins

CONTENTS

DESCRIPTION

Syntax::Highlight::Engine::Kate::Template is a framework to assist authors of plugin modules. All methods to provide highlighting to the Syntax::Highlight::Engine::Kate module are there, Just no syntax definitions and callbacks. An instance of Syntax::Highlight::Engine::Kate::Template should never be created, it’s meant to be sub classed only.

METHODS

<B>attributesB>(?$attributesref?); Sets and returns a reference to the attributes hash.
<B>basecontextB>(?$context?); Sets and returns the basecontext instance variable. This is the context that is used when highlighting starts.
<B>capturedB>($cap); Puts $cap in the first element of the stack, the current context. Used when the context is dynamic.
<B>capturedGetB>($num); Returns the $num’th element that was captured in the current context.
<B>capturedParseB>($string, $mode); If <B>B>$mode<B>B> is specified, <B>B>$string<B>B> should only be one character long and numeric. <B>capturedParseB> will return the Nth captured element of the current context.

If <B>B>$mode<B>B> is not specified, all occurences of %[1-9] will be replaced by the captured element of the current context.

<B>columnB> returns the column position in the line that is currently highlighted.
<B>contextdataB>(\%data); Sets and returns a reference to the contextdata hash.
<B>contextInfoB>($context, $item); returns the value of several context options. <B>B>$item<B>B> can be <B>callbackB>, <B>attributeB>, <B>lineendingB>, <B>linebeginningB>, <B>fallthroughB>.
<B>contextParseB>($plugin, $context); Called by the plugins after a test succeeds. if <B>B>$context<B>B> has following values:



 #pop       returns to the previous context, removes to top item in the stack. Can
            also be specified as #pop#pop etc.
 #stay      does nothing.
 ##....     Switches to the plugin specified in .... and assumes its basecontext.
 ....       Swtiches to the context specified in ....



<B>deliminatorsB>(?$delim?); Sets and returns a string that is a regular expression for detecting deliminators.
<B>engineB> Returns a reference to the Syntax::Highlight::Engine::Kate module that created this plugin.
<B>firstnonspaceB>($string); returns true if the current line did not contain a non-spatial character so far and the first character in <B>B>$string<B>B> is also a spatial character.
<B>formatTableB> sets and returns the instance variable <B>format_tableB>. See also the option <B>format_tableB>
<B>highlightB>($text); highlights $text. It does so by selecting the proper callback from the <B>commandsB> hash and invoke it. It will do so untill $text has been reduced to an empty string. returns a paired list of snippets of text and the attribute with which they should be highlighted.
<B>highlightTextB>($text); highlights $text and reformats it using the <B>format_tableB> and <B>substitutionsB>
<B>includePluginB>($language, \$text); Includes the plugin for <B>B>$language<B>B> in the highlighting.
<B>includeRulesB>($language, \$text); Includes the plugin for <B>B>$language<B>B> in the highlighting.
<B>keywordscaseB> Sets and returns the keywordscase instance variable.
<B>lastcharB> return the last character that was processed.
<B>lastcharDeliminatorB> returns true if the last character processed was a deliminator.
<B>linesegmentB> returns the string of text in the current line that has been processed so far,
<B>linestartB> returns true if processing is currently at the beginning of a line.
<B>listAddB>(’listname’, $item1, $item2 ...); Adds a list to the ’lists’ hash.
<B>listsB>(?\%lists?); sets and returns the instance variable ’lists’.
<B>outB>(?\@highlightedlist?); sets and returns the instance variable ’out’.
<B>parseResultB>(\$text, $match, $lookahaed, $column, $firstnonspace, $context, $attribute); Called by every one of the test methods below. If the test matches, it will do a couple of subtests. If <B>B>$column<B>B> is a defined numerical value it will test if the process is at the requested column. If <B>B>$firnonspace<B>B> is true, it will test this also. Ig it is not a look ahead and all tests are passed, <B>B>$match<B>B> is then parsed and removed from <B>$$textB>.
<B>pluginGetB>($language); Returns a reference to a plugin object for the specified language. Creating an instance if needed.
<B>resetB> Resets the highlight engine to a fresh state, does not change the syntx.
<B>snippetB> Contains the current snippet of text that will have one attribute. The moment the attribute changes it will be parsed.
<B>snippetAppendB>($string) appends $string to the current snippet.
<B>snippetAttributeB>($attribute) Sets and returns the used attribute.
<B>snippetForceB> Forces the current snippet to be parsed.
<B>snippetParseB>($text, ?$attribute?) If attribute is defined and differs from the current attribute it does a snippetForce and sets the current attribute to <B>B>$attribute<B>B>. Then it does a snippetAppend of <B>B>$text<B>B>
<B>stackB> sets and returns the instance variable ’stack’, a reference to an array
<B>stackPullB> retrieves the element that is on top of the stack, decrements stacksize by 1.
<B>stackPushB>($tagname); puts $tagname on top of the stack, increments stacksize by 1
<B>stackTopB> Retrieves the element that is on top of the stack.
<B>stateCompareB>(\@state) Compares two lists, \@state and the stack. returns true if they match.
<B>stateGetB> Returns a list containing the entire stack.
<B>stateSetB>(@list) Accepts @list as the current stack.
<B>substitutionsB> sets and returns a reference to the substitutions hash.
The methods below all return a boolean value.
<B>testAnyCharB>(\$text, $string, $insensitive, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testDetectCharB>(\$text, $char, $insensitive, $dynamic, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testDetect2CharsB>(\$text, $char1, $char2, $insensitive, $dynamic, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testDetectIdentifierB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testDetectSpacesB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testFloatB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testHlCCharB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testHlCHexB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testHlCOctB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testHlCStringCharB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testIntB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testKeywordB>(\$text, $list, $insensitive, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testLineContinueB>(\$text, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testRangeDetectB>(\$text, $char1, $char2, $insensitive, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testRegExprB>(\$text, $reg, $insensitive, $dynamic, $lookahaed, $column, $firstnonspace, $context, $attribute);
<B>testStringDetectB>(\$text, $string, $insensitive, $dynamic, I$lookahaed, $column, $firstnonspace, $context, $attribute);

ACKNOWLEDGEMENTS

All the people who wrote Kate and the syntax highlight xml files.

AUTHOR AND COPYRIGHT

This module is written and maintained by:

Hans Jeuken < haje at toneel dot demon dot nl >

Copyright (c) 2006 by Hans Jeuken, all rights reserved.

You may freely distribute and/or modify this module under same terms as Perl itself

SEE ALSO

Synax::Highlight::Engine::Kate http:://www.kate-editor.org
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SYNTAX::HIGHLIGHT::ENGINE::KATE::TEMPLATE (3) 2015-08-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.