Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lexer: convert re.UNICODE to int #38

Closed
wants to merge 1 commit into from
Closed

lexer: convert re.UNICODE to int #38

wants to merge 1 commit into from

Conversation

cormier
Copy link

@cormier cormier commented Aug 15, 2017

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

@coveralls
Copy link

coveralls commented Aug 15, 2017

Coverage Status

Coverage decreased (-0.3%) to 94.2% when pulling a28476a on erudit:convert-regexflag-to-int into 17d71c7 on emory-libraries:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 94.2% when pulling a28476a on erudit:convert-regexflag-to-int into 17d71c7 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
@erudit erudit closed this by deleting the head repository May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lextab.py syntax error
3 participants