首页> 外文会议>International Conference on Software Language Engineering >Verifiable Parse Table Composition for Deterministic Parsing
【24h】

Verifiable Parse Table Composition for Deterministic Parsing

机译:确定性解析的可验证解析表组成

获取原文

摘要

One obstacle to the implementation of modular extensions to programming languages lies in the problem of parsing extended languages. Specifically, the parse tables at the heart of traditional LALR(l) parsers are so monolithic and tightly constructed that, in the general case, it is impossible to extend them without regenerating them from the source grammar. Current extensible frameworks employ a variety of solutions, ranging from a full regeneration to using pluggable binary modules for each different extension. But recompilation is time-consuming, while the pluggable modules in many cases cannot support the addition of more than one extension, or use backtracking or non-deterministic parsing techniques. We present here a middle-ground approach that allows an extension, if it meets certain restrictions, to be compiled into a parse table fragment. The host language parse table and fragments from multiple extensions can then always be efficiently composed to produce a conflict-free parse table for the extended language. This allows for the distribution of deterministic parsers for extensible languages in a pre-compiled format, eliminating the need for the "source code" grammar to be distributed. In practice, we have found these restrictions to be reasonable and admit many useful language extensions.
机译:对编程语言实施模块化扩展的一个障碍在于解析扩展语言的问题。具体地,传统的LALR(L)解析剂的心脏处的解析表是如此单片和紧密地构造的,即在一般情况下,不可能延伸它们而不从源语法再生它们。当前可扩展框架采用各种解决方案,从完全再生到每个不同的扩展使用可插拔二进制模块。但重新编译是耗时的,而许多情况下的可插拔模块不能支持添加多个扩展,或者使用反向特许或非确定性解析技术。我们在这里展示了一种允许扩展的中间地面方法,如果它符合某些限制,则被编译成解析表片段。然后,主机语言解析表和来自多个扩展的片段,可以始终有效地组成用于为扩展语言生成无冲突的解析表。这允许以预编译格式分发用于可扩展语言的确定性解析器,从而消除了要分发的“源代码”语法的需要。在实践中,我们发现这些限制是合理的,并承认许多有用的语言扩展。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号