1PPIx::Regexp::Token::GrUosueprTyCpoen(t3r)ibuted Perl DoPcPuImxe:n:tRaetgieoxnp::Token::GroupType(3)
2
3
4

NAME

6       PPIx::Regexp::Token::GroupType - Represent a grouping parenthesis type.
7

SYNOPSIS

9        use PPIx::Regexp::Dumper;
10        PPIx::Regexp::Dumper->new( 'qr{(?i:foo)}smx' )
11            ->print();
12

INHERITANCE

14       "PPIx::Regexp::Token::GroupType" is a PPIx::Regexp::Token.
15
16       "PPIx::Regexp::Token::GroupType" is the parent of
17       PPIx::Regexp::Token::GroupType::Assertion,
18       PPIx::Regexp::Token::GroupType::Atomic_Script_Run,
19       PPIx::Regexp::Token::GroupType::BranchReset,
20       PPIx::Regexp::Token::GroupType::Code,
21       PPIx::Regexp::Token::GroupType::Modifier,
22       PPIx::Regexp::Token::GroupType::NamedCapture,
23       PPIx::Regexp::Token::GroupType::Script_Run,
24       PPIx::Regexp::Token::GroupType::Subexpression and
25       PPIx::Regexp::Token::GroupType::Switch.
26

DESCRIPTION

28       This class represents any of the magic sequences of characters that can
29       follow an open parenthesis. This particular class is intended to be
30       abstract.
31

METHODS

33       This class provides no public methods beyond those provided by its
34       superclass.
35
36   __defining_string
37        my $string = $class->__defining_string();
38
39       This method is private to the "PPIx-Regexp" package, and is documented
40       for the author's benefit only. It may be changed or revoked without
41       notice.
42
43       This method returns an array of strings that define the specific group
44       type.  These strings will normally start with '?'.
45
46       Optionally, the first returned item may be a hash reference. The only
47       supported key is "{suffix}", which is a string to be suffixed to each
48       of the regular expressions made by "__make_group_type_matcher()" out of
49       the defining strings, inside a "(?= ... )", so that it is not included
50       in the match.
51
52       This method must be overridden, unless "__make_group_type_matcher()"
53       is. The override must return the same thing each time, since the
54       results of "__make_group_type_matcher()" are cached.
55
56   __make_group_type_matcher
57        my $hash_ref = $class->__make_group_type_matcher();
58
59       This method is private to the "PPIx-Regexp" package, and is documented
60       for the author's benefit only. It may be changed or revoked without
61       notice.
62
63       This method returns a reference to a hash. The keys are regexp
64       delimiter characters which appear in the defining strings for the group
65       type. For each key, the value is a reference to an array of "Regexp"
66       objects, properly escaped for the key character. Key '' provides the
67       regular expressions to be used if the regexp delimiter does not appear
68       in any of the defining strings.
69
70       If this method is overridden by the subclass, method
71       "__defining_string()" need not be, unless the overridden
72       "__make_group_type_matcher()" calls "__defining_string()".
73
74   __match_setup
75        $class->__match_setup( $tokenizer );
76
77       This method is private to the "PPIx-Regexp" package, and is documented
78       for the author's benefit only. It may be changed or revoked without
79       notice.
80
81       This method performs whatever setup is needed once it is determined
82       that the given group type has been detected.  This method is called
83       only if the class matched at the current position in the string being
84       parsed. It must perform whatever extra setup is needed for the match.
85       It returns nothing.
86
87       This method need not be overridden. The default does nothing.
88
89   __setup_class
90        $class->__setup_class( \%definition, \%opt );
91
92       This method is private to the "PPIx-Regexp" package, and is documented
93       for the author's benefit only. It may be changed or revoked without
94       notice.
95
96       This method uses the %definition hash to create the
97       "__defining_string()", "explain()", "perl_version_introduced()", and
98       "perl_version_removed()" methods for the calling class. Any of these
99       that already exist will not be replaced.
100
101       The %definition hash defines all the strings that specify tokens of the
102       invoking class. You can not (unfortunately) use this mechanism if you
103       need a regular expression to recognize a token that belongs to this
104       class. The keys of the %definition hash are strings that specify
105       members of this class. The values are hashes that define the specific
106       member of the class. The following values are supported:
107
108       {expl}
109           This is the explanation of the element, to be returned by the
110           "explain()" method.
111
112       {intro}
113           This is the Perl version that introduced the element, as a string.
114           The default is the value of constant MINIMUM_PERL.
115
116       {remov}
117           This is the Perl version that removed the element, as a string. The
118           default is "undef", meaning that the element is still present in
119           the highest released version of Perl, whether development or
120           production.
121
122       The %opt hash is optional, and defaults to the empty hash. It is used,
123       basically, for ad-hocery. The supported keys are:
124
125       {suffix}
126           If this element is defined, the first element returned by the
127           generated __defining_string() method is a hash containing this key
128           and value.
129

SUPPORT

131       Support is by the author. Please file bug reports at
132       <https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
133       <https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in electronic
134       mail to the author.
135

AUTHOR

137       Thomas R. Wyant, III wyant at cpan dot org
138
140       Copyright (C) 2009-2021 by Thomas R. Wyant, III
141
142       This program is free software; you can redistribute it and/or modify it
143       under the same terms as Perl 5.10.0. For more details, see the full
144       text of the licenses in the directory LICENSES.
145
146       This program is distributed in the hope that it will be useful, but
147       without any warranty; without even the implied warranty of
148       merchantability or fitness for a particular purpose.
149
150
151
152perl v5.32.1                      2021-03-26 PPIx::Regexp::Token::GroupType(3)
Impressum