This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients David.Edelsohn, Michael.Felt, lys.nikolaou, pablogsal, skrah
Date 2020-07-06.17:13:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594055635.09.0.91384004728.issue41215@roundup.psfhosted.org>
In-reply-to
Content
Well, in any case, I will submit a patch today to the parser generator to substitute the NULL for single-element arrays which seems to work.

Michael, could you confirm that this patch works for you:

diff --git a/Parser/pegen/parse.c b/Parser/pegen/parse.c
index 9d3ac575df..e5511bf815 100644
--- a/Parser/pegen/parse.c
+++ b/Parser/pegen/parse.c
@@ -1,6 +1,6 @@
-// @generated by pegen.py from ./Grammar/python.gram
-#include "pegen.h"

+#include "pegen.h"
+// @generated by pegen.py from ./Grammar/python.gram
 #if defined(Py_DEBUG) && defined(Py_BUILD_CORE)
 extern int Py_DebugFlag;
 #define D(x) if (Py_DebugFlag) x;
@@ -9,8 +9,8 @@ extern int Py_DebugFlag;
 #endif
 static const int n_keyword_lists = 15;
 static KeywordToken *reserved_keywords[] = {
-    NULL,
-    NULL,
+    (KeywordToken[]) {{NULL, -1}},
+    (KeywordToken[]) {{NULL, -1}},
     (KeywordToken[]) {
         {"if", 510},
         {"in", 518},
@@ -65,11 +65,11 @@ static KeywordToken *reserved_keywords[] = {
         {"nonlocal", 509},
         {NULL, -1},
     },
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+    (KeywordToken[]) {{NULL, -1}},
+    (KeywordToken[]) {{NULL, -1}},
+    (KeywordToken[]) {{NULL, -1}},
+    (KeywordToken[]) {{NULL, -1}},
+    (KeywordToken[]) {{NULL, -1}},
     (KeywordToken[]) {
         {"__peg_parser__", 531},
         {NULL, -1},
@@ -24735,7 +24735,6 @@ _PyPegen_parse(Parser *p)
     // Initialize keywords
     p->keywords = reserved_keywords;
     p->n_keyword_lists = n_keyword_lists;
-
     // Run parser
     void *result = NULL;
     if (p->start_rule == Py_file_input) {
History
Date User Action Args
2020-07-06 17:13:55pablogsalsetrecipients: + pablogsal, skrah, David.Edelsohn, Michael.Felt, lys.nikolaou
2020-07-06 17:13:55pablogsalsetmessageid: <1594055635.09.0.91384004728.issue41215@roundup.psfhosted.org>
2020-07-06 17:13:55pablogsallinkissue41215 messages
2020-07-06 17:13:55pablogsalcreate