equal
deleted
inserted
replaced
2 def parse(ts: I): Set[(T, I)] |
2 def parse(ts: I): Set[(T, I)] |
3 |
3 |
4 def parse_all(ts: I) : Set[T] = |
4 def parse_all(ts: I) : Set[T] = |
5 for ((head, tail) <- parse(ts); if (tail.isEmpty)) |
5 for ((head, tail) <- parse(ts); if (tail.isEmpty)) |
6 yield head |
6 yield head |
7 |
|
8 def || (right : => Parser[I, T]) : Parser[I, T] = |
|
9 new AltParser(this, right) |
|
10 def ==>[S] (f: => T => S) : Parser [I, S] = |
|
11 new FunParser(this, f) |
|
12 def ~[S] (right : => Parser[I, S]) : Parser[I, (T, S)] = |
|
13 new SeqParser(this, right) |
|
14 } |
7 } |
15 |
8 |
16 |
9 |