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