marking4/postfix_test7.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 23 Nov 2020 02:43:03 +0000
changeset 365 fc118ee0fce4
parent 288 65731df141a5
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", "/"))