4
|
1 |
"{ Package: 'stx:goodies/petitparser' }"
|
0
|
2 |
|
|
3 |
PPParser subclass:#PPListParser
|
|
4 |
instanceVariableNames:'parsers'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'PetitParser-Parsers'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!PPListParser class methodsFor:'instance creation'!
|
|
12 |
|
|
13 |
with: aParser
|
|
14 |
^ self withAll: (Array with: aParser)
|
|
15 |
!
|
|
16 |
|
|
17 |
with: aFirstParser with: aSecondParser
|
|
18 |
^ self withAll: (Array with: aFirstParser with: aSecondParser)
|
|
19 |
!
|
|
20 |
|
|
21 |
withAll: aCollection
|
|
22 |
^ self basicNew setParsers: aCollection
|
|
23 |
! !
|
|
24 |
|
|
25 |
!PPListParser methodsFor:'accessing'!
|
|
26 |
|
|
27 |
children
|
|
28 |
^ parsers
|
|
29 |
! !
|
|
30 |
|
|
31 |
!PPListParser methodsFor:'copying'!
|
|
32 |
|
|
33 |
copyWith: aParser
|
|
34 |
^ self species withAll: (parsers copyWith: aParser)
|
|
35 |
!
|
|
36 |
|
|
37 |
postCopy
|
|
38 |
super postCopy.
|
|
39 |
parsers := parsers copy
|
|
40 |
! !
|
|
41 |
|
|
42 |
!PPListParser methodsFor:'initialization'!
|
|
43 |
|
|
44 |
initialize
|
|
45 |
super initialize.
|
|
46 |
self setParsers: #()
|
|
47 |
!
|
|
48 |
|
|
49 |
setParsers: aCollection
|
|
50 |
parsers := aCollection asArray
|
|
51 |
! !
|
|
52 |
|
|
53 |
!PPListParser class methodsFor:'documentation'!
|
|
54 |
|
56
|
55 |
version
|
|
56 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.3 2012-05-04 22:10:13 vrany Exp $'
|
|
57 |
!
|
|
58 |
|
|
59 |
version_CVS
|
|
60 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.3 2012-05-04 22:10:13 vrany Exp $'
|
|
61 |
!
|
|
62 |
|
0
|
63 |
version_SVN
|
56
|
64 |
^ '§Id: PPListParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
|
0
|
65 |
! !
|