Guest User

Untitled

a guest
Apr 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. (define evaluate-file-all
  2. (lambda (filename)
  3. (call-with-input-file (string-append filename ".ll") ll/test)))
  4.  
  5. (define ll/test
  6. (lambda (line)
  7. (if (char-ready? line)
  8. (if (eof-object? (peek-char line))
  9. (close-input-port line)
  10. (ll/do-stuff line)))))
  11.  
  12. (define ll/do-stuff
  13. (lambda (line)
  14. (ll/process-line (read line))
  15. (ll/test line)))
  16.  
  17. (define ll/process-line
  18. (lambda (line)
  19. (if (eof-object? line)
  20. '()
  21. (display (ll/eval line)))
  22. (newline)))
Add Comment
Please, Sign In to add comment