--- a/progs/comb1.scala Wed Nov 06 21:52:42 2019 +0000
+++ b/progs/comb1.scala Wed Nov 06 23:17:05 2019 +0000
@@ -12,7 +12,7 @@
def parse_all(ts: I) : Set[T] =
for ((head, tail) <- parse(ts);
- if (tail.isEmpty)) yield head
+ if tail.isEmpty) yield head
}
class SeqParser[I : IsSeq, T, S](p: => Parser[I, T],
@@ -162,8 +162,6 @@
//println(EL.parse_all("1+2+3"))
-
-
// non-ambiguous vs ambiguous grammars
// ambiguous
@@ -207,8 +205,6 @@
(One || Two).parse("111")
-
-
// a problem with the arithmetic expression parser -> gets
// slow with deep nestedness
E.parse("1")