marking4/postfix_test7.scala
author Christian Urban <urbanc@in.tum.de>
Mon, 21 Jan 2019 16:04:30 +0000
changeset 257 ba4d976ca88d
child 288 65731df141a5
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
257
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
assert(syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "*", "+"))
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
assert(syard(split("5 * 7 / 2")) == List("5", "7", "*", "2", "/"))