|
NAMEPPIx::Regexp::Token::GroupType - Represent a grouping parenthesis type.SYNOPSISuse PPIx::Regexp::Dumper; PPIx::Regexp::Dumper->new( 'qr{(?i:foo)}smx' ) ->print(); INHERITANCE"PPIx::Regexp::Token::GroupType" is a PPIx::Regexp::Token."PPIx::Regexp::Token::GroupType" is the parent of PPIx::Regexp::Token::GroupType::Assertion, PPIx::Regexp::Token::GroupType::Atomic_Script_Run, PPIx::Regexp::Token::GroupType::BranchReset, PPIx::Regexp::Token::GroupType::Code, PPIx::Regexp::Token::GroupType::Modifier, PPIx::Regexp::Token::GroupType::NamedCapture, PPIx::Regexp::Token::GroupType::Script_Run, PPIx::Regexp::Token::GroupType::Subexpression and PPIx::Regexp::Token::GroupType::Switch. DESCRIPTIONThis class represents any of the magic sequences of characters that can follow an open parenthesis. This particular class is intended to be abstract.METHODSThis class provides no public methods beyond those provided by its superclass.__defining_stringmy $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_matchermy $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:
The %opt hash is optional, and defaults to the empty hash. It is used, basically, for ad-hocery. The supported keys are:
SUPPORTSupport is by the author. Please file bug reports at <https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>, <https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in electronic mail to the author.AUTHORThomas R. Wyant, III wyant at cpan dot orgCOPYRIGHT AND LICENSECopyright (C) 2009-2022 by Thomas R. Wyant, IIIThis program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
Visit the GSP FreeBSD Man Page Interface. |