Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPIx/Regexp/Token/Backtrack.pm |
Statements | Executed 9 statements in 152µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 13µs | 26µs | BEGIN@31 | PPIx::Regexp::Token::Backtrack::
1 | 1 | 1 | 9µs | 14µs | __PPIX_TOKEN__recognize | PPIx::Regexp::Token::Backtrack::
1 | 1 | 1 | 8µs | 12µs | BEGIN@32 | PPIx::Regexp::Token::Backtrack::
1 | 1 | 1 | 7µs | 62µs | BEGIN@34 | PPIx::Regexp::Token::Backtrack::
1 | 1 | 1 | 6µs | 6µs | CORE:qr (opcode) | PPIx::Regexp::Token::Backtrack::
0 | 0 | 0 | 0s | 0s | can_be_quantified | PPIx::Regexp::Token::Backtrack::
0 | 0 | 0 | 0s | 0s | perl_version_introduced | PPIx::Regexp::Token::Backtrack::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | =head1 NAME | ||||
2 | |||||
3 | PPIx::Regexp::Token::Backtrack - Represent backtrack control. | ||||
4 | |||||
5 | =head1 SYNOPSIS | ||||
6 | |||||
7 | use PPIx::Regexp::Dumper; | ||||
8 | PPIx::Regexp::Dumper->new( 'qr{(*ACCEPT)}smx' ) | ||||
9 | ->print(); | ||||
10 | |||||
11 | =head1 INHERITANCE | ||||
12 | |||||
13 | C<PPIx::Regexp::Token::Backtrack> is a | ||||
14 | L<PPIx::Regexp::Token|PPIx::Regexp::Token>. | ||||
15 | |||||
16 | C<PPIx::Regexp::Token::Backtrack> has no descendants. | ||||
17 | |||||
18 | =head1 DESCRIPTION | ||||
19 | |||||
20 | This class represents one of the backtrack controls. | ||||
21 | |||||
22 | =head1 METHODS | ||||
23 | |||||
24 | This class provides no public methods beyond those provided by its | ||||
25 | superclass. | ||||
26 | |||||
27 | =cut | ||||
28 | |||||
29 | package PPIx::Regexp::Token::Backtrack; | ||||
30 | |||||
31 | 2 | 22µs | 2 | 38µs | # spent 26µs (13+12) within PPIx::Regexp::Token::Backtrack::BEGIN@31 which was called:
# once (13µs+12µs) by PPIx::Regexp::Tokenizer::BEGIN@16 at line 31 # spent 26µs making 1 call to PPIx::Regexp::Token::Backtrack::BEGIN@31
# spent 12µs making 1 call to strict::import |
32 | 2 | 21µs | 2 | 17µs | # spent 12µs (8+5) within PPIx::Regexp::Token::Backtrack::BEGIN@32 which was called:
# once (8µs+5µs) by PPIx::Regexp::Tokenizer::BEGIN@16 at line 32 # spent 12µs making 1 call to PPIx::Regexp::Token::Backtrack::BEGIN@32
# spent 5µs making 1 call to warnings::import |
33 | |||||
34 | 2 | 89µs | 2 | 117µs | # spent 62µs (7+55) within PPIx::Regexp::Token::Backtrack::BEGIN@34 which was called:
# once (7µs+55µs) by PPIx::Regexp::Tokenizer::BEGIN@16 at line 34 # spent 62µs making 1 call to PPIx::Regexp::Token::Backtrack::BEGIN@34
# spent 55µs making 1 call to base::import |
35 | |||||
36 | 1 | 500ns | our $VERSION = '0.036'; | ||
37 | |||||
38 | # Return true if the token can be quantified, and false otherwise | ||||
39 | sub can_be_quantified { return }; | ||||
40 | |||||
41 | sub perl_version_introduced { | ||||
42 | return '5.009005'; | ||||
43 | } | ||||
44 | |||||
45 | # This must be implemented by tokens which do not recognize themselves. | ||||
46 | # The return is a list of list references. Each list reference must | ||||
47 | # contain a regular expression that recognizes the token, and optionally | ||||
48 | # a reference to a hash to pass to make_token as the class-specific | ||||
49 | # arguments. The regular expression MUST be anchored to the beginning of | ||||
50 | # the string. | ||||
51 | # spent 14µs (9+6) within PPIx::Regexp::Token::Backtrack::__PPIX_TOKEN__recognize which was called:
# once (9µs+6µs) by base::import at line 102 of PPIx/Regexp/Token/Structure.pm | ||||
52 | 1 | 17µs | 1 | 6µs | return ( [ qr{ \A \( \* [^\)]* \) }smx ] ); # spent 6µs making 1 call to PPIx::Regexp::Token::Backtrack::CORE:qr |
53 | } | ||||
54 | |||||
55 | # This class gets recognized by PPIx::Regexp::Token::Structure as part | ||||
56 | # of its left parenthesis processing. | ||||
57 | |||||
58 | =begin comment | ||||
59 | |||||
60 | sub __PPIX_TOKENIZER__regexp { | ||||
61 | my ( $class, $tokenizer, $character ) = @_; | ||||
62 | |||||
63 | return $character eq 'x' ? 1 : 0; | ||||
64 | } | ||||
65 | |||||
66 | =end comment | ||||
67 | |||||
68 | =cut | ||||
69 | |||||
70 | 1 | 2µs | 1; | ||
71 | |||||
72 | __END__ | ||||
# spent 6µs within PPIx::Regexp::Token::Backtrack::CORE:qr which was called:
# once (6µs+0s) by PPIx::Regexp::Token::Backtrack::__PPIX_TOKEN__recognize at line 52 |