1
- # golox : a lox tree-walk interpreter written in Go
1
+ # golisp : a lisp (yisp) tree-walk interpreter written in Go
2
2
3
- This is a working interpreter of the Lox language, as
4
- used in the book Crafting Interpreters by Robert Nystrom
3
+ This is a working interpreter for a subset of the Lisp language (aka Yisp)
4
+ as outlined by Don Yessick for CS403 at the University of Alabama
5
5
6
- This interpreter is feature complete through Chapter 10
7
- of Crafting Interpreters, meaning it implements variables,
8
- printing, loops, control flow, and functions (complete with
9
- working return statements and control flow). Does NOT include variable resolution, classes, or inheritence <sub >(yuck)</sub >
6
+ This interpreter is feature complete for the language as defined by Yessick
7
+ Notes on choices made:
10
8
11
- Current native functions include: ``` clock() ``` , and ``` toStr(number) ```
9
+ ``` true ``` is the truth value
10
+
11
+ ``` nil ``` used for false/nil value
12
+
13
+ ``` = ``` used for equality checking
14
+
15
+ ``` cond ``` used for conditional statements
16
+
17
+ The language is not case sensitive
12
18
13
19
# Instructions
14
20
@@ -21,15 +27,15 @@ $ go version
21
27
22
28
Finally, clone the repository into the current directory with
23
29
```
24
- $ git clone https://github.com/reilandeubank/golox
30
+ $ git clone https://github.com/reilandeubank/golisp
25
31
```
26
32
or into ``` path/to/directory ``` using
27
33
```
28
- $ git clone https://github.com/reilandeubank/golox path/to/directory
34
+ $ git clone https://github.com/reilandeubank/golisp path/to/directory
29
35
```
30
36
31
37
## Compiling
32
- First, move into the ``` golox ``` directory that was just created
38
+ First, move into the ``` golisp ``` directory that was just created
33
39
34
40
From here, you can use the ``` make ``` command to compile the interpreter into the executable ``` ./main ``` in the current directory.
35
41
@@ -45,7 +51,7 @@ $ ./main
45
51
```
46
52
to start a REPL or
47
53
```
48
- $ ./main file.lox
54
+ $ ./main file.lsp
49
55
```
50
- to run ``` file.lox ```
56
+ to run ``` file.lsp ```
51
57
0 commit comments