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