首页> 外国专利> One-pass greedy-pattern-matching finite-state-machine code generation

One-pass greedy-pattern-matching finite-state-machine code generation

机译:一遍贪婪模式匹配有限状态机代码生成

摘要

A one-pass, greedy-pattern-matching, finite-state-machine code generator is disclosed. The code generator generates local code (such as processor-native code) from intermediate code (such as Java byte code). In one embodiment of the invention, a computer-implemented method for generating local code from intermediate code first includes receiving a current element of a post-fix-notated intermediate code. The method receives a current element of a postfix-notated intermediate code, and matches the current element to a base rule within a predetermined intermediate code-to-local code grammar. The method then selects and applies a matching base rule based on a predetermined criteria. A local code is then generated according to the matching base rule applied to the current element. A next element of the intermediate code is then advanced to as the current element. In another embodiment, the method matches the current element to a base rule, includes matching a most recent element to one or more chain rule(s) within the grammar and applies the chain rule(s) to the most recent element to enable the current element to match a given base rule. In still another embodiment, a code-generator generator is disclosed that constructs a code generator according to a machine specification.
机译:公开了一种单通,贪婪模式匹配的有限状态机代码生成器。代码生成器从中间代码(例如Java字节代码)生成本地代码(例如处理器本机代码)。在本发明的一个实施例中,一种用于从中间代码生成本地代码的计算机实现的方法首先包括:接收带有后缀标记的中间代码的当前元素。该方法接收带有后缀标记的中间代码的当前元素,并将当前元素与预定的中间代码到本地代码语法内的基本规则匹配。然后,该方法基于预定标准选择并应用匹配的基本规则。然后根据应用于当前元素的匹配基本规则生成本地代码。然后,将中间代码的下一个元素前进为当前元素。在另一实施例中,该方法使当前元素与基本规则匹配,包括将最新元素与语法中的一个或多个链规则匹配,并将链规则应用于最新元素以启用当前元素。元素以匹配给定的基本规则。在又一个实施例中,公开了一种代码生成器生成器,其根据机器规范来构造代码生成器。

著录项

  • 公开/公告号US6748588B1

    专利类型

  • 公开/公告日2004-06-08

    原文格式PDF

  • 申请/专利权人 MICROSOFT CORPORATION;

    申请/专利号US19990282780

  • 发明设计人 CHRISTOPHER W. FRASER;TODD A. PROEBSTING;

    申请日1999-03-31

  • 分类号G06F94/50;

  • 国家 US

  • 入库时间 2022-08-21 23:14:46

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号