PPLimitedRepeatingParser.st
changeset 377 6112a403a52d
parent 168 9fa394e40830
--- a/PPLimitedRepeatingParser.st	Fri Oct 03 01:59:10 2014 +0100
+++ b/PPLimitedRepeatingParser.st	Fri Oct 03 02:33:08 2014 +0100
@@ -14,6 +14,7 @@
 	^ (self on: aParser) setLimit: aLimitParser
 ! !
 
+
 !PPLimitedRepeatingParser methodsFor:'accessing'!
 
 children
@@ -32,13 +33,13 @@
 	limit := aParser
 ! !
 
-!PPLimitedRepeatingParser methodsFor:'private'!
+!PPLimitedRepeatingParser methodsFor:'parsing'!
 
-matchesLimitOn: aStream
+matchesLimitOn: aPPContext
 	| element position |
-	position := aStream position.
-	element := limit parseOn: aStream.
-	aStream position: position.
+	position := aPPContext remember.
+	element := limit parseOn: aPPContext.
+	aPPContext restore: position.
 	^ element isPetitFailure not
 ! !