diff options
author | michelou <michelou@epfl.ch> | 2005-08-26 12:26:10 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2005-08-26 12:26:10 +0000 |
commit | bc6f997f0a06bf2c8b2e05d34623474a7f91a986 (patch) | |
tree | cd15ad469f2c57dfcef828ba17ca74b75472c82e /sources/examples | |
parent | a33babfcf15b3022e3850e48a2731317dd4ee027 (diff) | |
download | scala-bc6f997f0a06bf2c8b2e05d34623474a7f91a986.tar.gz scala-bc6f997f0a06bf2c8b2e05d34623474a7f91a986.tar.bz2 scala-bc6f997f0a06bf2c8b2e05d34623474a7f91a986.zip |
- removed CR/LF (Windows) characters.
Diffstat (limited to 'sources/examples')
-rw-r--r-- | sources/examples/Parsers.scala | 10 | ||||
-rw-r--r-- | sources/examples/expressions/expressions-current.scala | 1 | ||||
-rw-r--r-- | sources/examples/monads/errorInterpreter.scala | 1 | ||||
-rw-r--r-- | sources/examples/monads/simpleInterpreter.scala | 1 | ||||
-rw-r--r-- | sources/examples/monads/stateInterpreter.scala | 1 | ||||
-rw-r--r-- | sources/examples/oneplacebuffer.scala | 1 | ||||
-rw-r--r-- | sources/examples/parsers1.scala | 4 | ||||
-rw-r--r-- | sources/examples/pilib/piNat.scala | 1 |
8 files changed, 10 insertions, 10 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 diff --git a/sources/examples/expressions/expressions-current.scala b/sources/examples/expressions/expressions-current.scala index 0e6ab57f7b..91e5df02ae 100644 --- a/sources/examples/expressions/expressions-current.scala +++ b/sources/examples/expressions/expressions-current.scala @@ -64,3 +64,4 @@ object Main { e2.visit(new l2.Show2(sref)); } } + diff --git a/sources/examples/monads/errorInterpreter.scala b/sources/examples/monads/errorInterpreter.scala index d797f01a4d..05dc979621 100644 --- a/sources/examples/monads/errorInterpreter.scala +++ b/sources/examples/monads/errorInterpreter.scala @@ -83,3 +83,4 @@ object errorInterpreter { System.out.println(test(term1)); } } + diff --git a/sources/examples/monads/simpleInterpreter.scala b/sources/examples/monads/simpleInterpreter.scala index 07da5f40ab..d728c620cf 100644 --- a/sources/examples/monads/simpleInterpreter.scala +++ b/sources/examples/monads/simpleInterpreter.scala @@ -72,3 +72,4 @@ object simpleInterpreter { System.out.println(test(term1)); } } + diff --git a/sources/examples/monads/stateInterpreter.scala b/sources/examples/monads/stateInterpreter.scala index 0878f4682d..593f2d9e3e 100644 --- a/sources/examples/monads/stateInterpreter.scala +++ b/sources/examples/monads/stateInterpreter.scala @@ -83,3 +83,4 @@ object stateInterpreter { System.out.println(test(term1)); } } + diff --git a/sources/examples/oneplacebuffer.scala b/sources/examples/oneplacebuffer.scala index 9a7d1d714d..eb3b3be905 100644 --- a/sources/examples/oneplacebuffer.scala +++ b/sources/examples/oneplacebuffer.scala @@ -44,3 +44,4 @@ object oneplacebuffer { } } + diff --git a/sources/examples/parsers1.scala b/sources/examples/parsers1.scala index 2ed0f4be4b..143f354049 100644 --- a/sources/examples/parsers1.scala +++ b/sources/examples/parsers1.scala @@ -14,7 +14,7 @@ object parsers1 { /*** p &&& q applies first p, and if that succeeds, then q */ - def &&& (def q: Parser) = new Parser { + def &&& (q: => Parser) = new Parser { def apply(in: inputType): Result = Parser.this.apply(in) match { case None => None case Some(in1) => q(in1) @@ -23,7 +23,7 @@ object parsers1 { /*** p ||| q applies first p, and, if that fails, then q. */ - def ||| (def q: Parser) = new Parser { + def ||| (q: => Parser) = new Parser { def apply(in: inputType): Result = Parser.this.apply(in) match { case None => q(in) case s => s diff --git a/sources/examples/pilib/piNat.scala b/sources/examples/pilib/piNat.scala index 2d34f90100..137c0e5e6a 100644 --- a/sources/examples/pilib/piNat.scala +++ b/sources/examples/pilib/piNat.scala @@ -89,3 +89,4 @@ object piNat with Application { >; } + |