Jordan Orelli
b9d2afce74
fixed quoting behavior
...
previously it was impossible to do the following:
(define dave (quote (x y z)))
dave
the interpreter would incorrectly try to evaluate the (x y z), because
there was no quote level being recorded, and it was seen as being the
same as a regular sexp.
12 years ago
Jordan Orelli
c648ad597d
added cons, car, cdr
12 years ago
Jordan Orelli
86929974cc
added comparison operations
12 years ago
Jordan Orelli
591a0bfe29
added "symbol?"
12 years ago
Jordan Orelli
699c407c22
added some more input tests
12 years ago
Jordan Orelli
ee8a7d3ee5
added "null" and "null?"
12 years ago
Jordan Orelli
86c288d116
added "list?" builtin
12 years ago
Jordan Orelli
7ec2538005
added "list" builtin
12 years ago
Jordan Orelli
a4e7333f86
renamed typ3 -> tokenType
...
because really, typ3 was annoying to look at.
12 years ago
Jordan Orelli
0cd35bd286
fixed up lexing of -
12 years ago
Jordan Orelli
93c86871da
(*) now evaluates to 1 instead of 0
...
I have no idea if this matters or if it's in the spec or anything like
that.
12 years ago
Jordan Orelli
e31816c22f
added a bit of documentation
12 years ago
Jordan Orelli
8476cc531b
added "length"
12 years ago
Jordan Orelli
6395089039
added "not"
12 years ago
Jordan Orelli
175e8abf1b
added "begin" special form
12 years ago
Jordan Orelli
b023686c81
added support for unary -
12 years ago
Jordan Orelli
09de857f46
added support for period-initial floats
12 years ago
Jordan Orelli
ee6c15a90f
made arity checking a little saner
12 years ago
Jordan Orelli
3bd216c75b
fixed evaluation order problem in sexp
12 years ago
Jordan Orelli
51a27aaa9b
added lambda support
12 years ago
Jordan Orelli
77195faff8
adding a bit of documentation to the lexer
12 years ago
Jordan Orelli
8c4285ec87
taking depth out of the lexer
...
I don't know why that was ever there to begin with
12 years ago
Jordan Orelli
8f150e038b
taking out a bit of redundancy in the lexer
12 years ago
Jordan Orelli
c35a4142d1
refactoring the lexer a bit
12 years ago
Jordan Orelli
90c4009ada
cleaning up a little bit
12 years ago
Jordan Orelli
18a8a9aea3
renamed proc to builtin
12 years ago
Jordan Orelli
e86260e8dc
environments now have outer environment pointers
12 years ago
Jordan Orelli
f8ba2415ff
fixed quote
12 years ago
Jordan Orelli
ba1bab1e39
implemented set!
12 years ago
Jordan Orelli
ec5cbdcaab
added *if*
12 years ago
Jordan Orelli
107565dc04
added quote
12 years ago
Jordan Orelli
29677e19e4
can now define variables
12 years ago
Jordan Orelli
2b9322624f
added division, prevent div by zero panics
12 years ago
Jordan Orelli
ac8430076a
refactoring a bit, defined accumulator struct
...
added subtraction and multiplication
12 years ago
Jordan Orelli
39286ce998
can now add numbers
12 years ago
Jordan Orelli
7eedbb4e92
reading symbols from environments
12 years ago
Jordan Orelli
b6a88a15fb
(fmt)
12 years ago
Jordan Orelli
a3791fcc0e
parsing!
12 years ago
Jordan Orelli
7bf30556ad
split lexer out into lex.go
12 years ago
Jordan Orelli
e54e565279
fixed some close paren lexing bugs
12 years ago
Jordan Orelli
101ee99edd
better EOF handling in repl
12 years ago
Jordan Orelli
926911a7c6
cleaned up some redundancy
12 years ago
Jordan Orelli
42c2ffd0d6
more working primitive lex repl
12 years ago
Jordan Orelli
e0c3f2de01
primitive repl lexing
12 years ago
Jordan Orelli
0de1044dda
now lexing comments
12 years ago
Jordan Orelli
6dd75298e5
added string escaping
12 years ago
Jordan Orelli
ab97429e98
lexing strings
12 years ago
Jordan Orelli
1a6b286b5c
lexer produces tokens now, not strings
...
can also lex integers and floats now
12 years ago
Jordan Orelli
816da3fbbc
input is now io.Reader
12 years ago
Jordan Orelli
79c570c53e
basic lexing
12 years ago