4
|
1 |
"{ Package: 'stx:goodies/petitparser' }"
|
0
|
2 |
|
|
3 |
PPDelegateParser subclass:#PPAndParser
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'PetitParser-Parsers'
|
|
8 |
!
|
|
9 |
|
|
10 |
PPAndParser comment:'The and-predicate, a parser that succeeds whenever its delegate does, but consumes the input stream [Parr 1994, 1995].'
|
|
11 |
!
|
|
12 |
|
|
13 |
|
|
14 |
!PPAndParser methodsFor:'operations'!
|
|
15 |
|
|
16 |
and
|
|
17 |
^ self
|
|
18 |
! !
|
|
19 |
|
|
20 |
!PPAndParser methodsFor:'parsing'!
|
|
21 |
|
|
22 |
parseOn: aStream
|
|
23 |
| element position |
|
|
24 |
position := aStream position.
|
|
25 |
element := parser parseOn: aStream.
|
|
26 |
aStream position: position.
|
|
27 |
^ element
|
|
28 |
! !
|
|
29 |
|
|
30 |
!PPAndParser class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
version_SVN
|
4
|
33 |
^ '$Id: PPAndParser.st,v 1.2 2012-01-13 11:22:50 cg Exp $'
|
0
|
34 |
! !
|