Syntax-Kamelon

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


Version 0.21 Mar 2, 2023
	Changed license to Perl
	Made the method Filename a full accessor
	Added #pop!context context switcher to Syntax::Kamelon::Builder
	Make Syntax::Kamelon::XMLData read comment information
	Make Syntax::Kamelon::Indexer interpret comment information
	Removed all XS related details. This package stays pure Perl
	Removed all Wx related stuff

	Updated syntax .desktop from version 2 to version 6
	Updated syntax 4DOS BatchToMemory from version 3 to version 10
	Updated syntax 4GL from version 2 to version 9
	Updated syntax 4GL-PER from version 2 to version 9
	Updated syntax ABAP from version 2 to version 7
	Updated syntax ABC from version 3 to version 8
	Updated syntax AHDL from version 3 to version 6
	Updated syntax AMPLE from version 3 to version 10
	Updated syntax ANS-Forth94 from version 3 to version 8
	Updated syntax ANSI C89 from version 4 to version 8
	Updated syntax ASN.1 from version 3 to version 6

MANIFEST  view on Meta::CPAN

lib/Syntax/Kamelon/XML/crk.xml
lib/Syntax/Kamelon/XML/cs.xml
lib/Syntax/Kamelon/XML/css-php.xml
lib/Syntax/Kamelon/XML/css.xml
lib/Syntax/Kamelon/XML/cubescript.xml
lib/Syntax/Kamelon/XML/cue.xml
lib/Syntax/Kamelon/XML/curry.xml
lib/Syntax/Kamelon/XML/d.xml
lib/Syntax/Kamelon/XML/debianchangelog.xml
lib/Syntax/Kamelon/XML/debiancontrol.xml
lib/Syntax/Kamelon/XML/desktop.xml
lib/Syntax/Kamelon/XML/diff.xml
lib/Syntax/Kamelon/XML/djangotemplate.xml
lib/Syntax/Kamelon/XML/dockerfile.xml
lib/Syntax/Kamelon/XML/dosbat.xml
lib/Syntax/Kamelon/XML/dot.xml
lib/Syntax/Kamelon/XML/doxyfile.xml
lib/Syntax/Kamelon/XML/doxygen.xml
lib/Syntax/Kamelon/XML/doxygenlua.xml
lib/Syntax/Kamelon/XML/dtd.xml
lib/Syntax/Kamelon/XML/e.xml

MANIFEST  view on Meta::CPAN

t/Bench/samples/highlight.ahdl
t/Bench/samples/highlight.asm
t/Bench/samples/highlight.asm-avr
t/Bench/samples/highlight.asm-nasm
t/Bench/samples/highlight.asp
t/Bench/samples/highlight.awk
t/Bench/samples/highlight.bib
t/Bench/samples/highlight.cmake
t/Bench/samples/highlight.cpp
t/Bench/samples/highlight.css
t/Bench/samples/highlight.desktop
t/Bench/samples/highlight.do
t/Bench/samples/highlight.dox
t/Bench/samples/highlight.e
t/Bench/samples/highlight.exu
t/Bench/samples/highlight.f90
t/Bench/samples/highlight.glsl
t/Bench/samples/highlight.hs
t/Bench/samples/highlight.html
t/Bench/samples/highlight.java
t/Bench/samples/highlight.js

bin/kamelon_bench  view on Meta::CPAN

		die "invalid argument $t, valid arguments -c, -cycles, -m, -mode, -v, -verbose";
	}
}

print "\nMode: $mode\n";
print "Cycles: $cycles\n";
print "Verbose: $verbose\n\n";


my %langs = (
	'.desktop' => "highlight.desktop",
	'AHDL' => "highlight.ahdl",
	'ASP' => "highlight.asp",
	'AVR Assembler' => "highlight.asm",
	'AWK' => "highlight.awk",
	'Bash' => "highlight.sh",
	'BibTeX' => "highlight.bib",
	'C++' => "highlight.cpp",
	'CMake' => "highlight.cmake",
	'CSS' => "highlight.css",
	'Clipper' => "highlight.prg",

lib/Syntax/Kamelon.pod  view on Meta::CPAN

    ],
 );
 while (my $in = <IFILE>) {
   $hl->Parse($in);
 }
 print $hl->Format;

=head1 DESCRIPTION

Kamelon is based on the syntax highlighting and code folding algorithms used in the Kate texteditor
of the KDE desktop. It replaces and supercedes Syntax::Highlight::Engine::Kate.

B<This is a rewrite> and not backwards compatible with Syntax::Highlight::Engine::Kate.

