Previous [1] [2] [3] [4] [5] [6] [7] [8]

Journal of Inforamtion Science and Engineering, Vol.11 No.4, pp.541-565 (December 1995)
Constructing a Language-Based Editor with
Object-Oriented Techniques

Chung-Hua Hu, Feng-Jian Wang and Jei-Chung Wang
Institute of Computer Science and Information Engineering
National Chiao Tung University
Hsincchu, Taiwan, R.O.C.

A language-based editor is an editor composed of interacting cells, called placeholders, where the programmer edits his program segments. The placeholders are designed according to a language's syntax and semantics such that the affected part(s) is analyzed (named incremental analysis) when control leaves the placeholder. This paper presents a template-based MVC (TMVC for short) architecture, and extension of MVC, for constructing a language-based editor. A TMVC encapsulates an MVC triad as its component to handle all of the I/O work of a placeholder, and a program is modeled by multiple TMVCs associated with the program tree.

        Object-oriented techniques have also been used to construct incremental tools which perform analysis via message passing between TMVCs. Since semantic definitions are usually associated with language constructs which are basically similar in different languages, the (code) class hierarchy for an (corresponding) incremental tool constructed based on language constructs is more reusable and maintainable. Furthermore, an example of integrating an incremental tool into the programming environment shows the extensibility.

Keywords: language-based editor, MVC, object-oriented programming, incremental analysis, reusability

Received May 19, 1994; revised May 17, 1995.
Communicated by Shing-Tsaan Huang.