Created
October 10, 2010 19:10
-
-
Save lsparrish/619478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ( dict contains link to the most recent char word created. ) | |
| ( m? is the interrupt detector for the lookup function. ) | |
| ( l? is the lookup function. returns an xt or 0. ) | |
| ( : starts a char definition. ) | |
| ( ; calls a char definition. ) | |
| variable dict | |
| : m? dup 0 =if nip -1 ( leave 0 on stack after interrupt ) ;then | |
| 2dup 1+ @ =if nip 2 + -1 ( leave xt on stack after interrupt );then ; | |
| : l? dict repeat @ m? if; again ; | |
| : __: @ here dict @ , dict ! , compiler on ; parsing | |
| : __; @ l? 0; .word ; parsing | |
| :a .s ; | |
| ;a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment