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