// BCPLX - Declarations for the BCPL Compiler, used throughout the Compiler. // Copyright Xerox Corporation 1980 // Swinehart, 5-9-77 -- /S switch // parameterize FileLength, etc. via statics -- Swinehart, 6 May 77 // increase FileNameLength to 40 - Edit by Boggs 2 Apr 77 // pull SWAltoc..ime <SWINEHART>BCPLX.;2 28-MAR-75 13:15:34 EDIT BY SWINEHART // last modified by Butterfield, January 8, 1980 11:12 AM // - add CounterJunta external - 1/8/80 // - SWUnsignedCompares, if true, enable uls, ule, uge, and ugt - 5/8 // - SWStackStrings, if true, put strings and tables on stack - 5/5 // - add Usc, MyFrame, GotoLabel, CloseCOMCM, RestartBCPL, // and CallSubsys externals - 5/5 // - SWNoExtExts, -E global switch, allow EXTERNAL & EXTERNAL - 2/12 // - SWGetLINEs, -G global switch, don'T "LINE" get files - 2/2/79 manifest [ H1=0; H2=1; H3=2; H4=3; H5=4; H6=5; H7=6 // Selectors for tree nodes. NAMELENGTH = 24 ///*DCS* remove FileNameLength, etc. -- See Externals, below GetnameN = 2 // Size of a GetnameV entry GetlineN = 3 // Size of a GetlineV entry MaxErrors = 64 ] external [ // MAIN1 Main; Overlay; BCPLreport; WriteLine; WriteLines; Help Abort Version SourceName; BinName; OutputName; Device; SourceDevice ///*DCS* Compiled Declarations DICTName ///* Name of File containing compiled dictionary DECLName ///* Name of file containing compiled decl. lexemes // switches in MAIN1 SWHelp; SWDebug; SWList; SWLexTrace; SWCaeTrace; SWSaeTrace; SWOcode; SWCode SWLexList; SWCaeList; SWSaeList; SWTrnList; SWPassOneList; SWPassTwoList SWListCode; SWPassOneCode; SWPassTwoCode; SWFastFrame SWTTOfile; SWTTOtype; SWOutput; SWWait; SWUpperCase; SWLowerCase; SWOneCase ///*DCS* File Name, # Get File parameters FileNameLength; GetFileMax; GetnameT; GetlineT; Dvec SWGetLINEs // "LINE" get files - Global /-G Switch sets this false SWNoExtExts // no EXTERNAL & EXTERNAL - Global /-E Switch sets this false SWStackStrings // if true, put strings and tables on stack SWUnsignedCompares // if true, enable ult, ule, uge, and ugt ///*DCS* Compiled Declarations SWPrepare ///* Global /G Switch -- compile Declarations this run SWUseDecl ///* Local/G -- these files contain compiled decls. SWAlto SWNoxios ///*DCS* Command line manifests SWParamset ///*DCS* Symbol Table Compaction NCG Pass RealSymCount; RealSymSize // functions and routines in MAIN2 Nextparam; Nextstatic; Nextentry Newvec; Zerovec; InitFree List1; List2; List3; List4; List5; List6; List7 IsFile OpenInput; OpenTemp; OpenOutput ResetStream; RenameTemp CloseInput; CloseTemp; CloseOutput Readword; Readaddr; Writeword; Writeaddr WW; Wait; WriteS; WriteO; WriteN InitBCPL;closechannel;syscallerror ///*DCS* precompiled declarations stuff ReadSequential; WriteSequential; ReadWord; WriteWord; Length; Char Position; Reposition Readch; Writech Packstring; Unpackstring; Movestring InitCOMCM; ReadCOMCM; BadSwitch; Error; FixFileName; filename; sw Usc; MyFrame; GotoLabel; CloseCOMCM; RestartBCPL; CallSubsys; CounterJunta DecValue; OctValue FreeMax; DictFreeMax; TreeFreeMax; CodeFreeMax; FreelistP Reportcount Istream; Ostream TTIstream; TTOstream; OutputStream; ErrorStream SourceStream; SourceLength LexStream Dictionary; DictStream; DictLength Tree; TreeOffset OcodeStream CodeStream Code; PC GetnameV; GetnameP GetlineV; GetlineP Curfile; Curline // Overlay limit values Freemax; DictFreeLimit; TreeFreeLimit; CodeFreeLimit // the routines that do the work ReadSource // in LEX ConstructTree // in CAE DeclareNames // in SAE TranslateTree // in TRN GenerateCode // in CG ] manifest // Specification of TX-2 -- machine on which the compiler runs. [ Bitsperbyte = 8 Bytesperword = 2 Bytesperaddr = 2 Bitsperaddr = 16 Bitsperword = 16 Bytemask = #377 StringLength = 250 StringMaxOb = 250 WordSizeOb = 16 ByteSizeOb = 8 Savespacesize = 4 ]