<div dir="ltr">I've tried PyParsing. I haven't tried Grako.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 3, 2017 at 8:54 AM Ryan Gonzalez <<a href="mailto:rymg19@gmail.com">rymg19@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class="gmail_msg">Have you tried PyParsing and/or Grako? They're some of my favorites (well, I like PLY too, but I'm thinking you wouldn't like it too much).<div dir="auto" class="gmail_msg"><br class="gmail_msg"><div data-smartmail="gmail_signature" dir="auto" class="gmail_msg">--<br class="gmail_msg">Ryan (ライアン)<br class="gmail_msg">Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else<br class="gmail_msg"><a href="http://refi64.com" class="gmail_msg" target="_blank">http://refi64.com</a></div></div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Apr 3, 2017 3:26 AM, "Neil Girdhar" <<a href="mailto:mistersheik@gmail.com" class="gmail_msg" target="_blank">mistersheik@gmail.com</a>> wrote:<br type="attribution" class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Mon, Apr 3, 2017 at 2:31 AM Mark Lawrence via Python-ideas <<a href="mailto:python-ideas@python.org" class="gmail_msg" target="_blank">python-ideas@python.org</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 03/04/2017 02:22, Neil Girdhar wrote:<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
> Same. One day, Python will have a decent parsing library.<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
><br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
Nothing here <a href="https://wiki.python.org/moin/LanguageParsing" rel="noreferrer" class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg" target="_blank">https://wiki.python.org/moin/LanguageParsing</a> suits your needs?<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg"></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">No, unfortunately.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I tried to make a simple grammar that parses latex code, and it was basically impossible with these tools.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">From what I remember, you need the match objects to be able to accept or reject their matched sub-nodes.<br class="gmail_msg"><br class="gmail_msg">It's same thing if you want to parse Python in one pass (not the usual two passes that CPython does whereby it creates an AST and then validates it). It would be cooler to validate as you go since the errors can be much richer since you have the whole parsing context?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">It's been a while, so I might be forgetting something, but I remember thinking that I'll check back in five years and see if anything new has come out.</div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
--<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
My fellow Pythonistas, ask not what our language can do for you, ask<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
what you can do for our language.<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
Mark Lawrence<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
_______________________________________________<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
Python-ideas mailing list<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
<a href="mailto:Python-ideas@python.org" class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg" target="_blank">Python-ideas@python.org</a><br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg" target="_blank">http://python.org/psf/codeofconduct/</a><br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
--<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
---<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group.<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/python-ideas/FSd6xLHowg8/unsubscribe" rel="noreferrer" class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg" target="_blank">https://groups.google.com/d/topic/python-ideas/FSd6xLHowg8/unsubscribe</a>.<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
To unsubscribe from this group and all its topics, send an email to <a href="mailto:python-ideas%2Bunsubscribe@googlegroups.com" class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg" target="_blank">python-ideas+unsubscribe@googlegroups.com</a>.<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg" target="_blank">https://groups.google.com/d/optout</a>.<br class="m_-4620097084358301388m_8555798341745343610gmail_msg gmail_msg">
</blockquote></div></div>
<br class="gmail_msg">_______________________________________________<br class="gmail_msg">
Python-ideas mailing list<br class="gmail_msg">
<a href="mailto:Python-ideas@python.org" class="gmail_msg" target="_blank">Python-ideas@python.org</a><br class="gmail_msg">
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" class="gmail_msg" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br class="gmail_msg">
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" class="gmail_msg" target="_blank">http://python.org/psf/codeofconduct/</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div></div>
</blockquote></div>