Skip to content

Conversation

@tslawler
Copy link
Contributor

Major changes:

  • ++ is not a valid scheme identifier, so use string-append instead
  • Use ; to denote comments rather than the Haskell --
  • I left Haskell-style block comments in place, since
    1. they're useful, and
    2. they don't interfere with any other scheme syntax
  • Use a few more niceties from Parsec to parse string literals, numbers

This still doesn't support things like hex/octal/binary numbers, but that shouldn't be too hard to add in the future.

- The parser now supports integers in binary, octal, and hex - It also supports arbitrary whitespace, rather than just space and newline - "Nil" is now spelled "'()" (or optionally "()") - `readExprFile` now takes a filename as an argument TODO: Write tests for radix stuff, maybe use operators for '#' prefix?
@adamwespiser
Copy link
Collaborator

thanks!

In a strict language, the naive Y combinator will go into an infinite loop; testing this against an existing scheme implementation gives the correct answer. It still doesn't work in this implementation, suggesting something about eval'ing a `lambda` is still messed up.
Nil is now forced to be spelled "'()"
@adamwespiser adamwespiser merged commit 34f027f into write-you-a-scheme-v2:master Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants