progs/matcher/re2.sc
changeset 767 bdd12391d345
parent 742 b5b5583a3a08
child 769 f9686b22db7e
equal deleted inserted replaced
766:e8402d8ec8e6 767:bdd12391d345
    88 @doc("Test (a*)* b")
    88 @doc("Test (a*)* b")
    89 @main
    89 @main
    90 def test2() = {
    90 def test2() = {
    91   println("Test (a*)* b")
    91   println("Test (a*)* b")
    92 
    92 
    93   for (i <- 0 to 20 by 2) {
    93   for (i <- 0 to 30 by 2) {
    94     println(f"$i: ${time_needed(2, matcher(EVIL2, "a" * i))}%.5f")
    94     println(f"$i: ${time_needed(2, matcher(EVIL2, "a" * i))}%.5f")
    95   }
    95   }
    96 }
    96 }
    97 
    97 
    98 // the size of a regular expressions - for testing purposes 
    98 // the size of a regular expressions - for testing purposes