Non-syntactic attribute flow in language based editors

The recent computer science literature has contained numerous papers about a new concept in software development, the Language Based Editor, or LBE[l.2,4,7,9,19]. An LBE is similar to standard text editors in that it has capabilities to create files, perform insertions, deletions, and other standard editing operations, but it differs from normal editors in that it possesses knowledge of the syntax and semantics of a particular programming language. With this knowledge, the text editor can notify a user immediately if an attempt is made to create an illegal program. Much attention has been focussed on the syntactic aspects of program editors, or more specifically on the context-free aspect of syntax analysis. Comparatively little attention has been directed at the semantic and context sensitive aspects of LBE’s. Demers, Reps, and Tietelbaum[6] have suggested the use of attribute grammars[13] as an appropriate basis for the semantics of program editors. Reps[15] continued this work and presehted an attribute evaluation technique tailored to incremental changes in an attributed parse tree. Skedzeleski[17] studied timevarying attributes, in which attributes may be evaluated more than once in the attribute evaluation process, and non-local attributes, which are attributes that are functions of attributes not localized within a single production. Although Skedzeleski’s work was not developed for LBE’s, it is similar to the approach presented in this paper.