author | Christian Urban <christian.urban@kcl.ac.uk> |
Mon, 08 Nov 2021 23:17:51 +0000 | |
changeset 415 | fced9a61c881 |
parent 288 | 65731df141a5 |
permissions | -rw-r--r-- |
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", "/"))