bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new module for grep's DFA matcher


From: Jim Meyering
Subject: new module for grep's DFA matcher
Date: Wed, 17 Aug 2016 14:03:13 -0700

Now that two gnulib-using packages are using grep's DFA matcher, I am
going to move that code into gnulib, so there is one clear source of
truth.

GNU sed began using dfa.[ch] very recently.
While gawk has been copying grep's dfa.[ch] for a long time, it does
not use gnulib.

To that end, I've written both the add-to-gnulib patch and the
use-from-grep patches and tested via grep's "make distcheck" and via
this for gnulib:

  ./gnulib-tool --create-testdir --dir=/tmp/x --with-tests --test dfa

Note that this merely moves grep/src/dfa.[ch] to gnulib/lib/ and also
moves the DFA-specific tests from grep/tests/. It does not add any new
tests. I am in no great hurry to make the switch, and expect to wait
at least for a few more pending patches by Norihiro Tanaka, syncing
the result to gnulib before pulling the trigger.

This is all the result of a couple of hours last night, so it's almost
certainly not perfect.  Feedback welcome.

Attachment: gnulib-dfa.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]