--- a/PPListParser.st Tue Mar 04 15:32:55 2014 +0100
+++ b/PPListParser.st Tue Mar 04 15:32:58 2014 +0100
@@ -22,6 +22,35 @@
^ self basicNew setParsers: aCollection
! !
+!PPListParser methodsFor:'*petitanalyzer-matching'!
+
+copyInContext: aDictionary seen: aSeenDictionary
+ | copy copies |
+ aSeenDictionary at: self ifPresent: [ :value | ^ value ].
+ copy := aSeenDictionary at: self put: self copy.
+ copies := OrderedCollection new.
+ parsers do: [ :each |
+ | result |
+ result := each
+ copyInContext: aDictionary
+ seen: aSeenDictionary.
+ result isCollection
+ ifTrue: [ copies addAll: result ]
+ ifFalse: [ copies add: result ] ].
+ ^ copy
+ setParsers: copies;
+ yourself
+! !
+
+!PPListParser methodsFor:'*petitanalyzer-transforming'!
+
+replace: aParser with: anotherParser
+ super replace: aParser with: anotherParser.
+ parsers keysAndValuesDo: [ :index :parser |
+ parser == aParser
+ ifTrue: [ parsers at: index put: anotherParser ] ]
+! !
+
!PPListParser methodsFor:'accessing'!
children
@@ -53,13 +82,14 @@
!PPListParser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.3 2012-05-04 22:10:13 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.4 2014-03-04 14:32:58 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.3 2012-05-04 22:10:13 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.4 2014-03-04 14:32:58 cg Exp $'
!
version_SVN
- ^ '§Id: PPListParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
+ ^ '$Id: PPListParser.st,v 1.4 2014-03-04 14:32:58 cg Exp $'
! !
+