Extend the Funclang language to add array of numeric values as a new kind of value to

Question:

Extend the Funclang language to add array of numeric values as a new kind of value to the programming language. This would require adding three new kinds of expressions, arrayexp, indexexp, and assignexp. You will also need to generalize the array allocation and access operations for heap from the previous question.
To create an array with three rows, one can use arrayexp as follows:image

In the output, we have adjusted spacing for clarity, but you are simply required to produce output that is equal to these.
To create an array with three rows and four columns, one can use arrayexp as follows:image

To create a three-dimensional array with three rows, four columns, and height two, one can use arrayexp as follows:image

To access the second element in an array with three rows, one can use indexexp as follows:image

To access the element in the second row and the first column in an array with three rows and four columns, one can use indexexp as follows:image

To assign the second element in an array with three rows, one can use assignexp as follows:image

To assign the element in the second row and the first column in an array with three rows and four columns, one can use indexexp as follows:image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: