Averest


LhsExprC Type

LhsExpr are viewed as addresses with an offset; the address is thereby the base variable, and the offset is computed as an expression that depends on the access expressions of arrays and tuples. Note that types [m][n]alpha are parsed to Carr(m,Carr(n,alpha)) and that expressions a[i][j] are parsed to LhsArrAcc(LhsArrAcc(a,i),j). The following are left-hand-side expressions of the MiniC language, i.e., expressions that may occur on the left-hand side of an assignment.

  • LhsVar(vn) is a variable with name vn.
  • LhsArrAcc(lhs,e) refers to array element lhs[e].
  • LhsTupAcc(lhs,i) refers to tuple element lhs.i.

Union cases

Union case Description

LhsArrAcc(LhsExprC, ExprC)

Full Usage: LhsArrAcc(LhsExprC, ExprC)

Parameters:

Item1 : LhsExprC
Item2 : ExprC

LhsTupAcc(LhsExprC, int)

Full Usage: LhsTupAcc(LhsExprC, int)

Parameters:

Item1 : LhsExprC
Item2 : int

LhsVar string

Full Usage: LhsVar string

Parameters:
    Item : string

Item : string