equal
deleted
inserted
replaced
|
1 "{ Package: 'stx:goodies/petitparser' }" |
|
2 |
|
3 "{ NameSpace: Smalltalk }" |
|
4 |
|
5 PPParser subclass:#PPEndOfFileParser |
|
6 instanceVariableNames:'' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'PetitParser-Parsers' |
|
10 ! |
|
11 |
|
12 !PPEndOfFileParser methodsFor:'as yet unclassified'! |
|
13 |
|
14 acceptsEpsilon |
|
15 ^ true |
|
16 ! |
|
17 |
|
18 exampleOn: aStream |
|
19 aStream nextPutAll: #'end-of-input' |
|
20 ! |
|
21 |
|
22 isNullable |
|
23 ^ true |
|
24 ! |
|
25 |
|
26 nonEmpty |
|
27 "I know I am empty, but it does not count in my case, I represent virtual non-existent character" |
|
28 ^ self |
|
29 ! |
|
30 |
|
31 parseOn: aPPContext |
|
32 (aPPContext atEnd) ifFalse: |
|
33 [ |
|
34 ^ PPFailure message: 'end of input expected' context: aPPContext. |
|
35 ]. |
|
36 ^ #'end-of-input' |
|
37 ! ! |
|
38 |