-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.lisp
More file actions
90 lines (86 loc) · 2.16 KB
/
repl.lisp
File metadata and controls
90 lines (86 loc) · 2.16 KB
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
;;; -*- mode: Lisp; coding: utf-8-unix -*-
#-:repl
(defpackage :repl
(:use :cl)
(:export :undefined-variable-error
:unknown-op-error
:malformed-error
:malformed-let-error
:has-feature?
:*repl-features*
:env-define
:env-symbol-position
:env-stack-position
:env-push-binding
:env-pop-bindings
:read-number
:read-symbol
:read-token
:*TOKEN* :*MEMORY*
:ptr-read-byte
:ptr-write-byte
:ptr-read-array
:ptr-read-short
:ptr-read-ushort
:ptr-write-short
:ptr-read-long
:ptr-read-ulong
:ptr-write-long
:ptr-read-float
:ptr-write-float
:ptr-write-string
:ptr-read-string
:ptr-find-string=
:symbol-string
:symbol-id
:space?
:null?
:symbol-char?
:special?
:alpha?
:digit?
:special-form?
:index-of
:test
:test-read-token
:test-compile
:test-compile-let
:test-compile-quote
:test-compile-set-local
:test-compile-set-global
:test-compile-lambda
:test-compile-named-lambda
:test-compile-set-lambda
:test-compile-if
:test-compile-asm
:test-compile-values
:test-compile-mvb
:test-compile-cond
:test-compile-conditional
:test-write-to-array
:test-write
:string=
:repl-read
:make-op
:make-short
:emit-lookup
:emit-lookup-call
:emit-value
:repl-compile
:repl-eval
:write-to-array
:write-to-file
:compile-to-file
:repl-file
:disassmble-asm
:repl-defstruct
))
#+(or :sbcl :ecl)
(in-package :repl)
(require "compiler")
(require "outputter")
(require "file-outputter")
(require "disassembler")
;;;
;;; Compatibility layer functions
;;;