The authors have developed a conceptual framework for a system that automatically generates object-oriented, syntax-directed editors for visual languages from their specifications. The system consists of two components: the specification language and the generator. The specification language is used to define the syntax and semantics of visual programming languages. The generator uses a specification of a language as input and produces as output the required syntax-directed editor.
A unified mechanism is proposed for specifying both a language and its editing manipulations. In the terms of this paper, if one considers the rewriting of the nonterminals of a context-free grammar as the editing operation “expand,” then a context-free grammar defines a collection of context-free, sentential forms as successive results of applying the “expand” operation. This is why syntax-directed editors are so elegant for program entry when the only editing operation is the expansion of nonterminals. In existing syntax-directed editors, modifications such as “if-to-while” (replace an “if” with a “while” operator having the same values of “condition” and “stmt”) are awkward because they are neither considered nor specified in the language. Such problems can be avoided using the proposed specification mechanism, which allows the user to define a language as one initial object and a collection of editing operations. Any object that can be obtained by applying a sequence of allowed editing operations is then defined to be in the language.
This paper fulfills its basic purpose--to formally describe the main results of the authors’ work and to point out some remaining problems. The intended audience consists mainly of designers of programming languages and programming environments.