diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /docs/examples/parsing/ListParser.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'docs/examples/parsing/ListParser.scala')
-rw-r--r-- | docs/examples/parsing/ListParser.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/examples/parsing/ListParser.scala b/docs/examples/parsing/ListParser.scala index 12805e5e50..59fc292c1d 100644 --- a/docs/examples/parsing/ListParser.scala +++ b/docs/examples/parsing/ListParser.scala @@ -14,7 +14,7 @@ object listParser { class ListParsers extends Parsers { type Elem = Char - + lazy val ident = rep1(elem("letter", isLetter), elem("letter or digit", isLetterOrDigit)) ^^ {cs => Id(mkString(cs))} lazy val number = chainl1(elem("digit", isDigit) ^^ (_ - '0'), success{(accum: Int, d: Int) => accum * 10 + d}) ^^ Num lazy val list = '(' ~> repsep(expr, ',') <~ ')' ^^ Lst |