204
|
1 |
"{ Package: 'stx:goodies/petitparser/analyzer' }"
|
|
2 |
|
|
3 |
PPRule subclass:#PPSearchRule
|
|
4 |
instanceVariableNames:'answerBlock'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'PetitAnalyzer-Core'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!PPSearchRule class methodsFor:'instance creation'!
|
|
12 |
|
|
13 |
searchFor: aParser thenDo: aBlock
|
|
14 |
^ (self searchFor: aParser) setAnswerBlock: aBlock
|
|
15 |
! !
|
|
16 |
|
|
17 |
!PPSearchRule methodsFor:'initialization'!
|
|
18 |
|
|
19 |
setAnswerBlock: aBlock
|
|
20 |
answerBlock := aBlock
|
|
21 |
! !
|
|
22 |
|
|
23 |
!PPSearchRule methodsFor:'matching'!
|
|
24 |
|
|
25 |
canMatch: aParser
|
|
26 |
owner setAnswer: (answerBlock cull: aParser cull: owner answer).
|
|
27 |
^ super canMatch: aParser
|
|
28 |
!
|
|
29 |
|
|
30 |
foundMatchFor: aParser
|
|
31 |
^ aParser
|
|
32 |
! !
|
|
33 |
|
|
34 |
!PPSearchRule class methodsFor:'documentation'!
|
|
35 |
|
|
36 |
version
|
296
|
37 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPSearchRule.st,v 1.2 2014-03-04 20:27:55 cg Exp $'
|
204
|
38 |
!
|
|
39 |
|
|
40 |
version_CVS
|
296
|
41 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPSearchRule.st,v 1.2 2014-03-04 20:27:55 cg Exp $'
|
204
|
42 |
! !
|
|
43 |
|