PPEndOfInputParser.st
changeset 377 6112a403a52d
parent 26 d5b0ca28ee55
child 642 77d5fddb6462
--- a/PPEndOfInputParser.st	Fri Oct 03 01:59:10 2014 +0100
+++ b/PPEndOfInputParser.st	Fri Oct 03 02:33:08 2014 +0100
@@ -16,16 +16,16 @@
 
 !PPEndOfInputParser methodsFor:'parsing'!
 
-parseOn: aStream
-	| position result |
-	position := aStream position.
-	result := parser parseOn: aStream.
-	(result isPetitFailure or: [ aStream atEnd ])
+parseOn: aPPContext
+	| memento result |
+	memento := aPPContext remember.
+	result := parser parseOn: aPPContext.
+	(result isPetitFailure or: [ aPPContext stream atEnd ])
 		ifTrue: [ ^ result ].
 	result := PPFailure
 		message: 'end of input expected'
-		at: aStream position.
-	aStream position: position.
+		context: aPPContext.
+	aPPContext restore: memento.
 	^ result
 ! !
 
@@ -42,3 +42,4 @@
 version_SVN
     ^ '§Id: PPEndOfInputParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
 ! !
+