Difference between revisions of "PLC Laboratory 1"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== Interpreter of Arithmetic Expressions == | == 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 == | == Example == |
Revision as of 08:08, 26 January 2022
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'