diff options
author | buraq <buraq@epfl.ch> | 2004-05-26 08:18:26 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-05-26 08:18:26 +0000 |
commit | 9efd2595195bda2c6126e10f6089805e0ef08664 (patch) | |
tree | c86f7bbef92cb545746fb8da2891aa867e262001 /test | |
parent | 308ed786b8b811926dfba9ae184a4465cff0e327 (diff) | |
download | scala-9efd2595195bda2c6126e10f6089805e0ef08664.tar.gz scala-9efd2595195bda2c6126e10f6089805e0ef08664.tar.bz2 scala-9efd2595195bda2c6126e10f6089805e0ef08664.zip |
added T
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/matching.scala | 13 |
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 ); } //############################################################################ |