Question: 4. We plan to define a new programming language. A statement in this language can be of the following form: an assignment statement var :=

4. We plan to define a new programming language. A statement in this language can be of the following form: an assignment statement var := E, where E is an arith-expression involving variables, integers and some arithmetic operators; a conditional statement if BE then statement where BE is a boolean expression representing rela- tionship between two arith-expressions. unconditional statement goto id where id is a label of some statement a statement may have a label id statement, where id denotes the label of statement a compound statement which starts with a begin and ends with an end and between these delimiters contains at least two statements separated by ; (i.e., the last statement is not proceeded by ;). You can assume typical infix grammar for arithmetic expression and boolean expressions: for instance x+1 is an arithmetic expression x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
