Commit Graph

179 Commits

Author SHA1 Message Date
Jeremiah Orians 90b0c38289
Minor fix 2018-08-26 15:32:41 -04:00
Jeremiah Orians 2988d0e391
Release_0.2.0 2018-08-26 12:12:30 -04:00
Jeremiah Orians d666bc21e9
Get char** foo[num] inside of a struct working 2018-08-26 10:24:56 -04:00
Jeremiah Orians 08ac63a9be
The really hard to trace bug in break 2018-08-26 07:43:02 -04:00
Jeremiah Orians a90916786f
Initial support for -> 2018-08-25 23:44:49 -04:00
Jeremiah Orians dc5f9bf4a6
Wow, How did that get missed 2018-08-25 14:33:54 -04:00
Jeremiah Orians ba91a45fac
Now weird strings are collected properly 2018-08-25 12:57:33 -04:00
Jeremiah Orians ae667843b3
Found a mistake in in_set 2018-08-25 12:31:48 -04:00
Jeremiah Orians 91e637a7e0
Initial array support 2018-08-25 01:10:11 -04:00
Jeremiah Orians 0ca7b2a547
Get function_call working 2018-08-24 18:20:53 -04:00
Jeremiah Orians 021385a7a3
Filling in missing functions 2018-08-22 22:55:03 -04:00
Jeremiah Orians 4231312f3b
Add initial support for if, for, do and while 2018-08-21 23:25:21 -04:00
Jeremiah Orians 6d7f1021c8
Initial bitwise operation implementation 2018-08-19 15:23:35 -04:00
Jeremiah Orians be2fcaaaaa
Adding intial support for additive and relative expressions 2018-08-19 11:53:41 -04:00
Jeremiah Orians 2c5d77e0ec
Fixed a hidden bug in match 2018-08-19 02:06:33 -04:00
Jeremiah Orians d435d61208
Started to filling in primary_expr 2018-08-18 21:42:14 -04:00
Jeremiah Orians 6ccc496efd
Stubbed out outstanding functions 2018-08-16 21:01:44 -04:00
Jeremiah Orians a1831faf09
Finish up statement 2018-08-15 22:03:53 -04:00
Jeremiah Orians ddb30edc70
Add support for inline assembly 2018-08-14 14:37:12 -04:00
Jeremiah Orians 8e5b6c3a8d
Added support for local variables to cc.s 2018-08-14 00:10:12 -04:00
Jeremiah Orians c63ff3766d
Added a debug function needed to troubleshoot label: bug and added
initial support for arguments
2018-08-13 20:54:32 -04:00
Jeremiah Orians 71ae12af86
Finish adding support for Weird strings 2018-08-12 15:12:34 -04:00
Jeremiah Orians d7961b28b5
Made weird string detection more reliable 2018-08-12 02:00:11 -04:00
Jeremiah Orians 8483d4d8b3
Added support for regular and escaped strings but not weird strings yet 2018-08-11 23:34:00 -04:00
Jeremiah Orians f1c43430c5
Broke special case from general case to avoid hard to trace bugs 2018-08-11 19:32:15 -04:00
Jeremiah Orians 530e44869f
Fix bug the was causing struct definitions to be misnamed 2018-08-11 17:35:52 -04:00
Jeremiah Orians 25a340dd7c
It is now able to compile int foo1; correctly 2018-08-11 06:47:12 -04:00
Jeremiah Orians 3862dc6b7b
Fixed bug in read_token 2018-08-11 06:34:58 -04:00
Jeremiah Orians b82712f699
Adding line_error, require_match and numerate_number 2018-08-11 02:39:33 -04:00
Jeremiah Orians 5ad01a63bb
Added First draft of cc_types.c functionality 2018-08-11 01:39:52 -04:00
Jeremiah Orians 126f4bbb9a
Starting to hand convert M2-Planet into Macro-assembly 2018-08-09 05:02:08 -04:00
Jeremiah Orians 3309e6325e
Correcting the behavior of R@ 2017-09-16 07:41:22 -04:00
Jeremiah Orians c06faa77e0
Release 0.0.9 2017-08-18 12:02:02 -04:00
Jeremiah Orians 9be2763c40
Incorporated number? and symbol? into stage2 lisp 2017-08-18 11:41:21 -04:00
Jeremiah Orians 1926a9d6b7
Added list->string primitive to stage2 lisp 2017-08-18 11:15:59 -04:00
Jeremiah Orians f835312b3c
Fixing documentation for initial malloc pointer. Tempted to make CONS
array be malloc'd to simplify the address space
2017-08-18 08:32:58 -04:00
Jeremiah Orians 437bfe90b7
Removed unrequired primitive 2017-07-30 21:54:27 -04:00
Jeremiah Orians 21e06a6dfa
Bunch of renames and 1 new internal function for future use 2017-07-30 21:14:25 -04:00
Jeremiah Orians 51c7c98a05
Adding string? primitive to stage2 lisp 2017-07-30 21:01:09 -04:00
Jeremiah Orians 157bec9609
Added char? primitive to stage2 lisp 2017-07-30 20:53:23 -04:00
Jeremiah Orians ef68ad2d3b
Added string->list to stage2 lisp 2017-07-30 20:38:56 -04:00
Jeremiah Orians 7619d6c779
Added char->integer and integer->char 2017-07-30 18:42:36 -04:00
Jeremiah Orians f3f8ec5a32
Implemented basic raw string support in stage2 lisp, many more
enhancements required to make it fully useful
2017-07-30 18:04:29 -04:00
Jeremiah Orians 5b302ba9d0
Actually write to the desired output 2017-07-13 22:01:25 -04:00
Jeremiah Orians 59393b4985
Missed int64_t 2017-07-13 20:08:19 -04:00
Jeremiah Orians 23b12e0ef9
Fixed lisp's behavior when there is insufficient memory 2017-06-24 11:49:28 -04:00
Jeremiah Orians 4963fcfebc
Implemented graceful FAILURE and PRINT 2017-06-24 10:06:50 -04:00
Jeremiah Orians a51c243088
Implementing LSHIFT and RSHIFT per request 2017-06-24 08:49:08 -04:00
Jeremiah Orians 37b061defc
Ensure changelog, checksums and whitespacing rules are updated and enforced 2017-06-24 08:14:31 -04:00
Caleb Ristvedt 1a6c7d5afe
Fix CREATE, implement DOES>, more words
Implemented some new words in forth.s:
* 'DODOES
  Gives the address of the assembly for DODOES. Used by DOES> when compiling
  machine code to jump to it and activate the following high-level forth
  code. This is how non-primitive actions for a word can be set.
