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

Flex regex patterns are incorrect. #237

Closed
justinmeiners opened this issue Oct 9, 2018 · 2 comments · Fixed by #238
Closed

Flex regex patterns are incorrect. #237

justinmeiners opened this issue Oct 9, 2018 · 2 comments · Fixed by #238
Assignees
Labels
bug C++ C lexer Concerning the generated lexer
Milestone

Comments

@justinmeiners
Copy link
Contributor

justinmeiners commented Oct 9, 2018

Set subtraction is translated to the # symbol. Flex doesn't seem to work with patterns containing this symbol. According to this manual this is invalid syntax.

Code:
https://github.com/BNFC/bnfc/blob/master/source/src/BNFC/Backend/CPP/NoSTL/RegToFlex.hs#L52

@andreasabel
Copy link
Member

andreasabel commented May 13, 2019

Ah, thanks for reporting. That explains why my token definition is not working. ;)

It seems that the syntax [...]{-}[...] could be used for subtraction in some cases at least.

@andreasabel andreasabel self-assigned this May 13, 2019
@andreasabel andreasabel added this to the 2.8.3 milestone May 13, 2019
@andreasabel
Copy link
Member

Fixed in PR #238.

@andreasabel andreasabel added the lexer Concerning the generated lexer label Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug C++ C lexer Concerning the generated lexer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants