ParserFlags.st
author Claus Gittinger <cg@exept.de>
Wed, 08 Mar 2006 13:10:42 +0100
changeset 1700 77551e0e8290
parent 1689 bb1dea093526
child 1701 d122f5efa601
permissions -rw-r--r--
*** empty log message ***

"
 COPYRIGHT (c) 1989 by Claus Gittinger
 COPYRIGHT (c) 2005 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

"{ Package: 'stx:libcomp' }"

Object subclass:#ParserFlags
	instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives
		warnSTXHereExtensionUsed warnSTXSpecialComment
		warnUnderscoreInIdentifier warnOldStyleAssignment
		warnCommonMistakes warnSTXNameSpaceUse
		warnPossibleIncompatibilities warnDollarInIdentifier
		warnHiddenVariables warnAboutVariableNameConventions
		warnAboutWrongVariableNames warnAboutBadComments
		warnInconsistentReturnValues allowLiteralNameSpaceSymbols
		allowUnderscoreInIdentifier allowDollarInIdentifier
		allowOldStyleAssignment allowSqueakExtensions
		allowDolphinExtensions allowExtendedBinarySelectors
		allowQualifiedNames allowFunctionCallSyntaxForBlockEvaluation
		allowLocalVariableDeclarationWithInitializerExpression
		allowDomainVariables allowArrayIndexSyntaxExtension
		allowReservedWordsAsSelectors allowVariableReferences
		allowLazyValueExtension allowFixedPointLiterals
		allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals
		allowExtensionsToPrivateClasses allowSqueakPrimitives
		allowVisualAgePrimitives allowSTVPrimitives 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
		WarnOldStyleAssignment WarnUnderscoreInIdentifier
		WarnCommonMistakes WarnPossibleIncompatibilities
		WarnDollarInIdentifier WarnHiddenVariables
		WarnInconsistentReturnValues Warnings AllowUnderscoreInIdentifier
		AllowFunctionCallSyntaxForBlockEvaluation AllowLazyValueExtension
		AllowVariableReferences AllowReservedWordsAsSelectors
		AllowLocalVariableDeclarationWithInitializerExpression
		AllowArrayIndexSyntaxExtension AllowDomainVariables
		AllowDollarInIdentifier AllowSqueakExtensions AllowQualifiedNames
		AllowDolphinExtensions AllowOldStyleAssignment
		AllowExtendedBinarySelectors AllowExtendedSTXSyntax
		AllowFixedPointLiterals AllowLiteralNameSpaceSymbols
		AllowVisualAgeESSymbolLiterals AllowExtensionsToPrivateClasses
		AllowSqueakPrimitives AllowVisualAgePrimitives AllowSTVPrimitives
		ArraysAreImmutable StringsAreImmutable ImplicitSelfSends
		STCModulePath STCKeepCIntermediate STCKeepOIntermediate
		STCKeepSTIntermediate STCCompilation STCCompilationIncludes
		STCCompilationDefines STCCompilationOptions STCPath
		CCCompilationOptions CCPath LinkArgs LinkCommand LibPath
		SearchedLibraries'
	poolDictionaries:''
	category:'System-Compiler'
!

!ParserFlags class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1989 by Claus Gittinger
 COPYRIGHT (c) 2005 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    compiler flags (used to be defined in Scanner and Parser) have been extracted for easier
    individual-method customization (using ST as scripting).
"
! !

!ParserFlags class methodsFor:'instance creation'!

new
    ^ self basicNew initialize
! !

!ParserFlags class methodsFor:'accessing-compilation control'!

allowExtensionsToPrivateClasses
    ^ AllowExtensionsToPrivateClasses
!

allowExtensionsToPrivateClasses:aBoolean
    AllowExtensionsToPrivateClasses := aBoolean
!

arraysAreImmutable
    "return true if arrays are immutable literals"

    ^ ArraysAreImmutable
!

arraysAreImmutable:aBoolean
    "turn on/off immutable array literals - default is false for ST-80 compatibilty."

    ArraysAreImmutable := aBoolean.

    "
     can be added to your private.rc file:

     ParserFlags arraysAreImmutable:true     
     ParserFlags arraysAreImmutable:false      
    "
