Created
January 30, 2014 03:08
-
-
Save anonymous/8701837 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
(define (parser x phase counter code pointer memory stack) | |
(case phase | |
((read-file) (let ((i (read))) | |
(let ((file-name (if (string? i) | |
i | |
(symbol->string i)))) | |
(let-values (((code stack) (read-file file-name))) | |
(values x phase counter code pointer memory stack))))) | |
((read-char) (values (read-char) phase counter code pointer memory stack)) | |
((read) (values (read) phase counter code pointer memory stack)) | |
(else (values x phase counter code pointer memory stack)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment