main_testing3/re_test6.scala
changeset 347 4de31fdc0d67
parent 300 72688efdf17c
child 403 ffce7b61b446
equal deleted inserted replaced
346:663c2a9108d1 347:4de31fdc0d67
       
     1 import CW8c._
       
     2 
       
     3 val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
       
     4 
       
     5 
       
     6 assert(simp(Iterator.iterate(ONE:Rexp)(r => SEQ(r, ONE | ONE)).drop(50).next) == ONE)
       
     7 assert(simp(Iterator.iterate(ONE:Rexp)(r => ALT(r, r)).drop(20).next) == ONE)
       
     8 assert(matcher(EVIL_urban, "a" * 1000000) == false)
       
     9 assert(matcher(EVIL_urban, "a" * 1000000 ++ "b") == true)