Since python 3.6, RegexFlags are instances of RegexFlag, not int.
Passing re.UNICODE directly to the lexer will result in the generated
lextab.py returning a SyntaxError.
RegexFlag instances need to be explicitely converted to int. This
solution does not break compatibility with previous previous versions of
python that already return int values.
Coverage decreased (-0.3%) to 94.2% when pulling a28476ad94b1ee0aa03ed8e46d88fe2e3abc943e on erudit:convert-regexflag-to-int into 17d71c7d98c0cebda9932b7f13e72093805e1fe2 on emory-libraries:master.
Coverage decreased (-0.3%) to 94.2% when pulling a28476ad94b1ee0aa03ed8e46d88fe2e3abc943e on erudit:convert-regexflag-to-int into 17d71c7d98c0cebda9932b7f13e72093805e1fe2 on emory-libraries:master.
Since python 3.6, RegexFlags are instances of RegexFlag, not int. Passing re.UNICODE directly to the lexer will result in the generated lextab.py returning a SyntaxError.
RegexFlag instances need to be explicitely converted to int. This solution does not break compatibility with previous previous versions of python that already return int values.
fix #35 ref: https://docs.python.org/3/library/re.html#module-contents