1 # Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved.
2 # This program is free software; you can redistribute it and/or
3 # modify it under the same terms as Perl itself.
5 # This file was generated from the 'commonlisp.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Dominik Haumann (dhdev@gmx.de)
11 #generated: Sun Feb 3 22:02:04 2008, localtime
13 package Syntax::Highlight::Engine::Kate::Common_Lisp;
15 our $VERSION = '0.06';
19 use base('Syntax::Highlight::Engine::Kate::Template');
23 my $class = ref($proto) || $proto;
24 my $self = $class->SUPER::new(@_);
27 'Brackets' => 'BString',
29 'Comment' => 'Comment',
31 'Decimal' => 'DecVal',
32 'Definition' => 'Others',
34 'Function' => 'Function',
35 'Keyword' => 'Keyword',
36 'Modifier' => 'Reserved',
38 'Operator' => 'Operator',
39 'Region Marker' => 'RegionMarker',
41 'Variable' => 'Variable',
43 $self->listAdd('definitions',
47 'define-compiler-macro',
49 'define-method-combination',
50 'define-modify-macro',
51 'define-setf-expander',
53 'define-symbol-macro',
64 $self->listAdd('keywords',
86 'arithmetic-error-operands',
87 'arithmetic-error-operation',
90 'array-dimension-limit',
94 'array-has-fill-pointer-p',
98 'array-row-major-index',
100 'array-total-size-limit',
152 'broadcast-stream-streams',
158 'call-arguments-limit',
217 'compile-file-pathname',
219 'compiled-function-p',
222 'compiler-macro-function',
226 'compute-applicable-methods',
229 'concatenated-stream',
230 'concatenated-stream-streams',
242 'copy-pprint-dispatch',
260 'decode-universal-time',
271 'destructuring-bind',
275 'directory-namestring',
281 'do-exeternal-symbols',
282 'do-external-symbols',
288 'double-float-epsilon',
289 'double-float-negative-epsilon',
295 'echo-stream-input-stream',
296 'echo-stream-output-stream',
300 'encode-universal-time',
304 'ensure-directories-exist',
305 'ensure-generic-function',
328 'file-error-pathname',
333 'file-string-length',
355 'floating-point-inexact',
356 'floating-point-invalid-operation',
357 'floating-point-overflow',
358 'floating-point-underflow',
373 'function-lambda-expression',
382 'get-dispatch-macro-character',
383 'get-internal-real-time',
384 'get-internal-run-time',
385 'get-macro-character',
386 'get-output-stream-string',
388 'get-setf-expansion',
390 'get-universal-time',
400 'hash-table-rehash-size',
401 'hash-table-rehash-threshold',
416 'initialize-instance',
422 'integer-decode-float',
425 'interactive-stream-p',
427 'internal-time-units-per-second',
429 'invalid-method-error',
432 'invoke-restart-interactively',
438 'lambda-list-keywords',
439 'lambda-parameters-limit',
445 'least-negative-double-float',
446 'least-negative-long-float',
447 'least-negative-normalized-double-float',
448 'least-negative-normalized-long-float',
449 'least-negative-normalized-short-float',
450 'least-negative-normalized-single-float',
451 'least-negative-short-float',
452 'least-negative-single-float',
453 'least-positive-double-float',
454 'least-positive-long-float',
455 'least-positive-normalized-double-float',
456 'least-positive-normalized-long-float',
457 'least-positive-normalized-short-float',
458 'least-positive-normalized-single-float',
459 'least-positive-short-float',
460 'least-positive-single-float',
465 'lisp-implementation-type',
466 'lisp-implementation-version',
474 'load-logical-pathname-translations',
485 'logical-pathname-translations',
495 'long-float-epsilon',
496 'long-float-negative-epsilon',
511 'make-broadcast-stream',
513 'make-concatenated-stream',
515 'make-dispatch-macro-character',
519 'make-instances-obsolete',
522 'make-load-form-saving-slots',
529 'make-string-input-stream',
530 'make-string-output-stream',
532 'make-synonym-stream',
533 'make-two-way-stream',
553 'method-combination',
554 'method-combination-error',
560 'most-negative-double-float',
561 'most-negative-fixnum',
562 'most-negative-long-float',
563 'most-negative-short-float',
564 'most-negative-single-float',
565 'most-positive-double-float',
566 'most-positive-fixnum',
567 'most-positive-long-float',
568 'most-positive-short-float',
569 'most-positive-single-float',
571 'multiple-value-bind',
572 'multiple-value-call',
573 'multiple-value-list',
574 'multiple-value-prog1',
575 'multiple-value-seteq',
576 'multiple-value-setq',
577 'multiple-values-limit',
586 'no-applicable-method',
597 'nstring-capitalize',
606 'nsubstitute-if-not',
624 'package-error-package',
627 'package-shadowing-symbols',
629 'package-used-by-list',
637 'pathname-directory',
654 'pprint-exit-if-list-exhausted',
658 'pprint-logical-block',
668 'print-not-readable',
669 'print-not-readable-object',
671 'print-unreadable-object',
702 'read-delimited-list',
706 'read-preserving-whitespace',
716 'reinitialize-instance',
757 'set-dispatch-macro-character',
759 'set-macro-character',
760 'set-pprint-dispatch',
761 'set-syntax-from-char',
770 'short-float-epsilon',
771 'short-float-negative-epsilon',
778 'simple-base-string',
780 'simple-bit-vector-p',
781 'simple-condition-format-arguments',
782 'simple-condition-format-control',
791 'single-flaot-epsilon',
793 'single-float-epsilon',
794 'single-float-negative-epsilon',
811 'special-operator-p',
819 'standard-generic-function',
826 'stream-element-type',
828 'stream-error-stream',
829 'stream-external-format',
842 'string-not-greaterp',
844 'string-right-strim',
882 'synonym-stream-symbol',
897 'translate-logical-pathname',
898 'translate-pathname',
904 'two-way-stream-input-stream',
905 'two-way-stream-output-stream',
909 'type-error-expected-type',
914 'unbound-slot-instance',
916 'undefined-function',
927 'update-instance-for-different-class',
928 'update-instance-for-redefined-class',
929 'upgraded-array-element-type',
930 'upgraded-complex-part-type',
935 'user-homedir-pathname',
941 'vector-push-extend',
948 'with-compilation-unit',
949 'with-condition-restarts',
950 'with-hash-table-iterator',
951 'with-input-from-string',
954 'with-output-to-string',
955 'with-package-iterator',
956 'with-simple-restart',
958 'with-standard-io-syntax',
970 $self->listAdd('modifiers',
988 ':displaced-index-offset',
1000 ':if-does-not-exist:pretty',
1002 ':include:print-function',
1005 ':initial-contents',
1024 ':preserve-whitespace',
1029 ':rehash-threshold',
1031 ':rename-and-delete',
1044 $self->listAdd('symbols',
1065 $self->listAdd('variables',
1067 '*break-on-signals*',
1068 '*break-on-signals*',
1069 '*break-on-warnings*',
1070 '*compile-file-pathname*',
1071 '*compile-file-pathname*',
1072 '*compile-file-truename*',
1073 '*compile-file-truename*',
1075 '*compile-verbose*',
1076 '*compile-verbose*',
1079 '*default-pathname-defaults*',
1088 '*macroexpand-hook*',
1100 '*print-miser-width*',
1101 '*print-miser-width*',
1102 '*print-pprint-dispatch*',
1103 '*print-pprint-dispatch*',
1107 '*print-right-margin*',
1108 '*print-right-margin*',
1112 '*read-default-float-format*',
1117 '*standard-output*',
1121 $self->contextdata({
1122 'MultiLineComment' => {
1123 callback => \&parseMultiLineComment,
1124 attribute => 'Comment',
1127 callback => \&parseNormal,
1128 attribute => 'Normal',
1130 'SpecialNumber' => {
1131 callback => \&parseSpecialNumber,
1132 attribute => 'Normal',
1133 lineending => '#pop',
1136 callback => \&parseString,
1137 attribute => 'String',
1139 'function_decl' => {
1140 callback => \&parsefunction_decl,
1141 attribute => 'Function',
1144 $self->deliminators('\\s||\\.|\\(|\\)|,|\\%|\\&|;|\\[|\\]|\\^|\\{|\\||\\}|\\~|-|\\+|\\*|\\?|\\!|<|>|=|\\/|:|#|\\\\');
1145 $self->basecontext('Normal');
1146 $self->keywordscase(0);
1148 bless ($self, $class);
1153 return 'Common Lisp';
1156 sub parseMultiLineComment {
1157 my ($self, $text) = @_;
1158 # attribute => 'Comment'
1162 # endRegion => 'region'
1163 # type => 'Detect2Chars'
1164 if ($self->testDetect2Chars($text, '|', '#', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
1171 my ($self, $text) = @_;
1172 # String => ';+\s*BEGIN.*$'
1173 # attribute => 'Region Marker'
1174 # beginRegion => 'region'
1175 # context => '#stay'
1177 if ($self->testRegExpr($text, ';+\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
1180 # String => ';+\s*END.*$'
1181 # attribute => 'Region Marker'
1182 # context => '#stay'
1183 # endRegion => 'region'
1185 if ($self->testRegExpr($text, ';+\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
1189 # attribute => 'Comment'
1190 # context => '#stay'
1192 if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
1195 # attribute => 'Comment'
1196 # beginRegion => 'region'
1199 # context => 'MultiLineComment'
1200 # type => 'Detect2Chars'
1201 if ($self->testDetect2Chars($text, '#', '|', 0, 0, 0, undef, 0, 'MultiLineComment', 'Comment')) {
1204 # attribute => 'Brackets'
1206 # context => '#stay'
1207 # type => 'DetectChar'
1208 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Brackets')) {
1211 # attribute => 'Brackets'
1213 # context => '#stay'
1214 # type => 'DetectChar'
1215 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#stay', 'Brackets')) {
1218 # String => 'keywords'
1219 # attribute => 'Keyword'
1220 # context => '#stay'
1222 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
1225 # String => 'symbols'
1226 # attribute => 'Operator'
1227 # context => '#stay'
1229 if ($self->testKeyword($text, 'symbols', 0, undef, 0, '#stay', 'Operator')) {
1232 # String => 'modifiers'
1233 # attribute => 'Modifier'
1234 # context => '#stay'
1236 if ($self->testKeyword($text, 'modifiers', 0, undef, 0, '#stay', 'Modifier')) {
1239 # String => 'variables'
1240 # attribute => 'Variable'
1241 # context => '#stay'
1243 if ($self->testKeyword($text, 'variables', 0, undef, 0, '#stay', 'Variable')) {
1246 # String => 'definitions'
1247 # attribute => 'Definition'
1248 # context => 'function_decl'
1250 if ($self->testKeyword($text, 'definitions', 0, undef, 0, 'function_decl', 'Definition')) {
1254 # attribute => 'Char'
1255 # context => '#stay'
1257 if ($self->testRegExpr($text, '#\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) {
1260 # attribute => 'String'
1262 # context => 'String'
1263 # type => 'DetectChar'
1264 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
1267 # String => '#[bodxei]'
1268 # attribute => 'Char'
1269 # context => 'SpecialNumber'
1271 if ($self->testRegExpr($text, '#[bodxei]', 0, 0, 0, undef, 0, 'SpecialNumber', 'Char')) {
1275 # attribute => 'Decimal'
1276 # context => '#stay'
1278 if ($self->testRegExpr($text, '#[tf]', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
1281 # attribute => 'Float'
1282 # context => '#stay'
1284 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
1287 # attribute => 'Decimal'
1288 # context => '#stay'
1290 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
1296 sub parseSpecialNumber {
1297 my ($self, $text) = @_;
1298 # attribute => 'Float'
1301 if ($self->testFloat($text, 0, undef, 0, '#pop', 'Float')) {
1304 # attribute => 'Decimal'
1307 if ($self->testInt($text, 0, undef, 0, '#pop', 'Decimal')) {
1310 # attribute => 'BaseN'
1313 if ($self->testHlCOct($text, 0, undef, 0, '#pop', 'BaseN')) {
1316 # attribute => 'Float'
1319 if ($self->testHlCHex($text, 0, undef, 0, '#pop', 'Float')) {
1326 my ($self, $text) = @_;
1328 # attribute => 'Char'
1329 # context => '#stay'
1331 if ($self->testRegExpr($text, '#\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) {
1334 # attribute => 'String'
1337 # type => 'DetectChar'
1338 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
1344 sub parsefunction_decl {
1345 my ($self, $text) = @_;
1346 # String => '\s*[A-Za-z0-9-+\<\>//\*]*\s*'
1347 # attribute => 'Function'
1350 if ($self->testRegExpr($text, '\\s*[A-Za-z0-9-+\\<\\>//\\*]*\\s*', 0, 0, 0, undef, 0, '#pop', 'Function')) {
1363 Syntax::Highlight::Engine::Kate::Common_Lisp - a Plugin for Common Lisp syntax highlighting
1367 require Syntax::Highlight::Engine::Kate::Common_Lisp;
1368 my $sh = new Syntax::Highlight::Engine::Kate::Common_Lisp([
1373 Syntax::Highlight::Engine::Kate::Common_Lisp is a plugin module that provides syntax highlighting
1374 for Common Lisp to the Syntax::Haghlight::Engine::Kate highlighting engine.
1376 This code is generated from the syntax definition files used
1377 by the Kate project.
1378 It works quite fine, but can use refinement and optimization.
1380 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
1386 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
1392 Unknown. If you find any, please contact the author