OCaml interpreter functions

Job ID: 36838546

Budget: $10 – $30 USD

I am looking for assistance with creating specific interpreter functions for my OCaml project. Specifically, I need help with the 'bind' and 'let...end' functions.

Requirements for the 'bind' function:
-The bind command binds a name(where name consists of a sequence of letters, digits, and underscores, starting with a letter or underscore.) to a value.
-It is evaluated by popping two values from the stack.
-The second value popped must be a name
-The name is bound to the value (the first thing popped off the stack). The value can be any of the
following:
• An integer
• A string
• A boolean
• :unit:
• The value of a name that has been previously bound

Requirements for the 'let...end' function:
-It should create a separate stack after 'let' is read from a txt file
-It should push the top of the stack to the original stack after the keyword "end"
-Trying to access an element that is not in scope of the let...end block would push :error: on
the stack.
-let...end blocks can also be nested.

Below I've attached the ml code I have so far. Everything is correct except for possibly the let function which I have as a comment(line 316)
I've also attached two test files that have to have the output that is shown in the. other two files.
Message me if you have any questions!
Related categories: Mathematics Software Development Programming