首页> 外文期刊>Theoretical computer science >PRECEDENCES IN SPECIFICATIONS AND IMPLEMENTATIONS OF PROGRAMMING LANGUAGES
【24h】

PRECEDENCES IN SPECIFICATIONS AND IMPLEMENTATIONS OF PROGRAMMING LANGUAGES

机译:编程语言规范和实现的先例

获取原文
获取原文并翻译 | 示例
           

摘要

Although precedences are often used to resolve ambiguities in programming language descriptions, there has been no parser-independent definition of languages which are generated by grammars with precedence rules. This paper gives such a definition for a subclass of context-free grammars. The definition is shown to be equivalent to the implicit definition an operator precedence parser gives. A problem with a language containing infix, prefix and postfix operators of different precedences is that the well-known algorithm, which transforms a grammar with infix operator precedences to an ordinary unambiguous context-free grammar, does not work. This paper gives an algorithm that works also for prefix and postfix operators, and the correctness of it is proved. An application of the algorithm is also presented. [References: 21]
机译:尽管优先级通常用于解决编程语言描述中的歧义,但是还没有语法独立于语法分析器的定义,这些语言是由具有优先级规则的语法生成的。本文为上下文无关文法的子类给出了这样的定义。该定义显示为等效于运算符优先级解析器提供的隐式定义。包含具有不同优先级的infix,prefix和postfix运算符的语言存在的一个问题是,众所周知的算法无法将具有infix运算符优先级的语法转换为普通的无上下文上下文语法。本文给出了一种适用于前缀和后缀运算符的算法,并证明了其正确性。还介绍了该算法的应用。 [参考:21]

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号