changeset 4256 | 5152078ff118 |
parent 4255 | 6ff79c868b94 |
child 4279 | 5d61e0122b4e |
4255:6ff79c868b94 | 4256:5152078ff118 |
---|---|
1 "{ Encoding: utf8 }" |
1 "{ Encoding: utf8 }" |
2 |
2 |
3 " |
3 " |
4 COPYRIGHT (c) 1989 by Claus Gittinger |
4 COPYRIGHT (c) 1989 by Claus Gittinger |
5 COPYRIGHT (c) 2005 by eXept Software AG |
5 COPYRIGHT (c) 2005 by eXept Software AG |
6 All Rights Reserved |
6 All Rights Reserved |
7 |
7 |
8 This software is furnished under a license and may be used |
8 This software is furnished under a license and may be used |
9 only in accordance with the terms of that license and with the |
9 only in accordance with the terms of that license and with the |
10 inclusion of the above copyright notice. This software may not |
10 inclusion of the above copyright notice. This software may not |
11 be provided or otherwise made available to, or used by, any |
11 be provided or otherwise made available to, or used by, any |
15 "{ Package: 'stx:libcomp' }" |
15 "{ Package: 'stx:libcomp' }" |
16 |
16 |
17 "{ NameSpace: Smalltalk }" |
17 "{ NameSpace: Smalltalk }" |
18 |
18 |
19 Object subclass:#ParserFlags |
19 Object subclass:#ParserFlags |
20 instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives |
20 instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives |
21 warnSTXHereExtensionUsed warnSTXSpecialComment |
21 warnSTXHereExtensionUsed warnSTXSpecialComment |
22 warnUnderscoreInIdentifier warnOldStyleAssignment |
22 warnUnderscoreInIdentifier warnOldStyleAssignment |
23 warnCommonMistakes warnSTXNameSpaceUse |
23 warnCommonMistakes warnSTXNameSpaceUse |
24 warnPossibleIncompatibilities warnDollarInIdentifier |
24 warnPossibleIncompatibilities warnDollarInIdentifier |
25 warnParagraphInIdentifier warnHiddenVariables |
25 warnParagraphInIdentifier warnHiddenVariables |
26 warnAboutVariableNameConventions warnAboutWrongVariableNames |
26 warnAboutVariableNameConventions warnAboutWrongVariableNames |
27 warnAboutBadComments warnInconsistentReturnValues |
27 warnAboutBadComments warnInconsistentReturnValues |
28 warnAboutNonLowercaseLocalVariableNames |
28 warnAboutNonLowercaseLocalVariableNames |
29 warnAboutPossibleSTCCompilationProblems |
29 warnAboutPossibleSTCCompilationProblems |
30 warnAboutReferenceToPrivateClass warnAboutShortLocalVariableNames |
30 warnAboutReferenceToPrivateClass warnAboutShortLocalVariableNames |
31 warnAboutPossiblyUnimplementedSelectors |
31 warnAboutPossiblyUnimplementedSelectors |
32 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
32 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
33 warnPlausibilityChecks allowLiteralNameSpaceSymbols |
33 warnPlausibilityChecks allowLiteralNameSpaceSymbols |
34 allowUnderscoreInIdentifier allowDollarInIdentifier |
34 allowUnderscoreInIdentifier allowDollarInIdentifier |
35 allowParagraphInIdentifier allowOldStyleAssignment |
35 allowParagraphInIdentifier allowOldStyleAssignment |
36 allowSqueakExtensions allowDolphinExtensions |
36 allowSqueakExtensions allowDolphinExtensions |
37 allowExtendedBinarySelectors allowQualifiedNames |
37 allowExtendedBinarySelectors allowQualifiedNames |
38 allowFunctionCallSyntaxForBlockEvaluation |
38 allowFunctionCallSyntaxForBlockEvaluation |
39 allowLocalVariableDeclarationWithInitializerExpression |
39 allowLocalVariableDeclarationWithInitializerExpression |
40 allowDomainVariables allowArrayIndexSyntaxExtension |
40 allowDomainVariables allowArrayIndexSyntaxExtension |
41 allowReservedWordsAsSelectors allowVariableReferences |
41 allowReservedWordsAsSelectors allowVariableReferences |
42 allowLazyValueExtension allowFixedPointLiterals |
42 allowLazyValueExtension allowFixedPointLiterals |
43 allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals |
43 allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals |
44 allowExtensionsToPrivateClasses allowSqueakPrimitives |
44 allowExtensionsToPrivateClasses allowSqueakPrimitives |
45 allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions |
45 allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions |
46 allowNationalCharactersInIdentifier allowHashAsBinarySelector |
46 allowNationalCharactersInIdentifier allowHashAsBinarySelector |
47 allowSTXEOLComments allowEmptyStatements |
47 allowSTXEOLComments allowEmptyStatements |
48 allowVisualWorksMethodAnnotations |
48 allowVisualWorksMethodAnnotations |
49 allowPossibleSTCCompilationProblems arraysAreImmutable |
49 allowPossibleSTCCompilationProblems arraysAreImmutable |
50 stringsAreImmutable implicitSelfSends stcKeepCIntermediate |
50 stringsAreImmutable implicitSelfSends stcKeepCIntermediate |
51 stcKeepOIntermediate stcKeepSTIntermediate stcModulePath |
51 stcKeepOIntermediate stcKeepSTIntermediate stcModulePath |
52 stcCompilation stcCompilationIncludes stcCompilationDefines |
52 stcCompilation stcCompilationIncludes stcCompilationDefines |
53 stcCompilationOptions stcPath ccCompilationOptions ccPath |
53 stcCompilationOptions stcPath ccCompilationOptions ccPath |
54 linkArgs linkSharedArgs linkCommand libPath searchedLibraries |
54 linkArgs linkSharedArgs linkCommand libPath searchedLibraries |
55 warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop |
55 warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop |
56 allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes |
56 allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes |
57 allowStringEscapes allowAssignmentToBlockArgument |
57 allowStringEscapes allowAssignmentToBlockArgument |
58 allowAssignmentToMethodArgument allowAssignmentToPoolVariable |
58 allowAssignmentToMethodArgument allowAssignmentToPoolVariable |
59 lineNumberInfo allowSTXDelimiterComments |
59 lineNumberInfo allowSTXDelimiterComments |
60 allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument |
60 allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument |
61 warnAssignmentToMethodArgument warnAssignmentToPoolVariable |
61 warnAssignmentToMethodArgument warnAssignmentToPoolVariable |
62 allowSignedByteArrayElements allowSymbolsStartingWithDigit |
62 allowSignedByteArrayElements allowSymbolsStartingWithDigit |
63 allowJavaScriptConst' |
63 allowJavaScriptConst' |
64 classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument |
64 classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument |
65 AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable |
65 AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable |
66 AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier |
66 AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier |
67 AllowDolphinExtensions AllowDomainVariables AllowEmptyStatements |
67 AllowDolphinExtensions AllowDomainVariables AllowEmptyStatements |
68 AllowExtendedBinarySelectors AllowExtendedSTXSyntax |
68 AllowExtendedBinarySelectors AllowExtendedSTXSyntax |
69 AllowExtensionsToPrivateClasses AllowFixedPointLiterals |
69 AllowExtensionsToPrivateClasses AllowFixedPointLiterals |
70 AllowFunctionCallSyntaxForBlockEvaluation |
70 AllowFunctionCallSyntaxForBlockEvaluation |
71 AllowHashAsBinarySelector AllowLazyValueExtension |
71 AllowHashAsBinarySelector AllowLazyValueExtension |
72 AllowLiteralNameSpaceSymbols |
72 AllowLiteralNameSpaceSymbols |
73 AllowLocalVariableDeclarationWithInitializerExpression |
73 AllowLocalVariableDeclarationWithInitializerExpression |
74 AllowNationalCharactersInIdentifier AllowOldStyleAssignment |
74 AllowNationalCharactersInIdentifier AllowOldStyleAssignment |
75 AllowParagraphInIdentifier AllowPeriodInSymbol |
75 AllowParagraphInIdentifier AllowPeriodInSymbol |
76 AllowPossibleSTCCompilationProblems AllowQualifiedNames |
76 AllowPossibleSTCCompilationProblems AllowQualifiedNames |
77 AllowReservedWordsAsSelectors AllowSTVExtensions |
77 AllowReservedWordsAsSelectors AllowSTVExtensions |
78 AllowSTVPrimitives AllowSTXDelimiterComments AllowSTXEOLComments |
78 AllowSTVPrimitives AllowSTXDelimiterComments AllowSTXEOLComments |
79 AllowSTXExtendedArrayLiterals AllowSqueakExtensions |
79 AllowSTXExtendedArrayLiterals AllowSqueakExtensions |
80 AllowSqueakPrimitives AllowStringEscapes |
80 AllowSqueakPrimitives AllowStringEscapes |
81 AllowUnderscoreInIdentifier AllowUnicodeCharacters |
81 AllowUnderscoreInIdentifier AllowUnicodeCharacters |
82 AllowUnicodeStrings AllowVariableReferences |
82 AllowUnicodeStrings AllowVariableReferences |
83 AllowVisualAgeESSymbolLiterals AllowVisualAgePrimitives |
83 AllowVisualAgeESSymbolLiterals AllowVisualAgePrimitives |
84 AllowVisualWorksMethodAnnotations ArraysAreImmutable BCCTop |
84 AllowVisualWorksMethodAnnotations ArraysAreImmutable BCCTop |
85 CCCompilationOptions CCPath DefineForBorlandC DefineForCLANG |
85 CCCompilationOptions CCPath DefineForBorlandC DefineForCLANG |
86 DefineForGNUC DefineForMINGW DefineForMINGW32 DefineForMINGW64 |
86 DefineForGNUC DefineForMINGW DefineForMINGW32 DefineForMINGW64 |
87 DefineForMSC DefineForVisualC ForcedCompiler ImplicitSelfSends |
87 DefineForMSC DefineForVisualC ForcedCompiler ImplicitSelfSends |
88 LibDirectory LibPath LineNumberInfo LinkArgs LinkCommand |
88 LibDirectory LibPath LineNumberInfo LinkArgs LinkCommand |
89 LinkSharedArgs MakeCommand MingwTop PerMethodFlags SDKTop |
89 LinkSharedArgs MakeCommand MingwTop PerMethodFlags SDKTop |
90 STCCompilation STCCompilationDefines STCCompilationIncludes |
90 STCCompilation STCCompilationDefines STCCompilationIncludes |
91 STCCompilationOptions STCKeepCIntermediate STCKeepOIntermediate |
91 STCCompilationOptions STCKeepCIntermediate STCKeepOIntermediate |
92 STCKeepSTIntermediate STCModulePath STCPath SearchedLibraries |
92 STCKeepSTIntermediate STCModulePath STCPath SearchedLibraries |
93 StringsAreImmutable VCTop WarnAboutBadComments |
93 StringsAreImmutable VCTop WarnAboutBadComments |
94 WarnAboutNonLowercaseLocalVariableNames WarnAboutPeriodInSymbol |
94 WarnAboutNonLowercaseLocalVariableNames WarnAboutPeriodInSymbol |
95 WarnAboutPossibleSTCCompilationProblems |
95 WarnAboutPossibleSTCCompilationProblems |
96 WarnAboutPossiblyUnimplementedSelectors |
96 WarnAboutPossiblyUnimplementedSelectors |
97 WarnAboutReferenceToPrivateClass WarnAboutShortLocalVariableNames |
97 WarnAboutReferenceToPrivateClass WarnAboutShortLocalVariableNames |
98 WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
98 WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
99 WarnAboutVariableNameConventions WarnAboutWrongVariableNames |
99 WarnAboutVariableNameConventions WarnAboutWrongVariableNames |
100 WarnAssignmentToBlockArgument WarnAssignmentToMethodArgument |
100 WarnAssignmentToBlockArgument WarnAssignmentToMethodArgument |
101 WarnAssignmentToPoolVariable WarnCommonMistakes |
101 WarnAssignmentToPoolVariable WarnCommonMistakes |
102 WarnDollarInIdentifier WarnHiddenVariables |
102 WarnDollarInIdentifier WarnHiddenVariables |
103 WarnInconsistentReturnValues WarnOldStyleAssignment |
103 WarnInconsistentReturnValues WarnOldStyleAssignment |
104 WarnParagraphInIdentifier WarnPlausibilityChecks |
104 WarnParagraphInIdentifier WarnPlausibilityChecks |
105 WarnPossibleIncompatibilities WarnST80Directives WarnSTXSpecials |
105 WarnPossibleIncompatibilities WarnST80Directives WarnSTXSpecials |
106 WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings |
106 WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings |
107 AutoDefineVariables AllowSignedByteArrayElements |
107 AutoDefineVariables AllowSignedByteArrayElements |
108 AllowSymbolsStartingWithDigit AllowJavaScriptConst |
108 AllowSymbolsStartingWithDigit AllowJavaScriptConst |
109 AllowJavaScriptLet' |
109 AllowJavaScriptLet' |
110 poolDictionaries:'' |
110 poolDictionaries:'' |
111 category:'System-Compiler' |
111 category:'System-Compiler' |
112 ! |
112 ! |
113 |
113 |
114 !ParserFlags class methodsFor:'documentation'! |
114 !ParserFlags class methodsFor:'documentation'! |
115 |
115 |
116 copyright |
116 copyright |
117 " |
117 " |
118 COPYRIGHT (c) 1989 by Claus Gittinger |
118 COPYRIGHT (c) 1989 by Claus Gittinger |
119 COPYRIGHT (c) 2005 by eXept Software AG |
119 COPYRIGHT (c) 2005 by eXept Software AG |
120 All Rights Reserved |
120 All Rights Reserved |
121 |
121 |
122 This software is furnished under a license and may be used |
122 This software is furnished under a license and may be used |
123 only in accordance with the terms of that license and with the |
123 only in accordance with the terms of that license and with the |
124 inclusion of the above copyright notice. This software may not |
124 inclusion of the above copyright notice. This software may not |
125 be provided or otherwise made available to, or used by, any |
125 be provided or otherwise made available to, or used by, any |
269 (try defining a method with an unused var, to see)" |
269 (try defining a method with an unused var, to see)" |
270 |
270 |
271 |key| |
271 |key| |
272 |
272 |
273 PerMethodFlags isNil ifTrue:[ |
273 PerMethodFlags isNil ifTrue:[ |
274 PerMethodFlags := Dictionary new. |
274 PerMethodFlags := Dictionary new. |
275 ]. |
275 ]. |
276 key := class name, '>>',selector. |
276 key := class name, '>>',selector. |
277 PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration). |
277 PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration). |
278 |
278 |
279 "Created: / 28-02-2012 / 12:57:45 / cg" |
279 "Created: / 28-02-2012 / 12:57:45 / cg" |
612 dfn = DefineForMINGW32 ifTrue:[ ^'mingw']. |
612 dfn = DefineForMINGW32 ifTrue:[ ^'mingw']. |
613 dfn = DefineForMINGW ifTrue:[ ^'mingw']. |
613 dfn = DefineForMINGW ifTrue:[ ^'mingw']. |
614 "/ dfn = DefineForLCC ifTrue:[ ^'lcc']. |
614 "/ dfn = DefineForLCC ifTrue:[ ^'lcc']. |
615 |
615 |
616 OperatingSystem isMSWINDOWSlike ifTrue:[ |
616 OperatingSystem isMSWINDOWSlike ifTrue:[ |
617 ^ 'bcc' |
617 ^ 'bcc' |
618 ]. |
618 ]. |
619 ^ 'gcc' |
619 ^ 'gcc' |
620 |
620 |
621 " |
621 " |
622 self usedCompiler |
622 self usedCompiler |
759 ! |
759 ! |
760 |
760 |
761 allowDolphinExtensions:aBoolean |
761 allowDolphinExtensions:aBoolean |
762 "this allows turning on/off support for computed arrays ##(..) as in dolphin. |
762 "this allows turning on/off support for computed arrays ##(..) as in dolphin. |
763 If you want to fileIn Dolphin classes, enable this with: |
763 If you want to fileIn Dolphin classes, enable this with: |
764 Compiler allowDolphinComputedArrays:true" |
764 Compiler allowDolphinComputedArrays:true" |
765 |
765 |
766 AllowDolphinExtensions := aBoolean. |
766 AllowDolphinExtensions := aBoolean. |
767 |
767 |
768 " |
768 " |
769 self allowDolphinExtensions:true |
769 self allowDolphinExtensions:true |
982 ! |
982 ! |
983 |
983 |
984 allowQualifiedNames:aBoolean |
984 allowQualifiedNames:aBoolean |
985 "this allows turning on/off support for qualifiedNames #{ .., } as in vw3. |
985 "this allows turning on/off support for qualifiedNames #{ .., } as in vw3. |
986 If you want to fileIn vw3 or later classes, enable this with: |
986 If you want to fileIn vw3 or later classes, enable this with: |
987 Compiler allowQualifiedNames:true |
987 Compiler allowQualifiedNames:true |
988 Notice, that qualified names are not really supported semantically |
988 Notice, that qualified names are not really supported semantically |
989 (they are parsed, but treated like regular globals) |
989 (they are parsed, but treated like regular globals) |
990 " |
990 " |
991 |
991 |
992 AllowQualifiedNames := aBoolean. |
992 AllowQualifiedNames := aBoolean. |
1023 ! |
1023 ! |
1024 |
1024 |
1025 allowSTVExtensions:aBoolean |
1025 allowSTVExtensions:aBoolean |
1026 "this allows turning on/off support for ST/V extensions: |
1026 "this allows turning on/off support for ST/V extensions: |
1027 If you want to fileIn ST/V classes, enable this with: |
1027 If you want to fileIn ST/V classes, enable this with: |
1028 Compiler allowSTVComputedArrays:true" |
1028 Compiler allowSTVComputedArrays:true" |
1029 |
1029 |
1030 AllowSTVExtensions := aBoolean. |
1030 AllowSTVExtensions := aBoolean. |
1031 |
1031 |
1032 " |
1032 " |
1033 ParserFlags allowSTVExtensions:true |
1033 ParserFlags allowSTVExtensions:true |
1070 ! |
1070 ! |
1071 |
1071 |
1072 allowSTXDelimiterComments:aBoolean |
1072 allowSTXDelimiterComments:aBoolean |
1073 "enable token delimited comments; |
1073 "enable token delimited comments; |
1074 these are multiline comments of the form: |
1074 these are multiline comments of the form: |
1075 ''>>TOKEN |
1075 ''>>TOKEN |
1076 ... anything, including double quotes |
1076 ... anything, including double quotes |
1077 TOKEN>>'' |
1077 TOKEN>>'' |
1078 (the '' being a double quote in the above) |
1078 (the '' being a double quote in the above) |
1079 Such comments are especially useful to comment pieces of sample code, which may |
1079 Such comments are especially useful to comment pieces of sample code, which may |
1080 contain another comment in it, but you don't want to make them all EOL comments |
1080 contain another comment in it, but you don't want to make them all EOL comments |
1081 (which are an ST/X speciality also, by the way). |
1081 (which are an ST/X speciality also, by the way). |
1082 Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
1082 Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
1136 AllowSignedByteArrayElements := aBoolean |
1136 AllowSignedByteArrayElements := aBoolean |
1137 ! |
1137 ! |
1138 |
1138 |
1139 allowSqueakExtensions |
1139 allowSqueakExtensions |
1140 "return true, if support for squeak extensions |
1140 "return true, if support for squeak extensions |
1141 computed arrays { .., } |
1141 computed arrays { .., } |
1142 c/java style arguments in message sends rec foo(arg1, ... argN) |
1142 c/java style arguments in message sends rec foo(arg1, ... argN) |
1143 is enabled." |
1143 is enabled." |
1144 |
1144 |
1145 ^ AllowSqueakExtensions |
1145 ^ AllowSqueakExtensions |
1146 ! |
1146 ! |
1147 |
1147 |
1148 allowSqueakExtensions:aBoolean |
1148 allowSqueakExtensions:aBoolean |
1149 "this allows turning on/off support for squeak extensions: |
1149 "this allows turning on/off support for squeak extensions: |
1150 computed arrays { .., } |
1150 computed arrays { .., } |
1151 c/java style arguments in message sends rec foo(arg1, ... argN) |
1151 c/java style arguments in message sends rec foo(arg1, ... argN) |
1152 |
1152 |
1153 If you want to fileIn Squeak classes, enable this with: |
1153 If you want to fileIn Squeak classes, enable this with: |
1154 Compiler allowSqueakComputedArrays:true" |
1154 Compiler allowSqueakComputedArrays:true" |
1155 |
1155 |
1156 AllowSqueakExtensions := aBoolean. |
1156 AllowSqueakExtensions := aBoolean. |
1157 |
1157 |
1158 " |
1158 " |
1159 self allowSqueakExtensions:true |
1159 self allowSqueakExtensions:true |
1205 but instead scanned as assignment character (old ST/80 syntax). |
1205 but instead scanned as assignment character (old ST/80 syntax). |
1206 If turned on, underscores are in identifiers are allowed, while extra |
1206 If turned on, underscores are in identifiers are allowed, while extra |
1207 underscores are still scanned as assignment. |
1207 underscores are still scanned as assignment. |
1208 If you have to fileIn old VW-Vsn2.x classes, |
1208 If you have to fileIn old VW-Vsn2.x classes, |
1209 turn them off with: |
1209 turn them off with: |
1210 Compiler allowUnderscoreInIdentifiers:false" |
1210 Compiler allowUnderscoreInIdentifiers:false" |
1211 |
1211 |
1212 AllowUnderscoreInIdentifier := aBoolean. |
1212 AllowUnderscoreInIdentifier := aBoolean. |
1213 |
1213 |
1214 "Modified: 7.9.1997 / 01:35:19 / cg" |
1214 "Modified: 7.9.1997 / 01:35:19 / cg" |
1215 ! |
1215 ! |
1430 Those are not really errors in the strict sense, but often lead to |
1430 Those are not really errors in the strict sense, but often lead to |
1431 run time errors later. |
1431 run time errors later. |
1432 Examples are: expr or:expr2, where expr2 is not a block. |
1432 Examples are: expr or:expr2, where expr2 is not a block. |
1433 If you get bored by those warnings, turn them off by adding |
1433 If you get bored by those warnings, turn them off by adding |
1434 a line as: |
1434 a line as: |
1435 ParserFlags warnCommonMistakes:false |
1435 ParserFlags warnCommonMistakes:false |
1436 in your 'private.rc' file" |
1436 in your 'private.rc' file" |
1437 |
1437 |
1438 WarnCommonMistakes := aBoolean |
1438 WarnCommonMistakes := aBoolean |
1439 |
1439 |
1440 "Modified: / 05-09-2006 / 11:46:26 / cg" |
1440 "Modified: / 05-09-2006 / 11:46:26 / cg" |
1500 |
1500 |
1501 warnOldStyleAssignment:aBoolean |
1501 warnOldStyleAssignment:aBoolean |
1502 "this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
1502 "this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
1503 If you get bored by those warnings, turn them off by adding |
1503 If you get bored by those warnings, turn them off by adding |
1504 a line as: |
1504 a line as: |
1505 ParserFlags warnOldStyleAssignment:false |
1505 ParserFlags warnOldStyleAssignment:false |
1506 in your 'private.rc' file" |
1506 in your 'private.rc' file" |
1507 |
1507 |
1508 WarnOldStyleAssignment := aBoolean |
1508 WarnOldStyleAssignment := aBoolean |
1509 |
1509 |
1510 "Modified: / 05-09-2006 / 11:46:17 / cg" |
1510 "Modified: / 05-09-2006 / 11:46:17 / cg" |
1556 warnPossibleIncompatibilities:aBoolean |
1556 warnPossibleIncompatibilities:aBoolean |
1557 "this turns warnings about possible incompatibilities (with other ST systems) |
1557 "this turns warnings about possible incompatibilities (with other ST systems) |
1558 on or off. |
1558 on or off. |
1559 If you get bored by those warnings, turn them off by adding |
1559 If you get bored by those warnings, turn them off by adding |
1560 a line as: |
1560 a line as: |
1561 ParserFlags warnPossibleIncompatibilities:false |
1561 ParserFlags warnPossibleIncompatibilities:false |
1562 in your 'private.rc' file." |
1562 in your 'private.rc' file." |
1563 |
1563 |
1564 WarnPossibleIncompatibilities := aBoolean |
1564 WarnPossibleIncompatibilities := aBoolean |
1565 |
1565 |
1566 "Created: / 23-05-1997 / 12:02:45 / cg" |
1566 "Created: / 23-05-1997 / 12:02:45 / cg" |
1575 |
1575 |
1576 warnSTXSpecials:aBoolean |
1576 warnSTXSpecials:aBoolean |
1577 "this allows turning on/off warnings about stx specials. |
1577 "this allows turning on/off warnings about stx specials. |
1578 If you get bored by those warnings, turn them off by adding |
1578 If you get bored by those warnings, turn them off by adding |
1579 a line as: |
1579 a line as: |
1580 ParserFlags warnSTXSpecials:false |
1580 ParserFlags warnSTXSpecials:false |
1581 in your 'private.rc' file" |
1581 in your 'private.rc' file" |
1582 |
1582 |
1583 WarnSTXSpecials := aBoolean |
1583 WarnSTXSpecials := aBoolean |
1584 |
1584 |
1585 "Modified: / 05-09-2006 / 11:46:11 / cg" |
1585 "Modified: / 05-09-2006 / 11:46:11 / cg" |
1596 You may find those warnings useful, to make certain that your code |
1596 You may find those warnings useful, to make certain that your code |
1597 is portable to other smalltalk versions, which do not allow this |
1597 is portable to other smalltalk versions, which do not allow this |
1598 (i.e. VW releases 2.x). |
1598 (i.e. VW releases 2.x). |
1599 If you get bored by those warnings, turn them off by adding |
1599 If you get bored by those warnings, turn them off by adding |
1600 a line as: |
1600 a line as: |
1601 ParserFlags warnUnderscoreInIdentifier:false |
1601 ParserFlags warnUnderscoreInIdentifier:false |
1602 in your 'private.rc' file" |
1602 in your 'private.rc' file" |
1603 |
1603 |
1604 WarnUnderscoreInIdentifier := aBoolean |
1604 WarnUnderscoreInIdentifier := aBoolean |
1605 |
1605 |
1606 "Modified: / 05-09-2006 / 11:46:08 / cg" |
1606 "Modified: / 05-09-2006 / 11:46:08 / cg" |
1625 ! |
1625 ! |
1626 |
1626 |
1627 warnings:aBoolean |
1627 warnings:aBoolean |
1628 "this allows turning on/off all warnings; the default is on. |
1628 "this allows turning on/off all warnings; the default is on. |
1629 You can turn off warnings in your 'private.rc' file with |
1629 You can turn off warnings in your 'private.rc' file with |
1630 ParserFlags warnings:false |
1630 ParserFlags warnings:false |
1631 " |
1631 " |
1632 |
1632 |
1633 Warnings := aBoolean |
1633 Warnings := aBoolean |
1634 |
1634 |
1635 " |
1635 " |
1807 notice: for now, can only initialize for borland+windows or linux; |
1807 notice: for now, can only initialize for borland+windows or linux; |
1808 visualC setup still fails." |
1808 visualC setup still fails." |
1809 |
1809 |
1810 |topDir topDirName vcTop sdkTop bccTop mingwTop |
1810 |topDir topDirName vcTop sdkTop bccTop mingwTop |
1811 borlandDir useBorlandC useVisualC useMingw32 useMingw64 |
1811 borlandDir useBorlandC useVisualC useMingw32 useMingw64 |
1812 programFiles archArg picArg| |
1812 programFiles archArg picArg optArg| |
1813 |
1813 |
1814 topDir := topDirArg. |
1814 topDir := topDirArg. |
1815 OperatingSystem isMSWINDOWSlike ifTrue:[ |
1815 OperatingSystem isMSWINDOWSlike ifTrue:[ |
1816 topDirArg isString ifTrue:[ |
1816 topDirArg isString ifTrue:[ |
1817 topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg. |
1817 topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg. |
1963 STCCompilationDefines := ''. |
1963 STCCompilationDefines := ''. |
1964 STCCompilationOptions := '+optinline +inlineNew'. |
1964 STCCompilationOptions := '+optinline +inlineNew'. |
1965 STCPath := topDirName,'/stc/stc'. |
1965 STCPath := topDirName,'/stc/stc'. |
1966 |
1966 |
1967 archArg := picArg := ''. |
1967 archArg := picArg := ''. |
1968 optArg := '-O'. |
|
1968 (ExternalBytes sizeofPointer == 4) ifTrue:[ |
1969 (ExternalBytes sizeofPointer == 4) ifTrue:[ |
1969 archArg := ' -m32' |
1970 archArg := ' -m32' |
1970 ] ifFalse:[ |
1971 ] ifFalse:[ |
1971 archArg := ' -m64'. "gcc -m64 needs -fPIC to make a shared library" |
1972 archArg := ' -m64'. "gcc -m64 needs -fPIC to make a shared library" |
1972 picArg := ' -fPIC'. |
1973 picArg := ' -fPIC'. |
1973 ]. |
1974 ]. |
1974 CCCompilationOptions := STCCompilerInterface getCPUDefine, |
1975 self useClang ifTrue:[ |
1975 ' -D', self usedCompilerDefine, |
|
1976 ' ', STCCompilerInterface getOSDefine, |
|
1977 ' ', '-O', archArg, picArg. |
|
1978 ParserFlags useClang ifTrue:[ |
|
1979 CCPath := 'clang' |
1976 CCPath := 'clang' |
1980 ] ifFalse:[ |
1977 ] ifFalse:[ |
1981 ParserFlags useGnuC ifTrue:[ |
1978 self useGnuC ifTrue:[ |
1982 CCPath := 'gcc' |
1979 CCPath := 'gcc'. |
1980 optArg := '-O2 -fno-toplevel-reorder -fno-stack-protector'. |
|
1983 ] ifFalse:[ |
1981 ] ifFalse:[ |
1984 CCPath := 'cc' |
1982 CCPath := 'cc' |
1985 ]. |
1983 ]. |
1986 ]. |
1984 ]. |
1985 CCCompilationOptions := STCCompilerInterface getCPUDefine, |
|
1986 ' -D', self usedCompilerDefine, |
|
1987 ' ', STCCompilerInterface getOSDefine, |
|
1988 ' ', optArg, archArg, picArg. |
|
1987 LinkArgs := archArg. |
1989 LinkArgs := archArg. |
1988 LinkCommand := CCPath. |
1990 LinkCommand := CCPath. |
1989 LinkSharedArgs := '-shared'. |
1991 LinkSharedArgs := '-shared'. |
1990 |
1992 |
1991 OperatingSystem isOSXlike ifTrue:[ |
1993 OperatingSystem isOSXlike ifTrue:[ |
2013 ParserFlags initialize |
2015 ParserFlags initialize |
2014 " |
2016 " |
2015 |
2017 |
2016 "Modified: / 09-08-2006 / 18:47:18 / fm" |
2018 "Modified: / 09-08-2006 / 18:47:18 / fm" |
2017 "Created: / 06-08-2011 / 19:47:47 / cg" |
2019 "Created: / 06-08-2011 / 19:47:47 / cg" |
2020 "Modified: / 11-05-2018 / 14:18:42 / stefan" |
|
2018 ! ! |
2021 ! ! |
2019 |
2022 |
2020 !ParserFlags methodsFor:'accessing'! |
2023 !ParserFlags methodsFor:'accessing'! |
2021 |
2024 |
2022 fullLineNumberInfo |
2025 fullLineNumberInfo |
2561 allowSignedByteArrayElements := aBoolean |
2564 allowSignedByteArrayElements := aBoolean |
2562 ! |
2565 ! |
2563 |
2566 |
2564 allowSqueakExtensions |
2567 allowSqueakExtensions |
2565 "return true, if support for squeak extensions |
2568 "return true, if support for squeak extensions |
2566 computed arrays { .., } |
2569 computed arrays { .., } |
2567 c/java style arguments in message sends rec foo(arg1, ... argN) |
2570 c/java style arguments in message sends rec foo(arg1, ... argN) |
2568 is enabled." |
2571 is enabled." |
2569 |
2572 |
2570 ^ allowSqueakExtensions |
2573 ^ allowSqueakExtensions |
2571 ! |
2574 ! |
2572 |
2575 |
2573 allowSqueakExtensions:aBoolean |
2576 allowSqueakExtensions:aBoolean |
2574 "this allows turning on/off support for squeak extensions: |
2577 "this allows turning on/off support for squeak extensions: |
2575 computed arrays { .., } |
2578 computed arrays { .., } |
2576 c/java style arguments in message sends rec foo(arg1, ... argN) |
2579 c/java style arguments in message sends rec foo(arg1, ... argN) |
2577 " |
2580 " |
2578 |
2581 |
2579 allowSqueakExtensions := aBoolean |
2582 allowSqueakExtensions := aBoolean |
2580 ! |
2583 ! |
2581 |
2584 |