Imperial College London

DrNicolasWu

Faculty of EngineeringDepartment of Computing

Reader in Computer Science
 
 
 
//

Contact

 

+44 (0)20 7594 8189n.wu Website

 
 
//

Location

 

374Huxley BuildingSouth Kensington Campus

//

Summary

 

Publications

Citation

BibTex format

@article{Willis:2020:10.1145/3409002,
author = {Willis, J and Wu, N and Pickering, M},
doi = {10.1145/3409002},
journal = {Proceedings of the ACM on Programming Languages},
pages = {1--30},
title = {Staged selective parser combinators},
url = {http://dx.doi.org/10.1145/3409002},
volume = {4},
year = {2020}
}

RIS format (EndNote, RefMan)

TY  - JOUR
AB - Parser combinators are a middle ground between the fine control of hand-rolled parsers and the high-level almost grammar-like appearance of parsers created via parser generators. They also promote a cleaner, compositional design for parsers. Historically, however, they cannot match the performance of their counterparts.This paper describes how to compile parser combinators into parsers of hand-written quality. This is done by leveraging the static information present in the grammar by representing it as a tree. However, in order to exploit this information, it will be necessary to drop support for monadic computation since this generates dynamic structure. Selective functors can help recover lost functionality in the absence of monads, and the parser tree can be partially evaluated with staging. This is implemented in a library called Parsley.
AU - Willis,J
AU - Wu,N
AU - Pickering,M
DO - 10.1145/3409002
EP - 30
PY - 2020///
SN - 2475-1421
SP - 1
TI - Staged selective parser combinators
T2 - Proceedings of the ACM on Programming Languages
UR - http://dx.doi.org/10.1145/3409002
UR - http://hdl.handle.net/10044/1/85700
VL - 4
ER -