equal
deleted
inserted
replaced
12 |
12 |
13 on: aBlock |
13 on: aBlock |
14 ^ self new initializeOn: aBlock |
14 ^ self new initializeOn: aBlock |
15 ! ! |
15 ! ! |
16 |
16 |
17 !PPPluggableParser methodsFor:'*petitanalyzer-matching'! |
|
18 |
|
19 match: aParser inContext: aDictionary seen: anIdentitySet |
|
20 ^ (super match: aParser inContext: aDictionary seen: anIdentitySet) and: [ self block = aParser block ] |
|
21 ! ! |
|
22 |
17 |
23 !PPPluggableParser methodsFor:'accessing'! |
18 !PPPluggableParser methodsFor:'accessing'! |
24 |
19 |
25 block |
20 block |
26 "Answer the pluggable block." |
21 "Answer the pluggable block." |
34 block := aBlock |
29 block := aBlock |
35 ! ! |
30 ! ! |
36 |
31 |
37 !PPPluggableParser methodsFor:'parsing'! |
32 !PPPluggableParser methodsFor:'parsing'! |
38 |
33 |
39 parseOn: aStream |
34 parseOn: aPPContext |
40 | position result | |
35 | memento result | |
41 position := aStream position. |
36 memento := aPPContext remember. |
42 result := block value: aStream. |
37 result := block value: aPPContext. |
43 result isPetitFailure |
38 result isPetitFailure |
44 ifTrue: [ aStream position: position ]. |
39 ifTrue: [ aPPContext restore: memento ]. |
45 ^ result |
40 ^ result |
46 ! ! |
41 ! ! |
47 |
42 |
48 !PPPluggableParser class methodsFor:'documentation'! |
43 !PPPluggableParser class methodsFor:'documentation'! |
49 |
44 |