SHELL is a framework that is built upon DLCORE. It defines a number of layers which represent functionality that exists in all shells. SHELL needs uses five layers by default: interface, lexer, parser, interpeter and mainloop. The only one that must be provided by the user is mainloop. Very simple defaults for all the other layers are provided, some of these defaults are NOOP functions. Each layer has a list of essential procedures that must be implemented for the layer to be fully functional. interface: defines the human program interface and provides I/O services to the lexer, parser and interpreter. lexer: reads characters using the services of the interface layer and converts them into tokens for the parser. parser: reads tokens using the services of the lexer layer, parses them. interpreter: uses the parser layer to parse commands from the user and do the appropriate thing. mainloop: uses the interpreter layer to provided user interaction while doing the primary functions of the application. Often the mainloop will do nothing more than call the interpreter repeatedly. This allows all action to be initiated by user input. This effectively makes the application a command shell much like csh. --------------------------------------------------------------------------- Essential Procedures -------------------- interface: Begin_Interface End_Interface GetChar UnGetChar GetLine UnGetLine PutChar PutLine OpenFile CloseFile Scanf Printf lexer: Begin_Lexer End_Lexer Lex parser: Begin_Parser End_Parser Parse interpreter: Begin_Interpreter End_Interpreter Interpret mainloop: Begin_Mainloop End_Mainloop