PPEndOfInputParser.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 03 Oct 2014 02:33:08 +0100
changeset 377 6112a403a52d
parent 26 d5b0ca28ee55
child 642 77d5fddb6462
permissions -rw-r--r--
Updated to latest version from Moose repository. Name: PetitParser-JanKurs.250 Author: JanKurs Time: 01-10-2014, 04:44:04 AM UUID: c46eea20-51a0-4deb-8fd5-8cb99810a8b4 Repository: http://smalltalkhub.com/mc/Moose/PetitParser/main Name: PetitTests-JanKurs.60 Author: JanKurs Time: 29-09-2014, 11:48:10 AM UUID: 28fd2e65-c287-4f73-b71e-5b6bb25bebaa Repository: http://smalltalkhub.com/mc/Moose/PetitParser/main

"{ Package: 'stx:goodies/petitparser' }"

PPDelegateParser subclass:#PPEndOfInputParser
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitParser-Parsers'
!


!PPEndOfInputParser methodsFor:'operations'!

end
	^ self
! !

!PPEndOfInputParser methodsFor:'parsing'!

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'
		context: aPPContext.
	aPPContext restore: memento.
	^ result
! !

!PPEndOfInputParser class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPEndOfInputParser.st,v 1.3 2012-05-04 22:02:18 vrany Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPEndOfInputParser.st,v 1.3 2012-05-04 22:02:18 vrany Exp $'
!

version_SVN
    ^ '§Id: PPEndOfInputParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
! !