equal
deleted
inserted
replaced
54 case n => SEQ(r, NTIMES(r, n - 1)) |
54 case n => SEQ(r, NTIMES(r, n - 1)) |
55 } |
55 } |
56 |
56 |
57 // the evil regular expression a?{n} a{n} |
57 // the evil regular expression a?{n} a{n} |
58 def EVIL1(n: Int) = SEQ(NTIMES(OPT(CHAR('a')), n), NTIMES(CHAR('a'), n)) |
58 def EVIL1(n: Int) = SEQ(NTIMES(OPT(CHAR('a')), n), NTIMES(CHAR('a'), n)) |
|
59 |
|
60 // the evil regular expression (a*)*b |
59 val EVIL2 = SEQ(STAR(CHAR('a')), CHAR('b')) |
61 val EVIL2 = SEQ(STAR(CHAR('a')), CHAR('b')) |
60 |
62 |
61 //for measuring time |
63 //for measuring time |
62 def time_needed[T](i: Int, code: => T) = { |
64 def time_needed[T](i: Int, code: => T) = { |
63 val start = System.nanoTime() |
65 val start = System.nanoTime() |