analyzer/tests/PPAnalyzerTest.st
changeset 263 32638bbc8537
parent 259 0f1afe248885
child 325 cd6b25955d98
equal deleted inserted replaced
262:185ab6ab79b3 263:32638bbc8537
   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.
   530 ! !
   530 ! !
   531 
   531 
   532 !PPAnalyzerTest class methodsFor:'documentation'!
   532 !PPAnalyzerTest class methodsFor:'documentation'!
   533 
   533 
   534 version
   534 version
   535     ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/tests/PPAnalyzerTest.st,v 1.2 2014-03-04 20:10:20 cg Exp $'
   535     ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/tests/PPAnalyzerTest.st,v 1.3 2014-03-04 20:26:16 cg Exp $'
   536 !
   536 !
   537 
   537 
   538 version_CVS
   538 version_CVS
   539     ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/tests/PPAnalyzerTest.st,v 1.2 2014-03-04 20:10:20 cg Exp $'
   539     ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/tests/PPAnalyzerTest.st,v 1.3 2014-03-04 20:26:16 cg Exp $'
   540 ! !
   540 ! !
   541 
   541