File: highlight.lisp

package info (click to toggle)
libsyntax-highlight-engine-kate-perl 0.14%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,844 kB
  • sloc: perl: 84,065; ruby: 176; asm: 166; cpp: 144; jsp: 128; haskell: 116; sh: 111; f90: 99; python: 98; ml: 75; javascript: 61; xml: 43; yacc: 37; ansic: 32; tcl: 29; lisp: 24; makefile: 15; awk: 13; php: 5
file content (36 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
;; This test file tests kates common lisp highlighting
#|
multilinecomment :)
|#

;BEGIN region marker

;END end

(defun bin-search (obj vec)
  (let ((len (length vec)))
    (and (not (zerop len))
         (finder obj vec 0 (- len 1)))))

(defun parse-date (str)
  (let ((toks (tokens str #'constituent 0)))
    (list (parse-integer (first toks))
          (parse-month   (second toks))
          (parse-integer (third toks)))))

(defconstant month-names
  #("jan" "feb" "mar" "apr" "may" "jun"
    "jul" "aug" "sep" "oct" "nov" "dec"))

(defstruct buf
  vec (start -1) (used -1) (new -1) (end -1))

(defparameter *words* (make-hash-table :size 10000))

(defmacro while (test &rest body)
  `(do ()
       ((not ,test))
     ,@body))

(define-modify-macro append1f (val)
  (lambda (lst val) (append lst (list val))))