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