core_testing3/postfix_test1.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 13:53:37 +0000
changeset 474 b528d1d3d3c3
parent 401 core_testing3/postfix_test7.scala@9471c3b7ea02
permissions -rw-r--r--
updated


def urbanmain() = {
  import C3a._


  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", "/"))
}