|<B>languageB>||Specify the language you want highlighted. Look in the <B>PLUGINSB> section for supported languages.|
If you created your own language plugins you may specify a list of them with this option.
|<B>format_tableB>||This option must be specified if the <B>highlightTextB> method needs to do anything useful for you. All mentioned keys in the synopsis must be specified.|
|<B>substitutionsB>||With this option you can specify additional formatting options.|
<B>extensionsB> Returns a reference to the extensions hash. <B>languageB>(?$language?) Sets and returns the current language that is highlighted. When setting the language a reset is also done. <B>languageAutoSetB>($filename) Suggests language name for the given file <B>B>$filename<B>B>. <B>languageListB> Returns a list of languages for which plugins have been defined. <B>languagePlugB>($language, ?$insensitive?) Returns the module name of the plugin for <B>B>$language<B>B>.
e.g. $highlighter->languagePlug(HtMl, 1); will return HTML.
<B>languageProposeB>($filename) Suggests language name for the given file <B>B>$filename<B>B>. <B>sectionsB> Returns a reference to the sections hash.
In the Kate XML syntax files you find under the section <B><itemDatasB>> entries like <itemData name="Unknown Property" defStyleNum="dsError" italic="1"/>. Kate is an editor so it is ok to have definitions for foreground and background colors and so on. However, since this module is supposed to be a more universal highlight engine, the attributes need to be fully abstract. In which case, Kate does not have enough default attributes defined to fulfill all needs. Kate defines the following standard attributes:
This module leaves out the <B><dsB>> part and uses following additional attributes:
o <B>dsNormalB> o <B>dsKeywordB> o <B>dsDataTypeB> o <B>dsDecValB> o <B>dsBaseNB> o <B>dsFloatB> o <B>dsCharB> o <B>dsStringB> o <B>dsCommentB> o <B>dsOthersB> o <B>dsAlertB> o <B>dsFunctionB> o <B>dsRegionMarkerB> o <B>dsErrorB>
I have modified the XML files so that each highlight mode would get its own attribute. In quite a few cases still not enough attributes were defined. So in some languages different modes have the same attribute.
o <B>BStringB> o <B>IStringB> o <B>OperatorB> o <B>ReservedB> o <B>VariableB>
Below is an overview of existing plugins. All have been tested on use and can be created. The ones for which no sample file is available are marked. Those marked OK have highlighted the test file without apparent mistakes. This does not mean that all bugs are shaken out.
Float is detected differently than in the Kate editor.
The regular expression engine of the Kate editor, qregexp, appears to be more tolerant to mistakes in regular expressions than Perl. This might lead to error messages and differences in behaviour. Most of the problems were sorted out while developing, because error messages appeared. For as far as differences in behaviour is concerned, testing is the only way to find out, so I hope the users out there will be able to tell me more.
This module is mimicking the behaviour of the syntax highlight engine of the Kate editor. If you find a bug/mistake in the highlighting, please check if Kate behaves in the same way. If yes, the cause is likely to be found there.
Rebuild the scripts I am using to generate the modules from XML files so they are more pro-actively tracking flaws in the build of the XML files like missing lists. Also regular expressions in the XML can be tested better before they are used in plugins.
Refine the test methods in Syntax::Highlight::Engine::Kate::Template, so that choices for case sensitivity, dynamic behaviour and lookahead can be determined at generate time of the plugin, might increase throughput.
Implement code folding.
All the people who wrote Kate and the syntax highlight XML files.
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 the same terms as Perl itself.
|perl v5.20.3||SYNTAX::HIGHLIGHT::ENGINE::KATE (3)||2015-08-01|