diff options
Diffstat (limited to 'src')
3 files changed, 0 insertions, 79 deletions
diff --git a/src/library/scala/util/parsing/combinator/Parsers.scala b/src/library/scala/util/parsing/combinator/Parsers.scala index 8fc2295d9c..4602c3cc53 100644 --- a/src/library/scala/util/parsing/combinator/Parsers.scala +++ b/src/library/scala/util/parsing/combinator/Parsers.scala @@ -158,12 +158,6 @@ trait Parsers { private lazy val lastNoSuccessVar = new DynamicVariable[Option[NoSuccess]](None) - @deprecated("lastNoSuccess was not thread-safe and will be removed in 2.11.0", "2.10.0") - def lastNoSuccess: NoSuccess = lastNoSuccessVar.value.orNull - - @deprecated("lastNoSuccess was not thread-safe and will be removed in 2.11.0", "2.10.0") - def lastNoSuccess_=(x: NoSuccess): Unit = lastNoSuccessVar.value = Option(x) - /** A common super-class for unsuccessful parse results. */ sealed abstract class NoSuccess(val msg: String, override val next: Input) extends ParseResult[Nothing] { // when we don't care about the difference between Failure and Error val successful = false diff --git a/src/library/scala/util/parsing/combinator/testing/RegexTest.scala b/src/library/scala/util/parsing/combinator/testing/RegexTest.scala deleted file mode 100644 index 727b6caf8d..0000000000 --- a/src/library/scala/util/parsing/combinator/testing/RegexTest.scala +++ /dev/null @@ -1,28 +0,0 @@ - -package scala -package util.parsing.combinator.testing - -import scala.util.parsing.combinator._ -import scala.util.parsing.input._ -import scala.language.postfixOps - -@deprecated("This class will be removed", "2.10.0") -case class Ident(s: String) -@deprecated("This class will be removed", "2.10.0") -case class Number(n: Int) -@deprecated("This class will be removed", "2.10.0") -case class Str(s: String) - -@deprecated("This class will be removed", "2.10.0") -object RegexTest extends RegexParsers { - val ident: Parser[Any] = """[a-zA-Z_]\w*""".r ^^ (s => Ident(s)) - val number: Parser[Any] = """\d\d*""".r ^^ (s => Number(s.toInt)) - val string: Parser[Any] = "\".*\"".r ^^ (s => Str(s.substring(1, s.length - 1))) - val parser = (ident | number | string)* - - def main(args: Array[String]) = { - val in = args mkString " " - println("\nin : "+in) - println(phrase[Any](parser)(new CharSequenceReader(in))) - } -} diff --git a/src/library/scala/util/parsing/combinator/testing/Tester.scala b/src/library/scala/util/parsing/combinator/testing/Tester.scala deleted file mode 100644 index 86c5d68ebe..0000000000 --- a/src/library/scala/util/parsing/combinator/testing/Tester.scala +++ /dev/null @@ -1,45 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2006-2013, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala -package util.parsing.combinator.testing - -import scala.util.parsing.combinator.lexical.Lexical -import scala.util.parsing.combinator.syntactical.TokenParsers - -/** Facilitates testing a given parser on various input strings. - * - * Example use: - * {{{ - * val syntactic = new MyParsers - * }}} - * and - * {{{ - * val parser = syntactic.term - * }}} - * (If `MyParsers` extends [[scala.util.parsing.combinator.syntactical.TokenParsers]] - * with a parser called `term`.) - * - * @author Martin Odersky - * @author Adriaan Moors - */ -@deprecated("This class will be removed", "2.10.0") -abstract class Tester { - - val syntactic: TokenParsers { val lexical: Lexical } - val parser: syntactic.Parser[Any] - - /** Scans a String (using a `syntactic.lexical.Scanner`), parses it using - * `phrase(parser)`, and prints the input and the parsed result to the - * console. - */ - def test(in: String) { - Console.println("\nin : "+in) - Console.println(syntactic.phrase[Any](parser)(new syntactic.lexical.Scanner(in))) - } -} |