415 self assert: list children second == one. |
415 self assert: list children second == one. |
416 self assert: list children last == other |
416 self assert: list children last == other |
417 ! |
417 ! |
418 |
418 |
419 testRepetitionReplace |
419 testRepetitionReplace |
420 | one two otherone othertwo repetition | |
420 | one two otherone othertwo repetition | |
421 one := $a asParser. |
421 one := $a asParser. |
422 two := $b asParser. |
422 two := $b asParser. |
423 otherone := $1 asParser. |
423 otherone := $1 asParser. |
424 othertwo := $2 asParser. |
424 othertwo := $2 asParser. |
425 |
425 |
426 repetition := one starLazy: two. |
426 repetition := one starLazy: two. |
427 self assert: repetition children first == one. |
427 self assert: repetition children first == one. |
428 self assert: repetition children second == two. |
428 self assert: repetition children second == two. |
429 |
429 |
430 repetition replace: one with: otherone. |
430 repetition replace: one with: otherone. |
431 self assert: repetition children first == otherone. |
431 self assert: repetition children first == otherone. |
432 self assert: repetition children second == two. |
432 self assert: repetition children second == two. |
433 |
433 |
434 repetition replace: two with: othertwo. |
434 repetition replace: two with: othertwo. |
435 self assert: repetition children first == otherone. |
435 self assert: repetition children first == otherone. |
436 self assert: repetition children second == othertwo |
436 self assert: repetition children second == othertwo |
437 ! |
437 ! |
438 |
438 |
439 testTransformIdentityGrammarC |
439 testTransformIdentityGrammarC |
440 | orig tran | |
440 | orig tran | |
441 orig := self grammarC. |
441 orig := self grammarC. |