Question: 2. Consider the following grammar for array access (expressions follow common rules) Expr- ArrayExpr ArrayAccessExpr' The language restricts the index expression to be of int
2. Consider the following grammar for array access (expressions follow common rules) Expr- ArrayExpr ArrayAccessExpr' The language restricts the index expression to be of int type. Show for the following AST how type checking proceeds and determine whether the concrete AST is type correct. Assume arr is an array of integer, and f is a floating point variable. 1.2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
