On 03/17/2015 06:02 PM, Matěj Týč wrote: > > What is interesting: I wanted to point out that it should be more > appropriate to write m4_pattern_forbid([\bMACRO]) than ...([^MACRO]), > but I found out that it is not really the true: The perl code in autom4te splits all words of the input into one word per line before running the regex. > > cat << EOF | autom4te -l m4sugar > m4_pattern_forbid([^FOO]) > m4_divert_push(1)dnl > FOO1 > FOO2 > hidden FOO3 so all three instances of these FOO match the pattern to be rejected (after being rewritten as: FOO1 FOO2 hidden FOO3 before testing the regex) > hiddenFOO4 and this does not. > So maybe getting involved \b is not needed under these circumstances? The accept/reject patterns operate on each word as if on the line by themselves, so no need to use \b. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf