424
|
1 |
import C3b._
|
384
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
3 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
4 |
assert(syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "*", "+"))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
5 |
assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
6 |
assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
7 |
assert(syard(split("5 * 7 / 2")) == List("5", "7", "*", "2", "/"))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
8 |
assert(syard(split("3 + 4 * 8 / ( 5 - 1 ) ^ 2 ^ 3")) == List("3", "4", "8", "*", "5", "1", "-", "2", "3", "^", "^", "/", "+"))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
9 |
|