!

implicitSelfSends
    "return true if undefined variables with
     lowercase first character are to be turned
     into implicit self sends"

    ^ ImplicitSelfSends
!

implicitSelfSends:aBoolean
    "turn on/off implicit self sends"

    ImplicitSelfSends := aBoolean

    "
     Compiler implicitSelfSends:true
     Compiler implicitSelfSends:false 
    "
!

stringsAreImmutable
    "return true if strings are immutable literals"

    ^ StringsAreImmutable

    "Created: / 3.8.1998 / 14:53:25 / cg"
!

stringsAreImmutable:aBoolean
    "turn on/off immutable string literals - default is false for ST-80 compatibilty."

    StringsAreImmutable := aBoolean.

    "
     can be added to your private.rc file:

     ParserFlags stringsAreImmutable:true     
     ParserFlags stringsAreImmutable:false      
    "

    "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
    "experimental"

    ^ AllowArrayIndexSyntaxExtension ? false
!

allowArrayIndexSyntaxExtension:aBoolean
    "experimental"

    AllowArrayIndexSyntaxExtension := aBoolean.

    "
     self allowArrayIndexSyntaxExtension:true
     self allowArrayIndexSyntaxExtension:false
    "
!

allowDollarInIdentifier
    "return true, if $-characters are allowed in identifiers.
     Notice, that dollars are NEVER allowed as the first character in an identifier."

    ^ AllowDollarInIdentifier

    "Created: 7.9.1997 / 01:32:18 / cg"
    "Modified: 7.9.1997 / 01:39:44 / cg"
!

allowDollarInIdentifier:aBoolean
    "this allows turning on/off $-characters in identifiers.
     Notice, that dollars are NEVER allowed as the first character in an identifier.
     If turned off (the default), dollars are not allowed in identifiers,
     but instead are scanned as character-constant prefix.
     If turned on, dollars are in identifiers are allowed, while extra
     dollars are still scanned as constant character prefix.
     If you have to fileIn old VW-Vsn2.x classes, turn this off
     before filing them in; i.e.:
        Compiler allowDollarInIdentifiers:false"

    AllowDollarInIdentifier := aBoolean.

    "Created: 7.9.1997 / 01:34:49 / cg"
    "Modified: 7.9.1997 / 01:39:30 / cg"
!

allowDolphinExtensions
    "return true, if ##(..) computed literals are allowed"

    ^ AllowDolphinExtensions
!

allowDolphinExtensions:aBoolean
    "this allows turning on/off support for computed arrays ##(..) as in dolphin.
     If you want to fileIn Dolphin classes, enable this with:
        Compiler allowDolphinComputedArrays:true"

    AllowDolphinExtensions := aBoolean.

    "
     self allowDolphinExtensions:true
     self allowDolphinExtensions:false
    "
!

allowExtendedSTXSyntax
    "experimental syntay extensions"

    ^ AllowExtendedSTXSyntax
!

allowExtendedSTXSyntax:aBoolean
    "experimental syntay extensions"

    AllowExtendedSTXSyntax := aBoolean

    "
     self allowExtendedSTXSyntax:true
     'a\tb' inspect.
     'a\u1616b' inspect.
     self allowExtendedSTXSyntax:false   
    "
!

allowFixedPointLiterals
    "return true, if nnnsn (FixedPoint) literals are allowed"

    ^ AllowFixedPointLiterals
!

allowFixedPointLiterals:aBoolean
    "enable/disable, if nnnsn (FixedPoint) literals are allowed"

    AllowFixedPointLiterals := aBoolean
!

allowFunctionCallSyntaxForBlockEvaluation
    "experimental"

    ^ AllowFunctionCallSyntaxForBlockEvaluation
!

allowFunctionCallSyntaxForBlockEvaluation:aBoolean
    "experimental"

    AllowFunctionCallSyntaxForBlockEvaluation := aBoolean.
!

allowLiteralNameSpaceSymbols
    "return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed"

    ^ AllowLiteralNameSpaceSymbols
!

allowLiteralNameSpaceSymbols:aBoolean
    "controls, if literal nameSpace symbols are allowed (#foo::bar) are allowed"

    AllowLiteralNameSpaceSymbols := aBoolean
