<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Am Di., 9. Okt. 2018 um 00:25 Uhr schrieb Vladislav Zavialov <<a href="mailto:vlad.z.4096@gmail.com">vlad.z.4096@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[...] That's true regardless of implementation technique, parsers are rather<br>
delicate.</blockquote><div><br></div><div>I think it's not the parsers themselves which are delicate, it is the language that they should recognize.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> A LALR-based parser generator does provide more information<br>
when it detects shift/reduce and reduce/reduce conflicts, but I never<br>
found this information useful. It was always quite the opposite of<br>
being helpful - an indication that a LALR parser could not handle my<br>
change and I had to look for workarounds. [...]<br></blockquote><div><br></div><div>Not that this would help at this point, but: The conflicts reported by parser generators like Happy are *extremely* valuable, they hint at tricky/ambiguous points in the grammar, which in turn is a strong hint that the language you're trying to parse has dark corners. IMHO every language designer and e.g. everybody proposing a syntactic extension to GHC should try to fit this into a grammar for Happy *before* proposing that extension. If you get conflicts, it is a very strong hint that the language is hard to parse by *humans*, too, which is the most important thing to consider. Haskell already has tons of syntactic warts which can only be parsed by infinite lookahead, which is only a minor technical problem, but a major usablity problem. "Programs are meant to be read by humans and only incidentally for computers to execute." (D.E.K.) </rant> ;-)</div><div><br></div><div>The situation is a bit strange: We all love strong guarantees offered by type checking, but somehow most people shy away from "syntactic type checking" offered by parser generators. Parser combinators are the Python of parsing: Easy to use initially, but a maintenance hell in the long run for larger projects...</div><div><br></div><div>Cheers,</div><div>   S.</div></div></div></div>