--- a/core_templates3/postfix2.scala Sat Oct 08 00:30:51 2022 +0100
+++ b/core_templates3/postfix2.scala Tue Nov 01 15:03:48 2022 +0000
@@ -35,12 +35,12 @@
// the operations in the basic version of the algorithm
val ops = List("+", "-", "*", "/", "^")
-// (3) Implement the extended version of the shunting yard algorithm.
-// This version should properly account for the fact that the power
-// operation is right-associative. Apart from the extension to include
-// the power operation, you can make the same assumptions as in
-// basic version.
+// ADD YOUR CODE BELOW
+//======================
+
+
+// (3)
def syard(toks: Toks, st: Toks = Nil, out: Toks = Nil) : Toks = ???
@@ -48,9 +48,7 @@
// syard(split("3 + 4 * 8 / ( 5 - 1 ) ^ 2 ^ 3")) // 3 4 8 * 5 1 - 2 3 ^ ^ / +
-// (4) Implement a compute function that produces an Int for an
-// input list of tokens in postfix notation.
-
+// (4)
def compute(toks: Toks, st: List[Int] = Nil) : Int = ???