PLC Laboratory 1
Jump to navigation
Jump to search
Interpreter of Arithmetic Expressions
Implement an interpreter of arithmetic expressions. These expressions contain +, -, *, / operators (with common priorities and left associativity) and parentheses.
Input specification
Example
- Input
doubleMe x = x * x
plus x y = x + y + 'a'
- Output
doubleMe x = x * x
plus x y = x + y + 'a'