-
Fixed the
while
loop implementations in slang_v2 for compilers 2 through 4.
The value from the body (always()
) was being left on the stack, unneccesarily using space. In most of the interpreters, this also meant a crash when it exited the loop and tried to apply the remaining code to a stack of()
s -
Changed
(*…*)
comments to work over new lines.
Previously they could be opened and closed on the same line, but new-lines would also close them, so they were effectively single-line comments -
Added pattern matching for the arguments of functions and lambdas, including allowing
let f() = ...
which wasn't possible before. Patterns can be nested, so deconstructing nested pairs works too. -
Added pattern matching to
let
expressions to allow the deconstruction of pairs -
Added pattern matching to
case
expressions to allow deconstruction of pairs within unions -
Removed the need for the
end
keyword afterif
expressions,while
loops, lambdas,let … in
expressions, andcase
expressions
forked from Timothy-G-Griffin/cc_cl_cam_ac_uk
-
Notifications
You must be signed in to change notification settings - Fork 0
TMVector/cc2016_cl_cam_ac_uk
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
OCaml code for Compiler Construction course at University of Cambridge
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- OCaml 98.9%
- Standard ML 1.1%