bpo-40750: Support -d flag in the new parser (GH-20340)

This commit is contained in:
Pablo Galindo 2020-05-25 18:38:45 +01:00 committed by GitHub
parent 7d847e29d7
commit 800a35c623
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 4440 additions and 48 deletions

View file

@ -96,7 +96,7 @@ def generate_parser_c_extension(
# context.
assert not os.listdir(path)
source = path / "parse.c"
with open(source, "w") as file:
with open(source, "w", encoding="utf-8") as file:
genr = CParserGenerator(
grammar, ALL_TOKENS, EXACT_TOKENS, NON_EXACT_TOKENS, file, debug=debug
)