PROJECTS STRUCTURE AND PROCESSING
=================================

   From Graphic User Interface point of veiw, PROJECT has structure:
   
       [SCHEMA-PROJECT-UNIT][SOURCE-PROJECT-UNIT]

   PROJECT-UNIT is a file, or folder, or texts given to Compy for conversion.

   File AppFolder\preferences.txt keeps last used PROJECT-file-name.prj
   PROJECT-file-name.prj keeps name of schema-project-unit and source-project-unit.

   From Compi's point of view, each unit is Compi's single project, and
   Compi treats each unit "equally.", except that first round of first unit
         is considered as belonging to schema, and no
            events
             .bop, 
             .bof,
             .bot,
             .eop,
             .eof,
            are fired.
   Each unit submitted to Compi in order: 
        schema - first (if any);
        then source (if any).


   WHERE DISK-TO-DISK-PROJECT RESULT WILL BE STORED
   ------------------------------------------------

   Compi creates folder RESULT_FILES under parent 

       of SOURCE-PROJECT-UNIT  -  if SOURCE-PROJECT-UNIT is provied,
       of SCHEMA-PROJECT-UNIT  -  if SOURCE-PROJECT-UNIT is not provided.


   Command ..skip_project
           skips autoparsing tree of folders and files in source:
           no .bof, .eof, .bot, .eot  will be fired;
           does not disable .bop and .eop.



WHERE SCHEMA BEGINS AND ENDS
============================

   By default, first-two-characters-string "\\" met by Compi
   denotes the beginning of schema_text and everything before \\ will be ignored.
   Slashes \\ are also ignored.

   Schema ends 
       naturally at the end of text, or by
       |end macro, or by
       |    macro; 
            If in nest *,-schema, then
              macro "|" 
                 fires
                   events
                    .bop, 
                    .bof (if source is a folder where schema is found,)
                    .bot,
                 permits
                    .eop,
                    .eof (if applicable,)
            In any case, starts processing text placed after "|" in schema as
               this text would be usual source text;
            Using "|" allows put both schema and source in one file.
             

PROJECT-UNIT
============

   Processing
   ----------

   When file (text) of PROJECT-UNIT is finished, or terminated due schema-syntax exception, then

       global queue              is reset to empty
       all open streams          are closed
       indent                    rebuilt; (margin for next text file)
       
       variables                 ARE NOT RESET AND KEEP THEIR VALUES
                                 (This may be useful to collect data common for all files.)
       global nest               IS NOT RESET
                                 This settings will be used to start the next file in PROJECT-UNIT
     

   If Compi was called from GUI\menu\option\Go, then finished file will be automatically saved
   if directive to save files is not disabled.

   The new file parsing starts with position 1 and with output text reset to empty. 
   Programmer can disable automatic result saving using command: ..save_file_mode.false

 

  File Tree Structure
  -------------------  

  Source for project-unit can be text from GUI screen, file, of folder.
  In second two cases, source unit parent folder is called "umbrella" and

          project = umbrella\source                       - project-unit
          umbrella\[local_path\]file                      - source_file_abs_path
          umbrella\shield\[local_path\]rfile              - converted_file_abs_path
          shield                                          = "RESULT_FILES"

          following reserved variables p_xxxx provide access to file system name xxxx:
 
          read-only:
            p_source           - source (basic name with possible extension)
            p_local_path 
            p_umbrella         - absolute path to umbrella
            p_shield     
            p_basic
            p_extension
            p_file             = p_basic [.p_extension]
            p_rfile            = p_rbasic [.p_rextension]
            p_parent           = parent of file
            p_rparent          = parent of rfile 
            p_processed_files  = list of processed files with lines:
                                 [local_path\]file  LF
                                 refreshed if project restarted;
          read/write:
            p_rbasic
            p_rextension
 
if project is <file>, then local_path is empty
if project is a <folder>, then local_path initial value is <folder>
   and may grow while processing <folder>-tree deeper

rfile = file or may be changed during conversion;
        usually, extension can be changed;

folder for read and include is schema's umbrella
forder for save is umbrella\shield[\local_path\]

programmer can rely on that files parsed in folder first, and then
if there are subfolders in this folder, then conversion enters this folders.