From 887ed5e2a97c98de83559eaf0a7210f103f3af8d Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 2 Feb 2003 19:34:14 +0000 Subject: [PATCH] backport: revision 2.75 date: 2003/01/29 14:20:22; author: mwh; state: Exp; lines: +2 -0 Teach the parsermodule about floor division. Fixes [ 676521 ] parser module validation failure --- Modules/parsermodule.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index ca0531d6b0f6..20db86e1fe2a 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -1438,6 +1438,7 @@ validate_expr_stmt(node *tree) || strcmp(s, "-=") == 0 || strcmp(s, "*=") == 0 || strcmp(s, "/=") == 0 + || strcmp(s, "//=") == 0 || strcmp(s, "%=") == 0 || strcmp(s, "&=") == 0 || strcmp(s, "|=") == 0 @@ -2093,6 +2094,7 @@ validate_term(node *tree) for ( ; res && (pos < nch); pos += 2) res = (((TYPE(CHILD(tree, pos)) == STAR) || (TYPE(CHILD(tree, pos)) == SLASH) + || (TYPE(CHILD(tree, pos)) == DOUBLESLASH) || (TYPE(CHILD(tree, pos)) == PERCENT)) && validate_factor(CHILD(tree, pos + 1))); -- 2.47.3