首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
A language-independent syntax-directed pretty printer has been implemented as the first step towards building a language-independent syntax-directed editor. The syntax-directed pretty printer works in two phases: the grammar processing phase and the program processing phase. In the grammar processing stage, a grammar which contains a context-free grammar and information for the parser and pretty printer is processed and all files needed by the second phase are written. With these files, the syntax-directed pretty printer works for the language of the grammar. The syntax-directed editor would use the same grammar processing phase to construct the files needed to make it work for a specific language. In the program processing phase, programs in the language of the grammar are parsed and parse trees are built. If syntax errors are found, error messages are produced and error recovery is done. The parse trees are pretty printed according to the pretty printer specifications given in the grammar, resulting in well-indented, syntactically clear programs.  相似文献   

2.
3.
The systematic approach to compilation represented by syntax-directed compilers makes possible a similarly systematic approach to the automatic correction of syntax errors. This paper describes the syntax-directed syntax error correction system EXPL. Techniques for pinpointing the locations of syntax errors, generating sets of possible corrections and for choosing the best correction from such a set are presented. A particularly promising approach involves the use of semantic information to assist in the elimination of inappropriate syntactic corrections.  相似文献   

4.
This article describes an algorithm for incremental parsing of expressions in the context of syntax-directed editors for programming languages. Since a syntax-directed editor represents programs as trees and statements and expressions as nodes in trees, making minor modifications in an expression can be difficult. Consider, for example, changing a “ + ” operator to a “1” operator or adding a short subexpression at a syntactically but not structurally correct position, such as inserting “) 1 (d“ at the # mark in” (a + b # + c)”. To make these changes in a typical syntax-directed editor, the user must understand the tree structure and type a number of tree-oriented construction and manipulation commands. This article describes an algorithm that allows the user to think in terms of the syntax of the expression as it is displayed on the screen (in infix notation) rather than in terms of its internal representation (which is effectively prefix), while maintaining the benefits of syntax-directed editing. This algorithm is significantly different from other incremental parsing algorithms in that it does not involve modifications to a traditional parsing algorithm or the overhead of maintaining a parser stack or any data structure other than the syntax tree. Instead, the algorithm applies tree transformations, in real-time as each token is inserted or deleted, to maintain a correct syntax tree.  相似文献   

5.
The front end of the software life cycle is an important phase in the development of quality software systems. Due to the interactive nature of the requirements specification phase, automated tools assist in capturing user concepts and conveying these concepts to the developers. This paper presents a syntax-directed editor developed for the Descartes software specification language. The editor helps in constructing the specifications by detecting and preventing syntactic and static semantic errors. The editor uses the visual notation of Nassi–Shneiderman charts for the external representation of Descartes specifications. The specifications are edited in their visual form directly within the editor. Use of a syntax-directed editor for the construction of Descartes specifications is expected to reduce specification errors, enhance constructibility, and in turn increase productivity. © 1997 John Wiley & Sons, Ltd.  相似文献   

6.
This paper describes a graphical specification tool for Dia Gen, a diagram editor generator based on hypergraph grammars and hypergraph transformation. The specification tool greatly simplifies the process of specifying and generating diagram editors. It uses an XML-based specification language, and it is an extension of a generic XML editor which offers syntax-directed editing based on the DTD, i.e, syntax specification, of the underlying XML-based language.  相似文献   

7.
8.
本文介绍一种基于模板式语法制导编辑器的程序转换系统的设计与实现。  相似文献   

9.
ROGER G. STONE  GADA F. KADODA 《Software》1996,26(11):1247-1260
This paper demonstrates a new approach to the building of a syntax-directed editor (SDE). The approach does not force the user to adopt a top-down syntax-oriented view of editing but supports the traditional text-editing approach of deciding which token to write next. Choices are made from menus listing only the tokens that are syntactically legal at a given point. The actual menus used by the editor are created by reference to the tables used by an LALR parser-generator.  相似文献   

10.
A growing interest in visual languages results in the development of methods and means of their implementation. In this paper, a formalism for analyzing visual language diagrams in the form of an automaton graphical grammar and structure of a syntax-directed graphical editor are suggested.  相似文献   

11.
12.
摘要:自适应软件在移动机器人上具有广泛的应用前景,然而要在具有不同软硬件平台的移动机器人上开发自适应软件是一件非常困难的事情..为了解决这个问题,提出并实现了一个面向移动机器人应用的跨平台自适应软件框架该框架屏蔽了运行平台的软硬件差异性,并使用规则文件将自适应逻辑分离出来,从而降低了自适应软件开发的难度。为了便于编写及检查规则文件,还实现了一个可视化的规则文件编辑器,用于自动生成模型图,并检查规则中存在的语法及逻辑错误i,最后,通过实验测试了框架的使用情况,并对框架的应用效果进行了评估、  相似文献   

13.
Phil Cook  Jim Welsh 《Software》2001,31(15):1461-1486
Incremental parsing has long been recognized as a technique of great utility in the construction of language‐based editors, and correspondingly, the area currently enjoys a mature theory. Unfortunately, many practical considerations have been largely overlooked in previously published algorithms. Many user requirements for an editing system necessarily impact on the design of its incremental parser, but most approaches focus only on one: response time. This paper details an incremental parser based on LR parsing techniques and designed for use in a modeless syntax recognition editor. The nature of this editor places significant demands on the structure and quality of the document representation it uses, and hence, on the parser. The strategy presented here is novel in that both the parser and the representation it constructs are tolerant of the inevitable and frequent syntax errors that arise during editing. This is achieved by a method that differs from conventional error repair techniques, and that is more appropriate for use in an interactive context. Furthermore, the parser aims to minimize disturbance to this representation, not only to ensure other system components can operate incrementally, but also to avoid unfortunate consequences for certain user‐oriented services. The algorithm is augmented with a limited form of predictive tree‐building, and a technique is presented for the determination of valid symbols for menu‐based insertion. Copyright © 2001 John Wiley & Sons, Ltd.  相似文献   

14.
本文讨论噪声模式和畸变模式的识别问题.用带有位置坐标的树状文法描述图象,对区 域的边界进行分析,建立与产生式相对应的词意规则.这里既考虑模式的统计特征,又通过词 意、句法指导下的变换来描写畸变模式的结构.在此基础上提出一种包括词意及句法的距离 度量,从而用最小距离准则来进行识别.  相似文献   

15.
A Pascal syntax directed screen editor, designed to run under PNX on an ICL Perq workstation is presented. The editor (Eliot) offers a structured approach to text editing and provides complete Pascal syntax checking. The exceptional graphic capabilities of the Perq are used to good effect in providing an efficient user interface by way of a hierarchy of pop-up menus. Using this interface, skeletal programs may be entered down to the assignment statement, or procedure call level without recourse to the keyboard, selections being made from menus using a graphics tablet and puck. Eliot encourages block structured programs with nested blocks by the use of a tree structured menu, representing the program structure. This allows for efficient movement around the program, again using the tablet and puck. Syntax checking is performed continually with errors reported and highlighted immediately for correction at will. For further error checking a variable scan option can be invoked which lists details of variable names which are not declared, or declared more than once, or declared and not used at all.  相似文献   

16.
Lloyd Allison 《Software》1983,13(5):453-465
A syntax editor provides alternative ways for manipulating programs (as opposed to text). Although not a new idea it has made only slow inroads into editing. This is because implementation is not easy and because of many practical considerations in the use of an editor. This paper covers the design issues of a syntax editor with particular reference to on—SED. Examples of different options taken by other editors are included.  相似文献   

17.
Improved human engineering can add significantly to the acceptance and use of computer technology. We report here an experiment in which users with varying degrees of interactive computing experience used two versions of an interactive text editor: one with an English-like command syntax, the other with a more notational syntax. User performance differences strongly favored the English-like editor at all levels of experience.  相似文献   

18.
The authors present the Abstract-Type and Scheme-Definition Language (ASDL), a new formalism and environment kernel. The main goal of this object-oriented kernel is to reconcile integration and extensibility. ASDL adopts the ideas underlying language-based editor generators but overcomes their extensibility deficiencies. ASDL combines an object-oriented type system with syntax-directed translation schemes and a target-language interface. Its power lies in utilizing inheritance for structure-driven computations. The authors discuss object types, translation rules, and semantic information in ASDL  相似文献   

19.
This paper describes the PECAN family of program development systems. PECAN supports multiple views of the user's program. The views can be representations of the program or of the corresponding semantics. The primary program view is a syntax-directed editor. The current semantic views include expression trees, data type diagrams, flow graphs, and the symbol table. PECAN is designed to make effective use of powerful personal machines with high-resolution graphics displays and is currently implemented on APOLLO workstations.  相似文献   

20.
In this paper, we suggest a class of (attributed) expansive graph grammars which generate languages contained in a graph family ?. It turns out that by means of node renumbering using a very effi-cient algorithm, any graph in ? can be converted into a standard form, which enables the use of related string representation for that graph to facilitate the syntax analysis. As a consequence, the syntax analysis of (attributed) expansive graph language is very efficient and almost like the parsing of tree languages. Furthermore, a syntax-directed transla-tion can be established for mapping one (attributed) expansive graph language to another. Finally, since many relational graphs for scene analysis can be considered as belonging to these graph languages, the proposed graph grammar model appears to be quite attractive from the application point of view.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号