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

handling digits in flex mode #483

Closed
2000jedi opened this issue Jul 19, 2024 · 2 comments
Closed

handling digits in flex mode #483

2000jedi opened this issue Jul 19, 2024 · 2 comments

Comments

@2000jedi
Copy link

Consider the following pattern of integer literal when the -F flag is given:

0|[1-9][0-9]* { /* ... */}

re2rust fails with error unexpected character: '0'

it requires to add double quotes or character classes around the literal 0

[0]|[1-9][0-9]* { /* ... */}

Should this be a bug in flex mode

skvadrik added a commit that referenced this issue Jul 19, 2024
This fixes bug #483 "handling digits in flex mode".
@skvadrik
Copy link
Owner

I'm not sure why digits were not allowed - probably just an oversight, as flex mode is not the primary one. They don't cause any grammar ambiguities, so I just added them: f2395c2.

@helly25
Copy link
Collaborator

helly25 commented Jul 21, 2024 via email

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

No branches or pull requests

3 participants