testing4/postfix_test7.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 10 Apr 2020 12:12:48 +0100
changeset 333 24bc76d97db2
parent 300 72688efdf17c
permissions -rw-r--r--
updated

import CW9a._


assert(syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "*", "+"))
assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))
assert(syard(split("5 * 7 / 2")) == List("5", "7", "*", "2", "/"))