Instead of using plugin modules it loads Kate's syntax
highlight definition xml files directly. That makes development and testing a lot easier. It
also opens up a new field of applications like creating your own highlight definitions to 
neatly format your reports. Tons of bugs have been removed. Testing has been redesigned. 
It runs about four times faster than version 0.10 and is up to spec with the latest Kate 
highlight definitions.

lib/Syntax/Kamelon/Syntaxes.pod  view on Meta::CPAN

 Intel x86 (FASM)                        1
 Intel x86 (NASM)                        3
 MIPS Assembler                          3
 Motorola 68k (VASM/Devpac)              2
 Motorola DSP56k                         2
 PicAsm                                  3

=item B<Configuration>

 --NAME--                                --VERSION--
 .desktop                                2
 Adblock Plus                            1
 Apache Configuration                    3
 Asterisk                                3
 Cisco                                   2
 Doxyfile                                1
 Git Ignore                              2
 Gitolite                                2
 INI Files                               2
 Kconfig                                 5
 Nagios                                  2

lib/Syntax/Kamelon/XML/ahk.xml  view on Meta::CPAN

	<item> a_batchlines </item>
	<item> a_caretx </item>
	<item> a_carety </item>
	<item> a_computername </item>
	<item> a_controldelay </item>
	<item> a_cursor </item>
	<item> a_dd </item>
	<item> a_ddd </item>
	<item> a_dddd </item>
	<item> a_defaultmousespeed </item>
	<item> a_desktop </item>
	<item> a_desktopcommon </item>
	<item> a_detecthiddentext </item>
	<item> a_detecthiddenwindows </item>
	<item> a_endchar </item>
	<item> a_eventinfo </item>
	<item> a_exitreason </item>
	<item> a_formatfloat </item>
	<item> a_formatinteger </item>
	<item> a_gui </item>
	<item> a_guievent </item>
	<item> a_guicontrol </item>

lib/Syntax/Kamelon/XML/asn1.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
        You'll find the "Writing a Kate Highlighting XML File HOWTO" at http://kate.kde.org/doc/hlhowto.php
        This is a template for the XML format used for syntax highlight descriptions
        for the Kate text editor (http://kate.kde.org), which is part of the KDE
        desktop environment (http://www.kde.org).

        Use it as the base for your own syntax files.

        Look at language.dtd for some documentation of the allowed elements and their attributes.
        There is also a description of how to validate your syntax file.

        You'll find the "Writing a Kate Highlighting XML File HOWTO" at http://kate.kde.org/doc/hlhowto.php
-->
<language name="ASN.1" section="Markup" version="3" kateversion="2.3" extensions="*.asn;*.asn1" mimetype="" author="Philippe Rigault" license="GPL">
  <highlighting>

lib/Syntax/Kamelon/XML/desktop.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name=".desktop" version="2" kateversion="2.4"
          section="Configuration" extensions="*.desktop;*.kdelnk;*.desktop.cmake"
          mimetype="application/x-desktop">
  <highlighting>
    <contexts>
      <context attribute="Key" lineEndContext="#stay" name="Normal">
        <RegExpr String="\[.*\]$" attribute="Section" context="#stay" beginRegion="Section" endRegion="Section" column="0"/>
        <RegExpr String="\[.*\]" attribute="Language" context="Value"/>
        <DetectChar char="#" attribute="Comment" context="Comment" firstNonSpace="true"/>
        <DetectChar char="=" attribute="Normal Text" context="Value"/>
      </context>
      <context attribute="Normal Text" lineEndContext="#pop" name="Value"/>
      <context attribute="Comment"     lineEndContext="#pop" name="Comment"/>

lib/Syntax/Kamelon/XML/indexrc  view on Meta::CPAN

[.desktop]
ext=*.desktop;*.kdelnk;*.desktop.cmake
file=desktop.xml
menu=Configuration
mime=application/x-desktop
priority=
slcomment=#
version=2

[4DOS BatchToMemory]
ext=*.btm
file=4dos.xml
menu=Scripts
mime=
priority=

t/10-Bench.t  view on Meta::CPAN

use lib 't/testlib';

use Test::More tests => 46;
use Syntax::Kamelon;
use KamTest qw(CompareFile InitWorkFolder ClearTimer Format GetTime Parse WriteCleanUp);


my $cycles = 5;

my %langs = (
	'.desktop' => "highlight.desktop",
	'AHDL' => "highlight.ahdl",
	'ASP' => "highlight.asp",
	'AVR Assembler' => "highlight.asm",
	'AWK' => "highlight.awk",
	'Bash' => "highlight.sh",
	'BibTeX' => "highlight.bib",
	'C++' => "highlight.cpp",
	'CMake' => "highlight.cmake",
	'CSS' => "highlight.css",
	'Clipper' => "highlight.prg",



( run in 0.551 second using v1.01-cache-2.11-cpan-299005ec8e3 )