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