-- file P1.Mesa
-- last modified by Satterthwaite, January 8, 1980  10:12 AM

DIRECTORY
  ParseTable: FROM "parsetable"
    USING [ActionEntry, Handle, Production, ProductionInfo, TSymbol],
  StreamDefs: FROM "streamdefs" USING [StreamHandle],
  Symbols: FROM "symbols" USING [HTIndex];

P1: DEFINITIONS =
  BEGIN
  OPEN ParseTable;

  Token: TYPE = RECORD [
    class: TSymbol,		-- the token class
    value: UNSPECIFIED,
    index: CARDINAL];		-- source line index

 -- implemented by Pass1
  LockId: PROCEDURE RETURNS [Symbols.HTIndex];

 -- implemented by Scan
  Atom: PROCEDURE RETURNS [Token];
  ErrorContext: PROCEDURE [STRING, CARDINAL];
  ResetScanIndex: PROCEDURE [CARDINAL];
  ScanInit: PROCEDURE [
	sourceStream, messageStream: StreamDefs.StreamHandle,
	table: ParseTable.Handle];
  ScanReset: PROCEDURE RETURNS [nTokens, nErrors: CARDINAL];

 -- implemented by Parse
  Parse: PROCEDURE [
	sourceStream, messageStream: StreamDefs.StreamHandle,
	table: ParseTable.Handle]
      RETURNS [complete: BOOLEAN, nTokens, nErrors: CARDINAL];
  ParserID: PROCEDURE RETURNS [STRING];
  InputLoc: PROCEDURE RETURNS [CARDINAL];

 -- implemented by Pass1T

  AssignDescriptors: PROCEDURE [
	qd: DESCRIPTOR FOR ARRAY OF ActionEntry,
	vd: DESCRIPTOR FOR ARRAY OF UNSPECIFIED,
	ld: DESCRIPTOR FOR ARRAY OF CARDINAL,
	pp: POINTER TO ARRAY Production OF ProductionInfo];
  ProcessQueue: PROCEDURE [qI, top: CARDINAL];
  TokenValue: PROCEDURE [TSymbol] RETURNS [UNSPECIFIED];

 -- the global frames
  Scanner, Parser, Pass1T: PROGRAM;

  END.