Commit graph

40 commits

Author SHA1 Message Date
Russ Olsen
480f6df6a5 Add timing words, improve keyword display. 2020-06-17 13:58:24 -04:00
Russ Olsen
47554de9f4 Break up basic_words a bit,add documentation to both native and sallyforth words. 2020-06-12 08:37:12 -04:00
Russ Olsen
960e4b0033 Add namespaces, fix parser bugs, add compile to python back in. 2020-06-04 07:59:18 -04:00
Russ Olsen
66a4e271d8 Cleanup. 2020-05-22 15:08:43 -04:00
Russ Olsen
6273bdfde7 Test dot-split. 2020-05-22 15:08:07 -04:00
Russ Olsen
53fcafb4f1 Add proxy methods for functions to Vars. 2020-05-22 15:07:40 -04:00
Russ Olsen
4c03ea5388 Handle short circuit boolean operators correctly. 2020-05-22 15:06:58 -04:00
Russ Olsen
6c67d2350f Replace Ref with smarter Vars. 2020-05-22 15:06:26 -04:00
Russ Olsen
a1669f996c Clean up argument names, debug printing. 2020-05-15 14:13:08 -04:00
Russ Olsen
3fb272156c Add support for #foo.bar form back in. Add support for inlining words. Very WIP work on expanding words to their Python code and expanding that code in inlined words. 2020-05-15 14:03:03 -04:00
Russ Olsen
5cdae26aeb Sync docs up with new code. 2020-05-11 12:56:39 -04:00
Russ Olsen
9bad7b958f Added nativeword word, which wraps a native function as a forth word. 2020-05-11 12:55:15 -04:00
Russ Olsen
9e9573b3dd Fairly complete rewrite of VM. Now supports composite words with { w1 w2...}. Rewrote :, if, ifelse and while to use composite words. Namespaces now have Clojure like vars for indirection and also support inline words. Words defined in Python now use Python function decorators to add Sallyforth related metadata. 2020-05-09 10:47:47 -04:00
Russ Olsen
ed5ccfd261 Formatting fix. 2020-05-02 11:11:14 -04:00
Russ Olsen
ca305ff519 Flesh out the readme a bit more. 2020-05-02 11:09:12 -04:00
Russ Olsen
e488738143 Add :keywords, if-not, begin-while-repeat. Change names of values imported from native python modules from mod1.mod2.value to mod1/mod2/value. 2020-05-02 10:45:23 -04:00
Russ Olsen
4473e149c3 Added :keywords, Token class. 2020-05-02 10:43:29 -04:00
Russ Olsen
a956438aec Clean up forth eval/execute, make repl more forth driven. 2020-05-01 08:06:08 -04:00
Russ Olsen
62acb4ab95 Removed unused lex module. 2020-04-30 02:23:24 -04:00
Russ Olsen
16d9bdf352 Rationalize namespaces by adding entries. Add readtoken which has different behavior at compile and runtime. 2020-04-30 02:14:50 -04:00
Russ Olsen
f303b00345 Reorganize python word impls, switch tokenizer to a stream approach. 2020-04-29 14:16:54 -04:00
Russ Olsen
638d50b100 Added #foo.bar macro to mean <. foo 'bar .>, improved stack word output. 2020-04-25 16:54:45 -04:00
Russ Olsen
e1b1c4ee24 Rationalize native code import. 2020-04-24 09:10:18 -04:00
Russ Olsen
a4e2a1997a Clean up attr resolution. 2020-04-23 09:10:27 -04:00
Russ Olsen
965f78f142 Set *source* during init. 2020-04-23 09:09:07 -04:00
Russ Olsen
f1bdf52b2b Adding reader macros. Turned tokenizer into a class, added list and string word. 2020-04-22 08:57:14 -04:00
Russ Olsen
f10edf9fd7 Added basic namespace support. 2020-04-21 09:22:25 -04:00
Russ Olsen
8d4375dbf1 Add empty set and map words. 2020-04-18 18:44:22 -04:00
Russ Olsen
502f120d7b Added builtin alias word, which means we can define most of the built-in words with non-Python comparible names (think . and +) in sallyforth instead of Python. Also added backslash comments and stack reset work. 2020-04-18 12:12:10 -04:00
Russ Olsen
97c3aa1fff Switched the word function xface so that words now return the new ip instead of a delta. This simplifies the interpreter allows recur to simply return 0. Also changed the tokenizer so that 'foo produces a string w/o the need for a closing quote, good for symbols. 2020-04-18 10:22:25 -04:00
Russ Olsen
0f63796331 General cleanup, use single quotes in Python, added single quoted strings to SallyForth. 2020-04-17 13:44:18 -04:00
Russ Olsen
8785b97f03 Reorganize code to make it a bit more modular. 2020-04-17 13:42:41 -04:00
Russ Olsen
6925755432 Added better support for calling native code, added readline history, else to ifs. 2020-04-17 08:56:06 -04:00
Russ Olsen
d5e5885b0b README.md 2020-04-16 09:07:08 -04:00
Russ Olsen
c5c8cdfff2 Added start up file execution, configurable prompt. 2020-04-16 09:04:06 -04:00
Russ Olsen
4886e2de2a Renamed process functions to execute, added file execution, vars. 2020-04-16 09:02:36 -04:00
Russ Olsen
c74f666a19 Added (comments) 2020-04-16 09:01:50 -04:00
Russ Olsen
f8ceb9b3a3 Fix formatting. 2020-04-14 12:45:46 -04:00
Russ Olsen
2a9ea9548f Initial checkin. 2020-04-14 12:44:37 -04:00
russolsen
3e48c372dc
Initial commit 2020-04-14 12:06:48 -04:00