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