marking4/postfix_test7.scala
changeset 288 65731df141a5
parent 257 ba4d976ca88d
equal deleted inserted replaced
287:c493eaba6018 288:65731df141a5
       
     1 import CW9a._
       
     2 
     1 
     3 
     2 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", "-", "*", "+"))
     3 assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
     5 assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
     4 assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))
     6 assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))
     5 assert(syard(split("5 * 7 / 2")) == List("5", "7", "*", "2", "/"))
     7 assert(syard(split("5 * 7 / 2")) == List("5", "7", "*", "2", "/"))