--- a/PPPluggableParser.st Fri Oct 03 01:59:10 2014 +0100
+++ b/PPPluggableParser.st Fri Oct 03 02:33:08 2014 +0100
@@ -14,11 +14,6 @@
^ self new initializeOn: aBlock
! !
-!PPPluggableParser methodsFor:'*petitanalyzer-matching'!
-
-match: aParser inContext: aDictionary seen: anIdentitySet
- ^ (super match: aParser inContext: aDictionary seen: anIdentitySet) and: [ self block = aParser block ]
-! !
!PPPluggableParser methodsFor:'accessing'!
@@ -36,12 +31,12 @@
!PPPluggableParser methodsFor:'parsing'!
-parseOn: aStream
- | position result |
- position := aStream position.
- result := block value: aStream.
+parseOn: aPPContext
+ | memento result |
+ memento := aPPContext remember.
+ result := block value: aPPContext.
result isPetitFailure
- ifTrue: [ aStream position: position ].
+ ifTrue: [ aPPContext restore: memento ].
^ result
! !