(**********************************************************************

    :Program.    SrcScanner.def
    :Contents.   Source code scanner for Make [bne]
    :Author.     Nicolas Benezan [bne]
    :Address.    Postwiesenstr. 2, D7000 Stuttgart 60
    :Phone.      711/333679
    :Copyright.  Amok internal, NOT in the public domain !
    :Language.   Modula-2
    :Translator. M2Amiga A+L V3.2d
    :Imports.    ErrorReq1.2 [bne]
    :History.    V1.0a [bne] 5.Feb.1989

**********************************************************************)

DEFINITION MODULE SrcScanner;

FROM Arts       IMPORT ModType;

(* The Scanner is not reentrable. It cannot have more than one file
   open at the same time *)

PROCEDURE StartScan(FileName:ARRAY OF CHAR):BOOLEAN;
(*:Input.       FileName: name of the file to scan (may include path)
  :Result.      FALSE if an error occured (file not found or wrong type)
  :Semantic.    Opens file to be ready to scan
*)

PROCEDURE FindNextImport(VAR ModuleName:ARRAY OF CHAR):BOOLEAN;
(*:Output.      ModuleName: Name of the next imported module (if found)
  :Result.      TRUE if an Import was found
  :Semantic.    Scans the file for the next occurace of
  :Semantic.    "IMPORT xxx" or "FROM xxx IMPORT"
*)

PROCEDURE EndScan(VAR ModuleType:ModType);
(*:Output.      ModuleType: tells you wether (*$M-*) or other special
  :Output.      things where found
  :Semantic.    Closes the file
*)

END SrcScanner.

