In this project, I extended a subset of OCaml called MiniML by implementing lexical scoping using closures, adding support for floating-point numbers and string operations, and enabling function currying. I modified the lexical analyzer (miniml_lex.mll) and parser (miniml_parse.mly) to handle new tokens and grammar rules. The implementation involved updating the abstract syntax tree, extending the evaluator to support new data types and operations, and creating helper functions for currying. Throughout the process, I made key design decisions such as maintaining strong typing and reusing existing operators for string operations and ensured robustness through comprehensive unit testing.
For more information, see https://cs51.io.