-- PGS.model
-- Copyright (c) 1985 by Xerox Corporation.  All rights reserved.
-- last edit by Satterthwaite, May 30, 1986 12:21:05 pm PDT

LET @///SML/OSBasics.modelBcd!581021414 IN 
LET @///SML/CedarBasics.modelBcd!581021540 IN 
LET @///SML/LoaderBasics.modelBcd!581021616 IN 
LET [
    ConvertUnsafe: TYPE~@/Cedar/Cedar6.1/Rope/ConvertUnsafe.bcd!541570785, 
    ProcessorFace: TYPE~@/Cedar/Cedar6.1/Heads/ProcessorFace.bcd!541571125, 
    RuntimeError: TYPE~@/Cedar/Cedar6.1/MesaRuntime/RuntimeError.bcd!541570482, 
    SymbolTable: TYPE~@/Cedar/Cedar6.1/BcdStuff/SymbolTable.bcd!541573286, 
    UnsafeStorage: TYPE~
      @/Cedar/Cedar6.1/SafeStorage/UnsafeStorage.bcd!541573222] IN 

LAMBDA [
    AsciiImpl: Ascii, 
    BasicsImpl: Basics, 
    BasicTimeImpl: BasicTime, 
    CommanderImpl: Commander, 
    ConvertUnsafeImpl: ConvertUnsafe, 
    FSImpl: FS, 
    IOImpl: IO, 
    LoaderImpl: Loader, 
    PrincOpsUtilsImpl: PrincOpsUtils, 
    ProcessorFaceImpl: ProcessorFace, 
    RopeImpl: Rope, 
    RuntimeErrorImpl: RuntimeError, 
    SymbolTableImpl: SymbolTable, 
    UnsafeStorageImpl: UnsafeStorage, 
    VMImpl: VM] IN 
  
  LET REC [
      
      &options: STRING~"j-b-ns"; 
      --&options: STRING~"j-b-n"; 
      
      -- these come from BasicLoadState.df
      -- Table: TYPE~@Table.mesa!541530693*["s-z"]; 
      -- BcdDefs: TYPE~@BcdDefs.mesa!541530938*["s-z"]; 
      FileSegment: TYPE~@/Cedar/Cedar6.1/BcdStuff/FileSegment.bcd!541573263; 
      
      OSMiscOps: TYPE~@///compiler/OSMiscOps.mesa!563132423*[]; 
      OSMiscOpsImpl: OSMiscOps~@///compiler/OSMiscOpsImpl.mesa!577672349*[]*[]; 
      CommandUtil: TYPE~@///compiler/CommandUtil.mesa!542181810*[]; 
      CommandUtilImpl: CommandUtil~
        @///compiler/CommandPack.mesa!542204761*[]*[]; 
      
      PGSOps: TYPE~@PGSOps.mesa!561515078*[]; 
      PGSTypes: TYPE~@PGSTypes.mesa!561515273*[]; 
      PGSConDefs: TYPE~@PGSConDefs.mesa!561515530*[]; 
      
      Formatter: PGSConDefs~@PGSFormat.mesa!561515929*[]*[]; 
      
      ParseTable: TYPE ParseTable~@PGSParseTable.mesa!580586105*[]; 
      P1: TYPE P1~@///Binder/ProtoP1.mesa!571097911*[]; 
      [PGSParseData: TYPE, PGSParseDataImpl: PGSParseData]~
        @PGSParseData.bcd!580326020*[]; 
      Parser:~
        REC [
          [P1ScanImpl: P1, ControlImpl: PGSConDefs]~
            @PGSScan.mesa!580586099*[]*[]; 
          P1Impl: P1~P1ScanImpl + @///Compiler/ProtoParser.mesa!580755205*[]*[]]; 
      P1Impl: P1~Parser.P1Impl; 
      
      LALRImpl: PGSConDefs~@PGSLALR.mesa!561516443*[]*[]; 
      
      TablesImpl: PGSConDefs~@PGSTab.mesa!561662654*[]*[]; 
      
      BcdImpl: PGSConDefs~
        REC [
          Symbols: TYPE~@/Cedar/Cedar6.1/BcdStuff/Symbols.bcd!541573249; 
          TableCommand: TYPE~@TableCommand.mesa!543261365*[]; 
          
          SymbolInput: TableCommand~@TableSymbols.mesa!543261856*[]*[]; 
          
          SymbolOutput: PGSConDefs~
            REC [
              Alloc: TYPE~@///Compiler/InternalAlloc.mesa!561081477*[]; 
              AllocImpl: Alloc~
                @///Compiler/InternalAllocImpl.mesa!561081501*[]*[]; 
              BcdDefs: TYPE~@///Compiler/InternalBcdDefs.mesa!564432582*[]; 
              Bcd:~@///Compiler/InternalBcdStuff.modelBcd!581022104; 
              Tree: TYPE~Bcd.Tree*[]; 
              Literals: TYPE~Bcd.Literals*[]; 
              Symbols: TYPE~Bcd.Symbols*[]; 
              SymbolSegment: TYPE~Bcd.SymbolSegment*[]; 
              SymbolOps: TYPE~Bcd.SymbolOps*[]; 
              [
              SymbolPack: TYPE, SymbolPackImpl: SymbolPack, 
              SymbolOpsBase: SymbolOps]~Bcd.SymbolPack*[]*[]; 
              SymbolOpsImpl: SymbolOps~
                SymbolOpsBase + Bcd.SymbolPackExt*[]*[own:~SymbolPackImpl]; 
              OutputImpl: PGSConDefs~@PGSSymbols.mesa!577404561*[]*[]].OutputImpl; 
          
          ControlImpl: PGSConDefs~
            @PGSBcd.mesa!561661754*[]*[TableCommandImpl:~SymbolInput] 
              + SymbolOutput].ControlImpl; 
      
      [ControlImpl: PGSConDefs, PGSOpsImpl: PGSOps]~
        @PGSControl.mesa!561662440*[]*[]; 
      
      PGSConDefsImpl: PGSConDefs~
        Formatter + Parser.ControlImpl + LALRImpl + TablesImpl + BcdImpl 
          + ControlImpl; 
      
      PGS: CONTROL~@PGSInterface.mesa!561510092*[]*[]] IN []
