Message373148
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) { |
|
Date |
User |
Action |
Args |
2020-07-06 17:13:55 | pablogsal | set | recipients:
+ pablogsal, skrah, David.Edelsohn, Michael.Felt, lys.nikolaou |
2020-07-06 17:13:55 | pablogsal | set | messageid: <1594055635.09.0.91384004728.issue41215@roundup.psfhosted.org> |
2020-07-06 17:13:55 | pablogsal | link | issue41215 messages |
2020-07-06 17:13:55 | pablogsal | create | |
|