pre_marking3/postfix_test1.scala
changeset 386 e2170c91a9f2
parent 384 6e1237691307
equal deleted inserted replaced
385:44383203970f 386:e2170c91a9f2
     1 import CW9a._
     1 import CW8a._
     2 
     2 
     3 
     3 
     4 assert(syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "*", "+"))
     4 assert(syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "*", "+"))
     5 assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
     5 assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
     6 assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))
     6 assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))