arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1210.3593cs.PLcs.FL
收藏

编译器中的模式匹配

Pattern matching in compilers

Ondřej Bílka

摘要:

在这篇论文中,我们开发了有效和灵活的模式匹配工具。我们介绍了一种新的模式匹配系统称为紫水晶。Amethyst不仅是程序设计语言的解析器生成器,而且还可以作为正则表达式匹配工具的替代品。我们的框架还产生动态解析器。它的预期用途是在IDE环境中(精确的语法突出显示和动态错误检测)。Amethyst提供一般数据结构的模式匹配。这使得它成为一个有用的工具,用于实现编译器优化,如常量折叠,指令调度和一般的编译器分析。生成的解析器基本上是自顶向下的解析器。线性时间复杂度是通过引入新的概念,结构化文法和正则表达式。Amethyst使用编译器优化中已知的技术来生成有效的解析器。

英文摘要:

In this thesis we develop tools for effective and flexible pattern matching. We introduce a new pattern matching system called amethyst. Amethyst is not only a generator of parsers of programming languages, but can also serve as an alternative to tools for matching regular expressions. Our framework also produces dynamic parsers. Its intended use is in the context of IDE (accurate syntax highlighting and error detection on the fly). Amethyst offers pattern matching of general data structures. This makes it a useful tool for implementing compiler optimizations such as constant folding, instruction scheduling, and dataflow analysis in general. The parsers produced are essentially top-down parsers. Linear time complexity is obtained by introducing the novel notion of structured grammars and regularized regular expressions. Amethyst uses techniques known from compiler optimizations to produce effective parsers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