author | Claus Gittinger <cg@exept.de> |
Wed, 12 Oct 2016 15:59:16 +0200 | |
changeset 4012 | 55763135379f |
parent 3960 | c028435d05a6 |
child 4013 | 32a83d2dc88d |
permissions | -rw-r--r-- |
1634 | 1 |
" |
2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
3 |
COPYRIGHT (c) 2005 by eXept Software AG |
|
3396 | 4 |
All Rights Reserved |
1634 | 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 |
" |
|
3576 | 13 |
"{ Package: 'stx:libcomp' }" |
14 |
||
15 |
"{ NameSpace: Smalltalk }" |
|
16 |
||
17 |
Object subclass:#ParserFlags |
|
18 |
instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives |
|
19 |
warnSTXHereExtensionUsed warnSTXSpecialComment |
|
20 |
warnUnderscoreInIdentifier warnOldStyleAssignment |
|
21 |
warnCommonMistakes warnSTXNameSpaceUse |
|
22 |
warnPossibleIncompatibilities warnDollarInIdentifier |
|
23 |
warnHiddenVariables warnAboutVariableNameConventions |
|
24 |
warnAboutWrongVariableNames warnAboutBadComments |
|
25 |
warnInconsistentReturnValues |
|
26 |
warnAboutNonLowercaseLocalVariableNames |
|
27 |
warnAboutPossibleSTCCompilationProblems |
|
28 |
warnAboutReferenceToPrivateClass warnAboutShortLocalVariableNames |
|
29 |
warnAboutPossiblyUnimplementedSelectors |
|
30 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
|
31 |
warnPlausibilityChecks allowLiteralNameSpaceSymbols |
|
32 |
allowUnderscoreInIdentifier allowDollarInIdentifier |
|
33 |
allowOldStyleAssignment allowSqueakExtensions |
|
34 |
allowDolphinExtensions allowExtendedBinarySelectors |
|
35 |
allowQualifiedNames allowFunctionCallSyntaxForBlockEvaluation |
|
36 |
allowLocalVariableDeclarationWithInitializerExpression |
|
37 |
allowDomainVariables allowArrayIndexSyntaxExtension |
|
38 |
allowReservedWordsAsSelectors allowVariableReferences |
|
39 |
allowLazyValueExtension allowFixedPointLiterals |
|
40 |
allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals |
|
41 |
allowExtensionsToPrivateClasses allowSqueakPrimitives |
|
42 |
allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions |
|
43 |
allowNationalCharactersInIdentifier allowHashAsBinarySelector |
|
44 |
allowSTXEOLComments allowEmptyStatements |
|
45 |
allowVisualWorksMethodAnnotations |
|
46 |
allowPossibleSTCCompilationProblems arraysAreImmutable |
|
47 |
stringsAreImmutable implicitSelfSends stcKeepCIntermediate |
|
48 |
stcKeepOIntermediate stcKeepSTIntermediate stcModulePath |
|
49 |
stcCompilation stcCompilationIncludes stcCompilationDefines |
|
50 |
stcCompilationOptions stcPath ccCompilationOptions ccPath |
|
51 |
linkArgs linkSharedArgs linkCommand libPath searchedLibraries |
|
52 |
warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop |
|
53 |
allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes |
|
54 |
allowStringEscapes allowAssignmentToBlockArgument |
|
55 |
allowAssignmentToMethodArgument allowAssignmentToPoolVariable |
|
56 |
lineNumberInfo allowSTXDelimiterComments |
|
3945 | 57 |
allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument |
58 |
warnAssignmentToMethodArgument warnAssignmentToPoolVariable' |
|
3576 | 59 |
classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared |
60 |
WarnAboutWrongVariableNames WarnAboutBadComments |
|
61 |
WarnAboutVariableNameConventions WarnSTXSpecials |
|
62 |
WarnOldStyleAssignment WarnUnderscoreInIdentifier |
|
63 |
WarnCommonMistakes WarnPossibleIncompatibilities |
|
64 |
WarnDollarInIdentifier WarnHiddenVariables |
|
65 |
WarnAboutNonLowercaseLocalVariableNames |
|
66 |
WarnInconsistentReturnValues Warnings |
|
67 |
WarnAboutPossibleSTCCompilationProblems |
|
68 |
WarnAboutReferenceToPrivateClass WarnAboutShortLocalVariableNames |
|
69 |
WarnAboutPossiblyUnimplementedSelectors WarnAboutPeriodInSymbol |
|
70 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
|
71 |
WarnPlausibilityChecks AllowUnderscoreInIdentifier |
|
72 |
AllowFunctionCallSyntaxForBlockEvaluation AllowLazyValueExtension |
|
73 |
AllowVariableReferences AllowReservedWordsAsSelectors |
|
74 |
AllowLocalVariableDeclarationWithInitializerExpression |
|
75 |
AllowArrayIndexSyntaxExtension AllowDomainVariables |
|
76 |
AllowDollarInIdentifier AllowSqueakExtensions AllowQualifiedNames |
|
77 |
AllowDolphinExtensions AllowOldStyleAssignment |
|
78 |
AllowExtendedBinarySelectors AllowExtendedSTXSyntax |
|
79 |
AllowFixedPointLiterals AllowLiteralNameSpaceSymbols |
|
80 |
AllowVisualAgeESSymbolLiterals AllowExtensionsToPrivateClasses |
|
81 |
AllowSqueakPrimitives AllowVisualAgePrimitives AllowSTVPrimitives |
|
82 |
AllowSTVExtensions AllowNationalCharactersInIdentifier |
|
83 |
AllowHashAsBinarySelector AllowSTXEOLComments |
|
84 |
AllowPossibleSTCCompilationProblems AllowEmptyStatements |
|
85 |
AllowVisualWorksMethodAnnotations ArraysAreImmutable |
|
86 |
AllowPeriodInSymbol StringsAreImmutable ImplicitSelfSends |
|
87 |
STCModulePath STCKeepCIntermediate STCKeepOIntermediate |
|
88 |
STCKeepSTIntermediate STCCompilation STCCompilationIncludes |
|
89 |
STCCompilationDefines STCCompilationOptions STCPath |
|
90 |
CCCompilationOptions CCPath LinkArgs LinkSharedArgs LinkCommand |
|
91 |
LibPath SearchedLibraries MakeCommand AllowCaretAsBinop |
|
92 |
AllowUnicodeStrings AllowUnicodeCharacters AllowCharacterEscapes |
|
93 |
AllowStringEscapes AllowAssignmentToBlockArgument |
|
94 |
AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable |
|
3719 | 95 |
LineNumberInfo LibDirectory VCTop SDKTop BCCTop MingwTop |
96 |
ForcedCompiler DefineForBorlandC DefineForVisualC DefineForMSC |
|
97 |
DefineForGNUC PerMethodFlags AllowSTXDelimiterComments |
|
3945 | 98 |
AllowSTXExtendedArrayLiterals DefineForMINGW32 DefineForMINGW64 |
99 |
DefineForMINGW DefineForCLANG WarnAssignmentToBlockArgument |
|
100 |
WarnAssignmentToPoolVariable WarnAssignmentToMethodArgument' |
|
3576 | 101 |
poolDictionaries:'' |
102 |
category:'System-Compiler' |
|
103 |
! |
|
1634 | 104 |
|
105 |
!ParserFlags class methodsFor:'documentation'! |
|
106 |
||
107 |
copyright |
|
108 |
" |
|
109 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
110 |
COPYRIGHT (c) 2005 by eXept Software AG |
|
3396 | 111 |
All Rights Reserved |
1634 | 112 |
|
113 |
This software is furnished under a license and may be used |
|
114 |
only in accordance with the terms of that license and with the |
|
115 |
inclusion of the above copyright notice. This software may not |
|
116 |
be provided or otherwise made available to, or used by, any |
|
117 |
other person. No title to or ownership of the software is |
|
118 |
hereby transferred. |
|
119 |
" |
|
120 |
! |
|
121 |
||
122 |
documentation |
|
123 |
" |
|
124 |
compiler flags (used to be defined in Scanner and Parser) have been extracted for easier |
|
125 |
individual-method customization (using ST as scripting). |
|
1711 | 126 |
|
3945 | 127 |
The class side provides correspondingly-named variables, which hold the default values. |
128 |
||
1712 | 129 |
howTo_fileInVSE: |
3945 | 130 |
ParserFlags allowSTVExtensions:true. |
131 |
ParserFlags allowSTVPrimitives:true. |
|
132 |
ParserFlags allowSTXEOLComments:false. |
|
2488 | 133 |
|
134 |
for stx debugging: |
|
3945 | 135 |
STCKeepCIntermediate := true |
2488 | 136 |
|
1711 | 137 |
" |
1634 | 138 |
! ! |
139 |
||
140 |
!ParserFlags class methodsFor:'instance creation'! |
|
141 |
||
142 |
new |
|
143 |
^ self basicNew initialize |
|
144 |
! ! |
|
145 |
||
146 |
!ParserFlags class methodsFor:'accessing-compilation control'! |
|
147 |
||
1668 | 148 |
allowExtensionsToPrivateClasses |
149 |
^ AllowExtensionsToPrivateClasses |
|
150 |
! |
|
151 |
||
152 |
allowExtensionsToPrivateClasses:aBoolean |
|
153 |
AllowExtensionsToPrivateClasses := aBoolean |
|
154 |
! |
|
155 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
156 |
allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
157 |
^ AllowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
158 |
|
3546 | 159 |
" |
160 |
self allowPossibleSTCCompilationProblems:true |
|
161 |
self allowPossibleSTCCompilationProblems:false |
|
162 |
||
163 |
self warnAboutPossibleSTCCompilationProblems |
|
164 |
" |
|
165 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
166 |
"Created: / 16-11-2006 / 14:31:36 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
167 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
168 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
169 |
allowPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
170 |
AllowPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
171 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
172 |
"Created: / 16-11-2006 / 14:31:40 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
173 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
174 |
|
1634 | 175 |
arraysAreImmutable |
3219 | 176 |
"return true if arrays and byteArrays are compiled as immutable literals" |
1634 | 177 |
|
178 |
^ ArraysAreImmutable |
|
179 |
! |
|
180 |
||
181 |
arraysAreImmutable:aBoolean |
|
3219 | 182 |
"turn on/off immutable array and byteArrays literals - default is false for ST-80 compatibilty." |
1634 | 183 |
|
184 |
ArraysAreImmutable := aBoolean. |
|
185 |
||
186 |
" |
|
187 |
can be added to your private.rc file: |
|
188 |
||
3396 | 189 |
ParserFlags arraysAreImmutable:true |
190 |
ParserFlags arraysAreImmutable:false |
|
1634 | 191 |
" |
192 |
! |
|
193 |
||
2927 | 194 |
fullLineNumberInfo |
195 |
^ (self lineNumberInfo == #full) |
|
196 |
||
197 |
"Created: / 26-09-2012 / 14:16:09 / cg" |
|
198 |
! |
|
199 |
||
1634 | 200 |
implicitSelfSends |
201 |
"return true if undefined variables with |
|
202 |
lowercase first character are to be turned |
|
203 |
into implicit self sends" |
|
204 |
||
205 |
^ ImplicitSelfSends |
|
206 |
! |
|
207 |
||
208 |
implicitSelfSends:aBoolean |
|
209 |
"turn on/off implicit self sends" |
|
210 |
||
211 |
ImplicitSelfSends := aBoolean |
|
212 |
||
213 |
" |
|
214 |
Compiler implicitSelfSends:true |
|
3396 | 215 |
Compiler implicitSelfSends:false |
1634 | 216 |
" |
217 |
! |
|
218 |
||
2927 | 219 |
lineNumberInfo |
220 |
^ LineNumberInfo |
|
221 |
||
222 |
"Created: / 26-09-2012 / 13:27:34 / cg" |
|
223 |
! |
|
224 |
||
225 |
lineNumberInfo:aSymbol |
|
226 |
LineNumberInfo := aSymbol. |
|
227 |
||
228 |
"Created: / 26-09-2012 / 13:27:54 / cg" |
|
229 |
! |
|
230 |
||
1634 | 231 |
stringsAreImmutable |
232 |
"return true if strings are immutable literals" |
|
233 |
||
234 |
^ StringsAreImmutable |
|
235 |
||
236 |
"Created: / 3.8.1998 / 14:53:25 / cg" |
|
237 |
! |
|
238 |
||
239 |
stringsAreImmutable:aBoolean |
|
240 |
"turn on/off immutable string literals - default is false for ST-80 compatibilty." |
|
241 |
||
242 |
StringsAreImmutable := aBoolean. |
|
243 |
||
244 |
" |
|
245 |
can be added to your private.rc file: |
|
246 |
||
3396 | 247 |
ParserFlags stringsAreImmutable:true |
248 |
ParserFlags stringsAreImmutable:false |
|
1634 | 249 |
" |
250 |
||
251 |
"Created: / 3.8.1998 / 14:53:28 / cg" |
|
252 |
! ! |
|
253 |
||
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
254 |
!ParserFlags class methodsFor:'accessing-per method flags'! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
255 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
256 |
disableFlag:flagName forClass:class selector:selector |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
257 |
"remember that warnings named flagName (such as #warnUnusedVars) |
3396 | 258 |
are disabled for a particular method. |
259 |
Sent if user wants to disable warnings in the future |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
260 |
(try defining a method with an unused var, to see)" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
261 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
262 |
|key| |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
263 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
264 |
PerMethodFlags isNil ifTrue:[ |
3396 | 265 |
PerMethodFlags := Dictionary new. |
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
266 |
]. |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
267 |
key := class name, '>>',selector. |
2852 | 268 |
PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration). |
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
269 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
270 |
"Created: / 28-02-2012 / 12:57:45 / cg" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
271 |
! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
272 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
273 |
isFlag:flagName enabledForClass:class selector:selector |
3295 | 274 |
"return true, if warnings named <flagName> (such as #warnUnusedVars) |
2852 | 275 |
are to be suppressed for a particular method." |
276 |
||
277 |
|key endTime| |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
278 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
279 |
PerMethodFlags isNil ifTrue:[^ true]. |
2830 | 280 |
class isNil ifTrue:[^ true]. |
281 |
selector isNil ifTrue:[^ true]. |
|
282 |
||
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
283 |
key := class name, '>>',selector. |
2852 | 284 |
endTime := PerMethodFlags at:key ifAbsent:nil. |
285 |
endTime isNil ifTrue:[^ true]. |
|
286 |
endTime > Timestamp now ifTrue:[^ false]. |
|
287 |
PerMethodFlags removeKey:key. |
|
288 |
^ true |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
289 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
290 |
"Created: / 28-02-2012 / 12:57:30 / cg" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
291 |
! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
292 |
|
2852 | 293 |
perMethodDisableWarningTimeDuration |
294 |
"when the user wants to suppress a particular warning for a particular |
|
295 |
method, it will be only suppressed for some time duration. |
|
296 |
After that, the suppress will automatically be removed, and normal warnings |
|
297 |
are issued again." |
|
298 |
||
299 |
^ 30 minutes |
|
300 |
||
301 |
"Created: / 08-03-2012 / 10:22:57 / cg" |
|
302 |
! |
|
303 |
||
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
304 |
reenableAllSuppressedFlags |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
305 |
"turn off any suppressed warnings" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
306 |
|
2830 | 307 |
PerMethodFlags := nil |
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
308 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
309 |
"Created: / 28-02-2012 / 12:59:08 / cg" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
310 |
! ! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
311 |
|
1658 | 312 |
!ParserFlags class methodsFor:'accessing-stc compilation control'! |
313 |
||
2645 | 314 |
bccTop:aPath |
315 |
"windows only: define the borland-C installation directory. |
|
316 |
must contain bin\bcc32.exe and include. |
|
317 |
Typically, something like 'C:\borland\bcc55'" |
|
318 |
||
319 |
BCCTop := aPath |
|
320 |
||
321 |
"Created: / 08-08-2011 / 22:41:48 / cg" |
|
322 |
! |
|
323 |
||
1658 | 324 |
ccCompilationOptions |
1668 | 325 |
^ CCCompilationOptions ? '' |
1658 | 326 |
! |
327 |
||
328 |
ccCompilationOptions:aString |
|
329 |
CCCompilationOptions := aString |
|
330 |
! |
|
331 |
||
332 |
ccPath |
|
333 |
^ CCPath |
|
334 |
! |
|
335 |
||
336 |
ccPath:aSymbol |
|
337 |
CCPath := aSymbol |
|
338 |
! |
|
339 |
||
2626 | 340 |
libDirectory |
341 |
^ LibDirectory |
|
342 |
||
343 |
"Created: / 07-08-2011 / 14:01:21 / cg" |
|
344 |
! |
|
345 |
||
346 |
libDirectory:aString |
|
347 |
LibDirectory := aString |
|
348 |
||
349 |
"Created: / 07-08-2011 / 14:01:28 / cg" |
|
350 |
! |
|
351 |
||
1658 | 352 |
libPath |
353 |
^ LibPath |
|
354 |
! |
|
355 |
||
356 |
libPath:aString |
|
357 |
LibPath := aString |
|
358 |
! |
|
359 |
||
360 |
linkArgs |
|
361 |
^ LinkArgs |
|
362 |
! |
|
363 |
||
364 |
linkArgs:aString |
|
365 |
LinkArgs := aString |
|
366 |
! |
|
367 |
||
368 |
linkCommand |
|
369 |
^ LinkCommand |
|
370 |
! |
|
371 |
||
372 |
linkCommand:aString |
|
373 |
LinkCommand := aString |
|
374 |
! |
|
375 |
||
1898 | 376 |
linkSharedArgs |
377 |
^ LinkSharedArgs |
|
378 |
! |
|
379 |
||
380 |
linkSharedArgs:aString |
|
381 |
LinkSharedArgs := aString |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
382 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
383 |
"Modified (format): / 28-02-2012 / 13:34:58 / cg" |
1898 | 384 |
! |
385 |
||
1814 | 386 |
makeCommand |
387 |
^ MakeCommand |
|
388 |
||
389 |
"Created: / 09-08-2006 / 18:45:04 / fm" |
|
390 |
! |
|
391 |
||
392 |
makeCommand:aString |
|
393 |
MakeCommand := aString |
|
394 |
||
395 |
"Created: / 09-08-2006 / 18:45:12 / fm" |
|
396 |
! |
|
397 |
||
2645 | 398 |
sdkTop:aPath |
399 |
"windows only: define the SDK top directory. |
|
400 |
must include folder with windows header files. |
|
401 |
Typically something like 'C:\Program Files\Microsoft SDKs\Windows\v6.0A'" |
|
402 |
||
403 |
SDKTop := aPath |
|
404 |
||
405 |
"Created: / 08-08-2011 / 22:39:24 / cg" |
|
406 |
! |
|
407 |
||
1658 | 408 |
searchedLibraries |
409 |
^ SearchedLibraries |
|
410 |
! |
|
411 |
||
412 |
searchedLibraries:aString |
|
413 |
SearchedLibraries := aString |
|
414 |
! |
|
415 |
||
416 |
stcCompilation |
|
417 |
^ STCCompilation |
|
418 |
! |
|
419 |
||
420 |
stcCompilation:aSymbol |
|
421 |
STCCompilation := aSymbol |
|
422 |
! |
|
423 |
||
424 |
stcCompilationDefines |
|
425 |
^ STCCompilationDefines |
|
426 |
! |
|
427 |
||
428 |
stcCompilationDefines:aString |
|
429 |
STCCompilationDefines := aString |
|
430 |
! |
|
431 |
||
432 |
stcCompilationIncludes |
|
433 |
^ STCCompilationIncludes |
|
434 |
! |
|
435 |
||
436 |
stcCompilationIncludes:aString |
|
437 |
STCCompilationIncludes := aString |
|
438 |
! |
|
439 |
||
440 |
stcCompilationOptions |
|
441 |
^ STCCompilationOptions |
|
442 |
! |
|
443 |
||
444 |
stcCompilationOptions:aString |
|
445 |
STCCompilationOptions := aString |
|
446 |
! |
|
447 |
||
448 |
stcKeepCIntermediate |
|
2701
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
449 |
^ STCKeepCIntermediate ? false |
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
450 |
|
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
451 |
"Modified: / 16-09-2011 / 19:56:18 / cg" |
1658 | 452 |
! |
453 |
||
3396 | 454 |
stcKeepCIntermediate:something |
1658 | 455 |
STCKeepCIntermediate := something. |
1940 | 456 |
|
457 |
" |
|
458 |
STCKeepCIntermediate := true. |
|
459 |
STCKeepCIntermediate := false. |
|
460 |
" |
|
461 |
||
462 |
"Modified: / 07-11-2006 / 10:58:42 / cg" |
|
1658 | 463 |
! |
464 |
||
465 |
stcKeepOIntermediate |
|
2702 | 466 |
^ STCKeepOIntermediate ? false |
467 |
||
468 |
"Modified: / 16-09-2011 / 19:56:49 / cg" |
|
1658 | 469 |
! |
470 |
||
3396 | 471 |
stcKeepOIntermediate:something |
1658 | 472 |
STCKeepOIntermediate := something. |
473 |
! |
|
474 |
||
475 |
stcKeepSTIntermediate |
|
2702 | 476 |
^ STCKeepSTIntermediate ? false |
2142 | 477 |
|
478 |
" |
|
479 |
STCKeepSTIntermediate := true. |
|
480 |
STCKeepSTIntermediate := false. |
|
481 |
" |
|
2702 | 482 |
|
483 |
"Modified: / 16-09-2011 / 19:57:17 / cg" |
|
1658 | 484 |
! |
485 |
||
3396 | 486 |
stcKeepSTIntermediate:something |
1658 | 487 |
STCKeepSTIntermediate := something. |
1940 | 488 |
|
489 |
" |
|
490 |
STCKeepSTIntermediate := true. |
|
491 |
STCKeepSTIntermediate := false. |
|
492 |
" |
|
493 |
||
494 |
"Modified: / 07-11-2006 / 10:58:54 / cg" |
|
1658 | 495 |
! |
496 |
||
497 |
stcModulePath |
|
4012 | 498 |
"the folder, where temporarily compiled modules are created by stc. |
499 |
Used to be inside the bin-directory, but that did not work for readonly/shared |
|
500 |
st/x installations (i.e. running stx from a mounted dbg). |
|
501 |
Therefore, this is now in the workspace (where the snapshot image resudes as well) |
|
502 |
||
503 |
Notice: |
|
504 |
this ought to be a persistent folder (at least as along as any |
|
505 |
snapshot image is present, which refers to any module there. |
|
506 |
As we cannot (currently) scan snapshots, this is somewhat tricky." |
|
507 |
||
508 |
STCModulePath notNil ifTrue:[^ STCModulePath]. |
|
509 |
^ UserPreferences current workspaceDirectory / 'modules' |
|
1658 | 510 |
! |
511 |
||
3396 | 512 |
stcModulePath:something |
1658 | 513 |
STCModulePath := something. |
514 |
! |
|
515 |
||
516 |
stcPath |
|
517 |
^ STCPath |
|
518 |
! |
|
519 |
||
520 |
stcPath:aSymbol |
|
521 |
STCPath := aSymbol |
|
522 |
! |
|
523 |
||
2011 | 524 |
useBorlandC |
2803 | 525 |
"true if borland compiler should be used" |
526 |
||
2888 | 527 |
^ self usedCompilerDefine = DefineForBorlandC |
2011 | 528 |
|
529 |
"Created: / 15-03-2007 / 13:33:32 / cg" |
|
530 |
! |
|
531 |
||
3653 | 532 |
useClang |
533 |
"true if clang compiler should be used" |
|
534 |
||
535 |
^ self usedCompilerDefine = DefineForCLANG |
|
536 |
! |
|
537 |
||
2888 | 538 |
useCompilerDefine: aCompilerDefine |
2803 | 539 |
"enforce a particular compiler to be used (independent from |
540 |
what the system was compiled with)" |
|
541 |
||
542 |
ForcedCompiler := aCompilerDefine. |
|
543 |
||
2804 | 544 |
" |
545 |
self useCompiler: DefineForBorlandC |
|
546 |
self useCompiler: DefineForVisualC |
|
3719 | 547 |
self useCompiler: DefineForMINGW32 |
2804 | 548 |
" |
549 |
||
2888 | 550 |
"Created: / 20-07-2012 / 13:10:30 / cg" |
2803 | 551 |
! |
552 |
||
2011 | 553 |
useGnuC |
2803 | 554 |
"true if gnu-c compiler should be used" |
555 |
||
2888 | 556 |
^ self usedCompilerDefine = DefineForGNUC |
2011 | 557 |
|
558 |
"Created: / 15-03-2007 / 13:34:49 / cg" |
|
559 |
! |
|
560 |
||
3009
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
561 |
useMingw32 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
562 |
"true if mingw compiler should be used" |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
563 |
|
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
564 |
^ self usedCompilerDefine = DefineForMINGW32 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
565 |
! |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
566 |
|
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
567 |
useMingw64 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
568 |
"true if mingw compiler should be used" |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
569 |
|
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
570 |
^ self usedCompilerDefine = DefineForMINGW64 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
571 |
! |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
572 |
|
2645 | 573 |
useVisualC |
2803 | 574 |
"true if visual-c compiler should be used" |
575 |
||
2888 | 576 |
|def| |
577 |
||
578 |
^ (def := self usedCompilerDefine) = DefineForVisualC |
|
579 |
or:[ def = DefineForMSC ] |
|
2645 | 580 |
|
581 |
"Created: / 08-08-2011 / 22:50:25 / cg" |
|
582 |
! |
|
583 |
||
2803 | 584 |
usedCompiler |
2888 | 585 |
|dfn| |
586 |
||
587 |
dfn := self usedCompilerDefine. |
|
588 |
||
589 |
dfn = DefineForGNUC ifTrue:[ ^'gcc']. |
|
590 |
dfn = DefineForBorlandC ifTrue:[ ^'bcc']. |
|
591 |
dfn = DefineForMSC ifTrue:[ ^'vc']. |
|
592 |
dfn = DefineForVisualC ifTrue:[ ^'vc']. |
|
3160 | 593 |
dfn = DefineForMINGW64 ifTrue:[ ^'mingw']. |
594 |
dfn = DefineForMINGW32 ifTrue:[ ^'mingw']. |
|
595 |
dfn = DefineForMINGW ifTrue:[ ^'mingw']. |
|
2888 | 596 |
"/ dfn = DefineForLCC ifTrue:[ ^'lcc']. |
597 |
||
598 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3396 | 599 |
^ 'bcc' |
2888 | 600 |
]. |
601 |
^ 'gcc' |
|
2803 | 602 |
|
2805 | 603 |
" |
604 |
self usedCompiler |
|
605 |
" |
|
606 |
||
2803 | 607 |
"Created: / 31-01-2012 / 12:05:30 / cg" |
608 |
! |
|
609 |
||
2888 | 610 |
usedCompilerDefine |
611 |
|dfn| |
|
612 |
||
613 |
dfn := ForcedCompiler. |
|
614 |
dfn isNil ifTrue:[ dfn := OperatingSystem getCCDefine]. |
|
615 |
^ dfn |
|
616 |
||
617 |
"Created: / 20-07-2012 / 13:11:22 / cg" |
|
618 |
! |
|
619 |
||
2645 | 620 |
vcTop:aPath |
621 |
"windows only: define the visual-C top directory. |
|
622 |
must contain bin\cl.exe and include. |
|
623 |
Typically, something like 'C:\Program Files\Microsoft Visual Studio 10.0\VC'" |
|
624 |
||
625 |
VCTop := aPath |
|
626 |
||
627 |
"Created: / 08-08-2011 / 22:39:15 / cg" |
|
628 |
! |
|
629 |
||
1658 | 630 |
withSTCCompilation:howSymbol do:aBlock |
631 |
|prev| |
|
632 |
||
633 |
prev := self stcCompilation. |
|
634 |
self stcCompilation:howSymbol. |
|
635 |
aBlock ensure:[ self stcCompilation:prev ] |
|
636 |
! ! |
|
637 |
||
1634 | 638 |
!ParserFlags class methodsFor:'accessing-syntax-control'! |
639 |
||
640 |
allowArrayIndexSyntaxExtension |
|
641 |
"experimental" |
|
642 |
||
643 |
^ AllowArrayIndexSyntaxExtension ? false |
|
3190 | 644 |
|
645 |
" |
|
646 |
self allowArrayIndexSyntaxExtension:true |
|
647 |
self allowArrayIndexSyntaxExtension:false |
|
648 |
self allowArrayIndexSyntaxExtension |
|
649 |
" |
|
1634 | 650 |
! |
651 |
||
652 |
allowArrayIndexSyntaxExtension:aBoolean |
|
653 |
"experimental" |
|
654 |
||
655 |
AllowArrayIndexSyntaxExtension := aBoolean. |
|
656 |
||
657 |
" |
|
658 |
self allowArrayIndexSyntaxExtension:true |
|
659 |
self allowArrayIndexSyntaxExtension:false |
|
660 |
" |
|
661 |
! |
|
662 |
||
2685 | 663 |
allowAssignmentToBlockArgument |
664 |
^ AllowAssignmentToBlockArgument |
|
665 |
||
666 |
"Created: / 08-09-2011 / 14:49:46 / cg" |
|
667 |
! |
|
668 |
||
669 |
allowAssignmentToBlockArgument:aBoolean |
|
670 |
AllowAssignmentToBlockArgument := aBoolean |
|
671 |
||
672 |
"Created: / 08-09-2011 / 14:50:23 / cg" |
|
673 |
! |
|
674 |
||
675 |
allowAssignmentToMethodArgument |
|
676 |
^ AllowAssignmentToMethodArgument |
|
677 |
||
678 |
"Created: / 08-09-2011 / 14:49:57 / cg" |
|
679 |
! |
|
680 |
||
681 |
allowAssignmentToMethodArgument:aBoolean |
|
682 |
AllowAssignmentToMethodArgument := aBoolean |
|
683 |
||
684 |
"Created: / 08-09-2011 / 14:50:34 / cg" |
|
685 |
! |
|
686 |
||
687 |
allowAssignmentToPoolVariable |
|
688 |
^ AllowAssignmentToPoolVariable |
|
689 |
||
690 |
"Created: / 08-09-2011 / 14:50:06 / cg" |
|
691 |
! |
|
692 |
||
693 |
allowAssignmentToPoolVariable:aBoolean |
|
694 |
AllowAssignmentToPoolVariable := aBoolean |
|
695 |
||
696 |
"Created: / 08-09-2011 / 14:50:48 / cg" |
|
697 |
! |
|
698 |
||
1634 | 699 |
allowDollarInIdentifier |
700 |
"return true, if $-characters are allowed in identifiers. |
|
701 |
Notice, that dollars are NEVER allowed as the first character in an identifier." |
|
702 |
||
703 |
^ AllowDollarInIdentifier |
|
704 |
||
705 |
"Created: 7.9.1997 / 01:32:18 / cg" |
|
706 |
"Modified: 7.9.1997 / 01:39:44 / cg" |
|
707 |
! |
|
708 |
||
709 |
allowDollarInIdentifier:aBoolean |
|
710 |
"this allows turning on/off $-characters in identifiers. |
|
711 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
712 |
If turned off (the default), dollars are not allowed in identifiers, |
|
713 |
but instead are scanned as character-constant prefix. |
|
714 |
If turned on, dollars are in identifiers are allowed, while extra |
|
715 |
dollars are still scanned as constant character prefix. |
|
716 |
If you have to fileIn old VW-Vsn2.x classes, turn this off |
|
717 |
before filing them in; i.e.: |
|
3396 | 718 |
Compiler allowDollarInIdentifiers:false" |
1634 | 719 |
|
720 |
AllowDollarInIdentifier := aBoolean. |
|
721 |
||
722 |
"Created: 7.9.1997 / 01:34:49 / cg" |
|
723 |
"Modified: 7.9.1997 / 01:39:30 / cg" |
|
724 |
! |
|
725 |
||
726 |
allowDolphinExtensions |
|
727 |
"return true, if ##(..) computed literals are allowed" |
|
728 |
||
729 |
^ AllowDolphinExtensions |
|
730 |
! |
|
731 |
||
732 |
allowDolphinExtensions:aBoolean |
|
733 |
"this allows turning on/off support for computed arrays ##(..) as in dolphin. |
|
734 |
If you want to fileIn Dolphin classes, enable this with: |
|
3396 | 735 |
Compiler allowDolphinComputedArrays:true" |
1634 | 736 |
|
737 |
AllowDolphinExtensions := aBoolean. |
|
738 |
||
739 |
" |
|
740 |
self allowDolphinExtensions:true |
|
741 |
self allowDolphinExtensions:false |
|
742 |
" |
|
743 |
! |
|
744 |
||
1950 | 745 |
allowEmptyStatements |
746 |
"return true, if empty statements are allowed (two .'s in a row). |
|
747 |
Notice, that stc cannot (yet) handle those." |
|
748 |
||
749 |
^ AllowEmptyStatements |
|
750 |
||
751 |
"Created: / 20-11-2006 / 14:29:02 / cg" |
|
752 |
! |
|
753 |
||
754 |
allowEmptyStatements:aBoolean |
|
755 |
"turn on/off, if empty statements are allowed (two .'s in a row). |
|
756 |
Notice, that stc cannot (yet) handle those." |
|
757 |
||
758 |
AllowEmptyStatements := aBoolean |
|
759 |
||
760 |
"Created: / 20-11-2006 / 14:29:15 / cg" |
|
761 |
! |
|
762 |
||
2145 | 763 |
allowExtendedBinarySelectors |
764 |
"experimental extended selectors extensions" |
|
765 |
||
766 |
^ AllowExtendedBinarySelectors |
|
2218
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
767 |
|
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
768 |
" |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
769 |
ParserFlags allowExtendedBinarySelectors |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
770 |
ParserFlags allowExtendedBinarySelectors:false |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
771 |
ParserFlags allowExtendedBinarySelectors:true |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
772 |
" |
2145 | 773 |
! |
774 |
||
775 |
allowExtendedBinarySelectors:aBoolean |
|
776 |
"experimental syntay extensions" |
|
777 |
||
778 |
AllowExtendedBinarySelectors := aBoolean |
|
779 |
! |
|
780 |
||
1682 | 781 |
allowExtendedSTXSyntax |
782 |
"experimental syntay extensions" |
|
783 |
||
784 |
^ AllowExtendedSTXSyntax |
|
785 |
! |
|
786 |
||
787 |
allowExtendedSTXSyntax:aBoolean |
|
788 |
"experimental syntay extensions" |
|
789 |
||
790 |
AllowExtendedSTXSyntax := aBoolean |
|
791 |
||
792 |
" |
|
793 |
self allowExtendedSTXSyntax:true |
|
794 |
'a\tb' inspect. |
|
795 |
'a\u1616b' inspect. |
|
3396 | 796 |
self allowExtendedSTXSyntax:false |
1682 | 797 |
" |
798 |
! |
|
799 |
||
1677 | 800 |
allowFixedPointLiterals |
801 |
"return true, if nnnsn (FixedPoint) literals are allowed" |
|
802 |
||
803 |
^ AllowFixedPointLiterals |
|
804 |
! |
|
805 |
||
806 |
allowFixedPointLiterals:aBoolean |
|
807 |
"enable/disable, if nnnsn (FixedPoint) literals are allowed" |
|
808 |
||
809 |
AllowFixedPointLiterals := aBoolean |
|
810 |
! |
|
811 |
||
1634 | 812 |
allowFunctionCallSyntaxForBlockEvaluation |
813 |
"experimental" |
|
814 |
||
815 |
^ AllowFunctionCallSyntaxForBlockEvaluation |
|
1721 | 816 |
|
817 |
" |
|
818 |
AllowFunctionCallSyntaxForBlockEvaluation := true |
|
819 |
" |
|
1634 | 820 |
! |
821 |
||
822 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
823 |
"experimental" |
|
824 |
||
825 |
AllowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
|
826 |
! |
|
827 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
828 |
allowHashAsBinarySelector |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
829 |
^ AllowHashAsBinarySelector |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
830 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
831 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
832 |
allowHashAsBinarySelector:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
833 |
AllowHashAsBinarySelector := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
834 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
835 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
836 |
self allowHashAsBinarySelector:true |
3396 | 837 |
self allowHashAsBinarySelector:false |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
838 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
839 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
840 |
|
1634 | 841 |
allowLiteralNameSpaceSymbols |
842 |
"return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
843 |
||
844 |
^ AllowLiteralNameSpaceSymbols |
|
845 |
! |
|
846 |
||
847 |
allowLiteralNameSpaceSymbols:aBoolean |
|
848 |
"controls, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
849 |
||
850 |
AllowLiteralNameSpaceSymbols := aBoolean |
|
851 |
! |
|
852 |
||
853 |
allowLocalVariableDeclarationWithInitializerExpression |
|
854 |
"experimental" |
|
855 |
||
856 |
^ AllowLocalVariableDeclarationWithInitializerExpression |
|
857 |
! |
|
858 |
||
859 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
860 |
"experimental" |
|
861 |
||
862 |
AllowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
|
863 |
! |
|
864 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
865 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
866 |
"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
|
867 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
868 |
^ AllowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
869 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
870 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
871 |
allowNationalCharactersInIdentifier:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
872 |
"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
|
873 |
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
|
874 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
875 |
AllowNationalCharactersInIdentifier := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
876 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
877 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
878 |
ParserFlags allowNationalCharactersInIdentifier:true |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
879 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
880 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
881 |
|
1634 | 882 |
allowOldStyleAssignment |
883 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
|
884 |
||
885 |
^ AllowOldStyleAssignment |
|
886 |
! |
|
887 |
||
888 |
allowOldStyleAssignment:aBoolean |
|
889 |
"this allows turning on/off recognition of underscore-assignment (pre ST-80v4 syntax). |
|
890 |
You must turn this off, if code with variables named '_' is to be filedIn" |
|
891 |
||
892 |
AllowOldStyleAssignment := aBoolean |
|
893 |
! |
|
894 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
895 |
allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
896 |
"return true, if periods are allowed in a symbol literal #foo.bar. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
897 |
Needed to parse some old ST80/Squeak code" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
898 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
899 |
^ AllowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
900 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
901 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
902 |
allowPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
903 |
"control, if periods are allowed in a symbol literal #foo.bar. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
904 |
Needed to parse some old ST80/Squeak code" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
905 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
906 |
AllowPeriodInSymbol := aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
907 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
908 |
" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
909 |
self allowPeriodInSymbol:true. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
910 |
self assert:( Parser parseExpression:' #foo.bar.baz. ' ) value == #'foo.bar.baz'. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
911 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
912 |
self allowPeriodInSymbol:false. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
913 |
self assert:( Parser parseExpression:' #foo.bar.baz. ' ) value == #'foo'. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
914 |
" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
915 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
916 |
|
3576 | 917 |
allowQualifiedNames |
918 |
"return true, if #{..} qualified names are allowed" |
|
919 |
||
920 |
^ AllowQualifiedNames |
|
921 |
! |
|
922 |
||
923 |
allowQualifiedNames:aBoolean |
|
924 |
"this allows turning on/off support for qualifiedNames #{ .., } as in vw3. |
|
925 |
If you want to fileIn vw3 or later classes, enable this with: |
|
926 |
Compiler allowQualifiedNames:true |
|
927 |
Notice, that qualified names are not really supported semantically |
|
928 |
(they are parsed, but treated like regular globals) |
|
929 |
" |
|
930 |
||
931 |
AllowQualifiedNames := aBoolean. |
|
932 |
||
933 |
" |
|
934 |
self allowQualifiedNames:true |
|
935 |
self allowQualifiedNames:false |
|
936 |
" |
|
937 |
! |
|
1634 | 938 |
|
939 |
allowReservedWordsAsSelectors |
|
940 |
"return true, if self, super, thisContext, nil, true and false are to be allowed |
|
941 |
as unary message selectors." |
|
942 |
||
943 |
^ AllowReservedWordsAsSelectors ? false |
|
944 |
! |
|
945 |
||
946 |
allowReservedWordsAsSelectors:aBoolean |
|
947 |
"enable/disable, if self, super, thisContext, nil, true and false are to be allowed |
|
948 |
as unary message selectors." |
|
949 |
||
950 |
AllowReservedWordsAsSelectors := aBoolean. |
|
951 |
||
952 |
" |
|
953 |
self allowReservedWordsAsSelectors:true |
|
954 |
self allowReservedWordsAsSelectors:false |
|
955 |
" |
|
956 |
! |
|
957 |
||
1702 | 958 |
allowSTVExtensions |
959 |
"return true, if support for ST/V syntax extensions is enabled." |
|
960 |
||
961 |
^ AllowSTVExtensions |
|
962 |
! |
|
963 |
||
964 |
allowSTVExtensions:aBoolean |
|
965 |
"this allows turning on/off support for ST/V extensions: |
|
966 |
If you want to fileIn ST/V classes, enable this with: |
|
3396 | 967 |
Compiler allowSTVComputedArrays:true" |
1702 | 968 |
|
969 |
AllowSTVExtensions := aBoolean. |
|
970 |
||
971 |
" |
|
1704 | 972 |
ParserFlags allowSTVExtensions:true |
973 |
ParserFlags allowSTVExtensions:false |
|
1702 | 974 |
" |
975 |
! |
|
976 |
||
1700 | 977 |
allowSTVPrimitives |
978 |
"return true, if support for ST/V primitives is enabled." |
|
979 |
||
980 |
^ AllowSTVPrimitives |
|
981 |
! |
|
982 |
||
983 |
allowSTVPrimitives:aBoolean |
|
984 |
"this allows turning on/off support for ST/V primitives" |
|
985 |
||
986 |
AllowSTVPrimitives := aBoolean |
|
1704 | 987 |
|
988 |
" |
|
989 |
ParserFlags allowSTVPrimitives:true |
|
990 |
" |
|
1700 | 991 |
! |
992 |
||
2984 | 993 |
allowSTXDelimiterComments |
3455 | 994 |
"token delimited comments; |
995 |
these are multiline comments of the form: |
|
3519
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
996 |
''>>TOKEN |
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
997 |
... anything, including double quotes |
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
998 |
TOKEN>>'' |
3455 | 999 |
(the '' being a double quote in the above) |
1000 |
Such comments are especially useful to comment pieces of sample code, which may |
|
1001 |
contain another comment in it, but you don't want to make them all EOL comments |
|
1002 |
(which are an ST/X speciality also, by the way). |
|
1003 |
Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
|
1004 |
" |
|
1005 |
||
2984 | 1006 |
^ AllowSTXDelimiterComments |
1007 |
! |
|
1008 |
||
1009 |
allowSTXDelimiterComments:aBoolean |
|
3455 | 1010 |
"enable token delimited comments; |
1011 |
these are multiline comments of the form: |
|
3519
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
1012 |
''>>TOKEN |
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
1013 |
... anything, including double quotes |
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
1014 |
TOKEN>>'' |
3455 | 1015 |
(the '' being a double quote in the above) |
1016 |
Such comments are especially useful to comment pieces of sample code, which may |
|
1017 |
contain another comment in it, but you don't want to make them all EOL comments |
|
1018 |
(which are an ST/X speciality also, by the way). |
|
1019 |
Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
|
1020 |
" |
|
1021 |
||
2984 | 1022 |
AllowSTXDelimiterComments := aBoolean. |
1023 |
||
1024 |
" |
|
1025 |
self allowSTXDelimiterComments:true |
|
1026 |
self allowSTXDelimiterComments:false |
|
1027 |
" |
|
1028 |
! |
|
1029 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1030 |
allowSTXEOLComments |
3946 | 1031 |
"are ST/X end-of-line comments allowed?" |
1032 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1033 |
^ AllowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1034 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1035 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1036 |
allowSTXEOLComments:aBoolean |
3946 | 1037 |
"are ST/X end-of-line comments allowed?" |
1038 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1039 |
AllowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1040 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1041 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1042 |
self allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1043 |
self allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1044 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1045 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1046 |
|
3945 | 1047 |
allowSTXExtendedArrayLiterals |
3946 | 1048 |
"are scheme-style typed literal arrays allowed?" |
1049 |
||
3945 | 1050 |
^ AllowSTXExtendedArrayLiterals ? false |
1051 |
! |
|
1052 |
||
1053 |
allowSTXExtendedArrayLiterals:aBoolean |
|
3946 | 1054 |
"are scheme-style typed literal arrays allowed?" |
1055 |
||
3945 | 1056 |
AllowSTXExtendedArrayLiterals := aBoolean. |
1057 |
||
1058 |
" |
|
1059 |
self allowSTXExtendedArrayLiterals:true |
|
1060 |
self allowSTXExtendedArrayLiterals:false |
|
1061 |
" |
|
1062 |
! |
|
1063 |
||
3576 | 1064 |
allowSqueakExtensions |
1065 |
"return true, if support for squeak extensions |
|
1066 |
computed arrays { .., } |
|
1067 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
1068 |
is enabled." |
|
1069 |
||
1070 |
^ AllowSqueakExtensions |
|
1071 |
! |
|
1072 |
||
1073 |
allowSqueakExtensions:aBoolean |
|
1074 |
"this allows turning on/off support for squeak extensions: |
|
1075 |
computed arrays { .., } |
|
1076 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
1077 |
||
1078 |
If you want to fileIn Squeak classes, enable this with: |
|
1079 |
Compiler allowSqueakComputedArrays:true" |
|
1080 |
||
1081 |
AllowSqueakExtensions := aBoolean. |
|
1082 |
||
1083 |
" |
|
1084 |
self allowSqueakExtensions:true |
|
1085 |
self allowSqueakExtensions:false |
|
1086 |
" |
|
1087 |
! |
|
1634 | 1088 |
|
1689 | 1089 |
allowSqueakPrimitives |
1090 |
"return true, if support for squeak primitives is enabled." |
|
1091 |
||
1092 |
^ AllowSqueakPrimitives |
|
1093 |
! |
|
1094 |
||
1095 |
allowSqueakPrimitives:aBoolean |
|
1096 |
"this allows turning on/off support for squeak primitives" |
|
1097 |
||
1098 |
AllowSqueakPrimitives := aBoolean |
|
1099 |
! |
|
1100 |
||
1634 | 1101 |
allowUnderscoreInIdentifier |
1102 |
"return true, if underscores are allowed in identifiers" |
|
1103 |
||
1104 |
^ AllowUnderscoreInIdentifier |
|
1105 |
! |
|
1106 |
||
1107 |
allowUnderscoreInIdentifier:aBoolean |
|
1108 |
"this allows turning on/off underscores in identifiers. |
|
1109 |
If turned off (the default), underscores are not allowed in identifiers, |
|
1110 |
but instead scanned as assignment character (old ST/80 syntax). |
|
1111 |
If turned on, underscores are in identifiers are allowed, while extra |
|
1112 |
underscores are still scanned as assignment. |
|
3396 | 1113 |
If you have to fileIn old VW-Vsn2.x classes, |
1634 | 1114 |
turn them off with: |
3396 | 1115 |
Compiler allowUnderscoreInIdentifiers:false" |
1634 | 1116 |
|
1117 |
AllowUnderscoreInIdentifier := aBoolean. |
|
1118 |
||
1119 |
"Modified: 7.9.1997 / 01:35:19 / cg" |
|
1655 | 1120 |
! |
1121 |
||
2310 | 1122 |
allowUnicodeCharacters |
1123 |
^ AllowUnicodeCharacters |
|
1124 |
! |
|
1125 |
||
1126 |
allowUnicodeCharacters:aBoolean |
|
1127 |
AllowUnicodeCharacters := aBoolean. |
|
1128 |
! |
|
1129 |
||
2307 | 1130 |
allowUnicodeStrings |
1131 |
^ AllowUnicodeStrings |
|
1132 |
! |
|
1133 |
||
1134 |
allowUnicodeStrings:aBoolean |
|
1135 |
AllowUnicodeStrings := aBoolean. |
|
1136 |
! |
|
1137 |
||
1655 | 1138 |
allowVisualAgeESSymbolLiterals |
1139 |
"return true, if ##symbols are allowed (treated like symbols)" |
|
1140 |
||
1141 |
^ AllowVisualAgeESSymbolLiterals |
|
1142 |
! |
|
1143 |
||
1144 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
1145 |
"if on, visualAge's ##symbols are allowed (treated like symbols)" |
|
1146 |
||
1147 |
AllowVisualAgeESSymbolLiterals := aBoolean. |
|
1689 | 1148 |
! |
1149 |
||
1150 |
allowVisualAgePrimitives |
|
1151 |
"return true, if support for V'Age primitives is enabled." |
|
1152 |
||
3396 | 1153 |
^ AllowVisualAgePrimitives |
2747 | 1154 |
|
1155 |
" |
|
1156 |
AllowVisualAgePrimitives := true |
|
1157 |
AllowVisualAgePrimitives := false |
|
1158 |
" |
|
1159 |
||
1160 |
"Modified (comment): / 18-10-2011 / 16:49:12 / cg" |
|
1689 | 1161 |
! |
1162 |
||
1163 |
allowVisualAgePrimitives:aBoolean |
|
1164 |
"this allows turning on/off support for V'Age primitives" |
|
1165 |
||
1166 |
AllowVisualAgePrimitives := aBoolean |
|
1773 | 1167 |
! |
1168 |
||
1169 |
allowVisualWorksMethodAnnotations |
|
1170 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
1171 |
||
1172 |
^ AllowVisualWorksMethodAnnotations |
|
1173 |
||
1174 |
"Created: / 07-07-2006 / 15:49:32 / cg" |
|
1175 |
! |
|
1176 |
||
1177 |
allowVisualWorksMethodAnnotations:aBoolean |
|
1178 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
1179 |
||
1180 |
AllowVisualWorksMethodAnnotations := aBoolean |
|
1181 |
||
1182 |
"Created: / 07-07-2006 / 15:49:27 / cg" |
|
3220 | 1183 |
! |
1184 |
||
1185 |
warnAssignmentToBlockArgument |
|
1186 |
^ WarnAssignmentToBlockArgument |
|
1187 |
! |
|
1188 |
||
1189 |
warnAssignmentToBlockArgument:aBoolean |
|
1190 |
WarnAssignmentToBlockArgument := aBoolean |
|
1191 |
! |
|
1192 |
||
1193 |
warnAssignmentToMethodArgument |
|
1194 |
^ WarnAssignmentToMethodArgument |
|
1195 |
! |
|
1196 |
||
1197 |
warnAssignmentToMethodArgument:aBoolean |
|
1198 |
WarnAssignmentToMethodArgument := aBoolean |
|
1199 |
! |
|
1200 |
||
1201 |
warnAssignmentToPoolVariable |
|
1202 |
^ WarnAssignmentToPoolVariable |
|
1203 |
! |
|
1204 |
||
1205 |
warnAssignmentToPoolVariable:aBoolean |
|
1206 |
WarnAssignmentToPoolVariable := aBoolean |
|
1634 | 1207 |
! ! |
1208 |
||
1209 |
!ParserFlags class methodsFor:'accessing-warning-control'! |
|
1210 |
||
1652 | 1211 |
warnAboutBadComments |
1212 |
"controls generation of warning messages about empty comments" |
|
3396 | 1213 |
|
1652 | 1214 |
^ WarnAboutBadComments |
1215 |
! |
|
1216 |
||
1217 |
warnAboutBadComments:aBoolean |
|
1218 |
"controls generation of warning messages about empty comments" |
|
3396 | 1219 |
|
1652 | 1220 |
WarnAboutBadComments := aBoolean |
1221 |
! |
|
1222 |
||
1811 | 1223 |
warnAboutNonLowercaseLocalVariableNames |
1740 | 1224 |
"controls generation of warning messages about wrong variable names" |
3396 | 1225 |
|
1811 | 1226 |
^ WarnAboutNonLowercaseLocalVariableNames |
1740 | 1227 |
! |
1228 |
||
3396 | 1229 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
1740 | 1230 |
"controls generation of warning messages about wrong variable names" |
3396 | 1231 |
|
1811 | 1232 |
WarnAboutNonLowercaseLocalVariableNames := aBoolean |
1740 | 1233 |
! |
1234 |
||
3396 | 1235 |
warnAboutPeriodInSymbol |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1236 |
^ WarnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1237 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1238 |
|
3396 | 1239 |
warnAboutPeriodInSymbol:aBoolean |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1240 |
WarnAboutPeriodInSymbol := aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1241 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1242 |
|
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1243 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1244 |
^ WarnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1245 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1246 |
"Created: / 16-11-2006 / 14:31:52 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1247 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1248 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1249 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1250 |
WarnAboutPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1251 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1252 |
"Created: / 16-11-2006 / 14:31:57 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1253 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1254 |
|
2121 | 1255 |
warnAboutPossiblyUnimplementedSelectors |
1256 |
^ WarnAboutPossiblyUnimplementedSelectors |
|
1257 |
! |
|
1258 |
||
1259 |
warnAboutPossiblyUnimplementedSelectors:aBoolean |
|
1260 |
WarnAboutPossiblyUnimplementedSelectors := aBoolean |
|
1261 |
! |
|
1262 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1263 |
warnAboutReferenceToPrivateClass |
3396 | 1264 |
"controls generation of warning messages when a private class is referenced" |
1265 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1266 |
^ WarnAboutReferenceToPrivateClass |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1267 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1268 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1269 |
warnAboutReferenceToPrivateClass:aBoolean |
3396 | 1270 |
"controls generation of warning messages when a private class is referenced" |
1271 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1272 |
WarnAboutReferenceToPrivateClass := aBoolean |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1273 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1274 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1275 |
warnAboutShortLocalVariableNames |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1276 |
"controls generation of warning messages about short variable names" |
3396 | 1277 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1278 |
^ WarnAboutShortLocalVariableNames |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1279 |
! |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1280 |
|
3396 | 1281 |
warnAboutShortLocalVariableNames:aBoolean |
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1282 |
"controls generation of warning messages about short variable names" |
3396 | 1283 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1284 |
WarnAboutShortLocalVariableNames := aBoolean |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1285 |
! |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1286 |
|
2739 | 1287 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1288 |
"things like '\c:foo' instead of '\\c:foo' " |
|
3396 | 1289 |
|
2739 | 1290 |
^ WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1291 |
||
1292 |
"Created: / 04-10-2011 / 19:54:57 / cg" |
|
1293 |
! |
|
1294 |
||
1295 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
|
1296 |
"things like '\c:foo' instead of '\\c:foo' " |
|
3396 | 1297 |
|
2739 | 1298 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean |
1299 |
||
1300 |
"Created: / 04-10-2011 / 19:54:42 / cg" |
|
1301 |
! |
|
1302 |
||
3396 | 1303 |
warnAboutVariableNameConventions |
1634 | 1304 |
"controls generation of warning messages about wrong variable names" |
3396 | 1305 |
|
1634 | 1306 |
^ WarnAboutVariableNameConventions |
1307 |
! |
|
1308 |
||
3396 | 1309 |
warnAboutVariableNameConventions:aBoolean |
1634 | 1310 |
"controls generation of warning messages about wrong variable names" |
3396 | 1311 |
|
1634 | 1312 |
WarnAboutVariableNameConventions := aBoolean |
1313 |
! |
|
1314 |
||
1315 |
warnAboutWrongVariableNames |
|
1316 |
"controls generation of warning messages about wrong variable names" |
|
3396 | 1317 |
|
1634 | 1318 |
^ WarnAboutWrongVariableNames |
1319 |
! |
|
1320 |
||
1321 |
warnAboutWrongVariableNames:aBoolean |
|
1322 |
"controls generation of warning messages about wrong variable names" |
|
3396 | 1323 |
|
1634 | 1324 |
WarnAboutWrongVariableNames := aBoolean |
1325 |
! |
|
1326 |
||
1327 |
warnCommonMistakes |
|
1328 |
"return true, if common beginners mistakes are to be warned about" |
|
1329 |
||
1754 | 1330 |
^ WarnCommonMistakes |
1634 | 1331 |
! |
1332 |
||
1333 |
warnCommonMistakes:aBoolean |
|
1334 |
"this allows turning on/off warnings about common beginners mistakes. |
|
1335 |
Those are not really errors in the strict sense, but often lead to |
|
1336 |
run time errors later. |
|
1337 |
Examples are: expr or:expr2, where expr2 is not a block. |
|
1338 |
If you get bored by those warnings, turn them off by adding |
|
1339 |
a line as: |
|
3396 | 1340 |
ParserFlags warnCommonMistakes:false |
1634 | 1341 |
in your 'private.rc' file" |
1342 |
||
1343 |
WarnCommonMistakes := aBoolean |
|
1902 | 1344 |
|
1345 |
"Modified: / 05-09-2006 / 11:46:26 / cg" |
|
1634 | 1346 |
! |
1347 |
||
1348 |
warnDollarInIdentifier |
|
1349 |
"return true, if $-characters in identifiers are to be warned about" |
|
1350 |
||
1351 |
^ Warnings and:[WarnDollarInIdentifier] |
|
1352 |
||
1353 |
"Created: 7.9.1997 / 01:36:17 / cg" |
|
1354 |
! |
|
1355 |
||
1356 |
warnDollarInIdentifier:aBoolean |
|
1357 |
"this allows turning on/off warnings about $-characters in identifiers. |
|
1358 |
You may find those warnings useful, to make certain that your code |
|
1359 |
is portable to other smalltalk versions, which do not allow this |
|
1360 |
(i.e. VW releases 2.x and maybe others). |
|
1361 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
1362 |
If you get bored by those warnings, turn them off by adding |
|
1363 |
a line as: |
|
3396 | 1364 |
ParserFlags warnDollarInIdentifier:false |
1634 | 1365 |
in your 'private.rc' file" |
1366 |
||
1367 |
WarnDollarInIdentifier := aBoolean |
|
1368 |
||
1902 | 1369 |
"Created: / 07-09-1997 / 01:37:42 / cg" |
1370 |
"Modified: / 05-09-2006 / 11:46:23 / cg" |
|
1634 | 1371 |
! |
1372 |
||
1682 | 1373 |
warnHiddenVariables |
1374 |
"controls generation of warning messages about hiding variables by locals" |
|
3396 | 1375 |
|
1682 | 1376 |
^ WarnHiddenVariables |
1377 |
! |
|
1378 |
||
1379 |
warnHiddenVariables:aBoolean |
|
1380 |
"controls generation of warning messages about hiding variables by locals" |
|
1381 |
||
1382 |
WarnHiddenVariables := aBoolean |
|
1383 |
! |
|
1384 |
||
1385 |
warnInconsistentReturnValues |
|
1386 |
"return true, if compiler should warn about inconsitent (boolean / non-boolean) |
|
1387 |
return values" |
|
1388 |
||
1389 |
^ WarnInconsistentReturnValues |
|
1390 |
! |
|
1391 |
||
1392 |
warnInconsistentReturnValues:aBoolean |
|
1393 |
"constrols if the compiler should warn about inconsitent (boolean / non-boolean) |
|
1394 |
return values" |
|
1395 |
||
1396 |
WarnInconsistentReturnValues := aBoolean |
|
1397 |
! |
|
1398 |
||
1634 | 1399 |
warnOldStyleAssignment |
1400 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be warned about" |
|
1401 |
||
1402 |
^ Warnings and:[WarnOldStyleAssignment] |
|
1403 |
! |
|
1404 |
||
1405 |
warnOldStyleAssignment:aBoolean |
|
1406 |
"this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
|
1407 |
If you get bored by those warnings, turn them off by adding |
|
1408 |
a line as: |
|
3396 | 1409 |
ParserFlags warnOldStyleAssignment:false |
1634 | 1410 |
in your 'private.rc' file" |
1411 |
||
1412 |
WarnOldStyleAssignment := aBoolean |
|
1902 | 1413 |
|
1414 |
"Modified: / 05-09-2006 / 11:46:17 / cg" |
|
1634 | 1415 |
! |
1416 |
||
2787 | 1417 |
warnPlausibilityChecks |
1418 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
1419 |
||
1420 |
^ WarnPlausibilityChecks |
|
1421 |
||
1422 |
"Created: / 19-01-2012 / 10:38:20 / cg" |
|
1423 |
! |
|
1424 |
||
1425 |
warnPlausibilityChecks:aBoolean |
|
1426 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
1427 |
||
1428 |
WarnPlausibilityChecks := aBoolean |
|
1429 |
||
1430 |
"Created: / 19-01-2012 / 10:38:39 / cg" |
|
1431 |
! |
|
1432 |
||
1634 | 1433 |
warnPossibleIncompatibilities |
1434 |
"return true, if possible incompatibilities (with other ST systems) |
|
1435 |
are to be warned about" |
|
1436 |
||
1437 |
^ Warnings and:[WarnPossibleIncompatibilities] |
|
1438 |
||
1439 |
"Modified: 23.5.1997 / 12:02:02 / cg" |
|
1440 |
! |
|
1441 |
||
1442 |
warnPossibleIncompatibilities:aBoolean |
|
1443 |
"this turns warnings about possible incompatibilities (with other ST systems) |
|
1444 |
on or off. |
|
1445 |
If you get bored by those warnings, turn them off by adding |
|
1446 |
a line as: |
|
3396 | 1447 |
ParserFlags warnPossibleIncompatibilities:false |
1634 | 1448 |
in your 'private.rc' file." |
1449 |
||
1450 |
WarnPossibleIncompatibilities := aBoolean |
|
1451 |
||
1902 | 1452 |
"Created: / 23-05-1997 / 12:02:45 / cg" |
1453 |
"Modified: / 05-09-2006 / 11:46:14 / cg" |
|
1634 | 1454 |
! |
1455 |
||
1456 |
warnSTXSpecials |
|
1457 |
"return true, if ST/X specials are to be warned about" |
|
1458 |
||
1459 |
^ Warnings and:[WarnSTXSpecials] |
|
1460 |
! |
|
1461 |
||
1462 |
warnSTXSpecials:aBoolean |
|
1463 |
"this allows turning on/off warnings about stx specials. |
|
1464 |
If you get bored by those warnings, turn them off by adding |
|
1465 |
a line as: |
|
3396 | 1466 |
ParserFlags warnSTXSpecials:false |
1634 | 1467 |
in your 'private.rc' file" |
1468 |
||
1469 |
WarnSTXSpecials := aBoolean |
|
1902 | 1470 |
|
1471 |
"Modified: / 05-09-2006 / 11:46:11 / cg" |
|
1634 | 1472 |
! |
1473 |
||
1474 |
warnUnderscoreInIdentifier |
|
1475 |
"return true, if underscores in identifiers are to be warned about" |
|
1476 |
||
1477 |
^ Warnings and:[WarnUnderscoreInIdentifier] |
|
1478 |
! |
|
1479 |
||
1480 |
warnUnderscoreInIdentifier:aBoolean |
|
1481 |
"this allows turning on/off warnings about underscores in identifiers. |
|
1482 |
You may find those warnings useful, to make certain that your code |
|
1483 |
is portable to other smalltalk versions, which do not allow this |
|
1484 |
(i.e. VW releases 2.x). |
|
1485 |
If you get bored by those warnings, turn them off by adding |
|
1486 |
a line as: |
|
3396 | 1487 |
ParserFlags warnUnderscoreInIdentifier:false |
1634 | 1488 |
in your 'private.rc' file" |
1489 |
||
1490 |
WarnUnderscoreInIdentifier := aBoolean |
|
1491 |
||
1902 | 1492 |
"Modified: / 05-09-2006 / 11:46:08 / cg" |
1634 | 1493 |
! |
1494 |
||
1495 |
warnUnusedVars |
|
1496 |
"controls generation of warning messages about unued method variables" |
|
1497 |
||
1498 |
^ WarnUnusedVars |
|
1499 |
! |
|
1500 |
||
1501 |
warnUnusedVars:aBoolean |
|
1502 |
"controls generation of warning messages about unued method variables" |
|
1503 |
||
1504 |
WarnUnusedVars := aBoolean |
|
1505 |
! |
|
1506 |
||
1507 |
warnings |
|
1508 |
"return true, if any warnings are to be shown" |
|
1509 |
||
1510 |
^ Warnings |
|
1511 |
! |
|
1512 |
||
1513 |
warnings:aBoolean |
|
1514 |
"this allows turning on/off all warnings; the default is on. |
|
1515 |
You can turn off warnings in your 'private.rc' file with |
|
3396 | 1516 |
ParserFlags warnings:false |
1634 | 1517 |
" |
1518 |
||
1519 |
Warnings := aBoolean |
|
1520 |
||
1902 | 1521 |
" |
1522 |
ParserFlags warnings |
|
1523 |
ParserFlags warnings:true |
|
1524 |
ParserFlags warnings:false |
|
1525 |
" |
|
1526 |
||
1527 |
"Modified: / 05-09-2006 / 11:46:47 / cg" |
|
1634 | 1528 |
! ! |
1529 |
||
1530 |
!ParserFlags class methodsFor:'class initialization'! |
|
1531 |
||
3576 | 1532 |
initialize |
1533 |
|executablePath| |
|
1534 |
||
1535 |
Warnings := true. |
|
1536 |
WarnUndeclared := true. |
|
1537 |
WarnUnusedVars := true. |
|
1538 |
WarnSTXSpecials := false. |
|
1539 |
WarnST80Directives := false. |
|
1540 |
WarnAboutWrongVariableNames := true. |
|
1541 |
WarnAboutVariableNameConventions := true. |
|
1542 |
WarnAboutBadComments := true. |
|
1543 |
WarnUnderscoreInIdentifier := false. |
|
1544 |
WarnDollarInIdentifier := true. |
|
1545 |
WarnOldStyleAssignment := true. |
|
1546 |
WarnCommonMistakes := true. |
|
1547 |
WarnPossibleIncompatibilities := false. |
|
1548 |
WarnHiddenVariables := true. |
|
1549 |
WarnInconsistentReturnValues := true. |
|
1550 |
WarnAboutNonLowercaseLocalVariableNames := true. |
|
1551 |
WarnAboutShortLocalVariableNames := false. |
|
1552 |
WarnAboutPossibleSTCCompilationProblems := true. |
|
1553 |
WarnAboutReferenceToPrivateClass := true. |
|
1554 |
WarnAboutPossiblyUnimplementedSelectors := true. |
|
1555 |
WarnAboutPeriodInSymbol := true. |
|
1556 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := false. |
|
1557 |
WarnPlausibilityChecks := true. |
|
1558 |
WarnAssignmentToBlockArgument := true. |
|
1559 |
WarnAssignmentToMethodArgument := true. |
|
1560 |
WarnAssignmentToPoolVariable := true. |
|
1561 |
||
1562 |
AllowReservedWordsAsSelectors := false. |
|
1563 |
AllowUnderscoreInIdentifier := true. |
|
1564 |
AllowDollarInIdentifier := false. "/ st80-vms dollars in identifiers |
|
1565 |
AllowOldStyleAssignment := true. "/ st80 underscore as assignment |
|
1566 |
AllowDolphinExtensions := false. "/ dolphin computed literal |
|
1567 |
AllowQualifiedNames := false. "/ vw3 qualified names |
|
1568 |
AllowExtendedBinarySelectors := false. "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.) |
|
1569 |
AllowCaretAsBinop := false. "/ too dangerous |
|
1570 |
AllowLiteralNameSpaceSymbols := true. "/ st/x literal nameSpace-symbols (#foo::bar) |
|
1571 |
AllowArrayIndexSyntaxExtension := false. |
|
1572 |
AllowFunctionCallSyntaxForBlockEvaluation := false. |
|
1573 |
AllowLocalVariableDeclarationWithInitializerExpression := false. |
|
1574 |
AllowDomainVariables := false. |
|
1575 |
AllowArrayIndexSyntaxExtension := false. |
|
1576 |
AllowReservedWordsAsSelectors := true. |
|
1577 |
AllowVariableReferences := false. |
|
1578 |
AllowLazyValueExtension := false. |
|
1579 |
AllowFixedPointLiterals := true "false". |
|
1580 |
AllowExtendedSTXSyntax := false. |
|
1581 |
AllowVisualAgeESSymbolLiterals := false. |
|
1582 |
AllowExtensionsToPrivateClasses := true. |
|
1583 |
AllowVisualAgePrimitives := false. |
|
1584 |
AllowSqueakExtensions := true. "/ squeak computed array |
|
1585 |
AllowSqueakPrimitives := false. |
|
1586 |
AllowSTVPrimitives := false. "/ number-sign syntax |
|
1587 |
AllowSTVExtensions := false. |
|
1588 |
AllowNationalCharactersInIdentifier := false. |
|
1589 |
AllowHashAsBinarySelector := true. |
|
1590 |
AllowSTXEOLComments := true. |
|
1591 |
AllowSTXDelimiterComments := true. "/ until stc and RBScanner support it also |
|
1592 |
AllowVisualWorksMethodAnnotations := false. |
|
1593 |
AllowPossibleSTCCompilationProblems := true. "/ must be true, to allow fileIn!! |
|
1594 |
AllowEmptyStatements := false. |
|
1595 |
AllowPeriodInSymbol := false. |
|
1596 |
"/ these are only used by the new compiler |
|
1597 |
AllowUnicodeStrings := false. |
|
1598 |
AllowUnicodeCharacters := false. |
|
1599 |
AllowCharacterEscapes := false. |
|
1600 |
AllowStringEscapes := false. |
|
1601 |
AllowAssignmentToBlockArgument := false. |
|
1602 |
AllowAssignmentToMethodArgument := false. |
|
1603 |
AllowAssignmentToPoolVariable := false. |
|
1604 |
"/ AllowAssignmentToPoolVariable := true. |
|
1605 |
||
1606 |
ArraysAreImmutable := false. "/ still care for ST-80 compatibility |
|
1607 |
StringsAreImmutable := false. "/ still care for ST-80 compatibility |
|
1608 |
"/ ArraysAreImmutable := true. "/ do not care for ST-80 compatibility |
|
1609 |
"/ StringsAreImmutable := true. "/ do not care for ST-80 compatibility |
|
1610 |
ImplicitSelfSends := false. |
|
1611 |
||
1612 |
STCKeepCIntermediate := false. |
|
1613 |
STCKeepOIntermediate := false. |
|
1614 |
STCKeepSTIntermediate := false. |
|
1615 |
STCCompilation := #default. |
|
1616 |
||
1617 |
DefineForBorlandC := '__BORLANDC__'. |
|
1618 |
DefineForVisualC := '__VISUALC__'. |
|
1619 |
DefineForMSC := '__MSC__'. |
|
1620 |
DefineForGNUC := '__GNUC__'. |
|
1621 |
DefineForMINGW := '__MINGW__'. |
|
1622 |
DefineForMINGW32 := '__MINGW32__'. |
|
1623 |
DefineForMINGW64 := '__MINGW64__'. |
|
3945 | 1624 |
DefineForCLANG := '__CLANG__'. |
3576 | 1625 |
|
1626 |
(executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[ |
|
3945 | 1627 |
executablePath := executablePath asFilename directory. |
1628 |
(((executablePath / 'include') exists and:[(executablePath / 'stc') exists]) |
|
1629 |
or:[ |
|
1630 |
executablePath := executablePath directory. |
|
1631 |
((executablePath / 'include') exists and:[(executablePath / 'stc') exists]) |
|
1632 |
or:[ |
|
1633 |
executablePath := executablePath directory. |
|
1634 |
((executablePath / 'include') exists and:[(executablePath / 'stc') exists]) |
|
1635 |
] |
|
1636 |
] |
|
1637 |
) ifTrue:[ |
|
1638 |
self initializeSTCFlagsForTopDirectory: executablePath. |
|
1639 |
] |
|
3576 | 1640 |
]. |
1641 |
||
1642 |
" |
|
1643 |
ParserFlags initialize |
|
1644 |
" |
|
1645 |
||
1646 |
"Modified: / 09-08-2006 / 18:47:18 / fm" |
|
1647 |
"Modified: / 31-01-2012 / 12:06:32 / cg" |
|
1648 |
! |
|
1649 |
||
1650 |
initializeSTCFlagsForTopDirectory:topDirArg |
|
1651 |
"topDirArg must be the stx directory (where stc directory with stc-executable is found) |
|
1652 |
notice: for now, can only initialize for borland+windows or linux; |
|
1653 |
visualC setup still fails." |
|
1654 |
||
3719 | 1655 |
|topDir topDirName vcTop sdkTop bccTop mingwTop |
3945 | 1656 |
borlandDir useBorlandC useVisualC useMingw32 useMingw64 |
3719 | 1657 |
programFiles archArg picArg| |
3576 | 1658 |
|
1659 |
topDir := topDirArg. |
|
1660 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3960 | 1661 |
topDirArg isString ifTrue:[ |
1662 |
topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg. |
|
1663 |
] |
|
3576 | 1664 |
]. |
1665 |
topDir := topDir asFilename. |
|
1666 |
topDirName := topDir name. |
|
1667 |
||
1668 |
"/ if in the development directory, use ./modules |
|
1669 |
Smalltalk isSmalltalkDevelopmentSystem ifTrue:[ |
|
3960 | 1670 |
STCModulePath := 'modules'. |
3576 | 1671 |
] ifFalse:[ |
3960 | 1672 |
STCModulePath := Filename tempDirectory constructString:'modules'. |
3576 | 1673 |
]. |
1674 |
||
1675 |
(topDir construct:'stc') exists ifFalse:[ |
|
3960 | 1676 |
('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR. |
1677 |
'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR. |
|
1678 |
STCCompilation := #never. |
|
3576 | 1679 |
]. |
1680 |
||
1681 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3960 | 1682 |
useBorlandC := useVisualC := useMingw32 := useMingw64 := false. |
1683 |
programFiles := OperatingSystem getEnvironment:'ProgramFiles'. |
|
1684 |
programFiles isEmptyOrNil ifTrue:[ programFiles := 'C:\Program Files' ]. |
|
1685 |
||
1686 |
STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'. |
|
1687 |
||
1688 |
ExternalAddress pointerSize == 4 ifFalse:[ |
|
1689 |
bccTop := nil |
|
1690 |
] ifTrue:[ |
|
1691 |
(bccTop := BCCTop) isNil ifTrue:[ |
|
1692 |
borlandDir := OperatingSystem getEnvironment:'BCCDIR'. |
|
1693 |
borlandDir isEmptyOrNil ifTrue:[ borlandDir := 'C:\Borland\bcc55' ]. |
|
1694 |
bccTop := { |
|
1695 |
(borlandDir) . |
|
1696 |
(programFiles , '\Borland\bcc55') . |
|
1697 |
(programFiles , '\bcc55') . |
|
1698 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] |
|
1699 |
ifNone:nil. |
|
1700 |
]. |
|
1701 |
]. |
|
1702 |
||
1703 |
STCCompilationDefines := '-DWIN32'. |
|
1704 |
||
1705 |
(bccTop notNil and:[bccTop asFilename exists]) ifTrue:[ |
|
1706 |
STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'. |
|
1707 |
LibDirectory := topDirName,'\lib\bc'. |
|
1708 |
LinkArgs := '-L',topDirName,'\lib\bc'. |
|
1709 |
LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'. |
|
1710 |
CCPath := 'bcc32'. |
|
1711 |
MakeCommand := 'bmake'. |
|
1712 |
LinkCommand := 'ilink32'. |
|
1713 |
CCCompilationOptions := '-w-'. |
|
1714 |
useBorlandC := true. |
|
1715 |
] ifFalse:[ |
|
1716 |
ExternalAddress pointerSize == 4 ifFalse:[ |
|
1717 |
vcTop := nil. |
|
1718 |
] ifTrue:[ |
|
1719 |
(vcTop := VCTop) isNil ifTrue:[ |
|
1720 |
vcTop := { |
|
1721 |
(programFiles,'\Microsoft Visual Studio 13.0\VC') . |
|
1722 |
(programFiles,'\Microsoft Visual Studio 12.0\VC') . |
|
1723 |
(programFiles,'\Microsoft Visual Studio 11.0\VC') . |
|
1724 |
(programFiles,'\Microsoft Visual Studio 10.0\VC') . |
|
1725 |
(programFiles,'\Microsoft Visual Studio 9.0\VC' ) . |
|
1726 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] |
|
1727 |
ifNone:nil. |
|
1728 |
]. |
|
1729 |
]. |
|
1730 |
(vcTop notNil and:[vcTop asFilename exists]) ifTrue:[ |
|
1731 |
useVisualC := true. |
|
1732 |
STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'. |
|
1733 |
||
1734 |
(sdkTop := SDKTop) isNil ifTrue:[ |
|
1735 |
sdkTop := { |
|
1736 |
(programFiles,'\Microsoft SDKs\Windows\v9.0A') . |
|
1737 |
(programFiles,'\Microsoft SDKs\Windows\v8.0A') . |
|
1738 |
(programFiles,'\Microsoft SDKs\Windows\v8.0A') . |
|
1739 |
(programFiles,'\Microsoft SDKs\Windows\v7.0A') . |
|
1740 |
(programFiles,'\Microsoft SDKs\Windows\v6.0A') . |
|
1741 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil. |
|
1742 |
]. |
|
1743 |
(sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[ |
|
1744 |
STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'. |
|
1745 |
]. |
|
1746 |
LibDirectory := topDirName,'\lib\vc'. |
|
1747 |
LinkArgs := '-L',topDirName,'\lib\vc'. |
|
1748 |
LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
|
1749 |
CCPath := vcTop,'\bin\cl.exe'. |
|
1750 |
LinkCommand := 'ilink32'. |
|
1751 |
MakeCommand := 'vcmake'. |
|
1752 |
CCCompilationOptions := '/nologo /ZI /w /GF /EHsc /FR.\objvc\'. |
|
1753 |
] ifFalse:[ |
|
1754 |
"/ add definitions for lcc, mingc etc. |
|
1755 |
"/ STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'. |
|
1756 |
ExternalAddress pointerSize == 4 ifTrue:[ |
|
1757 |
(mingwTop := MingwTop) isNil ifTrue:[ |
|
1758 |
mingwTop := { |
|
1759 |
(programFiles,'\mingw') . |
|
1760 |
(programFiles,'\mingw') . |
|
1761 |
('c:\mingw32') . |
|
1762 |
('c:\mingw') . |
|
1763 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]] |
|
1764 |
ifNone:nil. |
|
1765 |
]. |
|
1766 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
1767 |
useMingw32 := true. |
|
1768 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW32__'. |
|
1769 |
CCCompilationOptions := '-w32'. |
|
1770 |
]. |
|
1771 |
] ifFalse:[ |
|
1772 |
(mingwTop := MingwTop) isNil ifTrue:[ |
|
1773 |
mingwTop := { |
|
1774 |
(programFiles,'\mingw64') . |
|
1775 |
(programFiles,'\mingw') . |
|
1776 |
('c:\mingw64') . |
|
1777 |
('c:\mingw') . |
|
1778 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]] |
|
1779 |
ifNone:nil. |
|
1780 |
]. |
|
1781 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
1782 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW64__'. |
|
1783 |
"/ CCCompilationOptions := '-w64'. |
|
1784 |
]. |
|
1785 |
]. |
|
1786 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
1787 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW__'. |
|
1788 |
CCPath := mingwTop,'\bin\gcc.exe'. |
|
1789 |
LinkCommand := 'gcc'. |
|
1790 |
MakeCommand := 'mingwmake'. |
|
1791 |
LibDirectory := topDirName,'\lib\mingw'. |
|
1792 |
LinkArgs := '-L',topDirName,'\lib\mingw'. |
|
1793 |
"/ LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
|
1794 |
]. |
|
1795 |
]. |
|
1796 |
]. |
|
1797 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
1798 |
(topDirName,'\stc\stc.exe') asFilename exists ifTrue:[ |
|
1799 |
STCPath := (topDirName,'\stc\stc.exe'). |
|
1800 |
] ifFalse:[ |
|
1801 |
STCPath := 'stc.exe'. |
|
1802 |
]. |
|
1803 |
LibPath := ''. |
|
1804 |
SearchedLibraries := #('import32.lib'). |
|
1805 |
"/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib'). |
|
3576 | 1806 |
] ifFalse:[ |
3960 | 1807 |
STCCompilationIncludes := '-I',topDirName,'/include'. |
1808 |
STCCompilationDefines := ''. |
|
1809 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
1810 |
STCPath := topDirName,'/stc/stc'. |
|
1811 |
||
1812 |
archArg := picArg := ''. |
|
1813 |
(ExternalAddress pointerSize == 4) ifTrue:[ |
|
1814 |
archArg := ' -m32' |
|
1815 |
] ifFalse:[ |
|
1816 |
archArg := ' -m64'. "gcc -m64 needs -fPIC to make a shared library" |
|
1817 |
picArg := ' -fPIC'. |
|
1818 |
]. |
|
1819 |
CCCompilationOptions := OperatingSystem getCPUDefine, |
|
1820 |
' -D', self usedCompilerDefine, |
|
1821 |
' ', OperatingSystem getOSDefine, |
|
1822 |
' ', '-O', archArg, picArg. |
|
1823 |
ParserFlags useClang ifTrue:[ |
|
1824 |
CCPath := 'clang' |
|
1825 |
] ifFalse:[ |
|
1826 |
ParserFlags useGnuC ifTrue:[ |
|
1827 |
CCPath := 'gcc' |
|
1828 |
] ifFalse:[ |
|
1829 |
CCPath := 'cc' |
|
1830 |
]. |
|
1831 |
]. |
|
1832 |
LinkArgs := archArg. |
|
1833 |
LinkCommand := CCPath. |
|
1834 |
LinkSharedArgs := '-shared'. |
|
1835 |
||
1836 |
OperatingSystem isOSXlike ifTrue:[ |
|
1837 |
LinkSharedArgs := '-shared -mmacosx-version-min=10.3 -arch x86_64 librun.so'. |
|
1838 |
CCCompilationOptions := CCCompilationOptions ,' -mmacosx-version-min=10.3' |
|
1839 |
]. |
|
1840 |
LibPath := ''. |
|
1841 |
SearchedLibraries := #(). |
|
1842 |
MakeCommand := 'make'. |
|
3576 | 1843 |
]. |
1844 |
||
3748 | 1845 |
Smalltalk infoPrinting ifTrue:[ |
3960 | 1846 |
'ParserFlags [info]:' infoPrintCR. |
1847 |
' STC Setup:' infoPrintCR. |
|
1848 |
(' STCCompilationDefines: ',STCCompilationDefines asString) infoPrintCR. |
|
1849 |
(' CCPath: ',CCPath asString) infoPrintCR. |
|
1850 |
(' CCCompilationOptions: ',CCCompilationOptions asString) infoPrintCR. |
|
1851 |
(' LinkCommand: ',LinkCommand asString) infoPrintCR. |
|
1852 |
(' MakeCommand: ',MakeCommand asString) infoPrintCR. |
|
1853 |
(' LinkArgs: ',LinkArgs asString) infoPrintCR. |
|
3748 | 1854 |
]. |
1855 |
||
3576 | 1856 |
" |
1857 |
ParserFlags initializeSTCFlagsForTopDirectory:'../..' |
|
1858 |
" |
|
1859 |
||
1860 |
"Modified: / 09-08-2006 / 18:47:18 / fm" |
|
1861 |
"Created: / 06-08-2011 / 19:47:47 / cg" |
|
1862 |
! ! |
|
1634 | 1863 |
|
2685 | 1864 |
!ParserFlags methodsFor:'accessing'! |
1865 |
||
2927 | 1866 |
fullLineNumberInfo |
1867 |
^ (self lineNumberInfo == #full) |
|
1868 |
||
1869 |
"Created: / 26-09-2012 / 14:13:42 / cg" |
|
1870 |
! |
|
1871 |
||
1872 |
lineNumberInfo |
|
1873 |
^ lineNumberInfo |
|
1874 |
||
1875 |
"Created: / 26-09-2012 / 13:27:08 / cg" |
|
1876 |
! |
|
1877 |
||
1878 |
lineNumberInfo:something |
|
1879 |
lineNumberInfo := something. |
|
1880 |
||
1881 |
"Created: / 26-09-2012 / 13:27:17 / cg" |
|
2685 | 1882 |
! ! |
1883 |
||
1658 | 1884 |
!ParserFlags methodsFor:'accessing-compilation control'! |
1885 |
||
1668 | 1886 |
allowExtensionsToPrivateClasses |
1887 |
^ allowExtensionsToPrivateClasses |
|
1888 |
! |
|
1889 |
||
1890 |
allowExtensionsToPrivateClasses:aBoolean |
|
1891 |
allowExtensionsToPrivateClasses := aBoolean |
|
1892 |
! |
|
1893 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1894 |
allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1895 |
^ allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1896 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1897 |
"Created: / 16-11-2006 / 14:24:54 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1898 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1899 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1900 |
allowPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1901 |
allowPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1902 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1903 |
"Created: / 16-11-2006 / 14:24:56 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1904 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1905 |
|
1658 | 1906 |
arraysAreImmutable |
1907 |
^ arraysAreImmutable |
|
1908 |
! |
|
1909 |
||
1910 |
arraysAreImmutable:aBoolean |
|
1911 |
arraysAreImmutable := aBoolean. |
|
1912 |
! |
|
1913 |
||
1717
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1914 |
flattenVisualWorksNamespaces |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1915 |
^ true |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1916 |
! |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1917 |
|
1658 | 1918 |
stringsAreImmutable |
1919 |
^ stringsAreImmutable |
|
1920 |
! |
|
1921 |
||
1922 |
stringsAreImmutable:aBoolean |
|
1923 |
stringsAreImmutable := aBoolean. |
|
1924 |
! ! |
|
1925 |
||
1926 |
!ParserFlags methodsFor:'accessing-stc compilation control'! |
|
1927 |
||
1928 |
ccCompilationOptions |
|
1668 | 1929 |
^ ccCompilationOptions ? '' |
1658 | 1930 |
! |
1931 |
||
1932 |
ccCompilationOptions:something |
|
1933 |
ccCompilationOptions := something. |
|
1934 |
! |
|
1935 |
||
1936 |
ccPath |
|
1937 |
^ ccPath |
|
1938 |
! |
|
1939 |
||
1940 |
ccPath:something |
|
1941 |
ccPath := something. |
|
1942 |
! |
|
1943 |
||
1944 |
implicitSelfSends |
|
1945 |
^ implicitSelfSends |
|
1946 |
! |
|
1947 |
||
1948 |
implicitSelfSends:aBoolean |
|
1949 |
implicitSelfSends := aBoolean. |
|
1950 |
! |
|
1951 |
||
1952 |
libPath |
|
1953 |
^ libPath |
|
1954 |
! |
|
1955 |
||
1956 |
libPath:aString |
|
1957 |
libPath := aString |
|
1958 |
! |
|
1959 |
||
1960 |
linkArgs |
|
1961 |
^ linkArgs |
|
1962 |
! |
|
1963 |
||
1964 |
linkArgs:aString |
|
1965 |
linkArgs := aString |
|
1966 |
! |
|
1967 |
||
1968 |
linkCommand |
|
1969 |
^ linkCommand |
|
1970 |
! |
|
1971 |
||
1972 |
linkCommand:aString |
|
1973 |
linkCommand := aString |
|
1974 |
! |
|
1975 |
||
1898 | 1976 |
linkSharedArgs |
1977 |
^ linkSharedArgs |
|
1978 |
! |
|
1979 |
||
1980 |
linkSharedArgs:aString |
|
1981 |
linkSharedArgs := aString |
|
1982 |
! |
|
1983 |
||
1658 | 1984 |
searchedLibraries |
1985 |
^ searchedLibraries |
|
1986 |
! |
|
1987 |
||
1988 |
searchedLibraries:aString |
|
1989 |
searchedLibraries := aString |
|
1990 |
! |
|
1991 |
||
1992 |
stcCompilation |
|
1993 |
^ stcCompilation |
|
1994 |
! |
|
1995 |
||
1996 |
stcCompilation:something |
|
1997 |
stcCompilation := something. |
|
1998 |
! |
|
1999 |
||
2000 |
stcCompilationDefines |
|
2001 |
^ stcCompilationDefines |
|
2002 |
! |
|
2003 |
||
2004 |
stcCompilationDefines:something |
|
2005 |
stcCompilationDefines := something. |
|
2006 |
! |
|
2007 |
||
2008 |
stcCompilationIncludes |
|
2009 |
^ stcCompilationIncludes |
|
2010 |
! |
|
2011 |
||
2012 |
stcCompilationIncludes:something |
|
2013 |
stcCompilationIncludes := something. |
|
2014 |
! |
|
2015 |
||
2016 |
stcCompilationOptions |
|
2017 |
^ stcCompilationOptions |
|
2018 |
! |
|
2019 |
||
2020 |
stcCompilationOptions:something |
|
2021 |
stcCompilationOptions := something. |
|
2022 |
! |
|
2023 |
||
2024 |
stcKeepCIntermediate |
|
2701
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2025 |
^ stcKeepCIntermediate ? false |
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2026 |
|
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2027 |
"Modified: / 16-09-2011 / 19:56:22 / cg" |
1658 | 2028 |
! |
2029 |
||
2030 |
stcKeepCIntermediate:something |
|
2031 |
stcKeepCIntermediate := something. |
|
2032 |
! |
|
2033 |
||
2034 |
stcKeepOIntermediate |
|
2702 | 2035 |
^ stcKeepOIntermediate ? false |
2036 |
||
2037 |
"Modified: / 16-09-2011 / 19:56:52 / cg" |
|
1658 | 2038 |
! |
2039 |
||
2040 |
stcKeepOIntermediate:something |
|
2041 |
stcKeepOIntermediate := something. |
|
2042 |
! |
|
2043 |
||
2490 | 2044 |
stcKeepSIntermediate |
2045 |
^ false |
|
2046 |
"/ ^ true |
|
2047 |
! |
|
2048 |
||
1658 | 2049 |
stcKeepSTIntermediate |
2702 | 2050 |
^ stcKeepSTIntermediate ? false |
2051 |
||
2052 |
"Modified: / 16-09-2011 / 19:57:11 / cg" |
|
1658 | 2053 |
! |
2054 |
||
2055 |
stcKeepSTIntermediate:something |
|
2056 |
stcKeepSTIntermediate := something. |
|
2057 |
! |
|
2058 |
||
2059 |
stcModulePath |
|
4012 | 2060 |
stcModulePath isNil ifTrue:[^ self class stcModulePath]. |
2061 |
^ stcModulePath |
|
1658 | 2062 |
! |
2063 |
||
2064 |
stcModulePath:something |
|
2065 |
stcModulePath := something. |
|
2066 |
! |
|
2067 |
||
2068 |
stcPath |
|
2069 |
^ stcPath |
|
2070 |
! |
|
2071 |
||
2072 |
stcPath:something |
|
2073 |
stcPath := something. |
|
2074 |
! ! |
|
2075 |
||
2076 |
!ParserFlags methodsFor:'accessing-syntax-control'! |
|
1634 | 2077 |
|
2078 |
allowArrayIndexSyntaxExtension |
|
2079 |
^ allowArrayIndexSyntaxExtension |
|
2080 |
! |
|
2081 |
||
2082 |
allowArrayIndexSyntaxExtension:aBoolean |
|
2083 |
allowArrayIndexSyntaxExtension := aBoolean. |
|
2084 |
! |
|
2085 |
||
3220 | 2086 |
allowAssignmentToBlockArgument |
2087 |
^ allowAssignmentToBlockArgument |
|
2088 |
! |
|
2089 |
||
2090 |
allowAssignmentToBlockArgument:aBoolean |
|
2091 |
allowAssignmentToBlockArgument := aBoolean. |
|
2092 |
! |
|
2093 |
||
2094 |
allowAssignmentToMethodArgument |
|
2095 |
^ allowAssignmentToMethodArgument |
|
2096 |
! |
|
2097 |
||
2098 |
allowAssignmentToMethodArgument:aBoolean |
|
2099 |
allowAssignmentToMethodArgument := aBoolean. |
|
2100 |
! |
|
2101 |
||
2102 |
allowAssignmentToPoolVariable |
|
2103 |
^ allowAssignmentToPoolVariable |
|
2104 |
! |
|
2105 |
||
2106 |
allowAssignmentToPoolVariable:aBoolean |
|
2107 |
allowAssignmentToPoolVariable := aBoolean. |
|
2108 |
! |
|
2109 |
||
2306 | 2110 |
allowCaretAsBinop |
2111 |
^ allowCaretAsBinop |
|
2112 |
! |
|
2113 |
||
2114 |
allowCaretAsBinop:aBoolean |
|
2115 |
allowCaretAsBinop := aBoolean. |
|
2116 |
! |
|
2117 |
||
2312 | 2118 |
allowCharacterEscapes |
2119 |
^ allowCharacterEscapes |
|
2120 |
! |
|
2121 |
||
2122 |
allowCharacterEscapes:aBoolean |
|
2123 |
allowCharacterEscapes := aBoolean. |
|
2124 |
! |
|
2125 |
||
1634 | 2126 |
allowDollarInIdentifier |
2127 |
^ allowDollarInIdentifier |
|
2128 |
! |
|
2129 |
||
2130 |
allowDollarInIdentifier:aBoolean |
|
2131 |
allowDollarInIdentifier := aBoolean. |
|
2132 |
! |
|
2133 |
||
2134 |
allowDolphinExtensions |
|
2135 |
^ allowDolphinExtensions |
|
2136 |
! |
|
2137 |
||
2138 |
allowDolphinExtensions:aBoolean |
|
2139 |
allowDolphinExtensions := aBoolean |
|
2140 |
! |
|
2141 |
||
2142 |
allowDomainVariables |
|
2143 |
^ allowDomainVariables |
|
2144 |
! |
|
2145 |
||
2146 |
allowDomainVariables:aBoolean |
|
2147 |
allowDomainVariables := aBoolean. |
|
2148 |
! |
|
2149 |
||
1950 | 2150 |
allowEmptyStatements |
2151 |
^ allowEmptyStatements ? false |
|
2152 |
||
2153 |
"Created: / 20-11-2006 / 13:56:14 / cg" |
|
2154 |
! |
|
2155 |
||
2156 |
allowEmptyStatements:aBoolean |
|
2157 |
allowEmptyStatements := aBoolean. |
|
2158 |
||
2159 |
"Created: / 20-11-2006 / 14:26:48 / cg" |
|
2160 |
! |
|
2161 |
||
1634 | 2162 |
allowExtendedBinarySelectors |
2163 |
^ allowExtendedBinarySelectors |
|
2164 |
! |
|
2165 |
||
2166 |
allowExtendedBinarySelectors:aBoolean |
|
2167 |
allowExtendedBinarySelectors := aBoolean. |
|
2168 |
! |
|
2169 |
||
2170 |
allowExtendedSTXSyntax |
|
2171 |
^ allowExtendedSTXSyntax |
|
2172 |
! |
|
2173 |
||
3220 | 2174 |
allowExtendedSTXSyntax:aBoolean |
2175 |
allowExtendedSTXSyntax := aBoolean. |
|
1634 | 2176 |
! |
2177 |
||
2178 |
allowFixedPointLiterals |
|
2179 |
^ allowFixedPointLiterals |
|
2180 |
! |
|
2181 |
||
3220 | 2182 |
allowFixedPointLiterals:aBoolean |
2183 |
allowFixedPointLiterals := aBoolean. |
|
1634 | 2184 |
! |
2185 |
||
2186 |
allowFunctionCallSyntaxForBlockEvaluation |
|
2187 |
^ allowFunctionCallSyntaxForBlockEvaluation |
|
2188 |
! |
|
2189 |
||
2190 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
2191 |
allowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
|
2192 |
! |
|
2193 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2194 |
allowHashAsBinarySelector |
1713 | 2195 |
^ allowHashAsBinarySelector |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2196 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2197 |
|
1634 | 2198 |
allowLazyValueExtension |
2199 |
^ allowLazyValueExtension |
|
2200 |
! |
|
2201 |
||
3220 | 2202 |
allowLazyValueExtension:aBoolean |
2203 |
allowLazyValueExtension := aBoolean. |
|
1634 | 2204 |
! |
2205 |
||
2206 |
allowLiteralNameSpaceSymbols |
|
2207 |
^ allowLiteralNameSpaceSymbols |
|
2208 |
! |
|
2209 |
||
2210 |
allowLiteralNameSpaceSymbols:aBoolean |
|
2211 |
allowLiteralNameSpaceSymbols := aBoolean |
|
2212 |
! |
|
2213 |
||
2214 |
allowLocalVariableDeclarationWithInitializerExpression |
|
2215 |
^ allowLocalVariableDeclarationWithInitializerExpression |
|
2216 |
! |
|
2217 |
||
2218 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
2219 |
allowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
|
2220 |
! |
|
2221 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2222 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2223 |
^ allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2224 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2225 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2226 |
allowNationalCharactersInIdentifier:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2227 |
allowNationalCharactersInIdentifier := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2228 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2229 |
|
1634 | 2230 |
allowOldStyleAssignment |
2231 |
^ allowOldStyleAssignment |
|
2232 |
! |
|
2233 |
||
2234 |
allowOldStyleAssignment:aBoolean |
|
2235 |
allowOldStyleAssignment := aBoolean |
|
2236 |
! |
|
2237 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2238 |
allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2239 |
^ allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2240 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2241 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2242 |
allowPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2243 |
allowPeriodInSymbol := aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2244 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2245 |
|
1634 | 2246 |
allowQualifiedNames |
2247 |
^ allowQualifiedNames |
|
2248 |
! |
|
2249 |
||
2250 |
allowQualifiedNames:aBoolean |
|
2251 |
allowQualifiedNames := aBoolean. |
|
2252 |
! |
|
2253 |
||
2254 |
allowReservedWordsAsSelectors |
|
2255 |
^ allowReservedWordsAsSelectors |
|
2256 |
! |
|
2257 |
||
2258 |
allowReservedWordsAsSelectors:aBoolean |
|
2259 |
allowReservedWordsAsSelectors := aBoolean. |
|
2260 |
! |
|
2261 |
||
1703 | 2262 |
allowSTVExtensions |
2263 |
"return true, if support for ST/V extensions is enabled." |
|
2264 |
||
2265 |
^ allowSTVExtensions |
|
2266 |
! |
|
2267 |
||
1701 | 2268 |
allowSTVPrimitives |
2269 |
"return true, if support for ST/V primitives is enabled." |
|
2270 |
||
2271 |
^ allowSTVPrimitives |
|
2272 |
! |
|
2273 |
||
2984 | 2274 |
allowSTXDelimiterComments |
3946 | 2275 |
"are ST/X token-delimited comments allowed? |
2276 |
(see comment on class side)" |
|
2277 |
||
2984 | 2278 |
^ allowSTXDelimiterComments |
2279 |
! |
|
2280 |
||
2281 |
allowSTXDelimiterComments:aBoolean |
|
3946 | 2282 |
"are ST/X token-delimited comments allowed? |
2283 |
(see comment on class side)" |
|
2284 |
||
2984 | 2285 |
allowSTXDelimiterComments := aBoolean. |
2286 |
||
2287 |
" |
|
2288 |
ParserFlags allowSTXDelimiterComments:false |
|
2289 |
ParserFlags allowSTXDelimiterComments:true |
|
2290 |
" |
|
2291 |
! |
|
2292 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2293 |
allowSTXEOLComments |
3946 | 2294 |
"are ST/X end-of-line comments allowed?" |
2295 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2296 |
^ allowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2297 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2298 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2299 |
allowSTXEOLComments:aBoolean |
3946 | 2300 |
"are ST/X end-of-line comments allowed?" |
2301 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2302 |
allowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2303 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2304 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2305 |
ParserFlags allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2306 |
ParserFlags allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2307 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2308 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2309 |
|
3945 | 2310 |
allowSTXExtendedArrayLiterals |
3946 | 2311 |
"are scheme-style typed literal arrays allowed?" |
2312 |
||
3945 | 2313 |
^ allowSTXExtendedArrayLiterals ? false |
2314 |
! |
|
2315 |
||
2316 |
allowSTXExtendedArrayLiterals:aBoolean |
|
3946 | 2317 |
"are scheme-style typed literal arrays allowed?" |
2318 |
||
3945 | 2319 |
allowSTXExtendedArrayLiterals := aBoolean |
2320 |
! |
|
2321 |
||
2494 | 2322 |
allowSTXFunctions |
2323 |
^ false |
|
2324 |
||
2325 |
"Created: / 23-05-2011 / 17:43:45 / cg" |
|
2326 |
! |
|
2327 |
||
3783 | 2328 |
allowSignedByteArrayElements |
2329 |
"experimental" |
|
2330 |
"/ ^ true. |
|
2331 |
"/ ^ allowSignedByteArrayElements |
|
2332 |
^ false. |
|
2333 |
! |
|
2334 |
||
3576 | 2335 |
allowSqueakExtensions |
2336 |
"return true, if support for squeak extensions |
|
2337 |
computed arrays { .., } |
|
2338 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
2339 |
is enabled." |
|
2340 |
||
2341 |
^ allowSqueakExtensions |
|
2342 |
! |
|
2343 |
||
2344 |
allowSqueakExtensions:aBoolean |
|
2345 |
"this allows turning on/off support for squeak extensions: |
|
2346 |
computed arrays { .., } |
|
2347 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
2348 |
" |
|
2349 |
||
2350 |
allowSqueakExtensions := aBoolean |
|
2351 |
! |
|
1634 | 2352 |
|
1689 | 2353 |
allowSqueakPrimitives |
2354 |
"return true, if support for squeak primitives is enabled." |
|
2355 |
||
2356 |
^ allowSqueakPrimitives |
|
2357 |
! |
|
2358 |
||
2359 |
allowSqueakPrimitives:aBoolean |
|
2360 |
"this allows turning on/off support for squeak primitives" |
|
2361 |
||
2362 |
allowSqueakPrimitives := aBoolean |
|
2363 |
! |
|
2364 |
||
2313 | 2365 |
allowStringEscapes |
2366 |
^ allowStringEscapes |
|
2367 |
! |
|
2368 |
||
2369 |
allowStringEscapes:aBoolean |
|
2370 |
allowStringEscapes := aBoolean. |
|
2371 |
! |
|
2372 |
||
1634 | 2373 |
allowUnderscoreInIdentifier |
2374 |
^ allowUnderscoreInIdentifier |
|
2375 |
! |
|
2376 |
||
2377 |
allowUnderscoreInIdentifier:aBoolean |
|
2378 |
allowUnderscoreInIdentifier := aBoolean |
|
2379 |
! |
|
2380 |
||
2310 | 2381 |
allowUnicodeCharacters |
2382 |
^ allowUnicodeCharacters |
|
2383 |
! |
|
2384 |
||
2385 |
allowUnicodeCharacters:aBoolean |
|
2386 |
allowUnicodeCharacters := aBoolean |
|
2387 |
! |
|
2388 |
||
2307 | 2389 |
allowUnicodeStrings |
2390 |
^ allowUnicodeStrings |
|
2391 |
! |
|
2392 |
||
2393 |
allowUnicodeStrings:aBoolean |
|
2394 |
allowUnicodeStrings := aBoolean |
|
2395 |
! |
|
2396 |
||
1634 | 2397 |
allowVariableReferences |
2398 |
^ allowVariableReferences |
|
2399 |
! |
|
2400 |
||
2401 |
allowVariableReferences:aBoolean |
|
2402 |
allowVariableReferences := aBoolean. |
|
2403 |
! |
|
2404 |
||
1655 | 2405 |
allowVisualAgeESSymbolLiterals |
2406 |
^ allowVisualAgeESSymbolLiterals |
|
2407 |
! |
|
2408 |
||
2409 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
2410 |
allowVisualAgeESSymbolLiterals := aBoolean. |
|
1689 | 2411 |
! |
2412 |
||
2413 |
allowVisualAgePrimitives |
|
2414 |
"return true, if support for V'Age primitives is enabled." |
|
2415 |
||
2416 |
^ allowVisualAgePrimitives |
|
2417 |
! |
|
2418 |
||
2419 |
allowVisualAgePrimitives:aBoolean |
|
2420 |
"this allows turning on/off support for V'Age primitives" |
|
2421 |
||
2422 |
allowVisualAgePrimitives := aBoolean |
|
1773 | 2423 |
! |
2424 |
||
2425 |
allowVisualWorksMethodAnnotations |
|
2426 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
2427 |
||
2428 |
^ allowVisualWorksMethodAnnotations |
|
2429 |
||
2430 |
"Created: / 07-07-2006 / 15:48:30 / cg" |
|
2431 |
! |
|
2432 |
||
2433 |
allowVisualWorksMethodAnnotations:aBoolean |
|
2434 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
2435 |
||
3355 | 2436 |
allowVisualWorksMethodAnnotations := aBoolean |
1773 | 2437 |
|
2438 |
"Created: / 07-07-2006 / 15:49:03 / cg" |
|
3220 | 2439 |
! |
2440 |
||
2441 |
warnAssignmentToBlockArgument |
|
2442 |
^ warnAssignmentToBlockArgument |
|
2443 |
! |
|
2444 |
||
2445 |
warnAssignmentToBlockArgument:aBoolean |
|
2446 |
warnAssignmentToBlockArgument := aBoolean. |
|
2447 |
! |
|
2448 |
||
2449 |
warnAssignmentToMethodArgument |
|
2450 |
^ warnAssignmentToMethodArgument |
|
2451 |
! |
|
2452 |
||
2453 |
warnAssignmentToMethodArgument:aBoolean |
|
2454 |
warnAssignmentToMethodArgument := aBoolean. |
|
2455 |
! |
|
2456 |
||
2457 |
warnAssignmentToPoolVariable |
|
2458 |
^ warnAssignmentToPoolVariable |
|
2459 |
! |
|
2460 |
||
2461 |
warnAssignmentToPoolVariable:aBoolean |
|
2462 |
warnAssignmentToPoolVariable := aBoolean. |
|
1658 | 2463 |
! ! |
1634 | 2464 |
|
1658 | 2465 |
!ParserFlags methodsFor:'accessing-warning-control'! |
1634 | 2466 |
|
1652 | 2467 |
warnAboutBadComments |
2468 |
^ warnAboutBadComments |
|
2469 |
! |
|
2470 |
||
2471 |
warnAboutBadComments:aBoolean |
|
2472 |
warnAboutBadComments := aBoolean. |
|
2473 |
! |
|
2474 |
||
1811 | 2475 |
warnAboutNonLowercaseLocalVariableNames |
2476 |
^ warnAboutNonLowercaseLocalVariableNames |
|
1740 | 2477 |
! |
2478 |
||
1811 | 2479 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
2480 |
warnAboutNonLowercaseLocalVariableNames := aBoolean. |
|
1740 | 2481 |
! |
2482 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2483 |
warnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2484 |
^ warnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2485 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2486 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2487 |
warnAboutPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2488 |
warnAboutPeriodInSymbol := aBoolean. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2489 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2490 |
|
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2491 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2492 |
^ warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2493 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2494 |
"Created: / 16-11-2006 / 14:24:38 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2495 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2496 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2497 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2498 |
warnAboutPossibleSTCCompilationProblems := aBoolean. |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2499 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2500 |
"Created: / 16-11-2006 / 14:24:40 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2501 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2502 |
|
2121 | 2503 |
warnAboutPossiblyUnimplementedSelectors |
2504 |
^ warnAboutPossiblyUnimplementedSelectors |
|
2505 |
! |
|
2506 |
||
2507 |
warnAboutPossiblyUnimplementedSelectors:aBoolean |
|
2508 |
warnAboutPossiblyUnimplementedSelectors := aBoolean. |
|
2509 |
! |
|
2510 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2511 |
warnAboutReferenceToPrivateClass |
3396 | 2512 |
"controls generation of warning messages when a private class is referenced" |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2513 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2514 |
^ warnAboutReferenceToPrivateClass |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2515 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2516 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2517 |
warnAboutReferenceToPrivateClass:aBoolean |
3396 | 2518 |
"controls generation of warning messages when a private class is referenced" |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2519 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2520 |
warnAboutReferenceToPrivateClass := aBoolean |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2521 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2522 |
|
2079
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2523 |
warnAboutShortLocalVariableNames |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2524 |
^ warnAboutShortLocalVariableNames |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2525 |
! |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2526 |
|
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2527 |
warnAboutShortLocalVariableNames:aBoolean |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2528 |
warnAboutShortLocalVariableNames := aBoolean. |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2529 |
! |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2530 |
|
2738 | 2531 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
2739 | 2532 |
^ warnAboutUnknownCharacterEscapesInJavaScriptStringConstant ? false |
2738 | 2533 |
|
2534 |
"Created: / 04-10-2011 / 19:51:19 / cg" |
|
2535 |
! |
|
2536 |
||
2537 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
|
2538 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean. |
|
2539 |
||
2540 |
"Created: / 04-10-2011 / 19:51:27 / cg" |
|
2541 |
! |
|
2542 |
||
1634 | 2543 |
warnAboutVariableNameConventions |
2544 |
^ warnAboutVariableNameConventions |
|
2545 |
! |
|
2546 |
||
2547 |
warnAboutVariableNameConventions:aBoolean |
|
2548 |
warnAboutVariableNameConventions := aBoolean. |
|
2549 |
! |
|
2550 |
||
2551 |
warnAboutWrongVariableNames |
|
2552 |
^ warnAboutWrongVariableNames |
|
2553 |
! |
|
2554 |
||
2555 |
warnAboutWrongVariableNames:aBoolean |
|
2556 |
warnAboutWrongVariableNames := aBoolean. |
|
2557 |
! |
|
2558 |
||
2559 |
warnCommonMistakes |
|
2560 |
^ warnCommonMistakes |
|
2561 |
! |
|
2562 |
||
2563 |
warnCommonMistakes:aBoolean |
|
2564 |
warnCommonMistakes := aBoolean. |
|
2565 |
! |
|
2566 |
||
2567 |
warnDollarInIdentifier |
|
2568 |
^ warnDollarInIdentifier |
|
2569 |
! |
|
2570 |
||
2571 |
warnDollarInIdentifier:aBoolean |
|
2572 |
warnDollarInIdentifier := aBoolean. |
|
2573 |
! |
|
2574 |
||
1638 | 2575 |
warnHiddenVariables |
2576 |
^ warnHiddenVariables |
|
2577 |
! |
|
2578 |
||
2579 |
warnHiddenVariables:aBoolean |
|
2465 | 2580 |
"controls generation of warning messages about hiding variables by locals" |
2581 |
||
1638 | 2582 |
warnHiddenVariables := aBoolean. |
2465 | 2583 |
|
2584 |
"Modified: / 30-11-2010 / 15:00:55 / cg" |
|
1638 | 2585 |
! |
2586 |
||
1682 | 2587 |
warnInconsistentReturnValues |
2588 |
^ warnInconsistentReturnValues |
|
2589 |
! |
|
2590 |
||
2591 |
warnInconsistentReturnValues:aBoolean |
|
2592 |
warnInconsistentReturnValues := aBoolean. |
|
2593 |
! |
|
2594 |
||
1634 | 2595 |
warnOldStyleAssignment |
2596 |
^ warnOldStyleAssignment |
|
2597 |
! |
|
2598 |
||
2599 |
warnOldStyleAssignment:aBoolean |
|
2600 |
warnOldStyleAssignment := aBoolean. |
|
2601 |
! |
|
2602 |
||
2787 | 2603 |
warnPlausibilityChecks |
2604 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
2605 |
||
2789
3100327ad683
changed: #warnPlausibilityChecks
Claus Gittinger <cg@exept.de>
parents:
2787
diff
changeset
|
2606 |
^ warnPlausibilityChecks ? true |
2787 | 2607 |
|
2608 |
"Created: / 19-01-2012 / 10:38:54 / cg" |
|
2609 |
! |
|
2610 |
||
2611 |
warnPlausibilityChecks:aBoolean |
|
2612 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
2613 |
||
2614 |
warnPlausibilityChecks := aBoolean |
|
2615 |
||
2616 |
"Created: / 19-01-2012 / 10:39:02 / cg" |
|
2617 |
! |
|
2618 |
||
1634 | 2619 |
warnPossibleIncompatibilities |
2057 | 2620 |
"holds true, if possible incompatibilities (with other ST systems) |
2621 |
are to be warned about" |
|
2622 |
||
1634 | 2623 |
^ warnPossibleIncompatibilities |
2624 |
! |
|
2625 |
||
2626 |
warnPossibleIncompatibilities:aBoolean |
|
2057 | 2627 |
"holds true, if possible incompatibilities (with other ST systems) |
2628 |
are to be warned about" |
|
2629 |
||
1634 | 2630 |
warnPossibleIncompatibilities := aBoolean. |
2631 |
! |
|
2632 |
||
2633 |
warnST80Directives |
|
2634 |
^ warnST80Directives |
|
2635 |
! |
|
2636 |
||
2476 | 2637 |
warnST80Directives:aBoolean |
2638 |
warnST80Directives := aBoolean. |
|
2639 |
||
2640 |
"Modified: / 30-01-2011 / 13:01:06 / cg" |
|
1634 | 2641 |
! |
2642 |
||
2643 |
warnSTXHereExtensionUsed |
|
2644 |
^ warnSTXHereExtensionUsed |
|
2645 |
! |
|
2646 |
||
2647 |
warnSTXHereExtensionUsed:aBoolean |
|
2648 |
warnSTXHereExtensionUsed := aBoolean. |
|
2649 |
! |
|
2650 |
||
2651 |
warnSTXNameSpaceUse |
|
2652 |
^ warnSTXNameSpaceUse |
|
2653 |
! |
|
2654 |
||
2655 |
warnSTXNameSpaceUse:aBoolean |
|
2656 |
warnSTXNameSpaceUse := aBoolean. |
|
2657 |
! |
|
2658 |
||
2659 |
warnSTXSpecialComment |
|
2660 |
^ warnSTXSpecialComment |
|
2661 |
! |
|
2662 |
||
2663 |
warnSTXSpecialComment:aBoolean |
|
2664 |
warnSTXSpecialComment := aBoolean. |
|
2665 |
! |
|
2666 |
||
2667 |
warnUndeclared |
|
2668 |
^ warnUndeclared |
|
2669 |
! |
|
2670 |
||
2671 |
warnUndeclared:aBoolean |
|
2672 |
warnUndeclared := aBoolean. |
|
2673 |
! |
|
2674 |
||
2675 |
warnUnderscoreInIdentifier |
|
2676 |
^ warnUnderscoreInIdentifier |
|
2677 |
! |
|
2678 |
||
2679 |
warnUnderscoreInIdentifier:aBoolean |
|
2680 |
warnUnderscoreInIdentifier := aBoolean. |
|
2681 |
! |
|
2682 |
||
2683 |
warnUnusedVars |
|
2684 |
^ warnUnusedVars |
|
2685 |
! |
|
2686 |
||
2687 |
warnUnusedVars:aBoolean |
|
2688 |
warnUnusedVars := aBoolean. |
|
1662 | 2689 |
! |
2690 |
||
2691 |
warnings |
|
2477 | 2692 |
^ warnings ? true |
2693 |
||
2694 |
"Modified: / 30-01-2011 / 13:05:48 / cg" |
|
1662 | 2695 |
! |
2696 |
||
2476 | 2697 |
warnings:aBoolean |
2698 |
warnings := aBoolean. |
|
2699 |
||
2700 |
"Modified: / 30-01-2011 / 13:00:51 / cg" |
|
1634 | 2701 |
! ! |
2702 |
||
2703 |
!ParserFlags methodsFor:'initialization'! |
|
2704 |
||
2705 |
initialize |
|
3220 | 2706 |
"each instance is initially setup from the classes global defaults. |
2707 |
(but can be changed as required for an individual compilation run" |
|
2708 |
||
1662 | 2709 |
warnings := Warnings. |
1634 | 2710 |
warnUndeclared := WarnUndeclared. |
2711 |
warnUnusedVars := WarnUnusedVars. |
|
2712 |
warnST80Directives := WarnST80Directives. |
|
2713 |
warnSTXSpecialComment := WarnSTXSpecials. |
|
2714 |
warnSTXNameSpaceUse := WarnSTXSpecials. |
|
2715 |
warnSTXHereExtensionUsed := WarnSTXSpecials. |
|
2716 |
warnUnderscoreInIdentifier := WarnUnderscoreInIdentifier. |
|
2717 |
warnDollarInIdentifier := WarnDollarInIdentifier. |
|
2718 |
warnOldStyleAssignment := WarnOldStyleAssignment. |
|
2719 |
warnCommonMistakes := WarnCommonMistakes. |
|
2720 |
warnPossibleIncompatibilities := WarnPossibleIncompatibilities. |
|
2721 |
warnAboutVariableNameConventions := WarnAboutVariableNameConventions. |
|
2722 |
warnAboutWrongVariableNames := WarnAboutWrongVariableNames. |
|
1652 | 2723 |
warnAboutBadComments := WarnAboutBadComments. |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2724 |
warnAboutReferenceToPrivateClass := WarnAboutReferenceToPrivateClass. |
1638 | 2725 |
warnHiddenVariables := WarnHiddenVariables. |
1682 | 2726 |
warnInconsistentReturnValues := WarnInconsistentReturnValues. |
1811 | 2727 |
warnAboutNonLowercaseLocalVariableNames := WarnAboutNonLowercaseLocalVariableNames. |
2079
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2728 |
warnAboutShortLocalVariableNames := WarnAboutShortLocalVariableNames. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2729 |
warnAboutPossibleSTCCompilationProblems := WarnAboutPossibleSTCCompilationProblems. |
2121 | 2730 |
warnAboutPossiblyUnimplementedSelectors := WarnAboutPossiblyUnimplementedSelectors. |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2731 |
warnAboutPeriodInSymbol := WarnAboutPeriodInSymbol. |
2738 | 2732 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant. |
2787 | 2733 |
warnPlausibilityChecks := WarnPlausibilityChecks. |
3220 | 2734 |
warnAssignmentToBlockArgument := WarnAssignmentToBlockArgument. |
2735 |
warnAssignmentToMethodArgument := WarnAssignmentToMethodArgument. |
|
3396 | 2736 |
warnAssignmentToPoolVariable := WarnAssignmentToPoolVariable. |
1634 | 2737 |
|
2738 |
allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier. |
|
2739 |
allowDollarInIdentifier := AllowDollarInIdentifier. |
|
2740 |
allowOldStyleAssignment := AllowOldStyleAssignment. |
|
2741 |
allowSqueakExtensions := AllowSqueakExtensions. |
|
2742 |
allowDolphinExtensions := AllowDolphinExtensions. |
|
2743 |
allowLiteralNameSpaceSymbols := AllowLiteralNameSpaceSymbols. |
|
2744 |
allowExtendedBinarySelectors := AllowExtendedBinarySelectors. |
|
2306 | 2745 |
allowCaretAsBinop := AllowCaretAsBinop. |
1634 | 2746 |
allowFunctionCallSyntaxForBlockEvaluation := AllowFunctionCallSyntaxForBlockEvaluation. |
2747 |
allowLocalVariableDeclarationWithInitializerExpression := AllowLocalVariableDeclarationWithInitializerExpression. |
|
2748 |
allowDomainVariables := AllowDomainVariables. |
|
2749 |
allowArrayIndexSyntaxExtension := AllowArrayIndexSyntaxExtension. |
|
2750 |
allowReservedWordsAsSelectors := AllowReservedWordsAsSelectors. |
|
2751 |
allowVariableReferences := AllowVariableReferences. |
|
2752 |
allowLazyValueExtension := AllowLazyValueExtension. |
|
2753 |
allowFixedPointLiterals := AllowFixedPointLiterals. |
|
2754 |
allowExtendedSTXSyntax := AllowExtendedSTXSyntax. |
|
2755 |
allowQualifiedNames := AllowQualifiedNames. |
|
1655 | 2756 |
allowVisualAgeESSymbolLiterals := AllowVisualAgeESSymbolLiterals. |
1668 | 2757 |
allowExtensionsToPrivateClasses := AllowExtensionsToPrivateClasses. |
1689 | 2758 |
allowVisualAgePrimitives := AllowVisualAgePrimitives. |
2759 |
allowSqueakPrimitives := AllowSqueakPrimitives. |
|
1700 | 2760 |
allowSTVPrimitives := AllowSTVPrimitives. |
1702 | 2761 |
allowSTVExtensions := AllowSTVExtensions. |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2762 |
allowNationalCharactersInIdentifier := AllowNationalCharactersInIdentifier. |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2763 |
allowHashAsBinarySelector := AllowHashAsBinarySelector. |
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2764 |
allowSTXEOLComments := AllowSTXEOLComments. |
2984 | 2765 |
allowSTXDelimiterComments := AllowSTXDelimiterComments. |
3947 | 2766 |
allowSTXExtendedArrayLiterals := AllowSTXExtendedArrayLiterals. |
1773 | 2767 |
allowVisualWorksMethodAnnotations := AllowVisualWorksMethodAnnotations. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2768 |
allowPossibleSTCCompilationProblems := AllowPossibleSTCCompilationProblems. |
1950 | 2769 |
allowEmptyStatements := AllowEmptyStatements. |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2770 |
allowPeriodInSymbol := AllowPeriodInSymbol. |
2311 | 2771 |
"/ these are only supported in the new compiler |
2307 | 2772 |
allowUnicodeStrings := AllowUnicodeStrings. |
2310 | 2773 |
allowUnicodeCharacters := AllowUnicodeCharacters. |
2311 | 2774 |
allowCharacterEscapes := AllowCharacterEscapes. |
2313 | 2775 |
allowStringEscapes := AllowStringEscapes. |
2685 | 2776 |
allowAssignmentToBlockArgument := AllowAssignmentToBlockArgument. |
2777 |
allowAssignmentToMethodArgument := AllowAssignmentToMethodArgument. |
|
2778 |
allowAssignmentToPoolVariable := AllowAssignmentToPoolVariable. |
|
1634 | 2779 |
|
2780 |
arraysAreImmutable := ArraysAreImmutable ? true. |
|
2781 |
stringsAreImmutable := StringsAreImmutable ? true. |
|
2782 |
implicitSelfSends := ImplicitSelfSends ? false. |
|
2929 | 2783 |
lineNumberInfo := LineNumberInfo ? false. |
1634 | 2784 |
|
1658 | 2785 |
stcKeepCIntermediate := STCKeepCIntermediate. |
2786 |
stcKeepOIntermediate := STCKeepOIntermediate. |
|
2787 |
stcKeepSTIntermediate := STCKeepSTIntermediate. |
|
2788 |
stcModulePath := STCModulePath. |
|
2789 |
stcCompilation := STCCompilation. |
|
2790 |
stcCompilationIncludes := STCCompilationIncludes. |
|
2791 |
stcCompilationDefines := STCCompilationDefines. |
|
2792 |
stcCompilationOptions := STCCompilationOptions. |
|
2793 |
stcPath := STCPath. |
|
2794 |
ccCompilationOptions := CCCompilationOptions. |
|
2795 |
ccPath := CCPath. |
|
2796 |
linkArgs := LinkArgs. |
|
2797 |
linkCommand := LinkCommand. |
|
2798 |
libPath := LibPath. |
|
2799 |
searchedLibraries := SearchedLibraries. |
|
2800 |
||
1634 | 2801 |
" |
2802 |
ParserFlags initialize. |
|
2803 |
self new inspect. |
|
2804 |
" |
|
1773 | 2805 |
|
2929 | 2806 |
"Modified: / 26-09-2012 / 14:22:38 / cg" |
1634 | 2807 |
! ! |
2808 |
||
2809 |
!ParserFlags class methodsFor:'documentation'! |
|
2810 |
||
2811 |
version |
|
3653 | 2812 |
^ '$Header$' |
2218
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
2813 |
! |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
2814 |
|
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
2815 |
version_CVS |
3653 | 2816 |
^ '$Header$' |
1634 | 2817 |
! ! |
2818 |
||
3009
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
2819 |
|
1634 | 2820 |
ParserFlags initialize! |