--- a/ParserFlags.st Thu May 14 14:26:26 2009 +0200
+++ b/ParserFlags.st Mon May 18 16:27:54 2009 +0200
@@ -45,7 +45,8 @@
stcKeepOIntermediate stcKeepSTIntermediate stcModulePath
stcCompilation stcCompilationIncludes stcCompilationDefines
stcCompilationOptions stcPath ccCompilationOptions ccPath
- linkArgs linkSharedArgs linkCommand libPath searchedLibraries'
+ linkArgs linkSharedArgs linkCommand libPath searchedLibraries
+ warnAboutPeriodInSymbol allowPeriodInSymbol'
classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared
WarnAboutWrongVariableNames WarnAboutBadComments
WarnAboutVariableNameConventions WarnSTXSpecials
@@ -56,7 +57,7 @@
WarnInconsistentReturnValues Warnings
WarnAboutPossibleSTCCompilationProblems
WarnAboutReferenceToPrivateClass WarnAboutShortLocalVariableNames
- WarnAboutPossiblyUnimplementedSelectors
+ WarnAboutPossiblyUnimplementedSelectors WarnAboutPeriodInSymbol
AllowUnderscoreInIdentifier
AllowFunctionCallSyntaxForBlockEvaluation AllowLazyValueExtension
AllowVariableReferences AllowReservedWordsAsSelectors
@@ -72,12 +73,12 @@
AllowHashAsBinarySelector AllowSTXEOLComments
AllowPossibleSTCCompilationProblems AllowEmptyStatements
AllowVisualWorksMethodAnnotations ArraysAreImmutable
- StringsAreImmutable ImplicitSelfSends STCModulePath
- STCKeepCIntermediate STCKeepOIntermediate STCKeepSTIntermediate
- STCCompilation STCCompilationIncludes STCCompilationDefines
- STCCompilationOptions STCPath CCCompilationOptions CCPath
- LinkArgs LinkSharedArgs LinkCommand LibPath SearchedLibraries
- MakeCommand'
+ AllowPeriodInSymbol StringsAreImmutable ImplicitSelfSends
+ STCModulePath STCKeepCIntermediate STCKeepOIntermediate
+ STCKeepSTIntermediate STCCompilation STCCompilationIncludes
+ STCCompilationDefines STCCompilationOptions STCPath
+ CCCompilationOptions CCPath LinkArgs LinkSharedArgs LinkCommand
+ LibPath SearchedLibraries MakeCommand'
poolDictionaries:''
category:'System-Compiler'
!
@@ -591,6 +592,28 @@
AllowOldStyleAssignment := aBoolean
!
+allowPeriodInSymbol
+ "return true, if periods are allowed in a symbol literal #foo.bar.
+ Needed to parse some old ST80/Squeak code"
+
+ ^ AllowPeriodInSymbol
+!
+
+allowPeriodInSymbol:aBoolean
+ "control, if periods are allowed in a symbol literal #foo.bar.
+ Needed to parse some old ST80/Squeak code"
+
+ AllowPeriodInSymbol := aBoolean
+
+ "
+ self allowPeriodInSymbol:true.
+ self assert:( Parser parseExpression:' #foo.bar.baz. ' ) value == #'foo.bar.baz'.
+
+ self allowPeriodInSymbol:false.
+ self assert:( Parser parseExpression:' #foo.bar.baz. ' ) value == #'foo'.
+ "
+!
+
allowQualifiedNames
"return true, if #{..} qualified names are allowed"
@@ -804,6 +827,14 @@
WarnAboutNonLowercaseLocalVariableNames := aBoolean
!
+warnAboutPeriodInSymbol
+ ^ WarnAboutPeriodInSymbol
+!
+
+warnAboutPeriodInSymbol:aBoolean
+ WarnAboutPeriodInSymbol := aBoolean
+!
+
warnAboutPossibleSTCCompilationProblems
^ WarnAboutPossibleSTCCompilationProblems
@@ -1082,6 +1113,7 @@
WarnAboutPossibleSTCCompilationProblems := true.
WarnAboutReferenceToPrivateClass := true.
WarnAboutPossiblyUnimplementedSelectors := true.
+ WarnAboutPeriodInSymbol := true.
AllowReservedWordsAsSelectors := false.
AllowUnderscoreInIdentifier := true. "/ underscores in identifiers
@@ -1114,6 +1146,7 @@
AllowVisualWorksMethodAnnotations := false.
AllowPossibleSTCCompilationProblems := true.
AllowEmptyStatements := false.
+ AllowPeriodInSymbol := false.
ArraysAreImmutable := false. "/ no longer care for ST-80 compatibility
StringsAreImmutable := false. "/ no longer care for ST-80 compatibility
@@ -1477,6 +1510,14 @@
allowOldStyleAssignment := aBoolean
!
+allowPeriodInSymbol
+ ^ allowPeriodInSymbol
+!
+
+allowPeriodInSymbol:aBoolean
+ allowPeriodInSymbol := aBoolean
+!
+
allowQualifiedNames
^ allowQualifiedNames
!
@@ -1618,6 +1659,14 @@
warnAboutNonLowercaseLocalVariableNames := aBoolean.
!
+warnAboutPeriodInSymbol
+ ^ warnAboutPeriodInSymbol
+!
+
+warnAboutPeriodInSymbol:aBoolean
+ warnAboutPeriodInSymbol := aBoolean.
+!
+
warnAboutPossibleSTCCompilationProblems
^ warnAboutPossibleSTCCompilationProblems
@@ -1817,6 +1866,7 @@
warnAboutShortLocalVariableNames := WarnAboutShortLocalVariableNames.
warnAboutPossibleSTCCompilationProblems := WarnAboutPossibleSTCCompilationProblems.
warnAboutPossiblyUnimplementedSelectors := WarnAboutPossiblyUnimplementedSelectors.
+ warnAboutPeriodInSymbol := WarnAboutPeriodInSymbol.
allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier.
allowDollarInIdentifier := AllowDollarInIdentifier.
@@ -1847,6 +1897,7 @@
allowVisualWorksMethodAnnotations := AllowVisualWorksMethodAnnotations.
allowPossibleSTCCompilationProblems := AllowPossibleSTCCompilationProblems.
allowEmptyStatements := AllowEmptyStatements.
+ allowPeriodInSymbol := AllowPeriodInSymbol.
arraysAreImmutable := ArraysAreImmutable ? true.
stringsAreImmutable := StringsAreImmutable ? true.
@@ -1879,7 +1930,7 @@
!ParserFlags class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.45 2009-01-14 21:45:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.46 2009-05-18 14:27:54 cg Exp $'
! !
ParserFlags initialize!