<div dir="ltr"><div dir="ltr"><div>We do have a parser generator in the standard library:</div><div><a href="https://github.com/python/cpython/tree/master/Lib/lib2to3/pgen2">https://github.com/python/cpython/tree/master/Lib/lib2to3/pgen2</a><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 31, 2019 at 9:17 PM Nam Nguyen <<a href="mailto:bitsink@gmail.com">bitsink@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"><div dir="ltr"><div dir="ltr">On Sun, Mar 31, 2019 at 12:13 PM David Mertz <<a href="mailto:mertz@gnosis.cx" target="_blank">mertz@gnosis.cx</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I just found this nice summary. It's not complete, but it looks well written. <a href="https://tomassetti.me/parsing-in-python/" target="_blank">https://tomassetti.me/parsing-in-python/</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 31, 2019, 3:09 PM David Mertz <<a href="mailto:mertz@gnosis.cx" target="_blank">mertz@gnosis.cx</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"><div dir="auto"><div>There are about a half dozen widely used parsing libraries for Python. Each one of them takes a dramatically different approach to the defining a grammar. Each one has been debugged for over a decade.</div><div dir="auto"><br></div><div dir="auto">While I can imagine proposing one for inclusion in the standard library, you'd have to choose one (or write a new one) and explain why that one is better for everyone (or at least a better starting point) than all the others are.</div></div></blockquote></div></blockquote><div><br></div><div>I'm not at that stage, yet. By the way, it still is not clear to me if you think having one in the stdlib is desirable.</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"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"> You're also have to explain why it needs to be in the standard library rather than installed by 'pip install someparser'.<br></div></div></blockquote></div></blockquote><div><br></div><div>Installing a package out of stdlib does not solve the problem that motivated this thread. The libraries included in the stdlib can't use those parsers.</div><div><br></div><div>Cheers,</div><div>Nam</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"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, Mar 30, 2019, 1:58 PM Nam Nguyen <<a href="mailto:bitsink@gmail.com" rel="noreferrer" target="_blank">bitsink@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"><div dir="ltr">Hello list,<div><br></div><div>What do you think of a universal parsing library in the stdlib mainly for use by other libraries in the stdlib?</div><div><br></div><div>Through out the years we have had many issues with protocol parsing. Some have even introduced security bugs. The main cause of these issues is the use of simple regular expressions.</div><div><br></div><div>Having a universal parsing library in the stdlib would help cut down these issues. Such a library should be minimal yet encompassing, and whole parse trees should be entirely expressible in code. I am thinking of combinatoric parsing as the main candidate that fits this bill.</div><div><br></div><div>What do you say?</div><div><br></div><div>Thanks!</div><div>Nam</div></div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" rel="noreferrer noreferrer" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div></div>
</blockquote></div>
</blockquote></div></div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>