Permalink
Browse files

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.
  • Loading branch information...
paulp committed May 12, 2012
1 parent 50a7788 commit c5200ba0eac4058bb535cfa50a8a2a05691542e8
@@ -16,6 +16,7 @@ package scala.util
* @author Stephane Micheloud
* @version 1.0
*/
+@deprecated("This class will be removed", "2.10.0")
object Marshal {
import java.io._
import scala.reflect.ClassTag
@@ -17,6 +17,7 @@ import scala.collection.{ mutable, immutable }
* [[scala.util.automata.NondetWordAutom]] over `A` using the celebrated
* position automata construction (also called ''Berry-Sethi'' or ''Glushkov'').
*/
+@deprecated("This class will be removed", "2.10.0")
abstract class BaseBerrySethi {
val lang: Base
import lang.{ Alt, Eps, Meta, RegExp, Sequ, Star }
@@ -20,6 +20,7 @@ import scala.collection.{ mutable, immutable }
* @author Burak Emir
* @version 1.0
*/
+@deprecated("This class will be removed", "2.10.0")
abstract class DetWordAutom[T <: AnyRef] {
val nstates: Int
val finals: Array[Int]
@@ -17,6 +17,7 @@ package scala.util.automata
* @author Burak Emir
* @version 1.0
*/
+@deprecated("This class will be removed", "2.10.0")
trait Inclusion[A <: AnyRef] {
val labels: Seq[A]
@@ -17,6 +17,7 @@ import scala.collection.{ immutable, mutable }
* All states are reachable. Accepting states are those for which
* the partial function `finals` is defined.
*/
+@deprecated("This class will be removed", "2.10.0")
abstract class NondetWordAutom[T <: AnyRef] {
val nstates: Int
val labels: Seq[T]
@@ -10,6 +10,7 @@ package scala.util.automata
import scala.collection.{ mutable, immutable }
+@deprecated("This class will be removed", "2.10.0")
class SubsetConstruction[T <: AnyRef](val nfa: NondetWordAutom[T]) {
import nfa.labels
@@ -17,6 +17,7 @@ import scala.util.regexp.WordExp
* @author Burak Emir
* @version 1.0
*/
+@deprecated("This class will be removed", "2.10.0")
abstract class WordBerrySethi extends BaseBerrySethi {
override val lang: WordExp
@@ -10,13 +10,17 @@
package scala.util.grammar
+@deprecated("This class will be removed", "2.10.0")
abstract class HedgeRHS
/** Right hand side of a hedge production, deriving a single tree. */
+@deprecated("This class will be removed", "2.10.0")
case class ConsRHS(tnt: Int, hnt: Int) extends HedgeRHS
/** Right hand side of a hedge production, deriving any hedge. */
+@deprecated("This class will be removed", "2.10.0")
case object AnyHedgeRHS extends HedgeRHS
/** Right hand side of a hedge production, deriving the empty hedge. */
+@deprecated("This class will be removed", "2.10.0")
case object EmptyHedgeRHS extends HedgeRHS
@@ -11,9 +11,12 @@
package scala.util.grammar
/** Right hand side of a tree production. */
+@deprecated("This class will be removed", "2.10.0")
abstract class TreeRHS
/** Right hand side of a tree production, labelled with a letter from an alphabet. */
+@deprecated("This class will be removed", "2.10.0")
case class LabelledRHS[A](label: A, hnt: Int) extends TreeRHS
+@deprecated("This class will be removed", "2.10.0")
case object AnyTreeRHS extends TreeRHS
@@ -14,6 +14,7 @@ import scala.util.parsing.input.Positional
*
* @author Adriaan Moors
*/
+@deprecated("This class will be removed", "2.10.0")
trait AbstractSyntax {
/** The base class for elements of the abstract syntax tree.
*/
@@ -24,6 +24,7 @@ import language.implicitConversions
*
* @author Adriaan Moors
*/
+@deprecated("This class will be removed", "2.10.0")
trait Mappable {
trait Mapper { def apply[T <% Mappable[T]](x: T): T } /* TODO: having type `Forall T. T => T` is too strict:
sometimes we want to allow `Forall T >: precision. T => T` for some type `precision`, so that,
@@ -5,10 +5,14 @@ import scala.util.parsing.combinator._
import scala.util.parsing.input._
import 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))
@@ -28,6 +28,7 @@ import scala.util.parsing.combinator.syntactical.TokenParsers
* @author Martin Odersky
* @author Adriaan Moors
*/
+@deprecated("This class will be removed", "2.10.0")
abstract class Tester {
val syntactic: TokenParsers { val lexical: Lexical }
@@ -12,6 +12,7 @@ package scala.util.parsing.input
*
* @author Martin Odersky, Adriaan Moors
*/
+@deprecated("This class will be removed", "2.10.0")
trait Positional {
/** The source position of this object, initially set to undefined. */
@@ -15,8 +15,9 @@ package scala.util.regexp
* @author Burak Emir
* @version 1.0
*/
-abstract class Base
-{
+
+@deprecated("This class will be removed", "2.10.0")
+abstract class Base {
type _regexpT <: RegExp
abstract class RegExp {
@@ -15,6 +15,7 @@ package scala.util.regexp
* @author Burak Emir
* @version 1.0
*/
+@deprecated("This class will be removed", "2.10.0")
abstract class PointedHedgeExp extends Base {
type _regexpT <: RegExp
@@ -16,4 +16,5 @@ package scala.util.regexp
* @author Burak Emir
* @version 1.0
*/
+@deprecated("This class will be removed", "2.10.0")
class SyntaxError(e: String) extends RuntimeException(e)
@@ -38,6 +38,7 @@ package scala.util.regexp
* @author Burak Emir
* @version 1.0
*/
+@deprecated("This class will be removed", "2.10.0")
abstract class WordExp extends Base {
abstract class Label

1 comment on commit c5200ba

@soc

This comment has been minimized.

Show comment
Hide comment
@soc

soc May 13, 2012

Member

Thank you very much! Would this stuff qualify for a quick delete like the scala.mobile package (SI-4505)? I remember that I already asked questions about some of these classes during 2.8 ... and nobody had any idea how to use them. Suggestion: Remove those classes and ship the next milestone without them. If even a single person complains, let's put them back and do the usual deprecation cycle.

Member

soc commented on c5200ba May 13, 2012

Thank you very much! Would this stuff qualify for a quick delete like the scala.mobile package (SI-4505)? I remember that I already asked questions about some of these classes during 2.8 ... and nobody had any idea how to use them. Suggestion: Remove those classes and ship the next milestone without them. If even a single person complains, let's put them back and do the usual deprecation cycle.

Please sign in to comment.