perlman@wivax.UUCP (Gary Perlman) (12/13/84)
What follows is the abstract of my paper for the USENIX conference next month in Dallas. You can request reprints of the paper from me directly. I won't be posting the full article to the net. Gary Perlman Wang Institute Tyng Road Tyngsboro, MA 01879 USA (617) 649-9731 An Overview of the SETOPT Command Line Option Parser Generator Gary Perlman AT&T Bell Laboratories * Murray Hill, NJ 07974 USA wivax!perlman (617) 649-9731 * Now at the Wang Institute of Graduate Studies ABSTRACT SETOPT is a set of procedures for generating C functions to parse command line options for UNIX commands. The parsing routines follow the standard syntax presented at USENIX by Hemmenway & Armitage but goes several steps further by providing on-line help, type and range checking, interactive setting of variables, standard error messages, and other useful features. Programmers use a simple language to describe the attributes of options. For each option, the name, purpose, data type, dimension, range, and other information are used to generate program code to standardize the user interface between users and the program, and between the programmer and the parser. Programmers can assume perfect users are interacting with their programs because on-line help and diagnostic error messages tell users what options are available and make sure that legal option values are supplied. Extra benefits include the ability to generate summary documents and menu/form-filling interfaces.