Skip to content

Show off DFA's strength#5

Open
ogregoire wants to merge 11 commits intozhztheplayer:masterfrom
ogregoire:patch-1
Open

Show off DFA's strength#5
ogregoire wants to merge 11 commits intozhztheplayer:masterfrom
ogregoire:patch-1

Conversation

@ogregoire
Copy link
Copy Markdown

Usual implementations don't match failing branches very well while DFAs do that very well. Let's show that! See https://swtch.com/~rsc/regexp/regexp1.html

for (int i = 0; i < count; i++) {
result.append(str);
}
return result.toString;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be return result.toString()?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhztheplayer You're correct. I tested only the Java 11 version and wrote a fix for versions < 11 by hand without testing. That fix included a typo which you correctly noted. I fixed that typo.

@zhztheplayer zhztheplayer force-pushed the master branch 2 times, most recently from d0f9392 to a1b8992 Compare August 3, 2024 07:47
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.

3 participants