BeRo1985 / flre

FLRE - Fast Light Regular Expressions - A fast light regular expression library
GNU Lesser General Public License v2.1
94 stars 23 forks source link

PtrPosChar not working with \x00 at 8*i position #83

Closed benibela closed 1 year ago

benibela commented 2 years ago

PtrPosChar does not seem to work with \x00

There is while (XoredChunk<>0) and ((XoredChunk and $ff)<>TFLREUInt8(SearchChar)) do begin, so if it is found, we have (XoredChunk and $ff) = 0, and if it is the last byte in the chunk, it follows XoredChunk = 0, so the function ignores it

Thus

var
  f: TFLRE;
  captures: TFLREMultiCaptures;
  i: Integer;
begin
  f := TFLRE.Create('\x00', []);
  f.UTF8MatchAll('abcdefg'#00'b'#00'c', captures);
  for i := 0 to high(captures) do writeln(captures[i][0].Start, ' ',captures[i][0].Length);

does not find the first #00

Reino17 commented 2 years ago

@BeRo1985 If you have abandoned your flre project, then please add a statement on the frontpage. If not, then... well, I think it's kinda rude leaving all those who started an "issue"/bug-report here in the dark, not even leaving a single reply.

BeRo1985 commented 2 years ago

No, I have not given up FLRE, however I am currently busy with other stuff until the end of March 2022, which is also where my notice period is with my employer. After that I will be self-employed, and where I will have more time for projects like FLRE again. That's also why I quit my current job, to be able to manage my time better from end of March 2022 on. (Alongside other reasons.)

In short, I'm having a hard time in very general way right now, but which I hope will clear up next year. Until then, I mostly just work only on things that can make me money in the long run, such as the engine framework part of PasVulkan for later usage in commerical projects for example. And as a side note, PasVulkan also has an indirect dependency on FLRE through PUCU. Even already for this reason alone, FLRE cannot be dead. :-)

Reino17 commented 2 years ago

Alright. Thanks for the quick reply and your honesty.