This class provides no public methods beyond those provided by its superclass.
__defining_string
my $string = $class->__defining_string();
This method is private to the "PPIx-Regexp" package, and is documented for the author's benefit only. It
may be changed or revoked without notice.
This method returns an array of strings that define the specific group type. These strings will normally
start with '?'.
Optionally, the first returned item may be a hash reference. The only supported key is "{suffix}", which
is a string to be suffixed to each of the regular expressions made by "__make_group_type_matcher()" out
of the defining strings, inside a "(?= ... )", so that it is not included in the match.
This method must be overridden, unless "__make_group_type_matcher()" is. The override must return the
same thing each time, since the results of "__make_group_type_matcher()" are cached.
__make_group_type_matcher
my $hash_ref = $class->__make_group_type_matcher();
This method is private to the "PPIx-Regexp" package, and is documented for the author's benefit only. It
may be changed or revoked without notice.
This method returns a reference to a hash. The keys are regexp delimiter characters which appear in the
defining strings for the group type. For each key, the value is a reference to an array of "Regexp"
objects, properly escaped for the key character. Key '' provides the regular expressions to be used if
the regexp delimiter does not appear in any of the defining strings.
If this method is overridden by the subclass, method "__defining_string()" need not be, unless the
overridden "__make_group_type_matcher()" calls "__defining_string()".
__match_setup
$class->__match_setup( $tokenizer );
This method is private to the "PPIx-Regexp" package, and is documented for the author's benefit only. It
may be changed or revoked without notice.
This method performs whatever setup is needed once it is determined that the given group type has been
detected. This method is called only if the class matched at the current position in the string being
parsed. It must perform whatever extra setup is needed for the match. It returns nothing.
This method need not be overridden. The default does nothing.
__setup_class
$class->__setup_class( \%definition, \%opt );
This method is private to the "PPIx-Regexp" package, and is documented for the author's benefit only. It
may be changed or revoked without notice.
This method uses the %definition hash to create the "__defining_string()", "explain()",
"perl_version_introduced()", and "perl_version_removed()" methods for the calling class. Any of these
that already exist will not be replaced.
The %definition hash defines all the strings that specify tokens of the invoking class. You can not
(unfortunately) use this mechanism if you need a regular expression to recognize a token that belongs to
this class. The keys of the %definition hash are strings that specify members of this class. The values
are hashes that define the specific member of the class. The following values are supported:
{expl}
This is the explanation of the element, to be returned by the "explain()" method.
{intro}
This is the Perl version that introduced the element, as a string. The default is the value of
constant MINIMUM_PERL.
{remov}
This is the Perl version that removed the element, as a string. The default is "undef", meaning that
the element is still present in the highest released version of Perl, whether development or
production.
The %opt hash is optional, and defaults to the empty hash. It is used, basically, for ad-hocery. The
supported keys are:
{suffix}
If this element is defined, the first element returned by the generated __defining_string() method is
a hash containing this key and value.