-
Notifications
You must be signed in to change notification settings - Fork 64
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
Simplify anything-but #32
Comments
@timbray Do you still see this as an opportunity? The anything-but-prefix (and my proposal for anything-but-suffix) matching seems to simply take advantage of the StateMachine transitions ( event-ruler/src/main/software/amazon/event/ruler/ByteMachine.java Lines 459 to 503 in 84120a9
|
Absolutely. The way anything-but and suffix matching is done are sort of hacky (I can say that because anything-but is my own gross hack) and I suspect quite a bit of code could be discarded if someone were willing to buckle down and replace the hacks with principled automaton-building. I'm pretty sure performance would improve too. |
What is your idea?
The redesign of
ByteMachine
that came in with wildcards can efficiently represent byte-range transitions. Given that,anything-but
andanything-but-prefix
can be directly represented in a ByteMachine straightforwardly and efficiently, which would simplify the rule-matching code path.Would you be willing to make the change?
Maybe
The text was updated successfully, but these errors were encountered: