1 "{ Package: 'squeak:petitparser' }" |
1 "{ Package: 'stx:goodies/petitparser' }" |
2 |
2 |
3 PPParser subclass:#PPPredicateParser |
3 PPParser subclass:#PPPredicateParser |
4 instanceVariableNames:'predicate predicateMessage negated negatedMessage' |
4 instanceVariableNames:'predicate predicateMessage negated negatedMessage' |
5 classVariableNames:'' |
5 classVariableNames:'' |
6 poolDictionaries:'' |
6 poolDictionaries:'' |
7 category:'PetitParser-Parsers' |
7 category:'PetitParser-Parsers' |
8 ! |
8 ! |
9 |
9 |
10 PPPredicateParser comment:'An abstract parser that accepts if a given predicate holds. |
10 PPPredicateParser comment:'An abstract parser that accepts if a given predicate holds. |
11 Instance Variables: |
11 Instance Variables: |
12 predicate <BlockClosure> The block testing for the predicate. |
12 predicate <BlockClosure> The block testing for the predicate. |
13 predicateMessage <String> The error message of the predicate. |
13 predicateMessage <String> The error message of the predicate. |
14 negated <BlockClosure> The block testing for the negation of the predicate. |
14 negated <BlockClosure> The block testing for the negation of the predicate. |
15 negatedMessage <String> The error message of the negated predicate.' |
15 negatedMessage <String> The error message of the negated predicate.' |
16 ! |
16 ! |
17 |
17 |
18 |
18 |
19 !PPPredicateParser methodsFor:'accessing'! |
19 !PPPredicateParser methodsFor:'accessing'! |
20 |
20 |
21 block |
21 block |
22 "Answer the predicate block of the receiver." |
22 "Answer the predicate block of the receiver." |
23 |
23 |
24 ^ predicate |
24 ^ predicate |
25 ! |
25 ! |
26 |
26 |
27 message |
27 message |
28 "Answer the failure message." |
28 "Answer the failure message." |
29 |
29 |
30 ^ predicateMessage |
30 ^ predicateMessage |
31 ! ! |
31 ! ! |
32 |
32 |
33 !PPPredicateParser methodsFor:'printing'! |
33 !PPPredicateParser methodsFor:'printing'! |
34 |
34 |