diff options
Diffstat (limited to 'doc/reference/ExamplesPart.tex')
-rw-r--r-- | doc/reference/ExamplesPart.tex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/reference/ExamplesPart.tex b/doc/reference/ExamplesPart.tex index 0a9ef58d89..30ea725cfd 100644 --- a/doc/reference/ExamplesPart.tex +++ b/doc/reference/ExamplesPart.tex @@ -5420,7 +5420,7 @@ given predicate. They are now implemented in terms of \code{any}. The next level is represented by parsers reading identifiers, numbers and lists. Here is a parser for identifiers. \begin{lstlisting} -class ListParsers extends CharParsers { +abstract class ListParsers extends CharParsers { def ident: Parser[Tree] = for ( val c: char <- chr(Character.isLetter); @@ -5578,7 +5578,7 @@ applying it to the command line argument. object Test { def main(args: Array[String]): unit = { val ps = new ListParsers with ParseString(args(0)); - ps.expr(input) match { + ps.expr(ps.input) match { case Some(Pair(list, _)) => System.out.println("parsed: " + list); case None => "nothing parsed" } |