Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!uwvax!oddjob!uxc!uxc.cso.uiuc.edu!a.cs.uiuc.edu!m.cs.uiuc.edu!liberte From: liberte@m.cs.uiuc.edu Newsgroups: comp.software-eng Subject: Re: Language-based editors Message-ID: <39400001@m.cs.uiuc.edu> Date: 29 Jul 88 22:52:00 GMT References: <2135@mhres.mh.nl> Lines: 54 Nf-ID: #R:mhres.mh.nl:2135:m.cs.uiuc.edu:39400001:000:3059 Nf-From: m.cs.uiuc.edu!liberte Jul 29 17:52:00 1988 Here is a repost of our earlier announcement. ------ We have released Leif, a language oriented editor that is based on a recognition paradigm. In a recognition paradigm the programmer enters text and the editor incrementally analyzes this text to determine structure. Many other language oriented editors are based on templates. In these editors, the program is constructed by expanding templates. Template editors prevent the creation of syntax errors by restricting the possible edits. In Leif, the programmer may use all of the text editing commands of a host editor (GNU Emacs) to create a program. The programmer may also use language oriented commands. At any point, the syntax analysis may be consulted to locate syntax errors or display the structure of the program. By using a standard text editor as the front end, Leif offers several benefits. First, there is very little overhead in learning to use Leif. By learning only one new command, the "move to syntax error" command, Leif can be useful. Other commands allow a programmer to see the structure of the program or examine a syntax error. A second benefit is that the user can edit the program as text or as syntax simultaneously. Leif has respectable performance. It uses an incremental parsing algorithm to analyze changes to the text and to maintain a parse tree. If a change is made that affects only a local part of the parse tree, only that part is Analysis does not occur on every key stroke. Instead, Leif allows any number of consecutive changes to be processed as a unit. The programmer may use Leif transparently and request information from the parser when it is needed. Once started, Leif does not require any actions by the programmer for it to follow an editing session. Until a Leif command is activated, the user does not notice any change in the editor. This translates into an efficiency benefit and further enhances the ease of use. A language for Leif is specified as a lexical analyzer and LALR(1) grammar. Standard tools, Lex and Bison (similar to Yacc), are used to process the specification. Once the tables produced by these tools have been converted into an appropriate parse table format, Leif use the tables and edit text in the language. Prototyping the syntax of a language is easy and a designer of a language may specify a language and experiment with it quickly. The language need not be a programming language, but could instead be a specification, design or text processing language as long as a language fits in the lexical analyzer and parser paradigm. Leif is available via anonymous ftp from a.cs.uiuc.edu. The files are located in the subdirectory pub/Leif. Consult the file README.DIST that is in that directory to decide which files to retrieve. Documentation is available in the file leif-doc.tar.Z. (If you are unable to retrieve the files via ftp, please contact us.) Please send Leif related queries to ihnp4!uiucdcs!leif or leif@a.cs.uiuc.edu Bill Smith, Dan LaLiberte, Roy Campbell