!

allowLocalVariableDeclarationWithInitializerExpression
    "experimental"

    ^ AllowLocalVariableDeclarationWithInitializerExpression
!

allowLocalVariableDeclarationWithInitializerExpression:aBoolean
    "experimental"

    AllowLocalVariableDeclarationWithInitializerExpression := aBoolean.
!

allowOldStyleAssignment
    "return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed"

    ^ AllowOldStyleAssignment
!

allowOldStyleAssignment:aBoolean
    "this allows turning on/off recognition of underscore-assignment (pre ST-80v4 syntax).
     You must turn this off, if code with variables named '_' is to be filedIn"

    AllowOldStyleAssignment := aBoolean
!

allowQualifiedNames
    "return true, if #{..} qualified names are allowed"

    ^ AllowQualifiedNames
!

allowQualifiedNames:aBoolean
    "this allows turning on/off support for qualifiedNames #{ .., } as in vw3.
     If you want to fileIn vw3 or later classes, enable this with:
        Compiler allowQualifiedNames:true
     Notice, that qualified names are not really supported semantically
     (they are parsed, but treated like regular globals)
    "

    AllowQualifiedNames := aBoolean.

    "
     self allowQualifiedNames:true
     self allowQualifiedNames:false
    "
!

allowReservedWordsAsSelectors
    "return true, if self, super, thisContext, nil, true and false are to be allowed
     as unary message selectors."

    ^ AllowReservedWordsAsSelectors ? false
!

allowReservedWordsAsSelectors:aBoolean
    "enable/disable, if self, super, thisContext, nil, true and false are to be allowed
     as unary message selectors."

    AllowReservedWordsAsSelectors := aBoolean.

    "
     self allowReservedWordsAsSelectors:true
     self allowReservedWordsAsSelectors:false
    "
!

allowSTVPrimitives
    "return true, if support for ST/V primitives is enabled."

    ^ AllowSTVPrimitives
!

allowSTVPrimitives:aBoolean
    "this allows turning on/off support for ST/V primitives"

    AllowSTVPrimitives := aBoolean
!

allowSqueakExtensions
    "return true, if support for squeak extensions
        computed arrays { .., }
        c/java style arguments in message sends rec foo(arg1, ... argN)
     is enabled."

    ^ AllowSqueakExtensions
!

allowSqueakExtensions:aBoolean
    "this allows turning on/off support for squeak extensions:
        computed arrays { .., }
        c/java style arguments in message sends rec foo(arg1, ... argN)

     If you want to fileIn Squeak classes, enable this with:
        Compiler allowSqueakComputedArrays:true"

    AllowSqueakExtensions := aBoolean.

    "
     self allowSqueakExtensions:true
     self allowSqueakExtensions:false
    "
!

allowSqueakPrimitives
    "return true, if support for squeak primitives is enabled."

    ^ AllowSqueakPrimitives
!

allowSqueakPrimitives:aBoolean
    "this allows turning on/off support for squeak primitives"

    AllowSqueakPrimitives := aBoolean
!

allowUnderscoreInIdentifier
    "return true, if underscores are allowed in identifiers"

    ^ AllowUnderscoreInIdentifier
!

allowUnderscoreInIdentifier:aBoolean
    "this allows turning on/off underscores in identifiers.
     If turned off (the default), underscores are not allowed in identifiers,
     but instead scanned as assignment character (old ST/80 syntax).
     If turned on, underscores are in identifiers are allowed, while extra
     underscores are still scanned as assignment.
     If you have to fileIn old VW-Vsn2.x classes, 
     turn them off with:
        Compiler allowUnderscoreInIdentifiers:false"

    AllowUnderscoreInIdentifier := aBoolean.

    "Modified: 7.9.1997 / 01:35:19 / cg"
!

allowVisualAgeESSymbolLiterals
    "return true, if ##symbols are allowed (treated like symbols)"

    ^ AllowVisualAgeESSymbolLiterals
!

allowVisualAgeESSymbolLiterals:aBoolean
    "if on, visualAge's ##symbols are allowed (treated like symbols)"

    AllowVisualAgeESSymbolLiterals := aBoolean.
!

