NAME

Tk::CodeText::Template - a template for syntax highlighting plugins

SYNOPSIS

DESCRIPTION

Tk::CodeText::Template is some kind of a dummy module. All methods to provide highlighting in a Tk::CodeText widget are there, ready to do nothing.

It is also a good starting point for writing modules for syntax highlighting for other languages.

METHODS

listAdd('listname', $item1, $item2 ...);

Adds a list to the 'lists' hash.

lists(?\%lists?);

sets and returns the instance variable 'lists'.

out(?\@highlightedlist?);

sets and returns the instance variable 'out'.

rules(?\@rules?)

sets and returns a reference to a list of tagnames and options. By default it is set to [].

snippetAppend($string)

appends $string to the current snippet.

snippetParse

parses the current snippet of text to the 'out' list, and assigns the tagname that is returned by stackTop to it. then snippet is set to ''.

stack

sets and returns the instance variable 'stack', a reference to an array.

stackPull

retrieves the element that is on top of the stack, decrements stacksize by 1.

stackPush($tagname)

puts $tagname on top of the stack, increments stacksize by 1

stackTop

retrieves the element that is on top of the stack.

stateCompare(\@state);

Compares two lists, \@state and the stack. returns true if they match.

stateGet

Returns a list containing the entire stack.

stateSet(@list)

Accepts @list as the current stack.

tokenParse('Tagname');

Parses the currently build snippet and tags it with 'Tagname'

tokenTest('Listname', $value);

returns true if $value is and element of 'Listname' in the 'lists' hash

AUTHOR

Hans Jeuken (haje@toneel.demon.nl)

BUGS

Unknown.