progs/matcher/re2.sc
changeset 767 12d744ff9607
parent 742 155426396b5f
child 769 b153de5339bc
equal deleted inserted replaced
766:ef7a7c4b24b7 767:12d744ff9607
    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