allowVisualAgePrimitives
    "return true, if support for V'Age primitives is enabled."

    ^ AllowVisualAgePrimitives
!

allowVisualAgePrimitives:aBoolean
    "this allows turning on/off support for V'Age primitives"

    AllowVisualAgePrimitives := aBoolean
! !

!ParserFlags class methodsFor:'accessing-warning-control'!

warnAboutBadComments
    "controls generation of warning messages about empty comments"
    
    ^ WarnAboutBadComments
!

warnAboutBadComments:aBoolean
    "controls generation of warning messages about empty comments"
    
    WarnAboutBadComments := aBoolean
!

warnAboutVariableNameConventions 
    "controls generation of warning messages about wrong variable names"
    
    ^ WarnAboutVariableNameConventions
!

warnAboutVariableNameConventions:aBoolean 
    "controls generation of warning messages about wrong variable names"
    
    WarnAboutVariableNameConventions := aBoolean
!

warnAboutWrongVariableNames
    "controls generation of warning messages about wrong variable names"
    
    ^ WarnAboutWrongVariableNames
!

warnAboutWrongVariableNames:aBoolean
    "controls generation of warning messages about wrong variable names"
    
    WarnAboutWrongVariableNames := aBoolean
!

warnCommonMistakes
    "return true, if common beginners mistakes are to be warned about"

    ^ Warnings and:[WarnCommonMistakes]
!

warnCommonMistakes:aBoolean
    "this allows turning on/off warnings about common beginners mistakes.
     Those are not really errors in the strict sense, but often lead to
     run time errors later.
     Examples are: expr or:expr2, where expr2 is not a block.
     If you get bored by those warnings, turn them off by adding
     a line as:
        Compiler warnCommonMistakes:false
     in your 'private.rc' file"

    WarnCommonMistakes := aBoolean
!

warnDollarInIdentifier
    "return true, if $-characters in identifiers are to be warned about"

    ^ Warnings and:[WarnDollarInIdentifier]

    "Created: 7.9.1997 / 01:36:17 / cg"
!

warnDollarInIdentifier:aBoolean
    "this allows turning on/off warnings about $-characters in identifiers.
     You may find those warnings useful, to make certain that your code
     is portable to other smalltalk versions, which do not allow this
     (i.e. VW releases 2.x and maybe others).
     Notice, that dollars are NEVER allowed as the first character in an identifier.
     If you get bored by those warnings, turn them off by adding
     a line as:
        Compiler warnDollarInIdentifier:false
     in your 'private.rc' file"

    WarnDollarInIdentifier := aBoolean

    "Created: 7.9.1997 / 01:37:42 / cg"
    "Modified: 7.9.1997 / 01:40:02 / cg"
!

warnHiddenVariables
    "controls generation of warning messages about hiding variables by locals"
    
    ^ WarnHiddenVariables
!

warnHiddenVariables:aBoolean
    "controls generation of warning messages about hiding variables by locals"

    WarnHiddenVariables := aBoolean
!

warnInconsistentReturnValues
    "return true, if compiler should warn about inconsitent (boolean / non-boolean)
     return values"

    ^ WarnInconsistentReturnValues
!

warnInconsistentReturnValues:aBoolean
    "constrols if the compiler should warn about inconsitent (boolean / non-boolean)
     return values"

    WarnInconsistentReturnValues := aBoolean
!

warnOldStyleAssignment
    "return true, if underscore-assignment (pre ST-80v4 syntax) are to be warned about"

    ^ Warnings and:[WarnOldStyleAssignment]
!

warnOldStyleAssignment:aBoolean
    "this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax).
     If you get bored by those warnings, turn them off by adding
     a line as:
        Compiler warnOldStyleAssignment:false
     in your 'private.rc' file"

    WarnOldStyleAssignment := aBoolean
!

warnPossibleIncompatibilities
    "return true, if possible incompatibilities (with other ST systems)
     are to be warned about"

    ^ Warnings and:[WarnPossibleIncompatibilities]

    "Modified: 23.5.1997 / 12:02:02 / cg"
!

