Semester long personal project
- Developed an interpreter for a stack-based bytecode language resembling OCaml, using the OCaml language.
- Analyzed and compared the benefits and trade-offs of implementing various features such as type checking, bounds checking, and memory management at compile-time, runtime, or through programmer intervention in terms of security, execution speed, and flexibility.
- Implemented various features in the interpreter, such as constants (e.g., int, bool, error, string, name, unit), programs, commands, and function bindings.
- Supported a wide range of operations in the interpreter, including arithmetic, logical, and conditional statements, as well as function calls.
Within the project, it will be able to handle function call with variables by parsing commands from file
- add, sub, mul, div, rem, neg for interger operations
- push, pop, swap for stackvalue operation
- tostring, println , cat for print or write into file
- and, or, not, equal, lessthen for boolean operation
- let, end, fun, funend, return, call for function operation
- bind for variable assignments.
- quit for quit interterpreter.