progs/comb1.scala
changeset 183 b17eff695c7f
parent 178 d36363d648e3
child 185 ea8b94d4755e
--- a/progs/comb1.scala	Mon Nov 11 00:34:14 2013 +0000
+++ b/progs/comb1.scala	Mon Nov 11 13:48:34 2013 +0000
@@ -4,7 +4,7 @@
 abstract class Parser[I <% Seq[_], T] {
   def parse(ts: I): Set[(T, I)]
 
-    aaa dcjefoivhwefihvefhiv def parse_all(ts: I) : Set[T] =
+  def parse_all(ts: I) : Set[T] =
     for ((head, tail) <- parse(ts); if (tail.isEmpty)) yield head
 }
 
@@ -23,7 +23,7 @@
     for ((head, tail) <- p.parse(sb)) yield (f(head), tail)
 }
 
-// atomic parsers
+// atomic parsers  
 case class CharParser(c: Char) extends Parser[String, Char] {
   def parse(sb: String) = 
     if (sb.head == c) Set((c, sb.tail)) else Set()