warnPossibleIncompatibilities:aBoolean
    "this turns warnings about possible incompatibilities (with other ST systems)
     on or off.
     If you get bored by those warnings, turn them off by adding
     a line as:
        Compiler warnPossibleIncompatibilities:false
     in your 'private.rc' file."

    WarnPossibleIncompatibilities := aBoolean

    "Created: 23.5.1997 / 12:02:45 / cg"
!

warnSTXSpecials
    "return true, if ST/X specials are to be warned about"

    ^ Warnings and:[WarnSTXSpecials]
!

warnSTXSpecials:aBoolean
    "this allows turning on/off warnings about stx specials.
     If you get bored by those warnings, turn them off by adding
     a line as:
        Compiler warnSTXSpecials:false
     in your 'private.rc' file"

    WarnSTXSpecials := aBoolean
!

warnUnderscoreInIdentifier
    "return true, if underscores in identifiers are to be warned about"

    ^ Warnings and:[WarnUnderscoreInIdentifier]
!

warnUnderscoreInIdentifier:aBoolean
    "this allows turning on/off warnings about underscores in identifiers.
     You may find those warnings useful, to make certain that your code
     is portable to other smalltalk versions, which do not allow this
     (i.e. VW releases 2.x).
     If you get bored by those warnings, turn them off by adding
     a line as:
        Compiler warnUnderscoreInIdentifier:false
     in your 'private.rc' file"

    WarnUnderscoreInIdentifier := aBoolean

    "Modified: 7.9.1997 / 01:37:13 / cg"
!

warnUnusedVars
    "controls generation of warning messages about unued method variables"

    ^ WarnUnusedVars
!

warnUnusedVars:aBoolean
    "controls generation of warning messages about unued method variables"

    WarnUnusedVars := aBoolean
!

warnings
    "return true, if any warnings are to be shown"

    ^ Warnings
!

warnings:aBoolean
    "this allows turning on/off all warnings; the default is on.
     You can turn off warnings in your 'private.rc' file with
         Compiler warnings:false
    "

    Warnings := aBoolean

    "Modified: 23.5.1997 / 12:03:05 / cg"
! !

!ParserFlags class methodsFor:'class initialization'!

initialize
    Warnings := true.
    WarnUndeclared := true.
    WarnUnusedVars := true.
    WarnSTXSpecials := false.
    WarnST80Directives := false.
    WarnAboutWrongVariableNames := true.
    WarnAboutVariableNameConventions := true.
    WarnAboutBadComments := true.
    WarnUnderscoreInIdentifier := false.
    WarnDollarInIdentifier := true.
    WarnOldStyleAssignment := true.
    WarnCommonMistakes := true.
    WarnPossibleIncompatibilities := false.
    WarnHiddenVariables := true.
    WarnInconsistentReturnValues := true.

    AllowReservedWordsAsSelectors := false.
    AllowUnderscoreInIdentifier := true.        "/ underscores in identifiers
    AllowDollarInIdentifier := false.           "/ st80-vms dollars in identifiers
    AllowOldStyleAssignment := true.            "/ st80 underscore as assignment
    AllowSqueakExtensions := false.             "/ squeak computed array
    AllowDolphinExtensions := false.            "/ dolphin computed literal
    AllowQualifiedNames := false.               "/ vw3 qualified names
    AllowExtendedBinarySelectors := false.      "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.)
    AllowLiteralNameSpaceSymbols := true.       "/ st/x literal nameSpace-symbols (#foo::bar)
    AllowArrayIndexSyntaxExtension := false.
    AllowFunctionCallSyntaxForBlockEvaluation := false.
    AllowLocalVariableDeclarationWithInitializerExpression := false.
    AllowDomainVariables := false.
    AllowArrayIndexSyntaxExtension := false.
    AllowReservedWordsAsSelectors := true.
    AllowVariableReferences := false.
    AllowLazyValueExtension := false.
    AllowFixedPointLiterals := false.
    AllowExtendedSTXSyntax := false.
    AllowVisualAgeESSymbolLiterals := false.
    AllowExtensionsToPrivateClasses := true.
    AllowVisualAgePrimitives := false.
    AllowSqueakPrimitives := false.
    AllowSTVPrimitives := false.

    ArraysAreImmutable := false.                "/ no longer care for ST-80 compatibility
    StringsAreImmutable := false.               "/ no longer care for ST-80 compatibility
    ImplicitSelfSends := false.

    STCKeepCIntermediate := false.
    STCKeepOIntermediate := false.
    STCKeepSTIntermediate := false.
    STCModulePath := './modules'.
    STCCompilation := #default.

    OperatingSystem isMSWINDOWSlike ifTrue:[
        'C:\Borland\bcc55' asFilename exists ifTrue:[
            STCCompilationIncludes := '-I..\..\include -I..\..\libopengl -IC:\Borland\bcc55\Include'.
            LinkArgs := '-L..\..\libbc -LC:\Borland\bcc55\Lib -r -c -ap -Tpd -Gi -w-dup'.
        ] ifFalse:[
            STCCompilationIncludes := '-I..\..\include -I..\..\libopengl -IC:\Borland\xxxxx\Include'.
            LinkArgs := '-L..\..\libbc -LC:\Borland\xxxxx\Lib -r -c -ap -Tpd -Gi -w-dup'.
        ].
        STCCompilationDefines := '-DWIN32'.
        STCCompilationOptions := '+optinline +inlineNew'.
        STCPath := '..\..\stc\stc.exe'.
        CCCompilationOptions := ''.
        OperatingSystem getCCDefine = '__BORLANDC__' ifTrue:[
            CCPath := 'bcc32'
        ] ifFalse:[
            CCPath := 'cl'
        ].
        LinkCommand := 'ilink32'.
        LibPath := ''.
        SearchedLibraries := #('import32.lib').
    ] ifFalse:[
        STCCompilationIncludes := '-I../../include'.
        STCCompilationDefines := ''.
        STCCompilationOptions := '+optinline +inlineNew'.
        STCPath := '../../stc/stc'.
        CCCompilationOptions := '-O'.
        OperatingSystem getCCDefine = '__GNUC__' ifTrue:[
            CCPath := 'gcc'
        ] ifFalse:[
            CCPath := 'cc'
        ].
        LinkArgs := ''.
        LinkCommand := 'ld'.
        LibPath := ''.
        SearchedLibraries := #().
    ].

    "
     ParserFlags initialize
    "
