home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / TOOLS / LOADER.DOC < prev    next >
Text File  |  1996-06-04  |  2KB  |  63 lines

  1. #    $Id: Loader.doc,v 1.2 1994/12/08 23:47:03 duchier Exp $    
  2.  
  3.  
  4.                                                                           
  5.                    LOADING FILES USING THE LIFE PARSER IN LIFE   
  6.           
  7.  
  8.  NAME
  9.  
  10.  loader: an implementation of simple_load that uses the parser written in Life
  11.          (so that all the syntax extensions are available), and also contains
  12.          some extensions that allow a usage similar to that of load (except
  13.          that only one file may be specified).   
  14.  
  15.  The term_expansion predicate is supported. In particular, grammar rules are
  16.  expanded automatically if they are written as facts.
  17.  
  18.  The predicate term_expansion takes a term as first argument and returns a
  19.  clause or a list of clauses as second argument.
  20.  It is predefined for grammar rules and standard definitions. It is  possible
  21.  to extend it to handle new kinds of definitions by adding new clauses to
  22.  term_expansion. 
  23.  
  24.  In the current state of the interpreter, the asserta query is necessary to be
  25.  sure the stated rule will actually be used.  
  26.  
  27.  
  28.  USAGE:
  29.  
  30.       load_l(Filename) ? 
  31.  looks for the file Filename.lf or Filename in specified directories, and
  32.  loads the first it finds. Reloading the same file is not possible.
  33.  
  34.       load_gr(Filename) ? 
  35.  looks for the file Filename.gr in specified directories, and
  36.  loads the first it finds. Reloading the same file is not possible.
  37.  
  38.       load_in(Filename) ?
  39.  looks for the file Filename.in in specified directories, and
  40.  loads the first it finds. Reloading the same file is possible.
  41.     
  42.  
  43.  FILES
  44.  
  45.  The file loader.lf contains the loader.
  46.  
  47.  The other files are:
  48.  - parser.lf     : the Life parser
  49.  - tokenizer.lf  : the tokenizer used to provide inputs to the parser
  50.  - accumulators.lf, std_expander.lf and acc_declarations.lf 
  51.  
  52.  All these files are automatically loaded if they are in the same directory.
  53.  
  54.  They must be loaded with expand_load(true).
  55.  
  56.  AUTHOR
  57.  
  58.  Bruno Dumant
  59.  
  60.  Copyright 1992 Digital Equipment Corporation
  61.  All Rights Reserved
  62.  
  63.