1 EMU_COMPILE 
 Program to compile and execute rule files within the EMU system.
2 Inputs:
 This is a standalone interactive programme. The user inputs a file name
 to be compiled and executed.  
  
2 Outputs
 As directed by the statements.
2 Language_Primer
 This is a simple language used to manipulate the various databases.
 The statements contain record selection criteria followed by 
 actions to perform on or with those records. Initialy, the purpose is
 to provide a means to scan EMUDB.DAT and create relations that exist
 in the internal structures. In it's next iteration, it will supply
 the inputs to analysis functions.
3 Components
 Record selection is accomplished by specifying 1 or more database 
 records. A database record always consists of:
	 database.table.param.instance.box
 This is reduced to:
	database	(keyword)
	table		(keyword)
	Param		(numeric)
	Instance	(keyword or numeric)
	box		(
 and is formed as symbol(db.keyword.box) where symbol is a user supplied
 numeric keyword, db is one of the existing databases, keyword is
 the phrase used in translation of the paramater and index is 1 of: 
 Action is in form of an if statement ans uses the previously 
 defined symbols to test conditions and perform the execution requested.
4 Symbols
 The symbols are numeric and may be in range 1 - 2730 and may be reused.
 They 
 They essentialy index an area of memory (8k) used to store the RFA of the
 record. 
4   
2 MC_READ_MIB   
 Read a line from the MIB.
3 Inputs
 .addr of .quad where rec descriptor (less comments) is returned.
 Assumes file is open, connected.
 Also replaces non-printable chars with 'space'
2 MC_PRS_BEGIN 
 Place holder. Future routine to process BEGIN statement.
2 MC_PRS_SEQUENCE
 Parse sequence statement. Purpose here is to identify the following
 entries that are part of a table and therfore included in the help 
 library as level 2 entries.
3 Sample
               LIfEntry ::=
                   SEQUENCE {
                       locIfHardType
                           DisplayString,
                       locIfLineProt
                           INTEGER,
                             	.
				.
				.
                       locIfOutputQueueDrops
                           INTEGER
                   }

 
 This keyword occurs in 2 statements. The SEQUENCE OF is not interesting.
 We want the string SEQUENCE {.
2 MC_PRS_SEQUENCEOF 
 Parse SYNTAX statement containing SEQUENCE OF. Purpose here is to identify 
 the following entry that is part of a table and therfore included in the help 
 library as a level 2 entry.  This routine will be reached via the SYNTAX
 parser - it looks specificaly for this keyword.
3 Sample
               lifTable OBJECT-TYPE
                   SYNTAX  SEQUENCE OF LIfEntry
                   ACCESS  not-accessible
                   STATUS  mandatory
                   DESCRIPTION
                            "A list of interface entries."
                   ::= { linterfaces 1 }

 This keyword occurs in 2 statements. The SEQUENCE OF is the introducer
 and contains the name of the table entry point. The entry point will be
 the next object in the mib and the 1st level 2 entry in this table.
 simply extract the entry name and set up the SEQARRAY (as in SEQUENCE) 
 with 1 entry.
2 MC_PRS_IMPORTS  

 Parse IMPORTS statement and find all occurences of FROM. The next
 symbol will be a filename. Find this file and add it's contents to 
 the symbol section. For each entry scan the symbol table and discard
 any entry that already exists in the table.
2 MC_PRS_OBJTYP 
 locate the object name and record it in curobj
2 MC_PRS_SYNTAX
 locate the display syntax and record it in cursyn
2 MC_PRS_ACCESS 

 locate the access type and record it in curacc
2 MC_PRS_STATUS   
 Place holder. Future routine to process STATUS statement.
2 MC_PRS_DESCRIPTION

 Add the text following to the help file. Direct access and table names
 are displayed as menu entries. Table entries are not and so are not
 accessible as level 1 help entries. These are made as level 2 as follows:
 The SEQUENCE processor determines the number of entries that wll follow as
 table entries and stores this number as the name of the 1st entry in
 the SEQARRAY structure. This routine process this as follows:
 If the count of table elements is 0 then skip to 'l1'
 If help level is currently 2 then skip to 'L2'
 If current obj does not match 1st entry then skip to 'l1'
 Set help level 2
 l2:
 move help level 2 and name to hlpbuf and write
 decrement count
 rest of process
 l1:
 move help level 1 and name to hlpbuf and write
2 MC_PRS_OBJID   
 Process object definition string and produce schema entry.

3 Input 
 .addr of desc pointing to current rec
3 Output
 Fully qualified schema for this object.

3 Returns:
	BADPARAM	unexpected rec format
	NORMAL		Symbol written
	INSVMEM		Symbol table overflow

3 Example

  'experimental OBJECT IDENTIFIER ::= { internet 3 }'
  Result should be experimental = Internet (1.3.6.1) + .1
 = 1.3.6.1.1
2 MC_USER_ADD_SYM     
 Request user to add unknown symbol. If an unknown symbol is encountered
 this user may add it here to allo compilation to continue. Otherwise
 processing will likely stop (usualy by stack dump) (sorry 'bout that).
 
3 Inputs:
 addr of desc pointing to symbol name
3 Outp
 R0 either normal or error (symbol not added)
 If symbol is added then 1 more symbol in table
 R1 = addr of added sym (if added)
2 MC_PRS_VALUE 

 Exmple of line this routine processes:

       ::= { system 2 }

 Locate 'parent' symbol (system) in table
 add '.value (2)  and create new symbol
 For example
 if system = 1.2.3.4.5 then this will become 1.2.3.4.5.2
 This is the last entry in the MIB for this OBJECT-TYPE
 Therfore write out this rec.
2 MC_FIND_SYM 
 Find previously created symbol in symbol table.
  
3 Inputs
 Desc point to symbol to search for
3 Outputs
 R0 = either normal or not found 
 R1 = either add of located sym or loca of next avail position
 Fast search: If top .long matches then check rest of rec.
2 MC_GET_TOKEN
 Find next token (next occurence of non-whitespace) in string.
  
3 Inputs
 Desc point to string to search
 addr of .quad where descriptor of found word is written
3 Outputs:
 R0 = either normal or badparam (not found, 0 len etc) 