! !

!ParserFlags methodsFor:'accessing-compilation control'!

allowExtensionsToPrivateClasses
    ^ allowExtensionsToPrivateClasses
!

allowExtensionsToPrivateClasses:aBoolean
    allowExtensionsToPrivateClasses := aBoolean
!

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
!

allowArrayIndexSyntaxExtension:aBoolean
    allowArrayIndexSyntaxExtension := aBoolean.
!

allowDollarInIdentifier
    ^ allowDollarInIdentifier
!

allowDollarInIdentifier:aBoolean
    allowDollarInIdentifier := aBoolean.
!

allowDolphinExtensions
    ^ allowDolphinExtensions
!

allowDolphinExtensions:aBoolean
    allowDolphinExtensions := aBoolean
!

allowDomainVariables
    ^ allowDomainVariables
!

allowDomainVariables:aBoolean
    allowDomainVariables := aBoolean.
!

allowExtendedBinarySelectors
    ^ allowExtendedBinarySelectors
!

allowExtendedBinarySelectors:aBoolean
    allowExtendedBinarySelectors := aBoolean.
!

allowExtendedSTXSyntax
    ^ allowExtendedSTXSyntax
!

allowExtendedSTXSyntax:something
    allowExtendedSTXSyntax := something.
!

allowFixedPointLiterals
    ^ allowFixedPointLiterals
!

allowFixedPointLiterals:something
    allowFixedPointLiterals := something.
!

allowFunctionCallSyntaxForBlockEvaluation
    ^ allowFunctionCallSyntaxForBlockEvaluation
!

allowFunctionCallSyntaxForBlockEvaluation:aBoolean
    allowFunctionCallSyntaxForBlockEvaluation := aBoolean.
!

allowLazyValueExtension
    ^ allowLazyValueExtension
!

allowLazyValueExtension:something
    allowLazyValueExtension := something.
!

allowLiteralNameSpaceSymbols
    ^ allowLiteralNameSpaceSymbols
!

allowLiteralNameSpaceSymbols:aBoolean
    allowLiteralNameSpaceSymbols := aBoolean
