author | Christian Urban <christian.urban@kcl.ac.uk> |
Sun, 15 Sep 2024 12:57:59 +0100 | |
changeset 493 | 244df77507c2 |
parent 474 | b528d1d3d3c3 |
permissions | -rw-r--r-- |
474 | 1 |
|
2 |
def urbanmain() = { |
|
3 |
import C3a._ |
|
300 | 4 |
|
249 | 5 |
|
474 | 6 |
assert(syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "*", "+")) |
7 |
assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+")) |
|
8 |
assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+")) |
|
9 |
assert(syard(split("5 * 7 / 2")) == List("5", "7", "*", "2", "/")) |
|
10 |
} |