--- a/progs/comb2.scala Wed Oct 25 00:05:59 2017 +0100
+++ b/progs/comb2.scala Tue Oct 31 21:32:12 2017 +0000
@@ -4,6 +4,7 @@
import scala.language.implicitConversions
import scala.language.reflectiveCalls
+
abstract class Parser[I <% Seq[_], T] {
def parse(ts: I): Set[(T, I)]
@@ -70,6 +71,7 @@
lazy val F: Parser[String, Int] =
("(" ~ E ~ ")") ==> { case ((x, y), z) => y} || NumParser
+println(E.parse_all("123"))
println(E.parse_all("1*2+3"))
println(E.parse_all("1+2*3"))
println(E.parse_all("1+2+3"))