Add some tests for [\N{}]
re.pm: Nits in pod

This has clarifications, grammar changes, and reflowing to fit into 79
columns
re/re_tests: Correct Todo test

This test was not doing what it purported to test.  It should show that
a /[s\xDF]/i would not match 'ss', because the 's' is seen in the class,
and not the \xDF (which matches 'ss' under /i) in the appropriate
strings
regcomp.c: change pattern to utf8 if needed in \N{}

This patch is in preparation for future patches that will no longer
always make any pattern that contains \N{} be encoded in UTF-8.  Thus
this patch doesn't actually change anything, but enables future ones.
regcomp.c: Set flags when optimizing a [char class]

A bracketed character class containing a single Latin1-range character
has long been optimized into an EXACT node.  Also, flags are set to
include SIMPLE.  However, EXACT nodes containing code points that are
different when encoded under UTF-8 versus not UTF-8 should not be marked
simple.

To fix this, the address of the flags parameter is now passed to
regclass(), the function that parses bracketed character classes, which
now sets it appropriately.  The unconditional setting of SIMPLE that was
always done in the code after calling regclass() has been removed.

In addition, the setting of the flags for EXACT nodes has been pushed
into the common function that populates them.

regclass() will also now increment the naughtiness count if optimized to
a node that normally does that.  I do not understand this heuristic
behavior very well, and could not come up with a test case for it;
experimentation revealed that there are no test cases in our test suite
for which naughtiness makes any difference at all.
regcomp.c: Create NOTHING node when would have been 0 length EXACT

It's peculiar circumstances indeed that would get to this point in the
code with an EXACT node to be created, but nothing to populate it with.
Perhaps it is impossible; I'm not sure.  But commit
5f820f894e71b6970a5aa0fd763a84b647fd628a changed the behavior, which I
discovered in later re-reading the code.  Probably the node would be
populated with a single NUL.  Just in case it is possible to get here
under these peculiar circumstances, this commit adds code to handle the
case, with a NOTHING node instead of a 0 length EXACT.
regcomp.c: Use old paradigm in dealing with flags recursively

In a recursive call to reg(), instead of passing our flags pointer, pass
a new one and upon return or in that result with the existing one.  I
can see why this should be done, as you don't want to lose what you
already have, as reg() will start by resetting it to 0.  I don't know
why one ands it with the known flags, but I'm presuming there is a
reason, and so am copying the paradigm.  I searched the commit messages
and didn't find anything.  No tests failed, and I didn't figure out a
test that would fail.
regcomp.c: Comments only

The diffs will show more than this, as a block of comments was moved and
revised
regcomp.c: Make sure counter same in passes 1 and 2

The number of elements was not being incremented in pass 1, whereas that
number is needed later on in pass 1.  This did not cause a
bug, as currently, in pass 1 we care only if the count is 1 or not, and
this occurred only in a case where it would get incremented properly to
more than 1 anyway.  But this is a potential bug that should be
squelched before it happens.
regcomp.c: Extract duplicate code to common function

Comments warned about keeping the two code sections in sync; this commit
takes the portions that are identical and makes a common function out of
them, so the synchronization becomes automatic.
regcomp.c: Optimization not valid for Latin Sharp S

The regex optimizer optimizes some quantifier expressions into simpler
versions.  It turns out that these optimizations don't work on a
quantified, folded LATIN SMALL LETTER SHARP S under /d.  This is due to
the size differential of the fold from the source.

This commit omits the optimization if this circumstance occurs anywhere
in the regex prior to the determination of whether to optimize or not.
I tried adding a parameter to study_chunk() to indicate more locally if
the optimization should be excluded or not; but my first attempt did not
fix the bug, and I chose to not pursue that line.  This character is so
abnormal that it's probably best anyway to be overly cautious when
confronted with it.
perlre: Nits

This fixes some grammar ("either" legally should refer to only a
dual-valued option set) and removes unnecessary distracting detail.
mktables: Rebuild if local Makefile has changed

Normally, mktables is called from the Makefile at the base level.  But
during development, it may manually be called from the directory (and
hence that directory's Makefile).  This patch causes it to rebuild if
that Makefile changes.