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

Empty alternatives does not work if not first #35

Closed
curious-odd-man opened this issue Aug 12, 2020 · 0 comments
Closed

Empty alternatives does not work if not first #35

curious-odd-man opened this issue Aug 12, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@curious-odd-man
Copy link
Owner

Describe the bug
It works correctly for the regex (|A), but errors when using (A|)

To Reproduce
Steps to reproduce the behavior:

  1. With regex pattern (A|)
  2. When generating regex
  3. RuntimeException: "Empty nodes"

Expected behavior
(|A) and (A|) produces same results.

Environment (please complete the following information):

  • Win
  • OpenJDK 12
  • 1.2 snapshot
@curious-odd-man curious-odd-man added the bug Something isn't working label Aug 12, 2020
@curious-odd-man curious-odd-man added this to the Version 1.2 milestone Aug 12, 2020
@curious-odd-man curious-odd-man self-assigned this Aug 12, 2020
curious-odd-man added a commit that referenced this issue Aug 12, 2020
curious-odd-man added a commit that referenced this issue Aug 13, 2020
curious-odd-man added a commit that referenced this issue Aug 13, 2020
Fixed. Now empty alternative will be treated as empty string at the end of choices.
curious-odd-man added a commit that referenced this issue Aug 13, 2020
…FirstWorks

#35. Empty Alternatives Only First Works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant