<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 1:09 PM Vladislav Zavialov <<a href="mailto:vlad.z.4096@gmail.com" target="_blank">vlad.z.4096@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In fact, we do have a fair share of boilerplate in our current grammar<br>
due to lack of parametrisation. That's another issue that would be<br>
solved by parser combinators (or by a fancier parser generator, but<br>
I'm not aware of such one).<br></blockquote><div> </div><div>There is the Menhir [1] parser generator. It provides decent abstraction mechanism. It also generate LR parsers, hence is more flexible than Happy. And generates incremental parsers.<br></div><div><br></div><div>Of course, one would have to make it output Haskell a Haskell parser first. But considering the effort it seem to have been to add a Coq backend, I'd assume it would be less of an effort than porting the entire GHC grammar to parser combinators. (one hard thing would be to decide how to replace the ML functor mechanism that Menhir uses to generate functions from parsers to parsers)<br></div><div><br></div><div>[1]: <a href="http://gallium.inria.fr/~fpottier/menhir/" target="_blank">http://gallium.inria.fr/~fpottier/menhir/</a><br></div></div></div></div></div></div>