!

allowLocalVariableDeclarationWithInitializerExpression
    ^ allowLocalVariableDeclarationWithInitializerExpression
!

allowLocalVariableDeclarationWithInitializerExpression:aBoolean
    allowLocalVariableDeclarationWithInitializerExpression := aBoolean.
!

allowOldStyleAssignment
    ^ allowOldStyleAssignment
!

allowOldStyleAssignment:aBoolean
    allowOldStyleAssignment := aBoolean
!

allowQualifiedNames
    ^ allowQualifiedNames
!

allowQualifiedNames:aBoolean
    allowQualifiedNames := aBoolean.
!

allowReservedWordsAsSelectors
    ^ allowReservedWordsAsSelectors
!

allowReservedWordsAsSelectors:aBoolean
    allowReservedWordsAsSelectors := aBoolean.
!

allowSqueakExtensions
    "return true, if support for squeak extensions
        computed arrays { .., }
        c/java style arguments in message sends rec foo(arg1, ... argN)
     is enabled."

    ^ allowSqueakExtensions
!

allowSqueakExtensions:aBoolean
    "this allows turning on/off support for squeak extensions:
        computed arrays { .., }
        c/java style arguments in message sends rec foo(arg1, ... argN)
    "

    allowSqueakExtensions := aBoolean
!

allowSqueakPrimitives
    "return true, if support for squeak primitives is enabled."

    ^ allowSqueakPrimitives
!

allowSqueakPrimitives:aBoolean
    "this allows turning on/off support for squeak primitives"

    allowSqueakPrimitives := aBoolean
!

allowUnderscoreInIdentifier
    ^ allowUnderscoreInIdentifier
!

allowUnderscoreInIdentifier:aBoolean
    allowUnderscoreInIdentifier := aBoolean
!

allowVariableReferences
    ^ allowVariableReferences
!

allowVariableReferences:aBoolean
    allowVariableReferences := aBoolean.
!

allowVisualAgeESSymbolLiterals
    ^ allowVisualAgeESSymbolLiterals
!

allowVisualAgeESSymbolLiterals:aBoolean
    allowVisualAgeESSymbolLiterals := aBoolean.
!

allowVisualAgePrimitives
    "return true, if support for V'Age primitives is enabled."

    ^ allowVisualAgePrimitives
!

allowVisualAgePrimitives:aBoolean
    "this allows turning on/off support for V'Age primitives"

    allowVisualAgePrimitives := aBoolean
! !

!ParserFlags methodsFor:'accessing-warning-control'!

warnAboutBadComments
    ^ warnAboutBadComments
!

warnAboutBadComments:aBoolean
    warnAboutBadComments := aBoolean.
!

warnAboutVariableNameConventions
    ^ warnAboutVariableNameConventions
!

warnAboutVariableNameConventions:aBoolean
    warnAboutVariableNameConventions := aBoolean.
!

warnAboutWrongVariableNames
    ^ warnAboutWrongVariableNames
!

warnAboutWrongVariableNames:aBoolean
    warnAboutWrongVariableNames := aBoolean.
!

warnCommonMistakes
    ^ warnCommonMistakes
!

warnCommonMistakes:aBoolean
    warnCommonMistakes := aBoolean.
!

warnDollarInIdentifier
    ^ warnDollarInIdentifier
!

warnDollarInIdentifier:aBoolean
    warnDollarInIdentifier := aBoolean.
!

warnHiddenVariables
    ^ warnHiddenVariables
!

warnHiddenVariables:aBoolean
    warnHiddenVariables := aBoolean.
!

warnInconsistentReturnValues
    ^ warnInconsistentReturnValues
!

warnInconsistentReturnValues:aBoolean
    warnInconsistentReturnValues := aBoolean.
!

warnOldStyleAssignment
    ^ warnOldStyleAssignment
!

warnOldStyleAssignment:aBoolean
    warnOldStyleAssignment := aBoolean.
!

warnPossibleIncompatibilities
    ^ warnPossibleIncompatibilities
!

warnPossibleIncompatibilities:aBoolean
    warnPossibleIncompatibilities := aBoolean.
!

warnST80Directives
    ^ warnST80Directives
!

