forked from kanaka/mal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The grammar is not fully equivalent to the one in the process, but it passes all tests. I suggest that it becomes a formal/testable reference (are tabs allowed as spaces? is "a~" valid? is "' a" valid?...). As it is formuled here, it can directly be translated either to another language with high-level parsers, or to a low-level language as each production only switches after a look at the next input character. Another suggestion to simplify step1 is to make '{' a reader macro, parsing "{a1 a2..}" into (hash-map a1 a2..). The step1 tests should then accept both "(hash-map ..)" and "{a1..}", but the process should in my opinion suggest the former as it moves the complexity related to maps (language-dependent constructor, argument count and type checking, reporting of such errors) form reader.qx/step1 to core.qx/hash-map, where it has to be done later anyway.
- Loading branch information
1 parent
cede778
commit 003947b
Showing
1 changed file
with
80 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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