PPAndParser.st
author Claus Gittinger <cg@exept.de>
Mon, 12 Sep 2011 19:48:53 +0200
changeset 3 e1b11f74e142
parent 0 739fe9b7253e
child 4 90de244a7fa2
permissions -rw-r--r--
initial checkin

"{ Package: 'squeak:petitparser' }"

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

PPAndParser comment:'The and-predicate, a parser that succeeds whenever its delegate does, but consumes the input stream [Parr 1994, 1995].'
!


!PPAndParser methodsFor:'operations'!

and
	^ self
! !

!PPAndParser methodsFor:'parsing'!

parseOn: aStream
	| element position |
	position := aStream position.
	element := parser parseOn: aStream.
	aStream position: position.
	^ element
! !

!PPAndParser class methodsFor:'documentation'!

version_SVN
    ^ '$Id: PPAndParser.st,v 1.1 2011-08-18 18:56:17 cg Exp $'
! !