Parse Table Composition Separate Compilation and Binary Extensibility of Grammars

被引:0
|
作者
Bravenboer, Martin [1 ]
Visser, Eelco [2 ]
机构
[1] Univ Oregon, Eugene, OR 97403 USA
[2] Delft Univ Technol, NL-2600 AA Delft, Netherlands
来源
关键词
INCREMENTAL GENERATION;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Module systems, separate compilation, deployment of binary components, and dynamic linking have enjoyed wide acceptance in programming languages and systems. In contrast, the syntax of languages is usually defined in a non-modular way, cannot be compiled separately, cannot easily be combined with the syntax of other languages, and cannot be deployed as a component for later composition. Grammar formalisms that do support modules use whole program compilation. Current extensible compilers focus on source-level extensibility, which requires users to compile the compiler with a specific configuration of extensions. A compound parser needs to be generated for every combination of extensions. The generation of parse tables is expensive, which is a particular problem when the composition configuration is not fixed to enable users to choose language extensions. In this paper we introduce an algorithm for parse table composition to support separate compilation of grammars to parse table components. Parse table components can be composed (linked) efficiently at runtime, i.e. just before parsing. While the worst-case time complexity of parse table composition is exponential (like the complexity of parse table generation itself), for realistic language combination scenarios' involving grammars for real languages, our parse table composition algorithm is an order of magnitude faster than computation of the parse table for the combined grammars.
引用
收藏
页码:74 / +
页数:4
相关论文
共 1 条
  • [1] Verifiable Parse Table Composition for Deterministic Parsing
    Schwerdfeger, August
    Van Wyk, Eric
    [J]. SOFTWARE LANGUAGE ENGINEERING, 2010, 5969 : 184 - 203