equal
deleted
inserted
replaced
129 |
129 |
130 // given a regular expression and building successive |
130 // given a regular expression and building successive |
131 // derivatives might result into bigger and bigger |
131 // derivatives might result into bigger and bigger |
132 // regular expressions...here is an example for this: |
132 // regular expressions...here is an example for this: |
133 |
133 |
|
134 // (a+b)* o a o b o (a+b)* |
134 val BIG_aux = STAR(ALT(CHAR('a'), CHAR('b'))) |
135 val BIG_aux = STAR(ALT(CHAR('a'), CHAR('b'))) |
135 val BIG = SEQ(BIG_aux, SEQ(CHAR('a'),SEQ(CHAR('b'), BIG_aux))) |
136 val BIG = SEQ(BIG_aux, SEQ(CHAR('a'),SEQ(CHAR('b'), BIG_aux))) |
136 |
137 |
137 size(ders("".toList, BIG)) // 13 |
138 size(ders("".toList, BIG)) // 13 |
138 size(ders("ab".toList, BIG)) // 51 |
139 size(ders("ab".toList, BIG)) // 51 |