Skip to content

Commit c5200ba

Browse files
committed
Deprecated some classes.
All this stuff. I believe most of this is uncontroversial. scala/util/Marshal.scala scala/util/automata/BaseBerrySethi.scala scala/util/automata/DetWordAutom.scala scala/util/automata/Inclusion.scala scala/util/automata/NondetWordAutom.scala scala/util/automata/SubsetConstruction.scala scala/util/automata/WordBerrySethi.scala scala/util/grammar/HedgeRHS.scala scala/util/grammar/TreeRHS.scala scala/util/parsing/ast/AbstractSyntax.scala scala/util/parsing/ast/Binders.scala scala/util/parsing/combinator/testing/RegexTest.scala scala/util/parsing/combinator/testing/Tester.scala scala/util/parsing/input/Positional.scala scala/util/regexp/Base.scala scala/util/regexp/PointedHedgeExp.scala scala/util/regexp/SyntaxError.scala scala/util/regexp/WordExp.scala I'd have deprecated much of it long ago if the compiler didn't still depend on it due to xml/dtd/something. And it still does, but it's time to deprecate them anyway.
1 parent 50a7788 commit c5200ba

18 files changed

+28
-2
lines changed

src/library/scala/util/Marshal.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package scala.util
1616
* @author Stephane Micheloud
1717
* @version 1.0
1818
*/
19+
@deprecated("This class will be removed", "2.10.0")
1920
object Marshal {
2021
import java.io._
2122
import scala.reflect.ClassTag

src/library/scala/util/automata/BaseBerrySethi.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import scala.collection.{ mutable, immutable }
1717
* [[scala.util.automata.NondetWordAutom]] over `A` using the celebrated
1818
* position automata construction (also called ''Berry-Sethi'' or ''Glushkov'').
1919
*/
20+
@deprecated("This class will be removed", "2.10.0")
2021
abstract class BaseBerrySethi {
2122
val lang: Base
2223
import lang.{ Alt, Eps, Meta, RegExp, Sequ, Star }

src/library/scala/util/automata/DetWordAutom.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import scala.collection.{ mutable, immutable }
2020
* @author Burak Emir
2121
* @version 1.0
2222
*/
23+
@deprecated("This class will be removed", "2.10.0")
2324
abstract class DetWordAutom[T <: AnyRef] {
2425
val nstates: Int
2526
val finals: Array[Int]

src/library/scala/util/automata/Inclusion.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package scala.util.automata
1717
* @author Burak Emir
1818
* @version 1.0
1919
*/
20+
@deprecated("This class will be removed", "2.10.0")
2021
trait Inclusion[A <: AnyRef] {
2122

2223
val labels: Seq[A]

src/library/scala/util/automata/NondetWordAutom.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import scala.collection.{ immutable, mutable }
1717
* All states are reachable. Accepting states are those for which
1818
* the partial function `finals` is defined.
1919
*/
20+
@deprecated("This class will be removed", "2.10.0")
2021
abstract class NondetWordAutom[T <: AnyRef] {
2122
val nstates: Int
2223
val labels: Seq[T]

src/library/scala/util/automata/SubsetConstruction.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package scala.util.automata
1010

1111
import scala.collection.{ mutable, immutable }
1212

13+
@deprecated("This class will be removed", "2.10.0")
1314
class SubsetConstruction[T <: AnyRef](val nfa: NondetWordAutom[T]) {
1415
import nfa.labels
1516

src/library/scala/util/automata/WordBerrySethi.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import scala.util.regexp.WordExp
1717
* @author Burak Emir
1818
* @version 1.0
1919
*/
20+
@deprecated("This class will be removed", "2.10.0")
2021
abstract class WordBerrySethi extends BaseBerrySethi {
2122
override val lang: WordExp
2223

src/library/scala/util/grammar/HedgeRHS.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010

1111
package scala.util.grammar
1212

13+
@deprecated("This class will be removed", "2.10.0")
1314
abstract class HedgeRHS
1415

1516
/** Right hand side of a hedge production, deriving a single tree. */
17+
@deprecated("This class will be removed", "2.10.0")
1618
case class ConsRHS(tnt: Int, hnt: Int) extends HedgeRHS
1719

1820
/** Right hand side of a hedge production, deriving any hedge. */
21+
@deprecated("This class will be removed", "2.10.0")
1922
case object AnyHedgeRHS extends HedgeRHS
2023

2124
/** Right hand side of a hedge production, deriving the empty hedge. */
25+
@deprecated("This class will be removed", "2.10.0")
2226
case object EmptyHedgeRHS extends HedgeRHS

src/library/scala/util/grammar/TreeRHS.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
package scala.util.grammar
1212

1313
/** Right hand side of a tree production. */
14+
@deprecated("This class will be removed", "2.10.0")
1415
abstract class TreeRHS
1516

1617
/** Right hand side of a tree production, labelled with a letter from an alphabet. */
18+
@deprecated("This class will be removed", "2.10.0")
1719
case class LabelledRHS[A](label: A, hnt: Int) extends TreeRHS
1820

21+
@deprecated("This class will be removed", "2.10.0")
1922
case object AnyTreeRHS extends TreeRHS

src/library/scala/util/parsing/ast/AbstractSyntax.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import scala.util.parsing.input.Positional
1414
*
1515
* @author Adriaan Moors
1616
*/
17+
@deprecated("This class will be removed", "2.10.0")
1718
trait AbstractSyntax {
1819
/** The base class for elements of the abstract syntax tree.
1920
*/

src/library/scala/util/parsing/ast/Binders.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import language.implicitConversions
2424
*
2525
* @author Adriaan Moors
2626
*/
27+
@deprecated("This class will be removed", "2.10.0")
2728
trait Mappable {
2829
trait Mapper { def apply[T <% Mappable[T]](x: T): T } /* TODO: having type `Forall T. T => T` is too strict:
2930
sometimes we want to allow `Forall T >: precision. T => T` for some type `precision`, so that,

src/library/scala/util/parsing/combinator/testing/RegexTest.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ import scala.util.parsing.combinator._
55
import scala.util.parsing.input._
66
import language.postfixOps
77

8+
@deprecated("This class will be removed", "2.10.0")
89
case class Ident(s: String)
10+
@deprecated("This class will be removed", "2.10.0")
911
case class Number(n: Int)
12+
@deprecated("This class will be removed", "2.10.0")
1013
case class Str(s: String)
1114

15+
@deprecated("This class will be removed", "2.10.0")
1216
object RegexTest extends RegexParsers {
1317
val ident: Parser[Any] = """[a-zA-Z_]\w*""".r ^^ (s => Ident(s))
1418
val number: Parser[Any] = """\d\d*""".r ^^ (s => Number(s.toInt))

src/library/scala/util/parsing/combinator/testing/Tester.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import scala.util.parsing.combinator.syntactical.TokenParsers
2828
* @author Martin Odersky
2929
* @author Adriaan Moors
3030
*/
31+
@deprecated("This class will be removed", "2.10.0")
3132
abstract class Tester {
3233

3334
val syntactic: TokenParsers { val lexical: Lexical }

src/library/scala/util/parsing/input/Positional.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ package scala.util.parsing.input
1212
*
1313
* @author Martin Odersky, Adriaan Moors
1414
*/
15+
@deprecated("This class will be removed", "2.10.0")
1516
trait Positional {
1617

1718
/** The source position of this object, initially set to undefined. */

src/library/scala/util/regexp/Base.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ package scala.util.regexp
1515
* @author Burak Emir
1616
* @version 1.0
1717
*/
18-
abstract class Base
19-
{
18+
19+
@deprecated("This class will be removed", "2.10.0")
20+
abstract class Base {
2021
type _regexpT <: RegExp
2122

2223
abstract class RegExp {

src/library/scala/util/regexp/PointedHedgeExp.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ package scala.util.regexp
1515
* @author Burak Emir
1616
* @version 1.0
1717
*/
18+
@deprecated("This class will be removed", "2.10.0")
1819
abstract class PointedHedgeExp extends Base {
1920

2021
type _regexpT <: RegExp

src/library/scala/util/regexp/SyntaxError.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ package scala.util.regexp
1616
* @author Burak Emir
1717
* @version 1.0
1818
*/
19+
@deprecated("This class will be removed", "2.10.0")
1920
class SyntaxError(e: String) extends RuntimeException(e)

src/library/scala/util/regexp/WordExp.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ package scala.util.regexp
3838
* @author Burak Emir
3939
* @version 1.0
4040
*/
41+
@deprecated("This class will be removed", "2.10.0")
4142
abstract class WordExp extends Base {
4243

4344
abstract class Label

0 commit comments

Comments
 (0)