首页> 外国专利> Method and apparatus for efficient evaluation of semantic attributes in LALR parsing

Method and apparatus for efficient evaluation of semantic attributes in LALR parsing

机译:在LALR解析中有效评估语义属性的方法和装置

摘要

A method and apparatus for compiling source code that pre- evaluates certain semantic attributes during syntactical analysis. The invention performs certain type of semantic analysis, such as checking semantic attributes, during the operation of the syntactical analyzer, while the parse tree is being built, instead of waiting to perform these checks in a separate pass through the parse tree during semantic analysis. The present invention modifies the format of nodes in the parse tree to include fields for semantic attributes and modifies the actions associated with grammar productions so that they create parse tree nodes of the correct format. In addition, the present invention includes semantic attribute routines that determine the attribute values to store in the parse tree for the various semantic attributes.
机译:一种用于在语法分析期间预评估某些语义属性的源代码的方法和装置。本发明在语法分析器的操作过程中,在构建语法分析树的同时,执行某种类型的语义分析,例如检查语义属性,而不是在语义分析期间等待通过语法分析树的单独遍历执行这些检查。本发明修改了分析树中节点的格式,以包括语义属性的字段,并修改了与语法产生相关联的动作,使得它们创建了正确格式的分析树节点。另外,本发明包括语义属性例程,该语义属性例程确定用于各种语义属性的属性值以存储在解析树中。

著录项

  • 公开/公告号US5892951A

    专利类型

  • 公开/公告日1999-04-06

    原文格式PDF

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

    申请/专利号US19960586234

  • 发明设计人 VLADIMIR OLEGOVICH SAFONOV;

    申请日1996-01-12

  • 分类号G06F9/45;

  • 国家 US

  • 入库时间 2022-08-22 02:08:19

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号