summaryrefslogtreecommitdiff
path: root/sources/examples/Parsers.scala
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2005-08-26 12:26:10 +0000
committermichelou <michelou@epfl.ch>2005-08-26 12:26:10 +0000
commitbc6f997f0a06bf2c8b2e05d34623474a7f91a986 (patch)
treecd15ad469f2c57dfcef828ba17ca74b75472c82e /sources/examples/Parsers.scala
parenta33babfcf15b3022e3850e48a2731317dd4ee027 (diff)
downloadscala-bc6f997f0a06bf2c8b2e05d34623474a7f91a986.tar.gz
scala-bc6f997f0a06bf2c8b2e05d34623474a7f91a986.tar.bz2
scala-bc6f997f0a06bf2c8b2e05d34623474a7f91a986.zip
- removed CR/LF (Windows) characters.
Diffstat (limited to 'sources/examples/Parsers.scala')
-rw-r--r--sources/examples/Parsers.scala10
1 files changed, 2 insertions, 8 deletions
diff --git a/sources/examples/Parsers.scala b/sources/examples/Parsers.scala
index 5697868d76..6ec3bdb398 100644
--- a/sources/examples/Parsers.scala
+++ b/sources/examples/Parsers.scala
@@ -31,14 +31,14 @@ abstract class Parsers {
}
}
- def ||| (def p: Parser[a]) = new Parser[a] {
+ def ||| (p: => Parser[a]) = new Parser[a] {
def apply(in: inputType): Result = Parser.this.apply(in) match {
case None => p(in)
case s => s
}
}
- def &&& [b](def p: Parser[b]): Parser[b] =
+ def &&& [b](p: => Parser[b]): Parser[b] =
for (val _ <- this; val x <- p) yield x;
}
@@ -98,11 +98,6 @@ abstract class TokenParsers extends Parsers {
}
}
-
-
-
-
-
abstract class CharParsers extends Parsers {
def any: Parser[char];
def chr(ch: char) =
@@ -110,4 +105,3 @@ abstract class CharParsers extends Parsers {
def chr(p: char => boolean) =
for (val c <- any; p(c)) yield c;
}
-abstract class