ParserFlags.st
changeset 3945 e462043d335b
parent 3783 e7a3fe517286
child 3946 d6a5d4cc96e0
equal deleted inserted replaced
3943:50f01a3f66b1 3945:e462043d335b
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1989 by Claus Gittinger
     4  COPYRIGHT (c) 1989 by Claus Gittinger
     3  COPYRIGHT (c) 2005 by eXept Software AG
     5  COPYRIGHT (c) 2005 by eXept Software AG
     4 	      All Rights Reserved
     6 	      All Rights Reserved
     5 
     7 
    52 		warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop
    54 		warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop
    53 		allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes
    55 		allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes
    54 		allowStringEscapes allowAssignmentToBlockArgument
    56 		allowStringEscapes allowAssignmentToBlockArgument
    55 		allowAssignmentToMethodArgument allowAssignmentToPoolVariable
    57 		allowAssignmentToMethodArgument allowAssignmentToPoolVariable
    56 		lineNumberInfo allowSTXDelimiterComments
    58 		lineNumberInfo allowSTXDelimiterComments
    57 		warnAssignmentToBlockArgument warnAssignmentToMethodArgument
    59 		allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument
    58 		warnAssignmentToPoolVariable'
    60 		warnAssignmentToMethodArgument warnAssignmentToPoolVariable'
    59 	classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared
    61 	classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared
    60 		WarnAboutWrongVariableNames WarnAboutBadComments
    62 		WarnAboutWrongVariableNames WarnAboutBadComments
    61 		WarnAboutVariableNameConventions WarnSTXSpecials
    63 		WarnAboutVariableNameConventions WarnSTXSpecials
    62 		WarnOldStyleAssignment WarnUnderscoreInIdentifier
    64 		WarnOldStyleAssignment WarnUnderscoreInIdentifier
    63 		WarnCommonMistakes WarnPossibleIncompatibilities
    65 		WarnCommonMistakes WarnPossibleIncompatibilities
    93 		AllowStringEscapes AllowAssignmentToBlockArgument
    95 		AllowStringEscapes AllowAssignmentToBlockArgument
    94 		AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
    96 		AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
    95 		LineNumberInfo LibDirectory VCTop SDKTop BCCTop MingwTop
    97 		LineNumberInfo LibDirectory VCTop SDKTop BCCTop MingwTop
    96 		ForcedCompiler DefineForBorlandC DefineForVisualC DefineForMSC
    98 		ForcedCompiler DefineForBorlandC DefineForVisualC DefineForMSC
    97 		DefineForGNUC PerMethodFlags AllowSTXDelimiterComments
    99 		DefineForGNUC PerMethodFlags AllowSTXDelimiterComments
    98 		DefineForMINGW32 DefineForMINGW64 DefineForMINGW DefineForCLANG
   100 		AllowSTXExtendedArrayLiterals DefineForMINGW32 DefineForMINGW64
    99 		WarnAssignmentToBlockArgument WarnAssignmentToPoolVariable
   101 		DefineForMINGW DefineForCLANG WarnAssignmentToBlockArgument
   100 		WarnAssignmentToMethodArgument'
   102 		WarnAssignmentToPoolVariable WarnAssignmentToMethodArgument'
   101 	poolDictionaries:''
   103 	poolDictionaries:''
   102 	category:'System-Compiler'
   104 	category:'System-Compiler'
   103 !
   105 !
   104 
   106 
   105 !ParserFlags class methodsFor:'documentation'!
   107 !ParserFlags class methodsFor:'documentation'!
   122 documentation
   124 documentation
   123 "
   125 "
   124     compiler flags (used to be defined in Scanner and Parser) have been extracted for easier
   126     compiler flags (used to be defined in Scanner and Parser) have been extracted for easier
   125     individual-method customization (using ST as scripting).
   127     individual-method customization (using ST as scripting).
   126 
   128 
       
   129     The class side provides correspondingly-named variables, which hold the default values.
       
   130 
   127     howTo_fileInVSE:
   131     howTo_fileInVSE:
   128 	ParserFlags allowSTVExtensions:true.
   132         ParserFlags allowSTVExtensions:true.
   129 	ParserFlags allowSTVPrimitives:true.
   133         ParserFlags allowSTVPrimitives:true.
   130 	ParserFlags allowSTXEOLComments:false.
   134         ParserFlags allowSTXEOLComments:false.
   131 
   135 
   132     for stx debugging:
   136     for stx debugging:
   133 	STCKeepCIntermediate := true
   137         STCKeepCIntermediate := true
   134 
   138 
   135 "
   139 "
   136 ! !
   140 ! !
   137 
   141 
   138 !ParserFlags class methodsFor:'instance creation'!
   142 !ParserFlags class methodsFor:'instance creation'!
  1022     AllowSTXEOLComments := aBoolean.
  1026     AllowSTXEOLComments := aBoolean.
  1023 
  1027 
  1024     "
  1028     "
  1025      self allowSTXEOLComments:true
  1029      self allowSTXEOLComments:true
  1026      self allowSTXEOLComments:false
  1030      self allowSTXEOLComments:false
       
  1031     "
       
  1032 !
       
  1033 
       
  1034 allowSTXExtendedArrayLiterals
       
  1035     ^ AllowSTXExtendedArrayLiterals ? false
       
  1036 !
       
  1037 
       
  1038 allowSTXExtendedArrayLiterals:aBoolean
       
  1039     AllowSTXExtendedArrayLiterals := aBoolean.
       
  1040 
       
  1041     "
       
  1042      self allowSTXExtendedArrayLiterals:true
       
  1043      self allowSTXExtendedArrayLiterals:false
  1027     "
  1044     "
  1028 !
  1045 !
  1029 
  1046 
  1030 allowSqueakExtensions
  1047 allowSqueakExtensions
  1031     "return true, if support for squeak extensions
  1048     "return true, if support for squeak extensions
  1585     DefineForMSC := '__MSC__'.
  1602     DefineForMSC := '__MSC__'.
  1586     DefineForGNUC := '__GNUC__'.
  1603     DefineForGNUC := '__GNUC__'.
  1587     DefineForMINGW := '__MINGW__'.
  1604     DefineForMINGW := '__MINGW__'.
  1588     DefineForMINGW32 := '__MINGW32__'.
  1605     DefineForMINGW32 := '__MINGW32__'.
  1589     DefineForMINGW64 := '__MINGW64__'.
  1606     DefineForMINGW64 := '__MINGW64__'.
  1590     DefineForCLANG := '__clang__'.
  1607     DefineForCLANG := '__CLANG__'.
  1591 
  1608 
  1592     (executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[
  1609     (executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[
  1593         executablePath := executablePath asFilename directory.
  1610 	executablePath := executablePath asFilename directory.
  1594         (((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
  1611 	(((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
  1595           or:[
  1612 	  or:[
  1596             executablePath := executablePath directory.
  1613 	    executablePath := executablePath directory.
  1597             ((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
  1614 	    ((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
  1598               or:[
  1615 	      or:[
  1599                 executablePath := executablePath directory.
  1616 		executablePath := executablePath directory.
  1600                 ((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
  1617 		((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
  1601               ]
  1618 	      ]
  1602            ]
  1619 	   ]
  1603         ) ifTrue:[
  1620 	) ifTrue:[
  1604             self initializeSTCFlagsForTopDirectory: executablePath.
  1621 	    self initializeSTCFlagsForTopDirectory: executablePath.
  1605         ]
  1622 	]
  1606     ].
  1623     ].
  1607 
  1624 
  1608     "
  1625     "
  1609      ParserFlags initialize
  1626      ParserFlags initialize
  1610     "
  1627     "
  1617     "topDirArg must be the stx directory (where stc directory with stc-executable is found)
  1634     "topDirArg must be the stx directory (where stc directory with stc-executable is found)
  1618      notice: for now, can only initialize for borland+windows or linux;
  1635      notice: for now, can only initialize for borland+windows or linux;
  1619      visualC setup still fails."
  1636      visualC setup still fails."
  1620 
  1637 
  1621     |topDir topDirName vcTop sdkTop bccTop mingwTop
  1638     |topDir topDirName vcTop sdkTop bccTop mingwTop
  1622      borlandDir useBorlandC useVisualC useMingw32 useMingw64 
  1639      borlandDir useBorlandC useVisualC useMingw32 useMingw64
  1623      programFiles archArg picArg|
  1640      programFiles archArg picArg|
  1624 
  1641 
  1625     topDir := topDirArg.
  1642     topDir := topDirArg.
  1626     OperatingSystem isMSWINDOWSlike ifTrue:[
  1643     OperatingSystem isMSWINDOWSlike ifTrue:[
  1627         topDirArg isString ifTrue:[
  1644 	topDirArg isString ifTrue:[
  1628             topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg.
  1645 	    topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg.
  1629         ]
  1646 	]
  1630     ].
  1647     ].
  1631     topDir := topDir asFilename.
  1648     topDir := topDir asFilename.
  1632     topDirName := topDir name.
  1649     topDirName := topDir name.
  1633 
  1650 
  1634     "/ if in the development directory, use ./modules
  1651     "/ if in the development directory, use ./modules
  1635     Smalltalk isSmalltalkDevelopmentSystem ifTrue:[
  1652     Smalltalk isSmalltalkDevelopmentSystem ifTrue:[
  1636         STCModulePath := 'modules'.
  1653 	STCModulePath := 'modules'.
  1637     ] ifFalse:[
  1654     ] ifFalse:[
  1638         STCModulePath := Filename tempDirectory constructString:'modules'.
  1655 	STCModulePath := Filename tempDirectory constructString:'modules'.
  1639     ].
  1656     ].
  1640 
  1657 
  1641     (topDir construct:'stc') exists ifFalse:[
  1658     (topDir construct:'stc') exists ifFalse:[
  1642         ('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR.
  1659 	('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR.
  1643         'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR.
  1660 	'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR.
  1644         STCCompilation := #never.
  1661 	STCCompilation := #never.
  1645     ].
  1662     ].
  1646 
  1663 
  1647     OperatingSystem isMSWINDOWSlike ifTrue:[
  1664     OperatingSystem isMSWINDOWSlike ifTrue:[
  1648         useBorlandC := useVisualC := useMingw32 := useMingw64 := false.
  1665 	useBorlandC := useVisualC := useMingw32 := useMingw64 := false.
  1649         programFiles := OperatingSystem getEnvironment:'ProgramFiles'.
  1666 	programFiles := OperatingSystem getEnvironment:'ProgramFiles'.
  1650         programFiles isEmptyOrNil ifTrue:[ programFiles := 'C:\Program Files' ].
  1667 	programFiles isEmptyOrNil ifTrue:[ programFiles := 'C:\Program Files' ].
  1651 
  1668 
  1652         STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'.
  1669 	STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'.
  1653 
  1670 
  1654         ExternalAddress pointerSize == 4 ifFalse:[
  1671 	ExternalAddress pointerSize == 4 ifFalse:[
  1655             bccTop := nil
  1672 	    bccTop := nil
  1656         ] ifTrue:[    
  1673 	] ifTrue:[
  1657             (bccTop := BCCTop) isNil ifTrue:[
  1674 	    (bccTop := BCCTop) isNil ifTrue:[
  1658                 borlandDir := OperatingSystem getEnvironment:'BCCDIR'.
  1675 		borlandDir := OperatingSystem getEnvironment:'BCCDIR'.
  1659                 borlandDir isEmptyOrNil ifTrue:[ borlandDir := 'C:\Borland\bcc55' ].
  1676 		borlandDir isEmptyOrNil ifTrue:[ borlandDir := 'C:\Borland\bcc55' ].
  1660                 bccTop := {
  1677 		bccTop := {
  1661                             (borlandDir) .
  1678 			    (borlandDir) .
  1662                             (programFiles , '\Borland\bcc55') .
  1679 			    (programFiles , '\Borland\bcc55') .
  1663                             (programFiles , '\bcc55') .
  1680 			    (programFiles , '\bcc55') .
  1664                           } detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]]
  1681 			  } detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]]
  1665                              ifNone:nil.
  1682 			     ifNone:nil.
  1666             ].
  1683 	    ].
  1667         ].
  1684 	].
  1668 
  1685 
  1669         STCCompilationDefines := '-DWIN32'.
  1686 	STCCompilationDefines := '-DWIN32'.
  1670 
  1687 
  1671         (bccTop notNil and:[bccTop asFilename exists]) ifTrue:[
  1688 	(bccTop notNil and:[bccTop asFilename exists]) ifTrue:[
  1672             STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'.
  1689 	    STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'.
  1673             LibDirectory := topDirName,'\lib\bc'.
  1690 	    LibDirectory := topDirName,'\lib\bc'.
  1674             LinkArgs := '-L',topDirName,'\lib\bc'.
  1691 	    LinkArgs := '-L',topDirName,'\lib\bc'.
  1675             LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'.
  1692 	    LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'.
  1676             CCPath := 'bcc32'.
  1693 	    CCPath := 'bcc32'.
  1677             MakeCommand := 'bmake'.
  1694 	    MakeCommand := 'bmake'.
  1678             LinkCommand := 'ilink32'.
  1695 	    LinkCommand := 'ilink32'.
  1679             CCCompilationOptions := '-w-'.
  1696 	    CCCompilationOptions := '-w-'.
  1680             useBorlandC := true.
  1697 	    useBorlandC := true.
  1681         ] ifFalse:[
  1698 	] ifFalse:[
  1682             ExternalAddress pointerSize == 4 ifFalse:[
  1699 	    ExternalAddress pointerSize == 4 ifFalse:[
  1683                 vcTop := nil.
  1700 		vcTop := nil.
  1684             ] ifTrue:[
  1701 	    ] ifTrue:[
  1685                 (vcTop := VCTop) isNil ifTrue:[
  1702 		(vcTop := VCTop) isNil ifTrue:[
  1686                     vcTop := {
  1703 		    vcTop := {
  1687                                 (programFiles,'\Microsoft Visual Studio 13.0\VC') .
  1704 				(programFiles,'\Microsoft Visual Studio 13.0\VC') .
  1688                                 (programFiles,'\Microsoft Visual Studio 12.0\VC') .
  1705 				(programFiles,'\Microsoft Visual Studio 12.0\VC') .
  1689                                 (programFiles,'\Microsoft Visual Studio 11.0\VC') .
  1706 				(programFiles,'\Microsoft Visual Studio 11.0\VC') .
  1690                                 (programFiles,'\Microsoft Visual Studio 10.0\VC') .
  1707 				(programFiles,'\Microsoft Visual Studio 10.0\VC') .
  1691                                 (programFiles,'\Microsoft Visual Studio 9.0\VC' ) .
  1708 				(programFiles,'\Microsoft Visual Studio 9.0\VC' ) .
  1692                              } detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]]
  1709 			     } detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]]
  1693                                ifNone:nil.
  1710 			       ifNone:nil.
  1694                 ].
  1711 		].
  1695             ].
  1712 	    ].
  1696             (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[
  1713 	    (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[
  1697                 useVisualC := true.
  1714 		useVisualC := true.
  1698                 STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'.
  1715 		STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'.
  1699 
  1716 
  1700                 (sdkTop := SDKTop) isNil ifTrue:[
  1717 		(sdkTop := SDKTop) isNil ifTrue:[
  1701                     sdkTop := {
  1718 		    sdkTop := {
  1702                                 (programFiles,'\Microsoft SDKs\Windows\v9.0A') .
  1719 				(programFiles,'\Microsoft SDKs\Windows\v9.0A') .
  1703                                 (programFiles,'\Microsoft SDKs\Windows\v8.0A') .
  1720 				(programFiles,'\Microsoft SDKs\Windows\v8.0A') .
  1704                                 (programFiles,'\Microsoft SDKs\Windows\v8.0A') .
  1721 				(programFiles,'\Microsoft SDKs\Windows\v8.0A') .
  1705                                 (programFiles,'\Microsoft SDKs\Windows\v7.0A') .
  1722 				(programFiles,'\Microsoft SDKs\Windows\v7.0A') .
  1706                                 (programFiles,'\Microsoft SDKs\Windows\v6.0A') .
  1723 				(programFiles,'\Microsoft SDKs\Windows\v6.0A') .
  1707                              }  detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
  1724 			     }  detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
  1708                 ].
  1725 		].
  1709                 (sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[
  1726 		(sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[
  1710                     STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'.
  1727 		    STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'.
  1711                 ].
  1728 		].
  1712                 LibDirectory := topDirName,'\lib\vc'.
  1729 		LibDirectory := topDirName,'\lib\vc'.
  1713                 LinkArgs := '-L',topDirName,'\lib\vc'.
  1730 		LinkArgs := '-L',topDirName,'\lib\vc'.
  1714                 LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
  1731 		LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
  1715                 CCPath := vcTop,'\bin\cl.exe'.
  1732 		CCPath := vcTop,'\bin\cl.exe'.
  1716                 LinkCommand := 'ilink32'.
  1733 		LinkCommand := 'ilink32'.
  1717                 MakeCommand := 'vcmake'.
  1734 		MakeCommand := 'vcmake'.
  1718                 CCCompilationOptions := '/nologo /ZI  /w /GF /EHsc /FR.\objvc\'.
  1735 		CCCompilationOptions := '/nologo /ZI  /w /GF /EHsc /FR.\objvc\'.
  1719             ] ifFalse:[
  1736 	    ] ifFalse:[
  1720                 "/ add definitions for lcc, mingc etc.
  1737 		"/ add definitions for lcc, mingc etc.
  1721                 "/ STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'.
  1738 		"/ STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'.
  1722                 ExternalAddress pointerSize == 4 ifTrue:[
  1739 		ExternalAddress pointerSize == 4 ifTrue:[
  1723                     (mingwTop := MingwTop) isNil ifTrue:[
  1740 		    (mingwTop := MingwTop) isNil ifTrue:[
  1724                         mingwTop := {
  1741 			mingwTop := {
  1725                                     (programFiles,'\mingw') .
  1742 				    (programFiles,'\mingw') .
  1726                                     (programFiles,'\mingw') .
  1743 				    (programFiles,'\mingw') .
  1727                                     ('c:\mingw32') .
  1744 				    ('c:\mingw32') .
  1728                                     ('c:\mingw') .
  1745 				    ('c:\mingw') .
  1729                                  } detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]]
  1746 				 } detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]]
  1730                                    ifNone:nil.
  1747 				   ifNone:nil.
  1731                     ].
  1748 		    ].
  1732                     (mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[
  1749 		    (mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[
  1733                         useMingw32 := true.
  1750 			useMingw32 := true.
  1734                         STCCompilationDefines := STCCompilationDefines,' -D__MINGW32__'.
  1751 			STCCompilationDefines := STCCompilationDefines,' -D__MINGW32__'.
  1735                         CCCompilationOptions := '-w32'.
  1752 			CCCompilationOptions := '-w32'.
  1736                     ].
  1753 		    ].
  1737                 ] ifFalse:[
  1754 		] ifFalse:[
  1738                     (mingwTop := MingwTop) isNil ifTrue:[
  1755 		    (mingwTop := MingwTop) isNil ifTrue:[
  1739                         mingwTop := {
  1756 			mingwTop := {
  1740                                     (programFiles,'\mingw64') .
  1757 				    (programFiles,'\mingw64') .
  1741                                     (programFiles,'\mingw') .
  1758 				    (programFiles,'\mingw') .
  1742                                     ('c:\mingw64') .
  1759 				    ('c:\mingw64') .
  1743                                     ('c:\mingw') .
  1760 				    ('c:\mingw') .
  1744                                  } detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]]
  1761 				 } detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]]
  1745                                    ifNone:nil.
  1762 				   ifNone:nil.
  1746                     ].
  1763 		    ].
  1747                     (mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[
  1764 		    (mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[
  1748                         STCCompilationDefines := STCCompilationDefines,' -D__MINGW64__'.
  1765 			STCCompilationDefines := STCCompilationDefines,' -D__MINGW64__'.
  1749                         "/ CCCompilationOptions := '-w64'.
  1766 			"/ CCCompilationOptions := '-w64'.
  1750                     ].
  1767 		    ].
  1751                 ].    
  1768 		].
  1752                 (mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[
  1769 		(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[
  1753                     STCCompilationDefines := STCCompilationDefines,' -D__MINGW__'.
  1770 		    STCCompilationDefines := STCCompilationDefines,' -D__MINGW__'.
  1754                     CCPath := mingwTop,'\bin\gcc.exe'.
  1771 		    CCPath := mingwTop,'\bin\gcc.exe'.
  1755                     LinkCommand := 'gcc'.
  1772 		    LinkCommand := 'gcc'.
  1756                     MakeCommand := 'mingwmake'.
  1773 		    MakeCommand := 'mingwmake'.
  1757                     LibDirectory := topDirName,'\lib\mingw'.
  1774 		    LibDirectory := topDirName,'\lib\mingw'.
  1758                     LinkArgs := '-L',topDirName,'\lib\mingw'.
  1775 		    LinkArgs := '-L',topDirName,'\lib\mingw'.
  1759                     "/ LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
  1776 		    "/ LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
  1760                 ].
  1777 		].
  1761             ].
  1778 	    ].
  1762         ].
  1779 	].
  1763         STCCompilationOptions := '+optinline +inlineNew'.
  1780 	STCCompilationOptions := '+optinline +inlineNew'.
  1764         (topDirName,'\stc\stc.exe') asFilename exists ifTrue:[
  1781 	(topDirName,'\stc\stc.exe') asFilename exists ifTrue:[
  1765             STCPath := (topDirName,'\stc\stc.exe').
  1782 	    STCPath := (topDirName,'\stc\stc.exe').
  1766         ] ifFalse:[
  1783 	] ifFalse:[
  1767             STCPath := 'stc.exe'.
  1784 	    STCPath := 'stc.exe'.
  1768         ].
  1785 	].
  1769         LibPath := ''.
  1786 	LibPath := ''.
  1770         SearchedLibraries := #('import32.lib').
  1787 	SearchedLibraries := #('import32.lib').
  1771         "/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib').
  1788 	"/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib').
  1772     ] ifFalse:[
  1789     ] ifFalse:[
  1773         STCCompilationIncludes := '-I',topDirName,'/include'.
  1790 	STCCompilationIncludes := '-I',topDirName,'/include'.
  1774         STCCompilationDefines := ''.
  1791 	STCCompilationDefines := ''.
  1775         STCCompilationOptions := '+optinline +inlineNew'.
  1792 	STCCompilationOptions := '+optinline +inlineNew'.
  1776         STCPath := topDirName,'/stc/stc'.
  1793 	STCPath := topDirName,'/stc/stc'.
  1777 
  1794 
  1778         archArg := picArg := ''.
  1795 	archArg := picArg := ''.
  1779         (ExternalAddress pointerSize == 4) ifTrue:[
  1796 	(ExternalAddress pointerSize == 4) ifTrue:[
  1780             archArg := ' -m32'
  1797 	    archArg := ' -m32'
  1781         ] ifFalse:[
  1798 	] ifFalse:[
  1782             archArg := ' -m64'.            "gcc -m64 needs -fPIC to make a shared library"
  1799 	    archArg := ' -m64'.            "gcc -m64 needs -fPIC to make a shared library"
  1783             picArg := ' -fPIC'.
  1800 	    picArg := ' -fPIC'.
  1784         ].
  1801 	].
  1785         CCCompilationOptions := OperatingSystem getCPUDefine,
  1802 	CCCompilationOptions := OperatingSystem getCPUDefine,
  1786                                 ' -D', self usedCompilerDefine,
  1803 				' -D', self usedCompilerDefine,
  1787                                 ' ', OperatingSystem getOSDefine,
  1804 				' ', OperatingSystem getOSDefine,
  1788                                 ' ', '-O', archArg, picArg.
  1805 				' ', '-O', archArg, picArg.
  1789         ParserFlags useClang ifTrue:[
  1806 	ParserFlags useClang ifTrue:[
  1790             CCPath := 'clang'
  1807 	    CCPath := 'clang'
  1791         ] ifFalse:[
  1808 	] ifFalse:[
  1792             ParserFlags useGnuC ifTrue:[
  1809 	    ParserFlags useGnuC ifTrue:[
  1793                 CCPath := 'gcc'
  1810 		CCPath := 'gcc'
  1794             ] ifFalse:[
  1811 	    ] ifFalse:[
  1795                 CCPath := 'cc'
  1812 		CCPath := 'cc'
  1796             ].
  1813 	    ].
  1797         ].
  1814 	].
  1798         LinkArgs := archArg.
  1815 	LinkArgs := archArg.
  1799         LinkSharedArgs := '-shared'.
  1816 	LinkSharedArgs := '-shared'.
  1800         LinkCommand := CCPath.
  1817 	LinkCommand := CCPath.
  1801         LibPath := ''.
  1818 	LibPath := ''.
  1802         SearchedLibraries := #().
  1819 	SearchedLibraries := #().
  1803         MakeCommand := 'make'.
  1820 	MakeCommand := 'make'.
  1804     ].
  1821     ].
  1805 
  1822 
  1806     Smalltalk infoPrinting ifTrue:[
  1823     Smalltalk infoPrinting ifTrue:[
  1807         'ParserFlags [info]:' infoPrintCR.
  1824 	'ParserFlags [info]:' infoPrintCR.
  1808         '  STC Setup:' infoPrintCR.
  1825 	'  STC Setup:' infoPrintCR.
  1809         ('    STCCompilationDefines: ',STCCompilationDefines asString) infoPrintCR.
  1826 	('    STCCompilationDefines: ',STCCompilationDefines asString) infoPrintCR.
  1810         ('    CCPath: ',CCPath asString) infoPrintCR.
  1827 	('    CCPath: ',CCPath asString) infoPrintCR.
  1811         ('    CCCompilationOptions: ',CCCompilationOptions asString) infoPrintCR.
  1828 	('    CCCompilationOptions: ',CCCompilationOptions asString) infoPrintCR.
  1812         ('    LinkCommand: ',LinkCommand asString) infoPrintCR.
  1829 	('    LinkCommand: ',LinkCommand asString) infoPrintCR.
  1813         ('    MakeCommand: ',MakeCommand asString) infoPrintCR.
  1830 	('    MakeCommand: ',MakeCommand asString) infoPrintCR.
  1814         ('    LinkArgs: ',LinkArgs asString) infoPrintCR.
  1831 	('    LinkArgs: ',LinkArgs asString) infoPrintCR.
  1815     ].
  1832     ].
  1816 
  1833 
  1817     "
  1834     "
  1818      ParserFlags initializeSTCFlagsForTopDirectory:'../..'
  1835      ParserFlags initializeSTCFlagsForTopDirectory:'../..'
  1819     "
  1836     "
  2253 
  2270 
  2254     "
  2271     "
  2255      ParserFlags allowSTXEOLComments:false
  2272      ParserFlags allowSTXEOLComments:false
  2256      ParserFlags allowSTXEOLComments:true
  2273      ParserFlags allowSTXEOLComments:true
  2257     "
  2274     "
       
  2275 !
       
  2276 
       
  2277 allowSTXExtendedArrayLiterals
       
  2278     ^ allowSTXExtendedArrayLiterals ? false
       
  2279 !
       
  2280 
       
  2281 allowSTXExtendedArrayLiterals:aBoolean
       
  2282     allowSTXExtendedArrayLiterals := aBoolean
  2258 !
  2283 !
  2259 
  2284 
  2260 allowSTXFunctions
  2285 allowSTXFunctions
  2261     ^ false
  2286     ^ false
  2262 
  2287