* LATEST!
  Sets the LATEST pointer. For when the user wants to write their own way of
  extending the dictionary (word lists, vocabularies, etc).
* R@
  Copies the top of the return stack to the data stack. Useful for when loops
  start getting non-trivial and you start wondering of all those ROTs aren't
  efficient enough. Maybe someday we'll implement a register-allocating
  compiler. Probably not. Too complicated for bootstrapping.
* Not really words but used: DODOES and DOVAR.
  DOVAR is the default behavior of CREATEd words - it just pushes a pointer to
  whatever was allotted right after the word was created. DODOES is jumped to in
  order to invoke high-level forth behaviors for words.
* Changed behavior of CREATE to better match the way it usually works.

Added some words to inital_library.fs (we should fix that name sometime):
* Added a variable BASE to control what base numbers are printed in.
* Turns out I misunderstood what WORD did and mis-diagnosed an early problem in
  ' - so it turns out that nothing was being allotted in the dictionary, just
  stuff in "string space", which if I understand properly just sort of fills up
  infinitely as long as WORD is being invoked. Some other forths try to solve
  this by introducing an input buffer for the current line, at the cost of some
  complexity (as words like [CHAR] and S" have to take that into
  account). Anyway, the HERE and DP! are gone from ' now.
* Added BOUNDS for common setup for sequence-iterating loops.
* Added region-comment "(" (note that it doesn't nest), used most often for
  stack comments.
* Added hex dump printer DUMP and support words, number of bytes printed per
  line is controlled by LINE-SIZE. It looks pretty nice, much of the design is
  based off of gforth's.
* Added DOES> and supporting words, and used it to make VARIABLE, CONSTANT, and
  DEFER.
* Added TUCK, MIN, SPACES, :NONAME, FILL, and <>.

Add LSHIFT and RSHIFT to the wishlist, as ghetto shifting with division seems to
behave a bit strangely when given negative values.

Also, we're now advanced enough to support the tictactoe I wrote awhile back for
gforth! http://paste.lisp.org/display/349394
2017-06-24 07:40:22 -04:00