Generation of Syntax-Directed Editors With Text-Oriented Features
01 December 1983
Generation of Syntax-Directed Editors With Text-Oriented Features By B. A. BOTTOS* and C. M. R. KINTALA* (Manuscript received March 16, 1983) Often, syntax-directed editors rely solely on menu selection for program construction. We describe here the generation of hybrid editors that give a programmer the option of either (1) using menu selection and tree navigation as in a syntax-directed editor, or (2) entering text for parsing and navigating through the text as in a conventional editor at any stage during the expansion of a program. A prototype system, HEG (Hybrid Editor Generator), has been built to automatically generate such a hybrid editor from a high-level specification of a grammar for an application language. Each such generated hybrid editor is called an AGE (Automatically Generated Editor). We describe the HEG meta-language and briefly summarize the editing process in AGEs. We also describe possible extensions to the meta-language to describe program semantics, and the generation of the procedures to check those semantics during program construction. I. INTRODUCTION In t h e past, there has been a dichotomy between t h e way a develo p m e n t tool such as a text editor would manipulate t h e text of a computer program and the way another development tool such as a parser would manipulate t h e same text. T h e advent of syntax-directed editing has removed this difference by introducing t h e use of editors t h a t store and manipulate programs entirely as (partially) instantiated syntax trees.