summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2005-04-24 18:44:53 +0000
committerburaq <buraq@epfl.ch>2005-04-24 18:44:53 +0000
commit68562d06e3d08902dc9e6110d548d2f6c9563c7c (patch)
tree13f905bf0b5d100e299c103b6e19c87fcf196b22
parent041681054fca3a6b5893c95cfc4bbfc7a780993d (diff)
downloadscala-68562d06e3d08902dc9e6110d548d2f6c9563c7c.tar.gz
scala-68562d06e3d08902dc9e6110d548d2f6c9563c7c.tar.bz2
scala-68562d06e3d08902dc9e6110d548d2f6c9563c7c.zip
merging wildcards into wordexp, too difficult t...
merging wildcards into wordexp, too difficult to keep the algo flexible
-rw-r--r--sources/scala/util/regexp/WildcardBase.scala12
-rw-r--r--sources/scala/util/regexp/WordExp.scala15
2 files changed, 8 insertions, 19 deletions
diff --git a/sources/scala/util/regexp/WildcardBase.scala b/sources/scala/util/regexp/WildcardBase.scala
deleted file mode 100644
index 0c1a62545c..0000000000
--- a/sources/scala/util/regexp/WildcardBase.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-
-package scala.util.regexp ;
-
-/** for use as a mixin to add wildcards to the language */
-
-trait WildcardBase extends Base {
- type regexp <: RegExp;
- case object Wildcard extends RegExp {
- final val isNullable = false;
- }
-}
diff --git a/sources/scala/util/regexp/WordExp.scala b/sources/scala/util/regexp/WordExp.scala
index a2c006ac50..3c7b74b126 100644
--- a/sources/scala/util/regexp/WordExp.scala
+++ b/sources/scala/util/regexp/WordExp.scala
@@ -2,12 +2,7 @@
package scala.util.regexp ;
-/** regular word expressions. use them with an alphabet: <pre>
-abstract class IntLabels extends Alphabet;
-object IntWordExp extends WordExp[IntLabels] {
- type regexp = RegExp;
-};
- * </pre>
+/** regular word expressions.
*/
trait WordExp extends Base {
@@ -16,8 +11,14 @@ trait WordExp extends Base {
type _regexpT <: RegExp ;
type _labelT <: Label;
- case class Letter(a: _labelT) extends RegExp {
+ case class Letter(a: _labelT) extends RegExp {
final val isNullable = false;
+ var pos = -1;
}
+ case class Wildcard extends RegExp {
+ final val isNullable = false;
+ var pos = -1;
+ }
}
+