Combinator Parsing: A Short Tutorial
Combinator Parsing: A Short Tutorial
复制标题
组合器解析:简短教程
DOI:
--
复制
发表时间:
2009
期刊:
影响因子:
--
通讯作者:
S. D. Swierstra
中科院分区:
文献类型:
--
作者:
S. D. Swierstra
There are numerous ways to implement a parser for a given syntax; using parser combinators is a powerful approach to parsing which derives much of its power and expressiveness from the type system and semantics of the host programming language. This tutorial begins with the construction of a small library of parsing combinators. This library introduces the basics of combinator parsing and, more generally, demonstrates how domain specific embedded languages are able to leverage the facilities of the host language. After having constructed our small combinator library, we investigate some shortcomings of the naive implementation introduced in the first part, and incrementally develop an implementation without these problems. Finally we discuss some further extensions of the presented library and compare our approach with similar libraries.