--- a/PPPredicateSequenceParser.st Fri Oct 03 01:59:10 2014 +0100
+++ b/PPPredicateSequenceParser.st Fri Oct 03 02:33:08 2014 +0100
@@ -18,11 +18,6 @@
^ self on: aBlock message: aString negated: [ :each | (aBlock value: each) not ] message: 'no ' , aString size: anInteger
! !
-!PPPredicateSequenceParser methodsFor:'*petitanalyzer-matching'!
-
-match: aParser inContext: aDictionary seen: anIdentitySet
- ^ (super match: aParser inContext: aDictionary seen: anIdentitySet) and: [ self size = aParser size ]
-! !
!PPPredicateSequenceParser methodsFor:'accessing'!
@@ -55,14 +50,14 @@
!PPPredicateSequenceParser methodsFor:'parsing'!
-parseOn: aStream
- | position result |
- position := aStream position.
- result := aStream next: size.
+parseOn: aPPContext
+ | memento result |
+ memento := aPPContext remember.
+ result := aPPContext stream next: size.
(result size = size and: [ predicate value: result ])
ifTrue: [ ^ result ].
- aStream position: position.
- ^ PPFailure message: predicateMessage at: aStream position
+ aPPContext restore: memento.
+ ^ PPFailure message: predicateMessage context: aPPContext
! !
!PPPredicateSequenceParser class methodsFor:'documentation'!