Question: Write programs in Arithlang 26 pt) Implement an interpreter for AbstractLang described as follows. You can modify from the ArithLang code. (a) This language contains

Write programs in Arithlang

26 pt) Implement an interpreter for AbstractLang described as follows. You can modify from the

ArithLang code.

(a) This language contains only three terminals, 0, p, n, u

(b) p represents positive numbers, n represents negative numbers and u represent unknown values

(c) There are three operators *, -, + that can be applied on the terminals, their syntactic rules are

similar to *, - and + in ArithLang, except that each operator only can take two operands

(d) The semantics of AbstractLang are defined by the following rules (the first column in the table

represents the first operand and the first row in the table represents the second operand of the

operation):

Write programs in Arithlang 26 pt) Implement an interpreter for AbstractLang described

5. (26 pt) Implement an interpreter for AbstractLang described as follows. You can modify from the ArithLang code. (a) This language contains only three terminals, 0, p, n, u (b) p represents positive numbers, n represents negative numbers and u represent unknown values (c) There are three operators *, -, that can be applied on the terminals, their syntactic rules are similar to *, - and + in ArithLang, except that each operator only can take two operands (d) The semantics of AbstractLang are defined by the following rules (the first column in the table represents the first operand and the first row in the table represents the second operand of the operation) 5. (26 pt) Implement an interpreter for AbstractLang described as follows. You can modify from the ArithLang code. (a) This language contains only three terminals, 0, p, n, u (b) p represents positive numbers, n represents negative numbers and u represent unknown values (c) There are three operators *, -, that can be applied on the terminals, their syntactic rules are similar to *, - and + in ArithLang, except that each operator only can take two operands (d) The semantics of AbstractLang are defined by the following rules (the first column in the table represents the first operand and the first row in the table represents the second operand of the operation)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!