4
|
1 |
"{ Package: 'stx:goodies/petitparser' }"
|
0
|
2 |
|
|
3 |
PPDelegateParser subclass:#PPEndOfInputParser
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'PetitParser-Parsers'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!PPEndOfInputParser methodsFor:'operations'!
|
|
12 |
|
|
13 |
end
|
|
14 |
^ self
|
|
15 |
! !
|
|
16 |
|
|
17 |
!PPEndOfInputParser methodsFor:'parsing'!
|
|
18 |
|
|
19 |
parseOn: aStream
|
|
20 |
| position result |
|
|
21 |
position := aStream position.
|
|
22 |
result := parser parseOn: aStream.
|
|
23 |
(result isPetitFailure or: [ aStream atEnd ])
|
|
24 |
ifTrue: [ ^ result ].
|
|
25 |
result := PPFailure
|
|
26 |
message: 'end of input expected'
|
|
27 |
at: aStream position.
|
|
28 |
aStream position: position.
|
|
29 |
^ result
|
|
30 |
! !
|
|
31 |
|
|
32 |
!PPEndOfInputParser class methodsFor:'documentation'!
|
|
33 |
|
26
|
34 |
version
|
|
35 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPEndOfInputParser.st,v 1.3 2012-05-04 22:02:18 vrany Exp $'
|
|
36 |
!
|
|
37 |
|
|
38 |
version_CVS
|
|
39 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPEndOfInputParser.st,v 1.3 2012-05-04 22:02:18 vrany Exp $'
|
|
40 |
!
|
|
41 |
|
0
|
42 |
version_SVN
|
26
|
43 |
^ '§Id: PPEndOfInputParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
|
0
|
44 |
! !
|