Fix Bison 3.8.2 error (#3366).

This commit is contained in:
Wilson Snyder 2022-03-31 19:14:13 -04:00
parent 33105f017c
commit 9be4e7b576
2 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@ Verilator 4.221 devel
* Split --prof-threads into --prof-exec and --prof-pgo (#3365). [Geza Lore, Shunyao CAD]
* Deprecate 'vluint64_t' and similar types (#3255).
* Fix MSVC localtime_s (#3124).
* Fix Bison 3.8.2 error (#3366). [elike-ypq]
Verilator 4.220 2022-03-12

View File

@ -101,7 +101,7 @@ def bison_version_check():
def clean_output(filename, outname, is_output, is_c):
print(" edit " + filename + " " + outname)
with open(filename) as fh:
with open(filename, "r", encoding="utf-8") as fh:
lines = fh.readlines()
basename = re.sub(r'.*/', '', tmp_prefix() + ".")
@ -165,7 +165,7 @@ def clean_output(filename, outname, is_output, is_c):
def warning_check(filename):
with open(filename) as fh:
with open(filename, "r", encoding="utf-8") as fh:
linenum = 0
for line in fh:
linenum += 1
@ -185,7 +185,7 @@ def clean_input(filename, outname):
global Filename # pylint: disable=global-variable-undefined
Filename = filename
with open(filename) as fh:
with open(filename, "r", encoding="utf-8") as fh:
lines = fh.readlines()
# Find "%tokens<type>:"