in reply to Perl Forth interpreter
As an old Forth programmer, I'm happy to see this. Although, I probably would have done the core loop much differently.
Forth normally reads the input stream one word (\S+) at a time. This allows immediate words (like '"', '."', ':', and '(') to read the input directly instead of delegating that to the input function. This also allows removal of the state logic in dispatch.
If I remember correctly, the first Forth I learned on had about a dozen words defined in assembly and the rest were defined in Forth. Your experiment reminds me of how little it took to get a beginning Forth system up and running.
Thanks for the memories.<grin/>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Forth interpreter
by GrandFather (Saint) on May 30, 2009 at 01:02 UTC |