regcomp.c: Centralize assignment

It's better to do something in one common place than two.  This properly
initializes the regex opcode for the synthetic start class when it is
created, rather than at the end where the code has to be repeated to get
all instances.
regcomp.c: Remove redundant matching possibilities

The flag ANYOF_UNICODE_ALL is for performance.  It is set when the
inversion list for the ANYOF node includes every code point above
Latin1, and avoids runtime searching through the list.  We don't need
both, as the flag being set short-circuits even looking at the other
list.  By removing the code points from the list, we perhaps will get
rid of the list entirely, thus saving some operations, or will shorten
it so that later binary searches run faster.
regcomp.c: Extract code into separate function

This is in preparation for it to be called from more than one place, in
a future commit.
Add inversion list for U+80 - U+FF

This is the upper half of the Latin1 range.  This simplifies some code
very slightly, but will be of use in future commits.
regcomp.c: Move a #define, add a similar one

Future commits will use this #define (and the new one) earlier in the
file than currently defined.
Add regnode struct for synthetic start class

As part of extending the regular expression optimizer to properly handle
above Latin1 code points, I need an inversion list to contain which code
points the synthetic start class (ssc) matches.

The ssc currently is the same as a locale-aware ANYOF node, which uses
the struct of a regular ANYOF node, plus some extra fields at the end.

This commit creates a new typedef for ssc use, which is the locale-aware
ANYOF node, plus an extra SV* at the end to hold the inversion list.
regcomp.c: Use PL_sv_undef instead of NULL in an AV

The NULL gets turned into an SVt_NULL anyway.  This array is read only
by S_core_regclass_swash() in regexec.c.  That uses an SvROK, so it
doesn't have to change.

This commit also beefs up the comments around this operation
regcomp.c: Extract code into separate function

A future commit will use this functionality from another place.  For
now, just cut and paste, and do the minimal ancillary work to get it to
compile and pass.
regcomp.c: Rework static function call; comments

The previous commit just extracted out code into a function.  This
commit renames a parameter for clarity, combines two parameters to make
the interface cleaner, and adds and moves comments around.
regcomp.c: Change names of some static functions

The term 'class' is very overloaded in regex code and documentation.
perlrecharclass.pod calls the dot (matching any char) a class, and
calls the [] form "bracketed character classes".  There are other
meanings as well.  This is the first commit in a short series that
removes some of those overloadings.

One instance of class is the "synthetic start class", generated by the
regex optimizer to be a list of all the code points a sucessful match
could possibly start with.  This is useful in more quickly finding where
to start looking in matching against a target string.  Prior to this
commit, the routines that referred to this began with 'cl_', and the
formal parameters were 'cl', which could mean any class.  This commit
changes those instances of 'cl' to 'ssc' to indicate this is the only
type of class that is being handled.
regcomp.h: Move #define

This moves it to be adjacent to similar #defines
regcomp.h: Add better named synonyms

This continues the process started two commits ago of removing some of
the overloading of the term 'class'.

In this case, this commit adds some #defines referring to the portions
of the regnode associated with bracketed character classes, the ANYOF
node.  Specifically those portions that deal with the Posix character
classes, like \w and [:punct:] under /l (locale) matching are renamed
substituting POSIXL for CLASS.  POSIXL is already used for POSIX-related
things under /l.  I remember being terribly confused when I started
reading this code about this.  One had a class within a class.  This
should clarify things somewhat.

The old names are retained in case files outside the core #include and
use it (there are a few such in cpan).
regcomp.h: Parenthesize macro formal parameter

Not doing so can cause problems, so it is standard procedure to
parenthesize all parameters within a macro definition.
regcomp.h: Create new typedef synonym for clarity

This commit finishes (at least for now) removing some of the overloading
of the term class.  A 'regnode_charclass_class' node contains space for
storing the posix classes it matches that are never defined until the
moment of matching because they are subject to the current run-time
locale.  This commit creates a typedef 'regnode_charclass_posixl'
synonym that doesn't re-use the term 'class' for two different purposes.
Make typedef fully typedef

The regcomp.c struct RExC_state_t has not been usable fully as a
typedef, requiring the 'struct' at times.  This has caused me, and I
presume others, wasted time when we forget to use it under those
circumstances when it should be used, but it's never been a big enough
issue to cause me to spend tuits on it.  But, working on something else,
I finally came to the realization of what the problem is.  It is because
proto.h is #included before regcomp.h is, and so functions that are
declared in proto.h that have something that is a RExC_state_t as a
parameter don't know that it is a typedef because that is defined in
regcomp.h.  A way around this is already used for other similar
structures, and that is to declare them in perl.h which is always read
in before proto.h, leaving the definitions to regcomp.h.  Thus proto.h
knows enough to compile.

The structure was already declared in perl.h; just not typedef'd.
Otherwise proto.h would not know about it at all.  This patch moves two
regcomp.c related declarations in perl.h to the same section as the
others, and changes the one for RExC_state_t to be a typedef.  All the
'struct' uses are removed.
perl.h: Don't pollute global namespace

These structures are used internally in the regular expression files,
and are declared here only because of #include ordering issues.  Wrap
them in an #ifdef so only visible to the correct files.
regcomp.c: Fix syntax error in #ifdef'd out code

This line is currently not compiled, but would fail if the #ifdef is
changed.
regcomp.c: Typos in comments; Fix another comment

The non-typo fix is the result of allowing a parameter to the function
be NULL, and not updating the comments to reflect that.
Remove PL_ASCII; use existing array slots for it

PL_ASCII contains an inversion list to match the ASCII-range code
points.  It is unusable outside the core regular expression code because
all the functions that manipulate inversion lists are defined only
within a few core files.  Therefore no outside code should be depending
on it.

It turns out that there are arrays of similar inversion lists, and these
all have slots which should have this inversion list in them.  This
commit fills them, instead of using PL_ASCII.
regcomp.c: Add parameter to static function

This parameter will be used in future commits.  This commit is really
only to make the difference listing smaller in those, by committing
separately just the book-keeping parts.  This parameter requires also
passing the aTHX_ thread parameter