Commit Graph

18 Commits

Author SHA1 Message Date
Christian Barthel
293e6b80e4 comments, format, example code updated
format and more notes
2019-07-25 11:47:57 +02:00
Christian Barthel
712dcfc931 eval function calls, 2nd and improved attempt 2019-07-07 22:23:44 +02:00
Christian Barthel
ccd2bb723f cleanup, comments added
- add comments and underscores for symbol names
- remove printf
2019-07-05 09:08:02 +02:00
Christian Barthel
e0bbc7f7cb repair string literals 2019-07-04 21:55:22 +02:00
Christian Barthel
02d3d783c9 allow lambda at first element of a list
previously, lambda wasn't evaluated if it was the first
element of a list.  it should be possible to evaluate
calls like
   ((lm (x) (add x 1)) 55) ->
now.
2019-07-04 21:32:49 +02:00
Christian Barthel
6b8812f467 bind args and create newenv, eval function calls
this commit adds the evaluation of user defined
functions.
2019-07-04 16:09:47 +02:00
Christian Barthel
1e22fb868b reassure, evaluation of functions #1
- add reassure() function with useful error
  messages
- format code, with 65 cols max
- don't allow multiple definitions in one
	environment
- prepare eval of defined symbols
- prepare eval of lambda/functions
2019-07-04 10:19:37 +02:00
Christian Barthel
7ace1d6fe9 eval if statement, num2bool conversion 2019-07-02 23:10:55 +02:00
Christian Barthel
97a04bd1ce distinguish function calls from sym evaluation
prepare function call handling: till now, i've
just eval'ed new tokens but i think that i have
to distinguish a function call from a symbol
evaluation.
2019-06-30 23:10:17 +02:00
Christian Barthel
e718421f17 lower than 2019-06-30 22:44:14 +02:00
Christian Barthel
7f362af841 add NAND, add boolean type, read form
- this commit adds the boolean type with the
	NAND operation (which is complete and other
	operations can be built by using NAND)
- read from now reads until an entire form
	has been entered.  line breaks, whitespace
	and tabs are allowed.
2019-06-29 13:20:05 +02:00
Christian Barthel
6f1ba0333f add inverse function 2019-06-29 12:30:06 +02:00
Christian Barthel
6440eeec77 split up eval code 2019-06-29 12:25:01 +02:00
Christian Barthel
ca33a1096c parsing and environment infrastructure
. add env struct and parameter,
. add lookup() and append() functions
. add `q` and `add` in eval,
2019-06-29 12:06:43 +02:00
Christian Barthel
3ba49003f3 add first draft to eval a form 2019-06-28 21:12:12 +02:00
Christian Barthel
62cb03ebf0 parse init 2019-06-27 09:23:14 +02:00
Christian Barthel
dab413018e work on structure 2019-06-26 23:00:48 +02:00
Christian Barthel
8b790839df tokenizer init 2019-06-26 22:21:36 +02:00