diff -r 451328cc3264 -r 244fc639dba3 ParserFlags.st --- a/ParserFlags.st Fri Feb 03 17:31:59 2006 +0100 +++ b/ParserFlags.st Wed Feb 08 16:11:45 2006 +0100 @@ -31,7 +31,12 @@ allowReservedWordsAsSelectors allowVariableReferences allowLazyValueExtension allowFixedPointLiterals allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals - arraysAreImmutable stringsAreImmutable implicitSelfSends' + arraysAreImmutable stringsAreImmutable implicitSelfSends + stcKeepCIntermediate stcKeepOIntermediate stcKeepSTIntermediate + stcModulePath stcCompilation stcCompilationIncludes + stcCompilationDefines stcCompilationOptions stcPath + ccCompilationOptions ccPath linkArgs linkCommand libPath + searchedLibraries' classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared WarnAboutWrongVariableNames WarnAboutBadComments WarnAboutVariableNameConventions WarnSTXSpecials @@ -48,7 +53,11 @@ AllowExtendedBinarySelectors AllowExtendedSTXSyntax AllowFixedPointLiterals AllowLiteralNameSpaceSymbols ArraysAreImmutable StringsAreImmutable ImplicitSelfSends - AllowVisualAgeESSymbolLiterals' + AllowVisualAgeESSymbolLiterals STCModulePath STCKeepCIntermediate + STCKeepOIntermediate STCKeepSTIntermediate STCCompilation + STCCompilationIncludes STCCompilationDefines + STCCompilationOptions STCPath CCCompilationOptions CCPath + LinkArgs LinkCommand LibPath SearchedLibraries' poolDictionaries:'' category:'System-Compiler' ! @@ -146,6 +155,136 @@ "Created: / 3.8.1998 / 14:53:28 / cg" ! ! +!ParserFlags class methodsFor:'accessing-stc compilation control'! + +ccCompilationOptions + ^ CCCompilationOptions +! + +ccCompilationOptions:aString + CCCompilationOptions := aString +! + +ccPath + ^ CCPath +! + +ccPath:aSymbol + CCPath := aSymbol +! + +libPath + ^ LibPath +! + +libPath:aString + LibPath := aString +! + +linkArgs + ^ LinkArgs +! + +linkArgs:aString + LinkArgs := aString +! + +linkCommand + ^ LinkCommand +! + +linkCommand:aString + LinkCommand := aString +! + +searchedLibraries + ^ SearchedLibraries +! + +searchedLibraries:aString + SearchedLibraries := aString +! + +stcCompilation + ^ STCCompilation +! + +stcCompilation:aSymbol + STCCompilation := aSymbol +! + +stcCompilationDefines + ^ STCCompilationDefines +! + +stcCompilationDefines:aString + STCCompilationDefines := aString +! + +stcCompilationIncludes + ^ STCCompilationIncludes +! + +stcCompilationIncludes:aString + STCCompilationIncludes := aString +! + +stcCompilationOptions + ^ STCCompilationOptions +! + +stcCompilationOptions:aString + STCCompilationOptions := aString +! + +stcKeepCIntermediate + ^ STCKeepCIntermediate +! + +stcKeepCIntermediate:something + STCKeepCIntermediate := something. +! + +stcKeepOIntermediate + ^ STCKeepOIntermediate +! + +stcKeepOIntermediate:something + STCKeepOIntermediate := something. +! + +stcKeepSTIntermediate + ^ STCKeepSTIntermediate +! + +stcKeepSTIntermediate:something + STCKeepSTIntermediate := something. +! + +stcModulePath + ^ STCModulePath +! + +stcModulePath:something + STCModulePath := something. +! + +stcPath + ^ STCPath +! + +stcPath:aSymbol + STCPath := aSymbol +! + +withSTCCompilation:howSymbol do:aBlock + |prev| + + prev := self stcCompilation. + self stcCompilation:howSymbol. + aBlock ensure:[ self stcCompilation:prev ] +! ! + !ParserFlags class methodsFor:'accessing-syntax-control'! allowArrayIndexSyntaxExtension @@ -588,12 +727,190 @@ StringsAreImmutable := false. "/ no longer care for ST-80 compatibility ImplicitSelfSends := false. + STCKeepCIntermediate := false. + STCKeepOIntermediate := false. + STCKeepSTIntermediate := false. + STCModulePath := './modules'. + STCCompilation := #default. + + OperatingSystem isMSWINDOWSlike ifTrue:[ + STCCompilationIncludes := '-I..\..\include -I..\..\libopengl -IC:\Borland\bcc55\Include'. + STCCompilationDefines := '-DWIN32'. + STCCompilationOptions := '+optinline +inlineNew'. + STCPath := '..\..\stc\stc.exe'. + CCCompilationOptions := ''. + CCPath := 'bcc32'. + LinkArgs := '-L..\..\libbc -LC:\Borland\bcc55\Lib -r -c -ap -Tpd -Gi -w-dup'. + LinkCommand := 'ilink32'. + LibPath := ''. + SearchedLibraries := 'import32.lib'. + ] ifFalse:[ + STCCompilationIncludes := '-I../../include'. + STCCompilationDefines := ''. + STCCompilationOptions := '+optinline +inlineNew'. + STCPath := '../../stc/stc'. + CCCompilationOptions := '-O'. + CCPath := 'cc'. + LinkArgs := ''. + LinkCommand := 'ld'. + LibPath := ''. + SearchedLibraries := ''. + ]. + " ParserFlags initialize " ! ! -!ParserFlags methodsFor:'accessing'! +!ParserFlags methodsFor:'accessing-compilation control'! + +arraysAreImmutable + ^ arraysAreImmutable +! + +arraysAreImmutable:aBoolean + arraysAreImmutable := aBoolean. +! + +stringsAreImmutable + ^ stringsAreImmutable +! + +stringsAreImmutable:aBoolean + stringsAreImmutable := aBoolean. +! ! + +!ParserFlags methodsFor:'accessing-stc compilation control'! + +ccCompilationOptions + ^ ccCompilationOptions +! + +ccCompilationOptions:something + ccCompilationOptions := something. +! + +ccPath + ^ ccPath +! + +ccPath:something + ccPath := something. +! + +implicitSelfSends + ^ implicitSelfSends +! + +implicitSelfSends:aBoolean + implicitSelfSends := aBoolean. +! + +libPath + ^ libPath +! + +libPath:aString + libPath := aString +! + +linkArgs + ^ linkArgs +! + +linkArgs:aString + linkArgs := aString +! + +linkCommand + ^ linkCommand +! + +linkCommand:aString + linkCommand := aString +! + +searchedLibraries + ^ searchedLibraries +! + +searchedLibraries:aString + searchedLibraries := aString +! + +stcCompilation + ^ stcCompilation +! + +stcCompilation:something + stcCompilation := something. +! + +stcCompilationDefines + ^ stcCompilationDefines +! + +stcCompilationDefines:something + stcCompilationDefines := something. +! + +stcCompilationIncludes + ^ stcCompilationIncludes +! + +stcCompilationIncludes:something + stcCompilationIncludes := something. +! + +stcCompilationOptions + ^ stcCompilationOptions +! + +stcCompilationOptions:something + stcCompilationOptions := something. +! + +stcKeepCIntermediate + ^ stcKeepCIntermediate +! + +stcKeepCIntermediate:something + stcKeepCIntermediate := something. +! + +stcKeepOIntermediate + ^ stcKeepOIntermediate +! + +stcKeepOIntermediate:something + stcKeepOIntermediate := something. +! + +stcKeepSTIntermediate + ^ stcKeepSTIntermediate +! + +stcKeepSTIntermediate:something + stcKeepSTIntermediate := something. +! + +stcModulePath + ^ stcModulePath +! + +stcModulePath:something + stcModulePath := something. +! + +stcPath + ^ stcPath +! + +stcPath:something + stcPath := something. +! ! + +!ParserFlags methodsFor:'accessing-syntax-control'! allowArrayIndexSyntaxExtension ^ allowArrayIndexSyntaxExtension @@ -747,31 +1064,9 @@ allowVisualAgeESSymbolLiterals:aBoolean allowVisualAgeESSymbolLiterals := aBoolean. -! - -arraysAreImmutable - ^ arraysAreImmutable -! - -arraysAreImmutable:aBoolean - arraysAreImmutable := aBoolean. -! +! ! -implicitSelfSends - ^ implicitSelfSends -! - -implicitSelfSends:aBoolean - implicitSelfSends := aBoolean. -! - -stringsAreImmutable - ^ stringsAreImmutable -! - -stringsAreImmutable:aBoolean - stringsAreImmutable := aBoolean. -! +!ParserFlags methodsFor:'accessing-warning-control'! warnAboutBadComments ^ warnAboutBadComments @@ -935,6 +1230,22 @@ stringsAreImmutable := StringsAreImmutable ? true. implicitSelfSends := ImplicitSelfSends ? false. + stcKeepCIntermediate := STCKeepCIntermediate. + stcKeepOIntermediate := STCKeepOIntermediate. + stcKeepSTIntermediate := STCKeepSTIntermediate. + stcModulePath := STCModulePath. + stcCompilation := STCCompilation. + stcCompilationIncludes := STCCompilationIncludes. + stcCompilationDefines := STCCompilationDefines. + stcCompilationOptions := STCCompilationOptions. + stcPath := STCPath. + ccCompilationOptions := CCCompilationOptions. + ccPath := CCPath. + linkArgs := LinkArgs. + linkCommand := LinkCommand. + libPath := LibPath. + searchedLibraries := SearchedLibraries. + " ParserFlags initialize. self new inspect. @@ -944,7 +1255,7 @@ !ParserFlags class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.4 2006-02-03 16:06:37 cg Exp $' + ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.5 2006-02-08 15:11:45 cg Exp $' ! ! ParserFlags initialize!