progs/matcher/re2.sc
changeset 1006 674d1258a2fb
parent 998 5dc412b9a7fd
equal deleted inserted replaced
1005:970ddba0d72e 1006:674d1258a2fb
    91 @arg(doc = "Test (a*)* b")
    91 @arg(doc = "Test (a*)* b")
    92 @main
    92 @main
    93 def test2() = {
    93 def test2() = {
    94   println("Test (a*)* b")
    94   println("Test (a*)* b")
    95 
    95 
    96   for (i <- 0 to 20 by 2) {
    96   for (i <- 0 to 22 by 2) {
    97     println(f"$i: ${time_needed(1, matcher(EVIL2, "a" * i))}%.5f")
    97     println(f"$i: ${time_needed(1, matcher(EVIL2, "a" * i))}%.5f")
    98   }
    98   }
    99 }
    99 }
   100 
   100 
   101 // the size of a regular expressions - for testing purposes 
   101 // the size of a regular expressions - for testing purposes