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