summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-05-26 08:18:26 +0000
committerburaq <buraq@epfl.ch>2004-05-26 08:18:26 +0000
commit9efd2595195bda2c6126e10f6089805e0ef08664 (patch)
treec86f7bbef92cb545746fb8da2891aa867e262001 /test
parent308ed786b8b811926dfba9ae184a4465cff0e327 (diff)
downloadscala-9efd2595195bda2c6126e10f6089805e0ef08664.tar.gz
scala-9efd2595195bda2c6126e10f6089805e0ef08664.tar.bz2
scala-9efd2595195bda2c6126e10f6089805e0ef08664.zip
added T
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm/matching.scala13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/files/jvm/matching.scala b/test/files/jvm/matching.scala
index f991a384dd..378f1aad44 100644
--- a/test/files/jvm/matching.scala
+++ b/test/files/jvm/matching.scala
@@ -25,13 +25,16 @@ object Test1Test {
val hedgeTrans = new immutable.TreeMap[Int,Set[HRule]]()
.update( 1, immutable.ListSet.Empty[HRule] + hr1 );
- val gram = new Grammar( treeTrans, hedgeTrans, null ) { val
- treeInitials = immutable.ListSet.Empty[TreeNT] + t2; val
- hedgeInitials = immutable.ListSet.Empty[HedgeNT]; def test( i:Int,
- inp:Any ) = { if( i==1 ) inp.isInstanceOf[List[Int]] else false; } }
+ val gram = new Grammar( treeTrans, hedgeTrans, null ) {
+ val treeInitials = immutable.ListSet.Empty[TreeNT] + t2;
+ val hedgeInitials = immutable.ListSet.Empty[HedgeNT];
+ def test( i:Int, inp:Any ) = {
+ if( i==1 ) inp.isInstanceOf[List[Int]] else false;
+ }
+ }
def main(args:Array[String]): Unit =
- Console.println( new Matcher(gram).matches( List(1,2,3) ));
+ Console.println( new Matcher( gram ).matchesT( List(1,2,3) ).toList );
}
//############################################################################