you give string expression represent Lisplike expression return integer value ofthe syntax expression give followsan expression integer let expression add expression mult expression assign variable expression evaluate single integeran integer positive negativeA let expression take form let v1 e1 v2 e2 vn en expr let string let pair alternate variable expression mean variable v1 assign value expression e1 second variable v2 assign value expression e2 sequentially value let expression value expression exprAn add expression take form add e1 e2 add string add expression e1 e2 result addition evaluation e1 evaluation e2a mult expression take form mult e1 e2 mult string mult expression e1 e2 result multiplication evaluation e1 evaluation e2For question use small subset variable name a variable start lowercase letter zero lowercase letter digit additionally convenience name add let mult protect variable namesfinally concept scope when expression variable evaluate context evaluation innermost scope term parenthese check value variable outer scope check sequentially it guarantee expression legal please example detail scope example 1input expression let x 2 mult x let x 3 y 4 add x youtput 14explanation in expression add x y checking value variable xwe check innermost scope outermost context variable try evaluateSince x 3 find value x 3example 2input expression let x 3 x 2 xOutput 2explanation Assignment let statement process sequentiallyExample 3input expression let x 1 y 2 x add x y add x youtput 5explanation the add x y evaluate 3 assign xThe second add x y evaluate 32 5 constraints1 expressionlength 2000there lead trail space expressionAll token separate single space expressionthe answer intermediate calculation answer guarantee fit 32bit integerthe expression guarantee legal evaluate integer