File: ilisp-kcl.el

package info (click to toggle)
xemacs21-packages 2009.02.17.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 116,928 kB
  • ctags: 88,975
  • sloc: lisp: 1,232,060; ansic: 16,570; java: 13,514; xml: 6,477; sh: 4,611; makefile: 4,036; asm: 3,007; perl: 839; cpp: 500; ruby: 257; csh: 96; haskell: 93; awk: 49; python: 47
file content (147 lines) | stat: -rw-r--r-- 4,223 bytes parent folder | download | duplicates (6)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-kcl.el --
;;; ILISP Kyoto Common Lisp dialect definition and derivative.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-kcl.el,v 1.4 2002-06-03 23:37:01 wbd Exp $

;;;%%%KCL--these dialects by Tom Emerson
;;; kcl-check-prompt doesn't after the first break because the
;;; number of ">" characters doesn't increase.

(defun kcl-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((was-in-break (and old (string-match ">+" old)))
 	 (old-level (if was-in-break
 			(- (match-end 0) (match-beginning 0))
 			0))
 	 (is-in-break (string-match ">+" new))
 	 (new-level (if is-in-break
 			(- (match-end 0) (match-beginning 0))
 			0)))
    (<= new-level old-level)))

;;;
(defdialect kcl "Kyoto Common LISP" common-lisp
  (setq comint-prompt-regexp "^>+"
        ilisp-error-regexp "Error: [^\n]*"
        ilisp-binary-extension "o"
        ilisp-init-binary-extension "o"
	ilisp-binary-command "\"o\""
        comint-fix-error ":q"
        comint-continue ":r"
	comint-prompt-status
	(function
	 (lambda (old line)
	   (comint-prompt-status old line 'kcl-check-prompt)))))
(if (not kcl-program) (setq kcl-program "kcl"))

;;;%%%AKCL
(defdialect akcl "Austin Kyoto Common LISP" kcl
  (setq comint-prompt-regexp "^[-A-Z]*>+")

  ;; ILD Support

  (setq ild-abort-string ":q"
	ild-continue-string ":r"
	ild-next-string ":up"
	ild-next-string-arg ":up %s"
	ild-previous-string ":down"
	ild-previous-string-arg ":down %s"
	ild-top-string ":down 1000000"
	ild-bottom-string ":up 1000000"
	ild-backtrace-string ":bt"
	ild-locals-string ":fr"
	ild-local-string-arg ":loc %s"
	ild-return-string ":r"
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
   )
(if (not akcl-program) (setq akcl-program "akcl"))


;;;%%%IBCL
(defdialect ibcl "Ibuki Common LISP" kcl
  (setq comint-prompt-regexp "^[-A-Z]*>+\\|^[-A-Z]* ->"
        comint-interrupt-regexp ">>Condition: Terminal Interrupt"
        comint-continue ":q"
        ilisp-reset ":q!"
        ilisp-error-regexp ">>Error:[^\n]*"))
(if (not ibcl-program) (setq ibcl-program "ibcl"))


;;; GCL and ECL (at least) have slightly different compilers and
;;; runtimes, hence we need to provide different extensions for their
;;; init files.
;;; Marco Antoniotti <marcoxa@icsi.berkeley.edu> 19951028.

;;; GCL -- I assume it is exactly as AKCL.
;;; Should check whether it is similar to IBUKI.

(defdialect gcl "GNU Common LISP" akcl
  (setq comint-prompt-regexp "^>+"
	ilisp-binary-extension "o"
        ilisp-init-binary-extension "gcl.o"
	ilisp-binary-command "\"o\""
	ilisp-init-binary-command "\"gcl.o\""
	)

  ;; ILD Support

  (setq ild-abort-string ":q"
	ild-continue-string ":r"
	ild-next-string ":up"
	ild-next-string-arg ":up %s"
	ild-previous-string ":down"
	ild-previous-string-arg ":down %s"
	ild-top-string ":down 1000000"
	ild-bottom-string ":up 1000000"
	ild-backtrace-string ":bt"
	ild-locals-string ":fr"
	ild-local-string-arg ":loc %s"
	ild-return-string ":r"
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
  )

(if (not gcl-program) (setq gcl-program "gcl"))


;;; ECL -- Beppe Attardi's developments over AKCL
;;;        Currently maintained by Juan Jose Garcia-Ripoll

(defdialect ecl "EcoLisp Common LISP" akcl
  (setq comint-prompt-regexp "^\\([A-Z].*\\)?>+ "
        ilisp-error-regexp "Broken at [^\n]*"
        comint-fix-error ":pop\n(progn (terpri) (values))") ; kludge

  ;; ILD Support.

  (setq ild-abort-string ":q"
	ild-continue-string ":r"
	ild-next-string ":up"
	ild-next-string-arg ":up %s"
	ild-previous-string ":down"
	ild-previous-string-arg ":down %s"
	ild-top-string ":down 1000000"
	ild-bottom-string ":up 1000000"
	ild-backtrace-string ":bt"
	ild-locals-string ":fr"
	ild-local-string-arg ":loc %s"
	ild-return-string ":r"
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
  )

(if (not ecl-program) (setq ecl-program "ecl"))

;;; end of file -- ilisp-kcl.el --