首页> 外国专利> Token-based computer program editor with program comment management

Token-based computer program editor with program comment management

机译:具有程序注释管理的基于令牌的计算机程序编辑器

摘要

A user-friendly text editor for structurally represented computer programs is disclosed. The present editor combines advantages of text editors and structure editors by transforming, as the user types, the text stream entered by the user into a token stream, where the tokens of the token stream constitute the words of the program being entered. Each of the tokens is classified by the editor as one of a group of extended lexemes defined by the language in which the program being edited is written. These extended lexemes are defined similar to lexemes that might be used in a batch lexer, but are more numerous as the present editor must account for the incomplete and ill-formed lexemes that arise as the user types the program. Before performing lexical analysis, the present editor separates program statements from program comments. The editor then stores the text of the comments along with comment positioning information that allows the original position of the comments as entered by the user to be recreated for printing or display purposes. Based on the token stream and the separately represented comments, the editor prettyprints the program and comments as the user types. The editor also allows the user to edit the program from the prettyprinted display as if the program were internally represented as text. The present editor also allows the user to periodically request a syntactical analysis of the program, wherein the structure of the program is represented in a syntax tree that references the token stream.
机译:公开了用于结构上表示的计算机程序的用户友好的文本编辑器。本编辑器通过将用户输入的用户输入的文本流转换成令牌流而结合了文本编辑器和结构编辑器的优点,其中令牌流的令牌构成了要输入的程序的单词。编辑器将每个标记分类为一组扩展词素之一,该扩展词素由编写被编辑程序的语言定义。这些扩展的词素的定义类似于可能在批处理词法分析器中使用的词素,但数量更多,因为当前编辑器必须考虑用户键入程序时出现的不完整和格式不正确的词素。在执行词法分析之前,当前编辑器将程序语句与程序注释分开。然后,编辑器将注释文本与注释定位信息一起存储,该注释定位信息允许重新创建用户输入的注释的原始位置以用于打印或显示。根据令牌流和单独表示的注释,编辑器会在用户键入时对程序和注释进行漂亮打印。编辑器还允许用户从漂亮打印的显示中编辑程序,就像程序在内部以文本形式表示一样。本编辑器还允许用户周期性地请求对该程序的语法分析,其中该程序的结构在引用令牌流的语法树中表示。

著录项

  • 公开/公告号US5813019A

    专利类型

  • 公开/公告日1998-09-22

    原文格式PDF

  • 申请/专利权人 SUN MICROSYSTEMS INC.;

    申请/专利号US19950499088

  • 发明设计人 MICHAEL L. VAN DE VANTER;

    申请日1995-07-06

  • 分类号G06F17/21;

  • 国家 US

  • 入库时间 2022-08-22 02:38:34

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号