首页> 外国专利> Mechanism for reformatting a simple source code statement into a compound source code statement

Mechanism for reformatting a simple source code statement into a compound source code statement

机译:将简单的源代码语句重新格式化为复合源代码语句的机制

摘要

A mechanism for reformatting a simple source code statement into a compound source code statement is provided. Tokens are identified in unformatted source code, which contains simple statements. A syntax tree is created from the identified tokens. The syntax tree is used to identify one or more simple statements. In processing a particular simple statement, potential statements are identified in the particular simple statement. A tree of blocks, which identifies block levels, is created from the potential statements. An intermediate textual representation is created where each of the potential statements is on a different line. Indentation levels, which correspond to the block levels in the tree of blocks, are associated with each of the potential statements. Formatted source code is created by inserting begin and end block indicators into the intermediate textual representation.
机译:提供了一种将简单的源代码语句重新格式化为复合源代码语句的机制。令牌以未格式化的源代码标识,该源代码包含简单的语句。根据标识的令牌创建语法树。语法树用于标识一个或多个简单语句。在处理特定的简单语句时,会在特定的简单语句中识别潜在的语句。从潜在语句中创建了一个块树,用于标识块级别。创建中间文本表示,其中每个潜在语句在不同的行上。对应于块树中的块级别的缩进级别与每个潜在语句相关联。通过在中间文本表示中插入开始和结束块指示符来创建格式化的源代码。

著录项

  • 公开/公告号US2003200534A1

    专利类型

  • 公开/公告日2003-10-23

    原文格式PDF

  • 申请/专利权人 KUZMIN ALEKSANDR M.;

    申请/专利号US20020128162

  • 发明设计人 ALEKSANDR M. KUZMIN;

    申请日2002-04-22

  • 分类号G06F9/45;

  • 国家 US

  • 入库时间 2022-08-22 00:09:40

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号