main_testing3/re_test9.scala
changeset 475 59e005dcf163
parent 433 6af86ba1208f
--- a/main_testing3/re_test9.scala	Thu Nov 02 13:53:37 2023 +0000
+++ b/main_testing3/re_test9.scala	Thu Nov 02 23:34:53 2023 +0000
@@ -1,9 +1,13 @@
-import M3._
+
+def urbanmain() = {
 
-val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
+  import M3._
+
+  val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
 
 
-assert(simp(Iterator.iterate(ONE:Rexp)(r => SEQ(r, ONE | ONE)).drop(50).next) == ONE)
-assert(simp(Iterator.iterate(ONE:Rexp)(r => ALT(r, r)).drop(20).next) == ONE)
-assert(matcher(EVIL_urban, "a" * 1000000) == false)
-assert(matcher(EVIL_urban, "a" * 1000000 ++ "b") == true)
+  assert(simp(Iterator.iterate(ONE:Rexp)(r => SEQ(r, ONE | ONE)).drop(50).next) == ONE)
+  assert(simp(Iterator.iterate(ONE:Rexp)(r => ALT(r, r)).drop(20).next) == ONE)
+  assert(matcher(EVIL_urban, "a" * 1000000) == false)
+  assert(matcher(EVIL_urban, "a" * 1000000 ++ "b") == true)
+}