warnST80Directives:something
    warnST80Directives := something.
!

warnSTXHereExtensionUsed
    ^ warnSTXHereExtensionUsed
!

warnSTXHereExtensionUsed:aBoolean
    warnSTXHereExtensionUsed := aBoolean.
!

warnSTXNameSpaceUse
    ^ warnSTXNameSpaceUse
!

warnSTXNameSpaceUse:aBoolean
    warnSTXNameSpaceUse := aBoolean.
!

warnSTXSpecialComment
    ^ warnSTXSpecialComment
!

warnSTXSpecialComment:aBoolean
    warnSTXSpecialComment := aBoolean.
!

warnUndeclared
    ^ warnUndeclared
!

warnUndeclared:aBoolean
    warnUndeclared := aBoolean.
!

warnUnderscoreInIdentifier
    ^ warnUnderscoreInIdentifier
!

warnUnderscoreInIdentifier:aBoolean
    warnUnderscoreInIdentifier := aBoolean.
!

warnUnusedVars
    ^ warnUnusedVars
!

warnUnusedVars:aBoolean
    warnUnusedVars := aBoolean.
!

warnings
    ^ warnings
!

warnings:something
    warnings := something.
! !

!ParserFlags methodsFor:'initialization'!

initialize
    warnings := Warnings.
    warnUndeclared := WarnUndeclared.
    warnUnusedVars := WarnUnusedVars.
    warnST80Directives := WarnST80Directives.
    warnSTXSpecialComment := WarnSTXSpecials.
    warnSTXNameSpaceUse := WarnSTXSpecials.
    warnSTXHereExtensionUsed := WarnSTXSpecials.
    warnUnderscoreInIdentifier := WarnUnderscoreInIdentifier.
    warnDollarInIdentifier := WarnDollarInIdentifier.
    warnOldStyleAssignment := WarnOldStyleAssignment.
    warnCommonMistakes := WarnCommonMistakes.
    warnPossibleIncompatibilities := WarnPossibleIncompatibilities.
    warnAboutVariableNameConventions := WarnAboutVariableNameConventions.
    warnAboutWrongVariableNames := WarnAboutWrongVariableNames.
    warnAboutBadComments := WarnAboutBadComments.
    warnHiddenVariables := WarnHiddenVariables.
    warnInconsistentReturnValues := WarnInconsistentReturnValues.

    allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier.
    allowDollarInIdentifier := AllowDollarInIdentifier.
    allowOldStyleAssignment := AllowOldStyleAssignment.
    allowSqueakExtensions := AllowSqueakExtensions.
    allowDolphinExtensions := AllowDolphinExtensions.
    allowLiteralNameSpaceSymbols := AllowLiteralNameSpaceSymbols.
    allowExtendedBinarySelectors := AllowExtendedBinarySelectors.
    allowFunctionCallSyntaxForBlockEvaluation := AllowFunctionCallSyntaxForBlockEvaluation.
    allowLocalVariableDeclarationWithInitializerExpression := AllowLocalVariableDeclarationWithInitializerExpression.
    allowDomainVariables := AllowDomainVariables.
    allowArrayIndexSyntaxExtension := AllowArrayIndexSyntaxExtension.
    allowReservedWordsAsSelectors := AllowReservedWordsAsSelectors.
    allowVariableReferences := AllowVariableReferences.
    allowLazyValueExtension := AllowLazyValueExtension.
    allowFixedPointLiterals := AllowFixedPointLiterals.
    allowExtendedSTXSyntax := AllowExtendedSTXSyntax.
    allowQualifiedNames := AllowQualifiedNames.
    allowVisualAgeESSymbolLiterals := AllowVisualAgeESSymbolLiterals.
    allowExtensionsToPrivateClasses := AllowExtensionsToPrivateClasses.
    allowVisualAgePrimitives := AllowVisualAgePrimitives.
    allowSqueakPrimitives := AllowSqueakPrimitives.
    allowSTVPrimitives := AllowSTVPrimitives.

    arraysAreImmutable := ArraysAreImmutable ? true.
    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.
    "
! !

!ParserFlags class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.13 2006-03-08 12:10:42 cg Exp $'
! !

ParserFlags initialize!