msg261486 - (view) |
Author: A. Skrobov (A. Skrobov) * |
Date: 2016-03-10 09:02 |
Updating Modules/parsermodule.c for every change in grammar and/or parser is a maintenance burden, listed as such at https://docs.python.org/devguide/grammar.html The attached patch lets the validation code use the auto-generated DFA structures, thus ensuring it stays up to date with the grammar. It also trims the code by over 2KLOC. |
|
|
msg265411 - (view) |
Author: A. Skrobov (A. Skrobov) * |
Date: 2016-05-12 15:22 |
Ping? This patch is two months old now. |
|
|
msg266441 - (view) |
Author: Fred Drake (fdrake)  |
Date: 2016-05-26 15:37 |
I see your message to python-dev, and apologize for taking so long to get to this. I do intend to read through your changes, and hope to be able to make time while I'm at PyCon this coming week. |
|
|
msg266577 - (view) |
Author: Fred Drake (fdrake)  |
Date: 2016-05-28 22:19 |
I've read through this, but haven't applied the patch & run tests (that's what buildbots are for). No objections. |
|
|
msg266741 - (view) |
Author: A. Skrobov (A. Skrobov) * |
Date: 2016-05-31 07:24 |
Thank you Fred for your review! I don't have commit access myself; can anybody please commit it for me? |
|
|
msg266903 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2016-06-02 18:28 |
Are you up for trying to commit this while at the sprints, Fred? If not then assign it back to me and I can eventually commit it (busy w/ a ton of stuff so I can't promise when I will get to it). |
|
|
msg266904 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-06-02 18:32 |
New changeset 4a9159ea2536 by Benjamin Peterson in branch 'default': replace custom validation logic in the parse module with a simple DFA validator (closes #26526) https://hg.python.org/cpython/rev/4a9159ea2536 |
|
|
msg272318 - (view) |
Author: Xavier Combelle (xcombelle) * |
Date: 2016-08-10 07:02 |
The DFA is generated by other part of existing cpython code ? If it's the case looks like you did a great job. |
|
|
msg272754 - (view) |
Author: A. Skrobov (A. Skrobov) * |
Date: 2016-08-15 12:49 |
Thanks Xavier! Yes, this is the same DFA that's used by the main Python parser. For some reason, parsermodule didn't previously reuse it, but instead did its own thing. Any volunteers to review the other patch for Python parser, at http://bugs.python.org/issue26415 ? |
|
|
msg286261 - (view) |
Author: A. Skrobov (A. Skrobov) * |
Date: 2017-01-25 15:16 |
Oh btw, the comment in the beginning of Grammar/Grammar > # Note: Changing the grammar specified in this file will most likely > # require corresponding changes in the parser module > # (../Modules/parsermodule.c). is no longer true: after this patch went in, changing the grammar no longer requires translating the changes into Modules/parsermodule.c Can somebody please remove the obsolete comment from there? |
|
|
msg286295 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2017-01-26 07:35 |
New changeset 3275d4b584a2 by Benjamin Peterson in branch '3.6': remove comment about updating the parser module; we do not need to do that anymore (#26526) https://hg.python.org/cpython/rev/3275d4b584a2 |
|
|