author | sr |
Wed, 04 Jul 2018 15:23:55 +0200 | |
changeset 607 | 019302eb9dd9 |
parent 591 | a3c2fee0f2c3 |
child 608 | 964384fe2ca5 |
permissions | -rw-r--r-- |
5 | 1 |
"{ Package: 'stx:goodies/petitparser' }" |
2 |
||
371
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
3 |
"{ NameSpace: Smalltalk }" |
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
4 |
|
5 | 5 |
LibraryDefinition subclass:#stx_goodies_petitparser |
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'* Projects & Packages *' |
|
10 |
! |
|
11 |
||
371
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
12 |
!stx_goodies_petitparser class methodsFor:'documentation'! |
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
13 |
|
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
14 |
documentation |
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
15 |
" |
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
16 |
Package documentation: |
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
17 |
|
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
18 |
A framework for PEG based parsers. |
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
19 |
Allows for very easy definition and use of parsers for any kind of documents, |
373
111945b70208
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
371
diff
changeset
|
20 |
but of course also to create parsers for programming language source code. |
371
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
21 |
" |
c703af84113c
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
22 |
! ! |
5 | 23 |
|
24 |
!stx_goodies_petitparser class methodsFor:'accessing'! |
|
25 |
||
26 |
monticelloPackageName |
|
27 |
"hook for packages which have been loaded from monticello" |
|
28 |
||
29 |
^ 'PetitParser' |
|
30 |
||
31 |
"Created: / 17-12-2010 / 19:44:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
32 |
! ! |
|
33 |
||
34 |
!stx_goodies_petitparser class methodsFor:'description'! |
|
35 |
||
36 |
excludedFromPreRequisites |
|
37 |
"list all packages which should be ignored in the automatic |
|
38 |
preRequisites scan. See #preRequisites for more." |
|
39 |
||
40 |
^ #( |
|
41 |
) |
|
42 |
! |
|
43 |
||
134
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
44 |
mandatoryPreRequisites |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
45 |
"list all required mandatory packages. |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
46 |
Packages are mandatory, if they contain superclasses of the package's classes |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
47 |
or classes which are extended by this package. |
5 | 48 |
This list can be maintained manually or (better) generated and |
134
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
49 |
updated by scanning the superclass hierarchies |
244 | 50 |
(the browser has a menu function for that)" |
5 | 51 |
|
52 |
^ #( |
|
244 | 53 |
#'stx:goodies/sunit' "TestAsserter - superclass of PPAbstractParseTest " |
54 |
#'stx:libbasic' "ArrayedCollection - extended " |
|
55 |
#'stx:libbasic2' "Text - extended " |
|
134
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
56 |
) |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
57 |
! |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
58 |
|
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
59 |
referencedPreRequisites |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
60 |
"list all packages containing classes referenced by the packages's members. |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
61 |
This list can be maintained manually or (better) generated and |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
62 |
updated by looking for global variable accesses |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
63 |
(the browser has a menu function for that) |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
64 |
However, often too much is found, and you may want to explicitely |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
65 |
exclude individual packages in the #excludedFromPreRequisites method." |
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
66 |
|
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
67 |
^ #( |
5 | 68 |
) |
90 | 69 |
! |
70 |
||
71 |
stcOptimizationOptions |
|
72 |
"do not inline the not operation here - it is overwritten" |
|
73 |
||
74 |
^ '+optspace3 -inlinenot' |
|
75 |
||
76 |
"Created: / 23-08-2006 / 01:27:22 / cg" |
|
244 | 77 |
! |
78 |
||
79 |
subProjects |
|
80 |
"list packages which are known as subprojects. |
|
81 |
The generated makefile will enter those and make there as well. |
|
82 |
However: they are not forced to be loaded when a package is loaded; |
|
83 |
for those, redefine requiredPrerequisites" |
|
84 |
||
85 |
^ #( |
|
86 |
#'stx:goodies/petitparser/analyzer' |
|
87 |
#'stx:goodies/petitparser/tests' |
|
88 |
) |
|
5 | 89 |
! ! |
90 |
||
91 |
!stx_goodies_petitparser class methodsFor:'description - actions'! |
|
92 |
||
93 |
postLoadAction |
|
94 |
||
147
87d7095d0ece
Do not autoload tests in postLoadAction
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
134
diff
changeset
|
95 |
"/self classes do: [:cls|cls isLoaded ifFalse:[cls autoload]] |
5 | 96 |
|
97 |
"Created: / 17-12-2010 / 19:55:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
98 |
! ! |
|
99 |
||
100 |
!stx_goodies_petitparser class methodsFor:'description - contents'! |
|
101 |
||
102 |
classNamesAndAttributes |
|
103 |
"lists the classes which are to be included in the project. |
|
104 |
Each entry in the list may be: a single class-name (symbol), |
|
105 |
or an array-literal consisting of class name and attributes. |
|
106 |
Attributes are: #autoload or #<os> where os is one of win32, unix,..." |
|
107 |
||
108 |
^ #( |
|
244 | 109 |
"<className> or (<className> attributes...) in load order" |
110 |
PPCharSetPredicate |
|
111 |
PPFailure |
|
112 |
PPMemento |
|
113 |
PPParser |
|
114 |
PPStream |
|
115 |
PPToken |
|
116 |
#'stx_goodies_petitparser' |
|
117 |
PPDelegateParser |
|
118 |
PPEpsilonParser |
|
119 |
PPFailingParser |
|
120 |
PPListParser |
|
121 |
PPLiteralParser |
|
122 |
PPPluggableParser |
|
123 |
PPPredicateParser |
|
124 |
PPUnresolvedParser |
|
125 |
PPActionParser |
|
126 |
PPAndParser |
|
127 |
PPChoiceParser |
|
128 |
PPCompositeParser |
|
129 |
PPEndOfInputParser |
|
130 |
PPExpressionParser |
|
131 |
PPFlattenParser |
|
132 |
PPLiteralObjectParser |
|
133 |
PPLiteralSequenceParser |
|
134 |
PPMemoizedParser |
|
135 |
PPNotParser |
|
136 |
PPOptionalParser |
|
137 |
PPPredicateObjectParser |
|
138 |
PPPredicateSequenceParser |
|
139 |
PPRepeatingParser |
|
140 |
PPSequenceParser |
|
141 |
PPTrimmingParser |
|
142 |
PPArithmeticParser |
|
143 |
PPLambdaParser |
|
144 |
PPLimitedRepeatingParser |
|
145 |
PPPossessiveRepeatingParser |
|
146 |
PPTokenParser |
|
147 |
PPWrappingParser |
|
148 |
PPGreedyRepeatingParser |
|
149 |
PPLazyRepeatingParser |
|
5 | 150 |
) |
151 |
! |
|
152 |
||
153 |
extensionMethodNames |
|
154 |
"lists the extension methods which are to be included in the project. |
|
244 | 155 |
Entries are 2-element array literals, consisting of class-name and selector." |
5 | 156 |
|
157 |
^ #( |
|
233 | 158 |
Block asParser |
159 |
BlockContext asParser |
|
160 |
Character asParser |
|
161 |
Character ppMinus: |
|
315 | 162 |
Collection asChoiceParser |
163 |
Collection asSequenceParser |
|
164 |
Interval asParser |
|
233 | 165 |
Object asParser |
166 |
Object isPetitFailure |
|
167 |
Object isPetitParser |
|
168 |
PositionableStream asPetitStream |
|
169 |
SequenceableCollection asParser |
|
170 |
SequenceableCollection asPetitStream |
|
171 |
Set asParser |
|
172 |
Stream asPetitStream |
|
173 |
String asParser |
|
174 |
Symbol asParser |
|
175 |
Symbol value: |
|
176 |
Text asPetitStream |
|
177 |
UndefinedObject asParser |
|
5 | 178 |
) |
179 |
! ! |
|
180 |
||
244 | 181 |
!stx_goodies_petitparser class methodsFor:'description - monticello'! |
182 |
||
183 |
monticelloTimestamps |
|
184 |
||
185 |
^#( |
|
186 |
) |
|
187 |
! ! |
|
188 |
||
5 | 189 |
!stx_goodies_petitparser class methodsFor:'description - project information'! |
190 |
||
191 |
applicationIconFileName |
|
192 |
"Return the name (without suffix) of an icon-file (the app's icon); will be included in the rc-resource file" |
|
193 |
||
194 |
^ nil |
|
195 |
"/ ^ self applicationName |
|
196 |
! |
|
197 |
||
198 |
companyName |
|
199 |
"Return a companyname which will appear in <lib>.rc" |
|
200 |
||
201 |
^ 'Lukas Renggli & SWING Research Group' |
|
202 |
||
203 |
"Modified: / 17-12-2010 / 19:43:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
204 |
! |
|
205 |
||
206 |
description |
|
207 |
"Return a description string which will appear in vc.def / bc.def" |
|
208 |
||
148
b44426fa6b0f
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
209 |
^ 'Smalltalk/X Scannerless Parser & Parser Combinator Library' |
5 | 210 |
|
211 |
"Modified: / 17-12-2010 / 19:43:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
212 |
! |
|
213 |
||
214 |
legalCopyright |
|
215 |
"Return a copyright string which will appear in <lib>.rc" |
|
216 |
||
217 |
^ '(C) Lukas Renggli' |
|
218 |
||
219 |
"Modified: / 17-12-2010 / 19:43:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
220 |
! |
|
221 |
||
8 | 222 |
productInstallDirBaseName |
223 |
"Returns a default installDir which will appear in <app>.nsi. |
|
224 |
This is usually not the one you want to keep" |
|
225 |
||
226 |
^ (self package asCollectionOfSubstringsSeparatedByAny:':/') last |
|
227 |
! |
|
228 |
||
5 | 229 |
productName |
230 |
"Return a product name which will appear in <lib>.rc" |
|
231 |
||
232 |
^ 'Petit Parser' |
|
233 |
||
234 |
"Modified: / 17-12-2010 / 19:43:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
235 |
! ! |
|
236 |
||
237 |
!stx_goodies_petitparser class methodsFor:'description - svn'! |
|
238 |
||
8 | 239 |
svnRepositoryUrlString |
240 |
"Return a SVN repository URL of myself. |
|
241 |
(Generated since 2011-04-08) |
|
90 | 242 |
" |
8 | 243 |
|
244 |
^ '$URL: https://vranyj1@swing.fit.cvut.cz/svn/squeak/petitparser/trunk/squeak_petitparser.st $' |
|
245 |
! |
|
246 |
||
5 | 247 |
svnRevisionNr |
248 |
"Return a SVN revision number of myself. |
|
249 |
This number is updated after a commit" |
|
250 |
||
8 | 251 |
^ "$SVN-Revision:"'11 '"$" |
5 | 252 |
! ! |
253 |
||
254 |
!stx_goodies_petitparser class methodsFor:'documentation'! |
|
255 |
||
256 |
version |
|
591 | 257 |
^ '$Header$' |
5 | 258 |
! |
259 |
||
260 |
version_CVS |
|
591 | 261 |
^ '$Header$' |
211
c156f64d8eb9
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
151
diff
changeset
|
262 |
! |
c156f64d8eb9
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
151
diff
changeset
|
263 |
|
c156f64d8eb9
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
151
diff
changeset
|
264 |
version_MC |
212
4717e419eabc
class: stx_goodies_petitparser
Claus Gittinger <cg@exept.de>
parents:
211
diff
changeset
|
265 |
^ '$PetitParser-lr.231 a18ceb3c-e6d2-4b74-91c9-33f05d2e0514 2013-03-16T21:51:30 lr$' |
5 | 266 |
! |
267 |
||
268 |
version_SVN |
|
591 | 269 |
^ '$Id$' |
5 | 270 |
! ! |
134
03907685ddff
Now preRequiites are separated in mandatoryPreRequisites and referencedPreRequisites
Stefan Vogel <sv@exept.de>
parents:
90
diff
changeset
|
271 |