author | Claus Gittinger <cg@exept.de> |
Mon, 20 Nov 2006 14:30:08 +0100 | |
changeset 1950 | acec00884e5a |
parent 1947 | a5429732842a |
child 2011 | 25a6ebc4a173 |
permissions | -rw-r--r-- |
1634 | 1 |
" |
2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
3 |
COPYRIGHT (c) 2005 by eXept Software AG |
|
4 |
All Rights Reserved |
|
5 |
||
6 |
This software is furnished under a license and may be used |
|
7 |
only in accordance with the terms of that license and with the |
|
8 |
inclusion of the above copyright notice. This software may not |
|
9 |
be provided or otherwise made available to, or used by, any |
|
10 |
other person. No title to or ownership of the software is |
|
11 |
hereby transferred. |
|
12 |
" |
|
13 |
"{ Package: 'stx:libcomp' }" |
|
14 |
||
15 |
Object subclass:#ParserFlags |
|
1898 | 16 |
instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives |
17 |
warnSTXHereExtensionUsed warnSTXSpecialComment |
|
18 |
warnUnderscoreInIdentifier warnOldStyleAssignment |
|
19 |
warnCommonMistakes warnSTXNameSpaceUse |
|
20 |
warnPossibleIncompatibilities warnDollarInIdentifier |
|
21 |
warnHiddenVariables warnAboutVariableNameConventions |
|
22 |
warnAboutWrongVariableNames warnAboutBadComments |
|
23 |
warnInconsistentReturnValues |
|
24 |
warnAboutNonLowercaseLocalVariableNames |
|
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
25 |
warnAboutPossibleSTCCompilationProblems |
1898 | 26 |
allowLiteralNameSpaceSymbols allowUnderscoreInIdentifier |
27 |
allowDollarInIdentifier allowOldStyleAssignment |
|
28 |
allowSqueakExtensions allowDolphinExtensions |
|
29 |
allowExtendedBinarySelectors allowQualifiedNames |
|
30 |
allowFunctionCallSyntaxForBlockEvaluation |
|
31 |
allowLocalVariableDeclarationWithInitializerExpression |
|
32 |
allowDomainVariables allowArrayIndexSyntaxExtension |
|
33 |
allowReservedWordsAsSelectors allowVariableReferences |
|
34 |
allowLazyValueExtension allowFixedPointLiterals |
|
35 |
allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals |
|
36 |
allowExtensionsToPrivateClasses allowSqueakPrimitives |
|
37 |
allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions |
|
38 |
allowNationalCharactersInIdentifier allowHashAsBinarySelector |
|
1950 | 39 |
allowSTXEOLComments allowEmptyStatements |
40 |
allowVisualWorksMethodAnnotations |
|
41 |
allowPossibleSTCCompilationProblems arraysAreImmutable |
|
42 |
stringsAreImmutable implicitSelfSends stcKeepCIntermediate |
|
43 |
stcKeepOIntermediate stcKeepSTIntermediate stcModulePath |
|
44 |
stcCompilation stcCompilationIncludes stcCompilationDefines |
|
1898 | 45 |
stcCompilationOptions stcPath ccCompilationOptions ccPath |
1950 | 46 |
linkArgs linkSharedArgs linkCommand libPath searchedLibraries' |
1898 | 47 |
classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared |
48 |
WarnAboutWrongVariableNames WarnAboutBadComments |
|
49 |
WarnAboutVariableNameConventions WarnSTXSpecials |
|
50 |
WarnOldStyleAssignment WarnUnderscoreInIdentifier |
|
51 |
WarnCommonMistakes WarnPossibleIncompatibilities |
|
52 |
WarnDollarInIdentifier WarnHiddenVariables |
|
53 |
WarnAboutNonLowercaseLocalVariableNames |
|
1950 | 54 |
WarnInconsistentReturnValues Warnings |
55 |
WarnAboutPossibleSTCCompilationProblems |
|
56 |
AllowUnderscoreInIdentifier |
|
1898 | 57 |
AllowFunctionCallSyntaxForBlockEvaluation AllowLazyValueExtension |
58 |
AllowVariableReferences AllowReservedWordsAsSelectors |
|
59 |
AllowLocalVariableDeclarationWithInitializerExpression |
|
60 |
AllowArrayIndexSyntaxExtension AllowDomainVariables |
|
61 |
AllowDollarInIdentifier AllowSqueakExtensions AllowQualifiedNames |
|
62 |
AllowDolphinExtensions AllowOldStyleAssignment |
|
63 |
AllowExtendedBinarySelectors AllowExtendedSTXSyntax |
|
64 |
AllowFixedPointLiterals AllowLiteralNameSpaceSymbols |
|
65 |
AllowVisualAgeESSymbolLiterals AllowExtensionsToPrivateClasses |
|
66 |
AllowSqueakPrimitives AllowVisualAgePrimitives AllowSTVPrimitives |
|
67 |
AllowSTVExtensions AllowNationalCharactersInIdentifier |
|
1950 | 68 |
AllowHashAsBinarySelector AllowSTXEOLComments |
69 |
AllowPossibleSTCCompilationProblems AllowEmptyStatements |
|
70 |
AllowVisualWorksMethodAnnotations ArraysAreImmutable |
|
1898 | 71 |
StringsAreImmutable ImplicitSelfSends STCModulePath |
72 |
STCKeepCIntermediate STCKeepOIntermediate STCKeepSTIntermediate |
|
73 |
STCCompilation STCCompilationIncludes STCCompilationDefines |
|
74 |
STCCompilationOptions STCPath CCCompilationOptions CCPath |
|
75 |
LinkArgs LinkSharedArgs LinkCommand LibPath SearchedLibraries |
|
1950 | 76 |
MakeCommand' |
1898 | 77 |
poolDictionaries:'' |
78 |
category:'System-Compiler' |
|
1634 | 79 |
! |
80 |
||
81 |
!ParserFlags class methodsFor:'documentation'! |
|
82 |
||
83 |
copyright |
|
84 |
" |
|
85 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
86 |
COPYRIGHT (c) 2005 by eXept Software AG |
|
87 |
All Rights Reserved |
|
88 |
||
89 |
This software is furnished under a license and may be used |
|
90 |
only in accordance with the terms of that license and with the |
|
91 |
inclusion of the above copyright notice. This software may not |
|
92 |
be provided or otherwise made available to, or used by, any |
|
93 |
other person. No title to or ownership of the software is |
|
94 |
hereby transferred. |
|
95 |
" |
|
96 |
! |
|
97 |
||
98 |
documentation |
|
99 |
" |
|
100 |
compiler flags (used to be defined in Scanner and Parser) have been extracted for easier |
|
101 |
individual-method customization (using ST as scripting). |
|
1711 | 102 |
|
1712 | 103 |
howTo_fileInVSE: |
104 |
ParserFlags allowSTVExtensions:true. |
|
105 |
ParserFlags allowSTVPrimitives:true. |
|
106 |
ParserFlags allowSTXEOLComments:false. |
|
1711 | 107 |
" |
1634 | 108 |
! ! |
109 |
||
110 |
!ParserFlags class methodsFor:'instance creation'! |
|
111 |
||
112 |
new |
|
113 |
^ self basicNew initialize |
|
114 |
! ! |
|
115 |
||
116 |
!ParserFlags class methodsFor:'accessing-compilation control'! |
|
117 |
||
1668 | 118 |
allowExtensionsToPrivateClasses |
119 |
^ AllowExtensionsToPrivateClasses |
|
120 |
! |
|
121 |
||
122 |
allowExtensionsToPrivateClasses:aBoolean |
|
123 |
AllowExtensionsToPrivateClasses := aBoolean |
|
124 |
! |
|
125 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
126 |
allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
127 |
^ AllowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
128 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
129 |
"Created: / 16-11-2006 / 14:31:36 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
130 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
131 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
132 |
allowPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
133 |
AllowPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
134 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
135 |
"Created: / 16-11-2006 / 14:31:40 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
136 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
137 |
|
1634 | 138 |
arraysAreImmutable |
139 |
"return true if arrays are immutable literals" |
|
140 |
||
141 |
^ ArraysAreImmutable |
|
142 |
! |
|
143 |
||
144 |
arraysAreImmutable:aBoolean |
|
145 |
"turn on/off immutable array literals - default is false for ST-80 compatibilty." |
|
146 |
||
147 |
ArraysAreImmutable := aBoolean. |
|
148 |
||
149 |
" |
|
150 |
can be added to your private.rc file: |
|
151 |
||
152 |
ParserFlags arraysAreImmutable:true |
|
153 |
ParserFlags arraysAreImmutable:false |
|
154 |
" |
|
155 |
! |
|
156 |
||
157 |
implicitSelfSends |
|
158 |
"return true if undefined variables with |
|
159 |
lowercase first character are to be turned |
|
160 |
into implicit self sends" |
|
161 |
||
162 |
^ ImplicitSelfSends |
|
163 |
! |
|
164 |
||
165 |
implicitSelfSends:aBoolean |
|
166 |
"turn on/off implicit self sends" |
|
167 |
||
168 |
ImplicitSelfSends := aBoolean |
|
169 |
||
170 |
" |
|
171 |
Compiler implicitSelfSends:true |
|
172 |
Compiler implicitSelfSends:false |
|
173 |
" |
|
174 |
! |
|
175 |
||
176 |
stringsAreImmutable |
|
177 |
"return true if strings are immutable literals" |
|
178 |
||
179 |
^ StringsAreImmutable |
|
180 |
||
181 |
"Created: / 3.8.1998 / 14:53:25 / cg" |
|
182 |
! |
|
183 |
||
184 |
stringsAreImmutable:aBoolean |
|
185 |
"turn on/off immutable string literals - default is false for ST-80 compatibilty." |
|
186 |
||
187 |
StringsAreImmutable := aBoolean. |
|
188 |
||
189 |
" |
|
190 |
can be added to your private.rc file: |
|
191 |
||
192 |
ParserFlags stringsAreImmutable:true |
|
193 |
ParserFlags stringsAreImmutable:false |
|
194 |
" |
|
195 |
||
196 |
"Created: / 3.8.1998 / 14:53:28 / cg" |
|
197 |
! ! |
|
198 |
||
1658 | 199 |
!ParserFlags class methodsFor:'accessing-stc compilation control'! |
200 |
||
201 |
ccCompilationOptions |
|
1668 | 202 |
^ CCCompilationOptions ? '' |
1658 | 203 |
! |
204 |
||
205 |
ccCompilationOptions:aString |
|
206 |
CCCompilationOptions := aString |
|
207 |
! |
|
208 |
||
209 |
ccPath |
|
210 |
^ CCPath |
|
211 |
! |
|
212 |
||
213 |
ccPath:aSymbol |
|
214 |
CCPath := aSymbol |
|
215 |
! |
|
216 |
||
217 |
libPath |
|
218 |
^ LibPath |
|
219 |
! |
|
220 |
||
221 |
libPath:aString |
|
222 |
LibPath := aString |
|
223 |
! |
|
224 |
||
225 |
linkArgs |
|
226 |
^ LinkArgs |
|
227 |
! |
|
228 |
||
229 |
linkArgs:aString |
|
230 |
LinkArgs := aString |
|
231 |
! |
|
232 |
||
233 |
linkCommand |
|
234 |
^ LinkCommand |
|
235 |
! |
|
236 |
||
237 |
linkCommand:aString |
|
238 |
LinkCommand := aString |
|
239 |
! |
|
240 |
||
1898 | 241 |
linkSharedArgs |
242 |
^ LinkSharedArgs |
|
243 |
! |
|
244 |
||
245 |
linkSharedArgs:aString |
|
246 |
LinkSharedArgs := aString |
|
247 |
! |
|
248 |
||
1814 | 249 |
makeCommand |
250 |
^ MakeCommand |
|
251 |
||
252 |
"Created: / 09-08-2006 / 18:45:04 / fm" |
|
253 |
! |
|
254 |
||
255 |
makeCommand:aString |
|
256 |
MakeCommand := aString |
|
257 |
||
258 |
"Created: / 09-08-2006 / 18:45:12 / fm" |
|
259 |
! |
|
260 |
||
1658 | 261 |
searchedLibraries |
262 |
^ SearchedLibraries |
|
263 |
! |
|
264 |
||
265 |
searchedLibraries:aString |
|
266 |
SearchedLibraries := aString |
|
267 |
! |
|
268 |
||
269 |
stcCompilation |
|
270 |
^ STCCompilation |
|
271 |
! |
|
272 |
||
273 |
stcCompilation:aSymbol |
|
274 |
STCCompilation := aSymbol |
|
275 |
! |
|
276 |
||
277 |
stcCompilationDefines |
|
278 |
^ STCCompilationDefines |
|
279 |
! |
|
280 |
||
281 |
stcCompilationDefines:aString |
|
282 |
STCCompilationDefines := aString |
|
283 |
! |
|
284 |
||
285 |
stcCompilationIncludes |
|
286 |
^ STCCompilationIncludes |
|
287 |
! |
|
288 |
||
289 |
stcCompilationIncludes:aString |
|
290 |
STCCompilationIncludes := aString |
|
291 |
! |
|
292 |
||
293 |
stcCompilationOptions |
|
294 |
^ STCCompilationOptions |
|
295 |
! |
|
296 |
||
297 |
stcCompilationOptions:aString |
|
298 |
STCCompilationOptions := aString |
|
299 |
! |
|
300 |
||
301 |
stcKeepCIntermediate |
|
302 |
^ STCKeepCIntermediate |
|
303 |
! |
|
304 |
||
305 |
stcKeepCIntermediate:something |
|
306 |
STCKeepCIntermediate := something. |
|
1940 | 307 |
|
308 |
" |
|
309 |
STCKeepCIntermediate := true. |
|
310 |
STCKeepCIntermediate := false. |
|
311 |
" |
|
312 |
||
313 |
"Modified: / 07-11-2006 / 10:58:42 / cg" |
|
1658 | 314 |
! |
315 |
||
316 |
stcKeepOIntermediate |
|
317 |
^ STCKeepOIntermediate |
|
318 |
! |
|
319 |
||
320 |
stcKeepOIntermediate:something |
|
321 |
STCKeepOIntermediate := something. |
|
322 |
! |
|
323 |
||
324 |
stcKeepSTIntermediate |
|
325 |
^ STCKeepSTIntermediate |
|
326 |
! |
|
327 |
||
328 |
stcKeepSTIntermediate:something |
|
329 |
STCKeepSTIntermediate := something. |
|
1940 | 330 |
|
331 |
" |
|
332 |
STCKeepSTIntermediate := true. |
|
333 |
STCKeepSTIntermediate := false. |
|
334 |
" |
|
335 |
||
336 |
"Modified: / 07-11-2006 / 10:58:54 / cg" |
|
1658 | 337 |
! |
338 |
||
339 |
stcModulePath |
|
340 |
^ STCModulePath |
|
341 |
! |
|
342 |
||
343 |
stcModulePath:something |
|
344 |
STCModulePath := something. |
|
345 |
! |
|
346 |
||
347 |
stcPath |
|
348 |
^ STCPath |
|
349 |
! |
|
350 |
||
351 |
stcPath:aSymbol |
|
352 |
STCPath := aSymbol |
|
353 |
! |
|
354 |
||
355 |
withSTCCompilation:howSymbol do:aBlock |
|
356 |
|prev| |
|
357 |
||
358 |
prev := self stcCompilation. |
|
359 |
self stcCompilation:howSymbol. |
|
360 |
aBlock ensure:[ self stcCompilation:prev ] |
|
361 |
! ! |
|
362 |
||
1634 | 363 |
!ParserFlags class methodsFor:'accessing-syntax-control'! |
364 |
||
365 |
allowArrayIndexSyntaxExtension |
|
366 |
"experimental" |
|
367 |
||
368 |
^ AllowArrayIndexSyntaxExtension ? false |
|
369 |
! |
|
370 |
||
371 |
allowArrayIndexSyntaxExtension:aBoolean |
|
372 |
"experimental" |
|
373 |
||
374 |
AllowArrayIndexSyntaxExtension := aBoolean. |
|
375 |
||
376 |
" |
|
377 |
self allowArrayIndexSyntaxExtension:true |
|
378 |
self allowArrayIndexSyntaxExtension:false |
|
379 |
" |
|
380 |
! |
|
381 |
||
382 |
allowDollarInIdentifier |
|
383 |
"return true, if $-characters are allowed in identifiers. |
|
384 |
Notice, that dollars are NEVER allowed as the first character in an identifier." |
|
385 |
||
386 |
^ AllowDollarInIdentifier |
|
387 |
||
388 |
"Created: 7.9.1997 / 01:32:18 / cg" |
|
389 |
"Modified: 7.9.1997 / 01:39:44 / cg" |
|
390 |
! |
|
391 |
||
392 |
allowDollarInIdentifier:aBoolean |
|
393 |
"this allows turning on/off $-characters in identifiers. |
|
394 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
395 |
If turned off (the default), dollars are not allowed in identifiers, |
|
396 |
but instead are scanned as character-constant prefix. |
|
397 |
If turned on, dollars are in identifiers are allowed, while extra |
|
398 |
dollars are still scanned as constant character prefix. |
|
399 |
If you have to fileIn old VW-Vsn2.x classes, turn this off |
|
400 |
before filing them in; i.e.: |
|
401 |
Compiler allowDollarInIdentifiers:false" |
|
402 |
||
403 |
AllowDollarInIdentifier := aBoolean. |
|
404 |
||
405 |
"Created: 7.9.1997 / 01:34:49 / cg" |
|
406 |
"Modified: 7.9.1997 / 01:39:30 / cg" |
|
407 |
! |
|
408 |
||
409 |
allowDolphinExtensions |
|
410 |
"return true, if ##(..) computed literals are allowed" |
|
411 |
||
412 |
^ AllowDolphinExtensions |
|
413 |
! |
|
414 |
||
415 |
allowDolphinExtensions:aBoolean |
|
416 |
"this allows turning on/off support for computed arrays ##(..) as in dolphin. |
|
417 |
If you want to fileIn Dolphin classes, enable this with: |
|
418 |
Compiler allowDolphinComputedArrays:true" |
|
419 |
||
420 |
AllowDolphinExtensions := aBoolean. |
|
421 |
||
422 |
" |
|
423 |
self allowDolphinExtensions:true |
|
424 |
self allowDolphinExtensions:false |
|
425 |
" |
|
426 |
! |
|
427 |
||
1950 | 428 |
allowEmptyStatements |
429 |
"return true, if empty statements are allowed (two .'s in a row). |
|
430 |
Notice, that stc cannot (yet) handle those." |
|
431 |
||
432 |
^ AllowEmptyStatements |
|
433 |
||
434 |
"Created: / 20-11-2006 / 14:29:02 / cg" |
|
435 |
! |
|
436 |
||
437 |
allowEmptyStatements:aBoolean |
|
438 |
"turn on/off, if empty statements are allowed (two .'s in a row). |
|
439 |
Notice, that stc cannot (yet) handle those." |
|
440 |
||
441 |
AllowEmptyStatements := aBoolean |
|
442 |
||
443 |
"Created: / 20-11-2006 / 14:29:15 / cg" |
|
444 |
! |
|
445 |
||
1682 | 446 |
allowExtendedSTXSyntax |
447 |
"experimental syntay extensions" |
|
448 |
||
449 |
^ AllowExtendedSTXSyntax |
|
450 |
! |
|
451 |
||
452 |
allowExtendedSTXSyntax:aBoolean |
|
453 |
"experimental syntay extensions" |
|
454 |
||
455 |
AllowExtendedSTXSyntax := aBoolean |
|
456 |
||
457 |
" |
|
458 |
self allowExtendedSTXSyntax:true |
|
459 |
'a\tb' inspect. |
|
460 |
'a\u1616b' inspect. |
|
461 |
self allowExtendedSTXSyntax:false |
|
462 |
" |
|
463 |
! |
|
464 |
||
1677 | 465 |
allowFixedPointLiterals |
466 |
"return true, if nnnsn (FixedPoint) literals are allowed" |
|
467 |
||
468 |
^ AllowFixedPointLiterals |
|
469 |
! |
|
470 |
||
471 |
allowFixedPointLiterals:aBoolean |
|
472 |
"enable/disable, if nnnsn (FixedPoint) literals are allowed" |
|
473 |
||
474 |
AllowFixedPointLiterals := aBoolean |
|
475 |
! |
|
476 |
||
1634 | 477 |
allowFunctionCallSyntaxForBlockEvaluation |
478 |
"experimental" |
|
479 |
||
480 |
^ AllowFunctionCallSyntaxForBlockEvaluation |
|
1721 | 481 |
|
482 |
" |
|
483 |
AllowFunctionCallSyntaxForBlockEvaluation := true |
|
484 |
" |
|
1634 | 485 |
! |
486 |
||
487 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
488 |
"experimental" |
|
489 |
||
490 |
AllowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
|
491 |
! |
|
492 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
493 |
allowHashAsBinarySelector |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
494 |
^ AllowHashAsBinarySelector |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
495 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
496 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
497 |
allowHashAsBinarySelector:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
498 |
AllowHashAsBinarySelector := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
499 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
500 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
501 |
self allowHashAsBinarySelector:true |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
502 |
self allowHashAsBinarySelector:false |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
503 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
504 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
505 |
|
1634 | 506 |
allowLiteralNameSpaceSymbols |
507 |
"return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
508 |
||
509 |
^ AllowLiteralNameSpaceSymbols |
|
510 |
! |
|
511 |
||
512 |
allowLiteralNameSpaceSymbols:aBoolean |
|
513 |
"controls, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
514 |
||
515 |
AllowLiteralNameSpaceSymbols := aBoolean |
|
516 |
! |
|
517 |
||
518 |
allowLocalVariableDeclarationWithInitializerExpression |
|
519 |
"experimental" |
|
520 |
||
521 |
^ AllowLocalVariableDeclarationWithInitializerExpression |
|
522 |
! |
|
523 |
||
524 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
525 |
"experimental" |
|
526 |
||
527 |
AllowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
|
528 |
! |
|
529 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
530 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
531 |
"return true, if national characters (diaresis etc.) are allowed in identifiers" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
532 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
533 |
^ AllowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
534 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
535 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
536 |
allowNationalCharactersInIdentifier:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
537 |
"this allows turning on/off recognition of national characters (diaresis etc.) in identifiers. |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
538 |
Use this ONLY to file in some non-ANSI ST/V code" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
539 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
540 |
AllowNationalCharactersInIdentifier := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
541 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
542 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
543 |
ParserFlags allowNationalCharactersInIdentifier:true |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
544 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
545 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
546 |
|
1634 | 547 |
allowOldStyleAssignment |
548 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
|
549 |
||
550 |
^ AllowOldStyleAssignment |
|
551 |
! |
|
552 |
||
553 |
allowOldStyleAssignment:aBoolean |
|
554 |
"this allows turning on/off recognition of underscore-assignment (pre ST-80v4 syntax). |
|
555 |
You must turn this off, if code with variables named '_' is to be filedIn" |
|
556 |
||
557 |
AllowOldStyleAssignment := aBoolean |
|
558 |
! |
|
559 |
||
560 |
allowQualifiedNames |
|
561 |
"return true, if #{..} qualified names are allowed" |
|
562 |
||
563 |
^ AllowQualifiedNames |
|
564 |
! |
|
565 |
||
566 |
allowQualifiedNames:aBoolean |
|
567 |
"this allows turning on/off support for qualifiedNames #{ .., } as in vw3. |
|
568 |
If you want to fileIn vw3 or later classes, enable this with: |
|
569 |
Compiler allowQualifiedNames:true |
|
570 |
Notice, that qualified names are not really supported semantically |
|
571 |
(they are parsed, but treated like regular globals) |
|
572 |
" |
|
573 |
||
574 |
AllowQualifiedNames := aBoolean. |
|
575 |
||
576 |
" |
|
577 |
self allowQualifiedNames:true |
|
578 |
self allowQualifiedNames:false |
|
579 |
" |
|
580 |
! |
|
581 |
||
582 |
allowReservedWordsAsSelectors |
|
583 |
"return true, if self, super, thisContext, nil, true and false are to be allowed |
|
584 |
as unary message selectors." |
|
585 |
||
586 |
^ AllowReservedWordsAsSelectors ? false |
|
587 |
! |
|
588 |
||
589 |
allowReservedWordsAsSelectors:aBoolean |
|
590 |
"enable/disable, if self, super, thisContext, nil, true and false are to be allowed |
|
591 |
as unary message selectors." |
|
592 |
||
593 |
AllowReservedWordsAsSelectors := aBoolean. |
|
594 |
||
595 |
" |
|
596 |
self allowReservedWordsAsSelectors:true |
|
597 |
self allowReservedWordsAsSelectors:false |
|
598 |
" |
|
599 |
! |
|
600 |
||
1702 | 601 |
allowSTVExtensions |
602 |
"return true, if support for ST/V syntax extensions is enabled." |
|
603 |
||
604 |
^ AllowSTVExtensions |
|
605 |
! |
|
606 |
||
607 |
allowSTVExtensions:aBoolean |
|
608 |
"this allows turning on/off support for ST/V extensions: |
|
609 |
If you want to fileIn ST/V classes, enable this with: |
|
610 |
Compiler allowSTVComputedArrays:true" |
|
611 |
||
612 |
AllowSTVExtensions := aBoolean. |
|
613 |
||
614 |
" |
|
1704 | 615 |
ParserFlags allowSTVExtensions:true |
616 |
ParserFlags allowSTVExtensions:false |
|
1702 | 617 |
" |
618 |
! |
|
619 |
||
1700 | 620 |
allowSTVPrimitives |
621 |
"return true, if support for ST/V primitives is enabled." |
|
622 |
||
623 |
^ AllowSTVPrimitives |
|
624 |
! |
|
625 |
||
626 |
allowSTVPrimitives:aBoolean |
|
627 |
"this allows turning on/off support for ST/V primitives" |
|
628 |
||
629 |
AllowSTVPrimitives := aBoolean |
|
1704 | 630 |
|
631 |
" |
|
632 |
ParserFlags allowSTVPrimitives:true |
|
633 |
" |
|
1700 | 634 |
! |
635 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
636 |
allowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
637 |
^ AllowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
638 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
639 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
640 |
allowSTXEOLComments:aBoolean |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
641 |
AllowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
642 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
643 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
644 |
self allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
645 |
self allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
646 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
647 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
648 |
|
1634 | 649 |
allowSqueakExtensions |
650 |
"return true, if support for squeak extensions |
|
651 |
computed arrays { .., } |
|
652 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
653 |
is enabled." |
|
654 |
||
655 |
^ AllowSqueakExtensions |
|
656 |
! |
|
657 |
||
658 |
allowSqueakExtensions:aBoolean |
|
659 |
"this allows turning on/off support for squeak extensions: |
|
660 |
computed arrays { .., } |
|
661 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
662 |
||
663 |
If you want to fileIn Squeak classes, enable this with: |
|
664 |
Compiler allowSqueakComputedArrays:true" |
|
665 |
||
666 |
AllowSqueakExtensions := aBoolean. |
|
667 |
||
668 |
" |
|
669 |
self allowSqueakExtensions:true |
|
670 |
self allowSqueakExtensions:false |
|
671 |
" |
|
672 |
! |
|
673 |
||
1689 | 674 |
allowSqueakPrimitives |
675 |
"return true, if support for squeak primitives is enabled." |
|
676 |
||
677 |
^ AllowSqueakPrimitives |
|
678 |
! |
|
679 |
||
680 |
allowSqueakPrimitives:aBoolean |
|
681 |
"this allows turning on/off support for squeak primitives" |
|
682 |
||
683 |
AllowSqueakPrimitives := aBoolean |
|
684 |
! |
|
685 |
||
1634 | 686 |
allowUnderscoreInIdentifier |
687 |
"return true, if underscores are allowed in identifiers" |
|
688 |
||
689 |
^ AllowUnderscoreInIdentifier |
|
690 |
! |
|
691 |
||
692 |
allowUnderscoreInIdentifier:aBoolean |
|
693 |
"this allows turning on/off underscores in identifiers. |
|
694 |
If turned off (the default), underscores are not allowed in identifiers, |
|
695 |
but instead scanned as assignment character (old ST/80 syntax). |
|
696 |
If turned on, underscores are in identifiers are allowed, while extra |
|
697 |
underscores are still scanned as assignment. |
|
698 |
If you have to fileIn old VW-Vsn2.x classes, |
|
699 |
turn them off with: |
|
700 |
Compiler allowUnderscoreInIdentifiers:false" |
|
701 |
||
702 |
AllowUnderscoreInIdentifier := aBoolean. |
|
703 |
||
704 |
"Modified: 7.9.1997 / 01:35:19 / cg" |
|
1655 | 705 |
! |
706 |
||
707 |
allowVisualAgeESSymbolLiterals |
|
708 |
"return true, if ##symbols are allowed (treated like symbols)" |
|
709 |
||
710 |
^ AllowVisualAgeESSymbolLiterals |
|
711 |
! |
|
712 |
||
713 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
714 |
"if on, visualAge's ##symbols are allowed (treated like symbols)" |
|
715 |
||
716 |
AllowVisualAgeESSymbolLiterals := aBoolean. |
|
1689 | 717 |
! |
718 |
||
719 |
allowVisualAgePrimitives |
|
720 |
"return true, if support for V'Age primitives is enabled." |
|
721 |
||
722 |
^ AllowVisualAgePrimitives |
|
723 |
! |
|
724 |
||
725 |
allowVisualAgePrimitives:aBoolean |
|
726 |
"this allows turning on/off support for V'Age primitives" |
|
727 |
||
728 |
AllowVisualAgePrimitives := aBoolean |
|
1773 | 729 |
! |
730 |
||
731 |
allowVisualWorksMethodAnnotations |
|
732 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
733 |
||
734 |
^ AllowVisualWorksMethodAnnotations |
|
735 |
||
736 |
"Created: / 07-07-2006 / 15:49:32 / cg" |
|
737 |
! |
|
738 |
||
739 |
allowVisualWorksMethodAnnotations:aBoolean |
|
740 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
741 |
||
742 |
AllowVisualWorksMethodAnnotations := aBoolean |
|
743 |
||
744 |
"Created: / 07-07-2006 / 15:49:27 / cg" |
|
1634 | 745 |
! ! |
746 |
||
747 |
!ParserFlags class methodsFor:'accessing-warning-control'! |
|
748 |
||
1652 | 749 |
warnAboutBadComments |
750 |
"controls generation of warning messages about empty comments" |
|
751 |
||
752 |
^ WarnAboutBadComments |
|
753 |
! |
|
754 |
||
755 |
warnAboutBadComments:aBoolean |
|
756 |
"controls generation of warning messages about empty comments" |
|
757 |
||
758 |
WarnAboutBadComments := aBoolean |
|
759 |
! |
|
760 |
||
1811 | 761 |
warnAboutNonLowercaseLocalVariableNames |
1740 | 762 |
"controls generation of warning messages about wrong variable names" |
763 |
||
1811 | 764 |
^ WarnAboutNonLowercaseLocalVariableNames |
1740 | 765 |
! |
766 |
||
1811 | 767 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
1740 | 768 |
"controls generation of warning messages about wrong variable names" |
769 |
||
1811 | 770 |
WarnAboutNonLowercaseLocalVariableNames := aBoolean |
1740 | 771 |
! |
772 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
773 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
774 |
^ WarnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
775 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
776 |
"Created: / 16-11-2006 / 14:31:52 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
777 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
778 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
779 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
780 |
WarnAboutPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
781 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
782 |
"Created: / 16-11-2006 / 14:31:57 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
783 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
784 |
|
1634 | 785 |
warnAboutVariableNameConventions |
786 |
"controls generation of warning messages about wrong variable names" |
|
787 |
||
788 |
^ WarnAboutVariableNameConventions |
|
789 |
! |
|
790 |
||
791 |
warnAboutVariableNameConventions:aBoolean |
|
792 |
"controls generation of warning messages about wrong variable names" |
|
793 |
||
794 |
WarnAboutVariableNameConventions := aBoolean |
|
795 |
! |
|
796 |
||
797 |
warnAboutWrongVariableNames |
|
798 |
"controls generation of warning messages about wrong variable names" |
|
799 |
||
800 |
^ WarnAboutWrongVariableNames |
|
801 |
! |
|
802 |
||
803 |
warnAboutWrongVariableNames:aBoolean |
|
804 |
"controls generation of warning messages about wrong variable names" |
|
805 |
||
806 |
WarnAboutWrongVariableNames := aBoolean |
|
807 |
! |
|
808 |
||
809 |
warnCommonMistakes |
|
810 |
"return true, if common beginners mistakes are to be warned about" |
|
811 |
||
1754 | 812 |
^ WarnCommonMistakes |
1634 | 813 |
! |
814 |
||
815 |
warnCommonMistakes:aBoolean |
|
816 |
"this allows turning on/off warnings about common beginners mistakes. |
|
817 |
Those are not really errors in the strict sense, but often lead to |
|
818 |
run time errors later. |
|
819 |
Examples are: expr or:expr2, where expr2 is not a block. |
|
820 |
If you get bored by those warnings, turn them off by adding |
|
821 |
a line as: |
|
1902 | 822 |
ParserFlags warnCommonMistakes:false |
1634 | 823 |
in your 'private.rc' file" |
824 |
||
825 |
WarnCommonMistakes := aBoolean |
|
1902 | 826 |
|
827 |
"Modified: / 05-09-2006 / 11:46:26 / cg" |
|
1634 | 828 |
! |
829 |
||
830 |
warnDollarInIdentifier |
|
831 |
"return true, if $-characters in identifiers are to be warned about" |
|
832 |
||
833 |
^ Warnings and:[WarnDollarInIdentifier] |
|
834 |
||
835 |
"Created: 7.9.1997 / 01:36:17 / cg" |
|
836 |
! |
|
837 |
||
838 |
warnDollarInIdentifier:aBoolean |
|
839 |
"this allows turning on/off warnings about $-characters in identifiers. |
|
840 |
You may find those warnings useful, to make certain that your code |
|
841 |
is portable to other smalltalk versions, which do not allow this |
|
842 |
(i.e. VW releases 2.x and maybe others). |
|
843 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
844 |
If you get bored by those warnings, turn them off by adding |
|
845 |
a line as: |
|
1902 | 846 |
ParserFlags warnDollarInIdentifier:false |
1634 | 847 |
in your 'private.rc' file" |
848 |
||
849 |
WarnDollarInIdentifier := aBoolean |
|
850 |
||
1902 | 851 |
"Created: / 07-09-1997 / 01:37:42 / cg" |
852 |
"Modified: / 05-09-2006 / 11:46:23 / cg" |
|
1634 | 853 |
! |
854 |
||
1682 | 855 |
warnHiddenVariables |
856 |
"controls generation of warning messages about hiding variables by locals" |
|
857 |
||
858 |
^ WarnHiddenVariables |
|
859 |
! |
|
860 |
||
861 |
warnHiddenVariables:aBoolean |
|
862 |
"controls generation of warning messages about hiding variables by locals" |
|
863 |
||
864 |
WarnHiddenVariables := aBoolean |
|
865 |
! |
|
866 |
||
867 |
warnInconsistentReturnValues |
|
868 |
"return true, if compiler should warn about inconsitent (boolean / non-boolean) |
|
869 |
return values" |
|
870 |
||
871 |
^ WarnInconsistentReturnValues |
|
872 |
! |
|
873 |
||
874 |
warnInconsistentReturnValues:aBoolean |
|
875 |
"constrols if the compiler should warn about inconsitent (boolean / non-boolean) |
|
876 |
return values" |
|
877 |
||
878 |
WarnInconsistentReturnValues := aBoolean |
|
879 |
! |
|
880 |
||
1634 | 881 |
warnOldStyleAssignment |
882 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be warned about" |
|
883 |
||
884 |
^ Warnings and:[WarnOldStyleAssignment] |
|
885 |
! |
|
886 |
||
887 |
warnOldStyleAssignment:aBoolean |
|
888 |
"this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
|
889 |
If you get bored by those warnings, turn them off by adding |
|
890 |
a line as: |
|
1902 | 891 |
ParserFlags warnOldStyleAssignment:false |
1634 | 892 |
in your 'private.rc' file" |
893 |
||
894 |
WarnOldStyleAssignment := aBoolean |
|
1902 | 895 |
|
896 |
"Modified: / 05-09-2006 / 11:46:17 / cg" |
|
1634 | 897 |
! |
898 |
||
899 |
warnPossibleIncompatibilities |
|
900 |
"return true, if possible incompatibilities (with other ST systems) |
|
901 |
are to be warned about" |
|
902 |
||
903 |
^ Warnings and:[WarnPossibleIncompatibilities] |
|
904 |
||
905 |
"Modified: 23.5.1997 / 12:02:02 / cg" |
|
906 |
! |
|
907 |
||
908 |
warnPossibleIncompatibilities:aBoolean |
|
909 |
"this turns warnings about possible incompatibilities (with other ST systems) |
|
910 |
on or off. |
|
911 |
If you get bored by those warnings, turn them off by adding |
|
912 |
a line as: |
|
1902 | 913 |
ParserFlags warnPossibleIncompatibilities:false |
1634 | 914 |
in your 'private.rc' file." |
915 |
||
916 |
WarnPossibleIncompatibilities := aBoolean |
|
917 |
||
1902 | 918 |
"Created: / 23-05-1997 / 12:02:45 / cg" |
919 |
"Modified: / 05-09-2006 / 11:46:14 / cg" |
|
1634 | 920 |
! |
921 |
||
922 |
warnSTXSpecials |
|
923 |
"return true, if ST/X specials are to be warned about" |
|
924 |
||
925 |
^ Warnings and:[WarnSTXSpecials] |
|
926 |
! |
|
927 |
||
928 |
warnSTXSpecials:aBoolean |
|
929 |
"this allows turning on/off warnings about stx specials. |
|
930 |
If you get bored by those warnings, turn them off by adding |
|
931 |
a line as: |
|
1902 | 932 |
ParserFlags warnSTXSpecials:false |
1634 | 933 |
in your 'private.rc' file" |
934 |
||
935 |
WarnSTXSpecials := aBoolean |
|
1902 | 936 |
|
937 |
"Modified: / 05-09-2006 / 11:46:11 / cg" |
|
1634 | 938 |
! |
939 |
||
940 |
warnUnderscoreInIdentifier |
|
941 |
"return true, if underscores in identifiers are to be warned about" |
|
942 |
||
943 |
^ Warnings and:[WarnUnderscoreInIdentifier] |
|
944 |
! |
|
945 |
||
946 |
warnUnderscoreInIdentifier:aBoolean |
|
947 |
"this allows turning on/off warnings about underscores in identifiers. |
|
948 |
You may find those warnings useful, to make certain that your code |
|
949 |
is portable to other smalltalk versions, which do not allow this |
|
950 |
(i.e. VW releases 2.x). |
|
951 |
If you get bored by those warnings, turn them off by adding |
|
952 |
a line as: |
|
1902 | 953 |
ParserFlags warnUnderscoreInIdentifier:false |
1634 | 954 |
in your 'private.rc' file" |
955 |
||
956 |
WarnUnderscoreInIdentifier := aBoolean |
|
957 |
||
1902 | 958 |
"Modified: / 05-09-2006 / 11:46:08 / cg" |
1634 | 959 |
! |
960 |
||
961 |
warnUnusedVars |
|
962 |
"controls generation of warning messages about unued method variables" |
|
963 |
||
964 |
^ WarnUnusedVars |
|
965 |
! |
|
966 |
||
967 |
warnUnusedVars:aBoolean |
|
968 |
"controls generation of warning messages about unued method variables" |
|
969 |
||
970 |
WarnUnusedVars := aBoolean |
|
971 |
! |
|
972 |
||
973 |
warnings |
|
974 |
"return true, if any warnings are to be shown" |
|
975 |
||
976 |
^ Warnings |
|
977 |
! |
|
978 |
||
979 |
warnings:aBoolean |
|
980 |
"this allows turning on/off all warnings; the default is on. |
|
981 |
You can turn off warnings in your 'private.rc' file with |
|
1902 | 982 |
ParserFlags warnings:false |
1634 | 983 |
" |
984 |
||
985 |
Warnings := aBoolean |
|
986 |
||
1902 | 987 |
" |
988 |
ParserFlags warnings |
|
989 |
ParserFlags warnings:true |
|
990 |
ParserFlags warnings:false |
|
991 |
" |
|
992 |
||
993 |
"Modified: / 05-09-2006 / 11:46:47 / cg" |
|
1634 | 994 |
! ! |
995 |
||
996 |
!ParserFlags class methodsFor:'class initialization'! |
|
997 |
||
998 |
initialize |
|
999 |
Warnings := true. |
|
1000 |
WarnUndeclared := true. |
|
1001 |
WarnUnusedVars := true. |
|
1002 |
WarnSTXSpecials := false. |
|
1003 |
WarnST80Directives := false. |
|
1004 |
WarnAboutWrongVariableNames := true. |
|
1005 |
WarnAboutVariableNameConventions := true. |
|
1652 | 1006 |
WarnAboutBadComments := true. |
1634 | 1007 |
WarnUnderscoreInIdentifier := false. |
1008 |
WarnDollarInIdentifier := true. |
|
1009 |
WarnOldStyleAssignment := true. |
|
1010 |
WarnCommonMistakes := true. |
|
1011 |
WarnPossibleIncompatibilities := false. |
|
1638 | 1012 |
WarnHiddenVariables := true. |
1682 | 1013 |
WarnInconsistentReturnValues := true. |
1811 | 1014 |
WarnAboutNonLowercaseLocalVariableNames := true. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1015 |
WarnAboutPossibleSTCCompilationProblems := true. |
1634 | 1016 |
|
1017 |
AllowReservedWordsAsSelectors := false. |
|
1018 |
AllowUnderscoreInIdentifier := true. "/ underscores in identifiers |
|
1019 |
AllowDollarInIdentifier := false. "/ st80-vms dollars in identifiers |
|
1020 |
AllowOldStyleAssignment := true. "/ st80 underscore as assignment |
|
1021 |
AllowDolphinExtensions := false. "/ dolphin computed literal |
|
1022 |
AllowQualifiedNames := false. "/ vw3 qualified names |
|
1023 |
AllowExtendedBinarySelectors := false. "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.) |
|
1024 |
AllowLiteralNameSpaceSymbols := true. "/ st/x literal nameSpace-symbols (#foo::bar) |
|
1025 |
AllowArrayIndexSyntaxExtension := false. |
|
1026 |
AllowFunctionCallSyntaxForBlockEvaluation := false. |
|
1027 |
AllowLocalVariableDeclarationWithInitializerExpression := false. |
|
1028 |
AllowDomainVariables := false. |
|
1029 |
AllowArrayIndexSyntaxExtension := false. |
|
1030 |
AllowReservedWordsAsSelectors := true. |
|
1031 |
AllowVariableReferences := false. |
|
1032 |
AllowLazyValueExtension := false. |
|
1033 |
AllowFixedPointLiterals := false. |
|
1034 |
AllowExtendedSTXSyntax := false. |
|
1655 | 1035 |
AllowVisualAgeESSymbolLiterals := false. |
1668 | 1036 |
AllowExtensionsToPrivateClasses := true. |
1689 | 1037 |
AllowVisualAgePrimitives := false. |
1702 | 1038 |
AllowSqueakExtensions := false. "/ squeak computed array |
1689 | 1039 |
AllowSqueakPrimitives := false. |
1702 | 1040 |
AllowSTVPrimitives := false. "/ number-sign syntax |
1041 |
AllowSTVExtensions := false. |
|
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1042 |
AllowNationalCharactersInIdentifier := false. |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1043 |
AllowHashAsBinarySelector := true. |
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1044 |
AllowSTXEOLComments := true. |
1773 | 1045 |
AllowVisualWorksMethodAnnotations := false. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1046 |
AllowPossibleSTCCompilationProblems := true. |
1950 | 1047 |
AllowEmptyStatements := false. |
1634 | 1048 |
|
1049 |
ArraysAreImmutable := false. "/ no longer care for ST-80 compatibility |
|
1050 |
StringsAreImmutable := false. "/ no longer care for ST-80 compatibility |
|
1051 |
ImplicitSelfSends := false. |
|
1052 |
||
1658 | 1053 |
STCKeepCIntermediate := false. |
1054 |
STCKeepOIntermediate := false. |
|
1055 |
STCKeepSTIntermediate := false. |
|
1056 |
STCModulePath := './modules'. |
|
1057 |
STCCompilation := #default. |
|
1058 |
||
1059 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
1668 | 1060 |
'C:\Borland\bcc55' asFilename exists ifTrue:[ |
1061 |
STCCompilationIncludes := '-I..\..\include -I..\..\libopengl -IC:\Borland\bcc55\Include'. |
|
1062 |
LinkArgs := '-L..\..\libbc -LC:\Borland\bcc55\Lib -r -c -ap -Tpd -Gi -w-dup'. |
|
1063 |
] ifFalse:[ |
|
1064 |
STCCompilationIncludes := '-I..\..\include -I..\..\libopengl -IC:\Borland\xxxxx\Include'. |
|
1065 |
LinkArgs := '-L..\..\libbc -LC:\Borland\xxxxx\Lib -r -c -ap -Tpd -Gi -w-dup'. |
|
1066 |
]. |
|
1658 | 1067 |
STCCompilationDefines := '-DWIN32'. |
1068 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
1069 |
STCPath := '..\..\stc\stc.exe'. |
|
1668 | 1070 |
OperatingSystem getCCDefine = '__BORLANDC__' ifTrue:[ |
1814 | 1071 |
CCPath := 'bcc32'. |
1072 |
MakeCommand := 'bmake'. |
|
1073 |
CCCompilationOptions := '-w-'. |
|
1668 | 1074 |
] ifFalse:[ |
1814 | 1075 |
CCPath := 'cl'. |
1076 |
MakeCommand := 'nmake'. |
|
1077 |
CCCompilationOptions := '-w-'. |
|
1668 | 1078 |
]. |
1658 | 1079 |
LinkCommand := 'ilink32'. |
1080 |
LibPath := ''. |
|
1660
c999eda0067a
stc flags moved to ParserFlags
Claus Gittinger <cg@exept.de>
parents:
1658
diff
changeset
|
1081 |
SearchedLibraries := #('import32.lib'). |
1658 | 1082 |
] ifFalse:[ |
1083 |
STCCompilationIncludes := '-I../../include'. |
|
1084 |
STCCompilationDefines := ''. |
|
1085 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
1086 |
STCPath := '../../stc/stc'. |
|
1087 |
CCCompilationOptions := '-O'. |
|
1668 | 1088 |
OperatingSystem getCCDefine = '__GNUC__' ifTrue:[ |
1089 |
CCPath := 'gcc' |
|
1090 |
] ifFalse:[ |
|
1091 |
CCPath := 'cc' |
|
1092 |
]. |
|
1658 | 1093 |
LinkArgs := ''. |
1094 |
LinkCommand := 'ld'. |
|
1095 |
LibPath := ''. |
|
1660
c999eda0067a
stc flags moved to ParserFlags
Claus Gittinger <cg@exept.de>
parents:
1658
diff
changeset
|
1096 |
SearchedLibraries := #(). |
1814 | 1097 |
MakeCommand := 'make'. |
1658 | 1098 |
]. |
1099 |
||
1634 | 1100 |
" |
1101 |
ParserFlags initialize |
|
1102 |
" |
|
1773 | 1103 |
|
1814 | 1104 |
"Modified: / 09-08-2006 / 18:47:18 / fm" |
1950 | 1105 |
"Modified: / 20-11-2006 / 14:27:45 / cg" |
1634 | 1106 |
! ! |
1107 |
||
1658 | 1108 |
!ParserFlags methodsFor:'accessing-compilation control'! |
1109 |
||
1668 | 1110 |
allowExtensionsToPrivateClasses |
1111 |
^ allowExtensionsToPrivateClasses |
|
1112 |
! |
|
1113 |
||
1114 |
allowExtensionsToPrivateClasses:aBoolean |
|
1115 |
allowExtensionsToPrivateClasses := aBoolean |
|
1116 |
! |
|
1117 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1118 |
allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1119 |
^ allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1120 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1121 |
"Created: / 16-11-2006 / 14:24:54 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1122 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1123 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1124 |
allowPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1125 |
allowPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1126 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1127 |
"Created: / 16-11-2006 / 14:24:56 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1128 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1129 |
|
1658 | 1130 |
arraysAreImmutable |
1131 |
^ arraysAreImmutable |
|
1132 |
! |
|
1133 |
||
1134 |
arraysAreImmutable:aBoolean |
|
1135 |
arraysAreImmutable := aBoolean. |
|
1136 |
! |
|
1137 |
||
1717
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1138 |
flattenVisualWorksNamespaces |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1139 |
^ true |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1140 |
! |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1141 |
|
1658 | 1142 |
stringsAreImmutable |
1143 |
^ stringsAreImmutable |
|
1144 |
! |
|
1145 |
||
1146 |
stringsAreImmutable:aBoolean |
|
1147 |
stringsAreImmutable := aBoolean. |
|
1148 |
! ! |
|
1149 |
||
1150 |
!ParserFlags methodsFor:'accessing-stc compilation control'! |
|
1151 |
||
1152 |
ccCompilationOptions |
|
1668 | 1153 |
^ ccCompilationOptions ? '' |
1658 | 1154 |
! |
1155 |
||
1156 |
ccCompilationOptions:something |
|
1157 |
ccCompilationOptions := something. |
|
1158 |
! |
|
1159 |
||
1160 |
ccPath |
|
1161 |
^ ccPath |
|
1162 |
! |
|
1163 |
||
1164 |
ccPath:something |
|
1165 |
ccPath := something. |
|
1166 |
! |
|
1167 |
||
1168 |
implicitSelfSends |
|
1169 |
^ implicitSelfSends |
|
1170 |
! |
|
1171 |
||
1172 |
implicitSelfSends:aBoolean |
|
1173 |
implicitSelfSends := aBoolean. |
|
1174 |
! |
|
1175 |
||
1176 |
libPath |
|
1177 |
^ libPath |
|
1178 |
! |
|
1179 |
||
1180 |
libPath:aString |
|
1181 |
libPath := aString |
|
1182 |
! |
|
1183 |
||
1184 |
linkArgs |
|
1185 |
^ linkArgs |
|
1186 |
! |
|
1187 |
||
1188 |
linkArgs:aString |
|
1189 |
linkArgs := aString |
|
1190 |
! |
|
1191 |
||
1192 |
linkCommand |
|
1193 |
^ linkCommand |
|
1194 |
! |
|
1195 |
||
1196 |
linkCommand:aString |
|
1197 |
linkCommand := aString |
|
1198 |
! |
|
1199 |
||
1898 | 1200 |
linkSharedArgs |
1201 |
^ linkSharedArgs |
|
1202 |
! |
|
1203 |
||
1204 |
linkSharedArgs:aString |
|
1205 |
linkSharedArgs := aString |
|
1206 |
! |
|
1207 |
||
1658 | 1208 |
searchedLibraries |
1209 |
^ searchedLibraries |
|
1210 |
! |
|
1211 |
||
1212 |
searchedLibraries:aString |
|
1213 |
searchedLibraries := aString |
|
1214 |
! |
|
1215 |
||
1216 |
stcCompilation |
|
1217 |
^ stcCompilation |
|
1218 |
! |
|
1219 |
||
1220 |
stcCompilation:something |
|
1221 |
stcCompilation := something. |
|
1222 |
! |
|
1223 |
||
1224 |
stcCompilationDefines |
|
1225 |
^ stcCompilationDefines |
|
1226 |
! |
|
1227 |
||
1228 |
stcCompilationDefines:something |
|
1229 |
stcCompilationDefines := something. |
|
1230 |
! |
|
1231 |
||
1232 |
stcCompilationIncludes |
|
1233 |
^ stcCompilationIncludes |
|
1234 |
! |
|
1235 |
||
1236 |
stcCompilationIncludes:something |
|
1237 |
stcCompilationIncludes := something. |
|
1238 |
! |
|
1239 |
||
1240 |
stcCompilationOptions |
|
1241 |
^ stcCompilationOptions |
|
1242 |
! |
|
1243 |
||
1244 |
stcCompilationOptions:something |
|
1245 |
stcCompilationOptions := something. |
|
1246 |
! |
|
1247 |
||
1248 |
stcKeepCIntermediate |
|
1249 |
^ stcKeepCIntermediate |
|
1250 |
! |
|
1251 |
||
1252 |
stcKeepCIntermediate:something |
|
1253 |
stcKeepCIntermediate := something. |
|
1254 |
! |
|
1255 |
||
1256 |
stcKeepOIntermediate |
|
1257 |
^ stcKeepOIntermediate |
|
1258 |
! |
|
1259 |
||
1260 |
stcKeepOIntermediate:something |
|
1261 |
stcKeepOIntermediate := something. |
|
1262 |
! |
|
1263 |
||
1264 |
stcKeepSTIntermediate |
|
1265 |
^ stcKeepSTIntermediate |
|
1266 |
! |
|
1267 |
||
1268 |
stcKeepSTIntermediate:something |
|
1269 |
stcKeepSTIntermediate := something. |
|
1270 |
! |
|
1271 |
||
1272 |
stcModulePath |
|
1273 |
^ stcModulePath |
|
1274 |
! |
|
1275 |
||
1276 |
stcModulePath:something |
|
1277 |
stcModulePath := something. |
|
1278 |
! |
|
1279 |
||
1280 |
stcPath |
|
1281 |
^ stcPath |
|
1282 |
! |
|
1283 |
||
1284 |
stcPath:something |
|
1285 |
stcPath := something. |
|
1286 |
! ! |
|
1287 |
||
1288 |
!ParserFlags methodsFor:'accessing-syntax-control'! |
|
1634 | 1289 |
|
1290 |
allowArrayIndexSyntaxExtension |
|
1291 |
^ allowArrayIndexSyntaxExtension |
|
1292 |
! |
|
1293 |
||
1294 |
allowArrayIndexSyntaxExtension:aBoolean |
|
1295 |
allowArrayIndexSyntaxExtension := aBoolean. |
|
1296 |
! |
|
1297 |
||
1298 |
allowDollarInIdentifier |
|
1299 |
^ allowDollarInIdentifier |
|
1300 |
! |
|
1301 |
||
1302 |
allowDollarInIdentifier:aBoolean |
|
1303 |
allowDollarInIdentifier := aBoolean. |
|
1304 |
! |
|
1305 |
||
1306 |
allowDolphinExtensions |
|
1307 |
^ allowDolphinExtensions |
|
1308 |
! |
|
1309 |
||
1310 |
allowDolphinExtensions:aBoolean |
|
1311 |
allowDolphinExtensions := aBoolean |
|
1312 |
! |
|
1313 |
||
1314 |
allowDomainVariables |
|
1315 |
^ allowDomainVariables |
|
1316 |
! |
|
1317 |
||
1318 |
allowDomainVariables:aBoolean |
|
1319 |
allowDomainVariables := aBoolean. |
|
1320 |
! |
|
1321 |
||
1950 | 1322 |
allowEmptyStatements |
1323 |
^ allowEmptyStatements ? false |
|
1324 |
||
1325 |
"Created: / 20-11-2006 / 13:56:14 / cg" |
|
1326 |
! |
|
1327 |
||
1328 |
allowEmptyStatements:aBoolean |
|
1329 |
allowEmptyStatements := aBoolean. |
|
1330 |
||
1331 |
"Created: / 20-11-2006 / 14:26:48 / cg" |
|
1332 |
! |
|
1333 |
||
1634 | 1334 |
allowExtendedBinarySelectors |
1335 |
^ allowExtendedBinarySelectors |
|
1336 |
! |
|
1337 |
||
1338 |
allowExtendedBinarySelectors:aBoolean |
|
1339 |
allowExtendedBinarySelectors := aBoolean. |
|
1340 |
! |
|
1341 |
||
1342 |
allowExtendedSTXSyntax |
|
1343 |
^ allowExtendedSTXSyntax |
|
1344 |
! |
|
1345 |
||
1346 |
allowExtendedSTXSyntax:something |
|
1347 |
allowExtendedSTXSyntax := something. |
|
1348 |
! |
|
1349 |
||
1350 |
allowFixedPointLiterals |
|
1351 |
^ allowFixedPointLiterals |
|
1352 |
! |
|
1353 |
||
1354 |
allowFixedPointLiterals:something |
|
1355 |
allowFixedPointLiterals := something. |
|
1356 |
! |
|
1357 |
||
1358 |
allowFunctionCallSyntaxForBlockEvaluation |
|
1359 |
^ allowFunctionCallSyntaxForBlockEvaluation |
|
1360 |
! |
|
1361 |
||
1362 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
1363 |
allowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
|
1364 |
! |
|
1365 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1366 |
allowHashAsBinarySelector |
1713 | 1367 |
^ allowHashAsBinarySelector |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1368 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1369 |
|
1634 | 1370 |
allowLazyValueExtension |
1371 |
^ allowLazyValueExtension |
|
1372 |
! |
|
1373 |
||
1374 |
allowLazyValueExtension:something |
|
1375 |
allowLazyValueExtension := something. |
|
1376 |
! |
|
1377 |
||
1378 |
allowLiteralNameSpaceSymbols |
|
1379 |
^ allowLiteralNameSpaceSymbols |
|
1380 |
! |
|
1381 |
||
1382 |
allowLiteralNameSpaceSymbols:aBoolean |
|
1383 |
allowLiteralNameSpaceSymbols := aBoolean |
|
1384 |
! |
|
1385 |
||
1386 |
allowLocalVariableDeclarationWithInitializerExpression |
|
1387 |
^ allowLocalVariableDeclarationWithInitializerExpression |
|
1388 |
! |
|
1389 |
||
1390 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
1391 |
allowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
|
1392 |
! |
|
1393 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1394 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1395 |
^ allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1396 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1397 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1398 |
allowNationalCharactersInIdentifier:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1399 |
allowNationalCharactersInIdentifier := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1400 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1401 |
|
1634 | 1402 |
allowOldStyleAssignment |
1403 |
^ allowOldStyleAssignment |
|
1404 |
! |
|
1405 |
||
1406 |
allowOldStyleAssignment:aBoolean |
|
1407 |
allowOldStyleAssignment := aBoolean |
|
1408 |
! |
|
1409 |
||
1410 |
allowQualifiedNames |
|
1411 |
^ allowQualifiedNames |
|
1412 |
! |
|
1413 |
||
1414 |
allowQualifiedNames:aBoolean |
|
1415 |
allowQualifiedNames := aBoolean. |
|
1416 |
! |
|
1417 |
||
1418 |
allowReservedWordsAsSelectors |
|
1419 |
^ allowReservedWordsAsSelectors |
|
1420 |
! |
|
1421 |
||
1422 |
allowReservedWordsAsSelectors:aBoolean |
|
1423 |
allowReservedWordsAsSelectors := aBoolean. |
|
1424 |
! |
|
1425 |
||
1703 | 1426 |
allowSTVExtensions |
1427 |
"return true, if support for ST/V extensions is enabled." |
|
1428 |
||
1429 |
^ allowSTVExtensions |
|
1430 |
! |
|
1431 |
||
1701 | 1432 |
allowSTVPrimitives |
1433 |
"return true, if support for ST/V primitives is enabled." |
|
1434 |
||
1435 |
^ allowSTVPrimitives |
|
1436 |
! |
|
1437 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1438 |
allowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1439 |
^ allowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1440 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1441 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1442 |
allowSTXEOLComments:aBoolean |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1443 |
allowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1444 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1445 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1446 |
ParserFlags allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1447 |
ParserFlags allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1448 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1449 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1450 |
|
1634 | 1451 |
allowSqueakExtensions |
1452 |
"return true, if support for squeak extensions |
|
1453 |
computed arrays { .., } |
|
1454 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
1455 |
is enabled." |
|
1456 |
||
1457 |
^ allowSqueakExtensions |
|
1458 |
! |
|
1459 |
||
1460 |
allowSqueakExtensions:aBoolean |
|
1461 |
"this allows turning on/off support for squeak extensions: |
|
1462 |
computed arrays { .., } |
|
1463 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
1464 |
" |
|
1465 |
||
1466 |
allowSqueakExtensions := aBoolean |
|
1467 |
! |
|
1468 |
||
1689 | 1469 |
allowSqueakPrimitives |
1470 |
"return true, if support for squeak primitives is enabled." |
|
1471 |
||
1472 |
^ allowSqueakPrimitives |
|
1473 |
! |
|
1474 |
||
1475 |
allowSqueakPrimitives:aBoolean |
|
1476 |
"this allows turning on/off support for squeak primitives" |
|
1477 |
||
1478 |
allowSqueakPrimitives := aBoolean |
|
1479 |
! |
|
1480 |
||
1634 | 1481 |
allowUnderscoreInIdentifier |
1482 |
^ allowUnderscoreInIdentifier |
|
1483 |
! |
|
1484 |
||
1485 |
allowUnderscoreInIdentifier:aBoolean |
|
1486 |
allowUnderscoreInIdentifier := aBoolean |
|
1487 |
! |
|
1488 |
||
1489 |
allowVariableReferences |
|
1490 |
^ allowVariableReferences |
|
1491 |
! |
|
1492 |
||
1493 |
allowVariableReferences:aBoolean |
|
1494 |
allowVariableReferences := aBoolean. |
|
1495 |
! |
|
1496 |
||
1655 | 1497 |
allowVisualAgeESSymbolLiterals |
1498 |
^ allowVisualAgeESSymbolLiterals |
|
1499 |
! |
|
1500 |
||
1501 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
1502 |
allowVisualAgeESSymbolLiterals := aBoolean. |
|
1689 | 1503 |
! |
1504 |
||
1505 |
allowVisualAgePrimitives |
|
1506 |
"return true, if support for V'Age primitives is enabled." |
|
1507 |
||
1508 |
^ allowVisualAgePrimitives |
|
1509 |
! |
|
1510 |
||
1511 |
allowVisualAgePrimitives:aBoolean |
|
1512 |
"this allows turning on/off support for V'Age primitives" |
|
1513 |
||
1514 |
allowVisualAgePrimitives := aBoolean |
|
1773 | 1515 |
! |
1516 |
||
1517 |
allowVisualWorksMethodAnnotations |
|
1518 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
1519 |
||
1520 |
^ allowVisualWorksMethodAnnotations |
|
1521 |
||
1522 |
"Created: / 07-07-2006 / 15:48:30 / cg" |
|
1523 |
! |
|
1524 |
||
1525 |
allowVisualWorksMethodAnnotations:aBoolean |
|
1526 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
1527 |
||
1528 |
^ allowVisualWorksMethodAnnotations := aBoolean |
|
1529 |
||
1530 |
"Created: / 07-07-2006 / 15:49:03 / cg" |
|
1658 | 1531 |
! ! |
1634 | 1532 |
|
1658 | 1533 |
!ParserFlags methodsFor:'accessing-warning-control'! |
1634 | 1534 |
|
1652 | 1535 |
warnAboutBadComments |
1536 |
^ warnAboutBadComments |
|
1537 |
! |
|
1538 |
||
1539 |
warnAboutBadComments:aBoolean |
|
1540 |
warnAboutBadComments := aBoolean. |
|
1541 |
! |
|
1542 |
||
1811 | 1543 |
warnAboutNonLowercaseLocalVariableNames |
1544 |
^ warnAboutNonLowercaseLocalVariableNames |
|
1740 | 1545 |
! |
1546 |
||
1811 | 1547 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
1548 |
warnAboutNonLowercaseLocalVariableNames := aBoolean. |
|
1740 | 1549 |
! |
1550 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1551 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1552 |
^ warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1553 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1554 |
"Created: / 16-11-2006 / 14:24:38 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1555 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1556 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1557 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1558 |
warnAboutPossibleSTCCompilationProblems := aBoolean. |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1559 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1560 |
"Created: / 16-11-2006 / 14:24:40 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1561 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1562 |
|
1634 | 1563 |
warnAboutVariableNameConventions |
1564 |
^ warnAboutVariableNameConventions |
|
1565 |
! |
|
1566 |
||
1567 |
warnAboutVariableNameConventions:aBoolean |
|
1568 |
warnAboutVariableNameConventions := aBoolean. |
|
1569 |
! |
|
1570 |
||
1571 |
warnAboutWrongVariableNames |
|
1572 |
^ warnAboutWrongVariableNames |
|
1573 |
! |
|
1574 |
||
1575 |
warnAboutWrongVariableNames:aBoolean |
|
1576 |
warnAboutWrongVariableNames := aBoolean. |
|
1577 |
! |
|
1578 |
||
1579 |
warnCommonMistakes |
|
1580 |
^ warnCommonMistakes |
|
1581 |
! |
|
1582 |
||
1583 |
warnCommonMistakes:aBoolean |
|
1584 |
warnCommonMistakes := aBoolean. |
|
1585 |
! |
|
1586 |
||
1587 |
warnDollarInIdentifier |
|
1588 |
^ warnDollarInIdentifier |
|
1589 |
! |
|
1590 |
||
1591 |
warnDollarInIdentifier:aBoolean |
|
1592 |
warnDollarInIdentifier := aBoolean. |
|
1593 |
! |
|
1594 |
||
1638 | 1595 |
warnHiddenVariables |
1596 |
^ warnHiddenVariables |
|
1597 |
! |
|
1598 |
||
1599 |
warnHiddenVariables:aBoolean |
|
1600 |
warnHiddenVariables := aBoolean. |
|
1601 |
! |
|
1602 |
||
1682 | 1603 |
warnInconsistentReturnValues |
1604 |
^ warnInconsistentReturnValues |
|
1605 |
! |
|
1606 |
||
1607 |
warnInconsistentReturnValues:aBoolean |
|
1608 |
warnInconsistentReturnValues := aBoolean. |
|
1609 |
! |
|
1610 |
||
1634 | 1611 |
warnOldStyleAssignment |
1612 |
^ warnOldStyleAssignment |
|
1613 |
! |
|
1614 |
||
1615 |
warnOldStyleAssignment:aBoolean |
|
1616 |
warnOldStyleAssignment := aBoolean. |
|
1617 |
! |
|
1618 |
||
1619 |
warnPossibleIncompatibilities |
|
1620 |
^ warnPossibleIncompatibilities |
|
1621 |
! |
|
1622 |
||
1623 |
warnPossibleIncompatibilities:aBoolean |
|
1624 |
warnPossibleIncompatibilities := aBoolean. |
|
1625 |
! |
|
1626 |
||
1627 |
warnST80Directives |
|
1628 |
^ warnST80Directives |
|
1629 |
! |
|
1630 |
||
1631 |
warnST80Directives:something |
|
1632 |
warnST80Directives := something. |
|
1633 |
! |
|
1634 |
||
1635 |
warnSTXHereExtensionUsed |
|
1636 |
^ warnSTXHereExtensionUsed |
|
1637 |
! |
|
1638 |
||
1639 |
warnSTXHereExtensionUsed:aBoolean |
|
1640 |
warnSTXHereExtensionUsed := aBoolean. |
|
1641 |
! |
|
1642 |
||
1643 |
warnSTXNameSpaceUse |
|
1644 |
^ warnSTXNameSpaceUse |
|
1645 |
! |
|
1646 |
||
1647 |
warnSTXNameSpaceUse:aBoolean |
|
1648 |
warnSTXNameSpaceUse := aBoolean. |
|
1649 |
! |
|
1650 |
||
1651 |
warnSTXSpecialComment |
|
1652 |
^ warnSTXSpecialComment |
|
1653 |
! |
|
1654 |
||
1655 |
warnSTXSpecialComment:aBoolean |
|
1656 |
warnSTXSpecialComment := aBoolean. |
|
1657 |
! |
|
1658 |
||
1659 |
warnUndeclared |
|
1660 |
^ warnUndeclared |
|
1661 |
! |
|
1662 |
||
1663 |
warnUndeclared:aBoolean |
|
1664 |
warnUndeclared := aBoolean. |
|
1665 |
! |
|
1666 |
||
1667 |
warnUnderscoreInIdentifier |
|
1668 |
^ warnUnderscoreInIdentifier |
|
1669 |
! |
|
1670 |
||
1671 |
warnUnderscoreInIdentifier:aBoolean |
|
1672 |
warnUnderscoreInIdentifier := aBoolean. |
|
1673 |
! |
|
1674 |
||
1675 |
warnUnusedVars |
|
1676 |
^ warnUnusedVars |
|
1677 |
! |
|
1678 |
||
1679 |
warnUnusedVars:aBoolean |
|
1680 |
warnUnusedVars := aBoolean. |
|
1662 | 1681 |
! |
1682 |
||
1683 |
warnings |
|
1684 |
^ warnings |
|
1685 |
! |
|
1686 |
||
1687 |
warnings:something |
|
1688 |
warnings := something. |
|
1634 | 1689 |
! ! |
1690 |
||
1691 |
!ParserFlags methodsFor:'initialization'! |
|
1692 |
||
1693 |
initialize |
|
1662 | 1694 |
warnings := Warnings. |
1634 | 1695 |
warnUndeclared := WarnUndeclared. |
1696 |
warnUnusedVars := WarnUnusedVars. |
|
1697 |
warnST80Directives := WarnST80Directives. |
|
1698 |
warnSTXSpecialComment := WarnSTXSpecials. |
|
1699 |
warnSTXNameSpaceUse := WarnSTXSpecials. |
|
1700 |
warnSTXHereExtensionUsed := WarnSTXSpecials. |
|
1701 |
warnUnderscoreInIdentifier := WarnUnderscoreInIdentifier. |
|
1702 |
warnDollarInIdentifier := WarnDollarInIdentifier. |
|
1703 |
warnOldStyleAssignment := WarnOldStyleAssignment. |
|
1704 |
warnCommonMistakes := WarnCommonMistakes. |
|
1705 |
warnPossibleIncompatibilities := WarnPossibleIncompatibilities. |
|
1706 |
warnAboutVariableNameConventions := WarnAboutVariableNameConventions. |
|
1707 |
warnAboutWrongVariableNames := WarnAboutWrongVariableNames. |
|
1652 | 1708 |
warnAboutBadComments := WarnAboutBadComments. |
1638 | 1709 |
warnHiddenVariables := WarnHiddenVariables. |
1682 | 1710 |
warnInconsistentReturnValues := WarnInconsistentReturnValues. |
1811 | 1711 |
warnAboutNonLowercaseLocalVariableNames := WarnAboutNonLowercaseLocalVariableNames. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1712 |
warnAboutPossibleSTCCompilationProblems := WarnAboutPossibleSTCCompilationProblems. |
1634 | 1713 |
|
1714 |
allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier. |
|
1715 |
allowDollarInIdentifier := AllowDollarInIdentifier. |
|
1716 |
allowOldStyleAssignment := AllowOldStyleAssignment. |
|
1717 |
allowSqueakExtensions := AllowSqueakExtensions. |
|
1718 |
allowDolphinExtensions := AllowDolphinExtensions. |
|
1719 |
allowLiteralNameSpaceSymbols := AllowLiteralNameSpaceSymbols. |
|
1720 |
allowExtendedBinarySelectors := AllowExtendedBinarySelectors. |
|
1721 |
allowFunctionCallSyntaxForBlockEvaluation := AllowFunctionCallSyntaxForBlockEvaluation. |
|
1722 |
allowLocalVariableDeclarationWithInitializerExpression := AllowLocalVariableDeclarationWithInitializerExpression. |
|
1723 |
allowDomainVariables := AllowDomainVariables. |
|
1724 |
allowArrayIndexSyntaxExtension := AllowArrayIndexSyntaxExtension. |
|
1725 |
allowReservedWordsAsSelectors := AllowReservedWordsAsSelectors. |
|
1726 |
allowVariableReferences := AllowVariableReferences. |
|
1727 |
allowLazyValueExtension := AllowLazyValueExtension. |
|
1728 |
allowFixedPointLiterals := AllowFixedPointLiterals. |
|
1729 |
allowExtendedSTXSyntax := AllowExtendedSTXSyntax. |
|
1730 |
allowQualifiedNames := AllowQualifiedNames. |
|
1655 | 1731 |
allowVisualAgeESSymbolLiterals := AllowVisualAgeESSymbolLiterals. |
1668 | 1732 |
allowExtensionsToPrivateClasses := AllowExtensionsToPrivateClasses. |
1689 | 1733 |
allowVisualAgePrimitives := AllowVisualAgePrimitives. |
1734 |
allowSqueakPrimitives := AllowSqueakPrimitives. |
|
1700 | 1735 |
allowSTVPrimitives := AllowSTVPrimitives. |
1702 | 1736 |
allowSTVExtensions := AllowSTVExtensions. |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1737 |
allowNationalCharactersInIdentifier := AllowNationalCharactersInIdentifier. |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1738 |
allowHashAsBinarySelector := AllowHashAsBinarySelector. |
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1739 |
allowSTXEOLComments := AllowSTXEOLComments. |
1773 | 1740 |
allowVisualWorksMethodAnnotations := AllowVisualWorksMethodAnnotations. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1741 |
allowPossibleSTCCompilationProblems := AllowPossibleSTCCompilationProblems. |
1950 | 1742 |
allowEmptyStatements := AllowEmptyStatements. |
1634 | 1743 |
|
1744 |
arraysAreImmutable := ArraysAreImmutable ? true. |
|
1745 |
stringsAreImmutable := StringsAreImmutable ? true. |
|
1746 |
implicitSelfSends := ImplicitSelfSends ? false. |
|
1747 |
||
1658 | 1748 |
stcKeepCIntermediate := STCKeepCIntermediate. |
1749 |
stcKeepOIntermediate := STCKeepOIntermediate. |
|
1750 |
stcKeepSTIntermediate := STCKeepSTIntermediate. |
|
1751 |
stcModulePath := STCModulePath. |
|
1752 |
stcCompilation := STCCompilation. |
|
1753 |
stcCompilationIncludes := STCCompilationIncludes. |
|
1754 |
stcCompilationDefines := STCCompilationDefines. |
|
1755 |
stcCompilationOptions := STCCompilationOptions. |
|
1756 |
stcPath := STCPath. |
|
1757 |
ccCompilationOptions := CCCompilationOptions. |
|
1758 |
ccPath := CCPath. |
|
1759 |
linkArgs := LinkArgs. |
|
1760 |
linkCommand := LinkCommand. |
|
1761 |
libPath := LibPath. |
|
1762 |
searchedLibraries := SearchedLibraries. |
|
1763 |
||
1634 | 1764 |
" |
1765 |
ParserFlags initialize. |
|
1766 |
self new inspect. |
|
1767 |
" |
|
1773 | 1768 |
|
1950 | 1769 |
"Modified: / 20-11-2006 / 14:28:02 / cg" |
1634 | 1770 |
! ! |
1771 |
||
1772 |
!ParserFlags class methodsFor:'documentation'! |
|
1773 |
||
1774 |
version |
|
1950 | 1775 |
^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.35 2006-11-20 13:30:08 cg Exp $' |
1634 | 1776 |
! ! |
1777 |
||
1778 |
ParserFlags initialize! |