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

how to best address a need for lookarounds? #61

Open
pmiam opened this issue Sep 19, 2024 · 2 comments
Open

how to best address a need for lookarounds? #61

pmiam opened this issue Sep 19, 2024 · 2 comments

Comments

@pmiam
Copy link

pmiam commented Sep 19, 2024

I am a user of the hledger tool. For some time my user experience has been limited by the fact that regex-tdfa does not support the negative lookahead. My goal is to add lookaround support to hledger's query engine, but I need some advice to help me get started:

Are lookarounds welcome in regex-tdfa? If so, I will contribute here.

  • I understand lookarounds are not POSIX standard, but it seems POSIX purity is not a stated goal
  • lookarounds appear to be possible in DFA, but I may easily be wrong

There is a lot of homework I have yet to do on this subject. If my instincts are wrong, I'd appreciate a forewarning. Thank you.

@andreasabel
Copy link
Member

Hi @pmiam, thanks for your interest.
So, the story here is that this package does not have an active maintainer. I maintain it to the extend to keep it buildable with newer GHCs and newer versions of libraries it depends on. I don't develop it further, and my main interest is to keep it working so that nothing breaks.

Larger work on the code always brings the risks of introducing regressions. This package has a testsuite, but I have not tried to investigate how complete it is and how likely it catches regressions.
Besides the written testsuite, there is evidence for the correctness of the package by test-of-time: it has been around for long and used by a fair number of clients and has worked ok.

Are lookarounds welcome in regex-tdfa? If so, I will contribute here.

  • I understand lookarounds are not POSIX standard, but it seems POSIX purity is not a stated goal

Extensions do not conflict with my stated goal of stability, as long as they are backward compatible.
They would have to be backed by a strong testsuite though, testing all the possible variants of the feature, also in combination with the existing features. (A new feature might conflict with any of the existing features.)

  • lookarounds appear to be possible in DFA, but I may easily be wrong

So I suggest you work on a fork of this repo, so you can figure out whether its feasible.
If stuff works, there still are the options to merge it in here or release it as a separate package.
It is probably too early now to decide this.

@pmiam
Copy link
Author

pmiam commented Sep 19, 2024

Thank you for your optimistic response, Andreas. I have started a fork.

This will be a big undertaking for me, but I think worthwhile. I will work independently, but I may ask some conceptual questions here.

Of course, I welcome input from other interested devs on this issue or on my fork.

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

2 participants