diff options
author | buraq <buraq@epfl.ch> | 2004-11-16 15:58:47 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-11-16 15:58:47 +0000 |
commit | 27410be7531a1f9e7642f5292c51672968ca5c0d (patch) | |
tree | d32da51dd18e2276b5991a8592dd571f3adbd4d6 /sources | |
parent | bfa877d7e477ac5f33c1fd28675f9c07e2358589 (diff) | |
download | scala-27410be7531a1f9e7642f5292c51672968ca5c0d.tar.gz scala-27410be7531a1f9e7642f5292c51672968ca5c0d.tar.bz2 scala-27410be7531a1f9e7642f5292c51672968ca5c0d.zip |
commitbye
Diffstat (limited to 'sources')
4 files changed, 7 insertions, 7 deletions
diff --git a/sources/scala/util/automata/NondetWordAutom.scala b/sources/scala/util/automata/NondetWordAutom.scala index 70c48030d3..36b36db84a 100644 --- a/sources/scala/util/automata/NondetWordAutom.scala +++ b/sources/scala/util/automata/NondetWordAutom.scala @@ -14,12 +14,12 @@ abstract class NondetWordAutom { type T_label; val nstates: Int; - val finals: Array[Int] ; + val finals: Array[Option[Int]] ; val delta: Array[Map[T_label,List[Int]]]; val default: Array[List[Int]]; /** returns true if the state is final */ - final def isFinal(state: Int) = finals.isDefinedAt( state ); + final def isFinal(state: Int) = !finals( state ).isEmpty; /** returns tag of final state */ final def finalTag(state: Int) = finals( state ); diff --git a/sources/scala/util/grammar/ImmutableTreeHedgeGrammar.scala b/sources/scala/util/grammar/ImmutableTreeHedgeGrammar.scala index 74b331b1b9..388b18ede5 100644 --- a/sources/scala/util/grammar/ImmutableTreeHedgeGrammar.scala +++ b/sources/scala/util/grammar/ImmutableTreeHedgeGrammar.scala @@ -21,8 +21,8 @@ abstract class ImmutableTreeHedgeGrammar extends TreeHedgeGrammar { /** inv: isNullable.length == nHedgeNT */ val isNullable: immutable.BitSet; /** inv: treeTransitions.length == nTreeNT */ - val treeTransitions: Function1[Int,immutable.Set[TreeRHS]]; + val treeTransitions: Array[immutable.Set[TreeRHS]]; /** inv: hedgeTransitions.length == nHedgeNT */ - val hedgeTransitions: Function1[Int,immutable.Set[HedgeRHS]]; + val hedgeTransitions: Array[immutable.Set[HedgeRHS]]; } diff --git a/sources/scala/util/grammar/MutableTreeHedgeGrammar.scala b/sources/scala/util/grammar/MutableTreeHedgeGrammar.scala index 4eae49c01c..3798e2e631 100644 --- a/sources/scala/util/grammar/MutableTreeHedgeGrammar.scala +++ b/sources/scala/util/grammar/MutableTreeHedgeGrammar.scala @@ -8,7 +8,7 @@ import scala.collection.mutable ; * can derive the empty hedge are called "nullable". initials tree * or hedge nonterminals. */ -class MutableTreeHedgeGrammar[ A ] extends TreeHedgeGrammar { +class MutableTreeHedgeGrammar[ A ] { /** number of tree nonterminals*/ var nTreeNT: Int = 0; diff --git a/sources/scala/util/grammar/TreeHedgeGrammar.scala b/sources/scala/util/grammar/TreeHedgeGrammar.scala index f4807a31aa..2cfef1c105 100644 --- a/sources/scala/util/grammar/TreeHedgeGrammar.scala +++ b/sources/scala/util/grammar/TreeHedgeGrammar.scala @@ -21,7 +21,7 @@ abstract class TreeHedgeGrammar { /** inv: isNullable.size == nHedgeNT */ def isNullable: BitSet; - def treeTransitions: Function1[Int, Set[TreeRHS]] ; - def hedgeTransitions: Function1[Int, Set[HedgeRHS]] ; + def treeTransitions: Array[Set[TreeRHS]] ; + def hedgeTransitions: Array[Set[HedgeRHS]] ; } |