line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
use Moops; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# PODNAME: MarpaX::Languages::M4::Impl::Parser::Actions |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: M4 Marpa parser actions |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
2945
|
class MarpaX::Languages::M4::Impl::Parser::Actions { |
|
1
|
|
|
1
|
|
26
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
47
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
246
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
57
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
76
|
|
|
1
|
|
|
|
|
27
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3502
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
308
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
121
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
72
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
210
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
1165
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
2841
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
103
|
|
|
1
|
|
|
|
|
6801
|
|
|
0
|
|
|
|
|
0
|
|
8
|
1
|
|
|
1
|
|
377
|
use MarpaX::Languages::M4::Impl::Value; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
9
|
|
9
|
1
|
|
|
1
|
|
53
|
use MarpaX::Languages::M4::Type::Value -all; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
10
|
1
|
|
|
1
|
|
874
|
use MarpaX::Languages::M4::Type::Macro -all; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
13
|
|
11
|
1
|
|
|
1
|
|
768
|
use Types::Common::Numeric -all; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
11
|
our $VERSION = '0.018'; # VERSION |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
2
|
our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has macro => ( |
18
|
|
|
|
|
|
|
is => 'rw', |
19
|
|
|
|
|
|
|
isa => Undef | M4Macro, |
20
|
|
|
|
|
|
|
# |
21
|
|
|
|
|
|
|
# In a sub because it has to re-evaluated at every new() |
22
|
|
|
|
|
|
|
# |
23
|
1855
|
|
|
|
|
351253
|
default => sub {$MarpaX::Languages::M4::Impl::Parser::macro} |
24
|
1
|
|
|
|
|
4
|
); |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
2728
|
has paramPos => ( |
27
|
|
|
|
|
|
|
is => 'rw', |
28
|
|
|
|
|
|
|
isa => PositiveOrZeroInt, |
29
|
|
|
|
|
|
|
default => 0 |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
1
|
50
|
33
|
1
|
|
9981
|
method createArgumentsGroup (Undef|ConsumerOf[M4Value] $tokens?) { |
|
1
|
50
|
|
4558
|
|
3
|
|
|
1
|
100
|
|
|
|
124
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
189
|
|
|
1
|
|
|
|
|
1020
|
|
|
4558
|
|
|
|
|
680332
|
|
|
4558
|
|
|
|
|
10846
|
|
|
4558
|
|
|
|
|
11530
|
|
|
4558
|
|
|
|
|
12087
|
|
|
4455
|
|
|
|
|
5888
|
|
|
4455
|
|
|
|
|
11574
|
|
|
4558
|
|
|
|
|
82120
|
|
33
|
4558
|
100
|
|
|
|
10911
|
if ( !Undef->check($tokens) ) { |
34
|
4455
|
|
|
|
|
42119
|
return $tokens; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
else { |
37
|
103
|
|
|
|
|
2479
|
return MarpaX::Languages::M4::Impl::Value->new(); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
1
|
50
|
33
|
1
|
|
7044
|
method mergeArgumentsGroup (ConsumerOf[M4Value] $argumentsGroupLeft, Str $lparen, ConsumerOf[M4Value] $argumentsGroupMiddle, Str $rparen, ConsumerOf[M4Value] $argumentsGroupRight) { |
|
1
|
50
|
33
|
31
|
|
2
|
|
|
1
|
50
|
33
|
|
|
124
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
50
|
|
|
|
3
|
|
|
1
|
50
|
|
|
|
192
|
|
|
1
|
50
|
|
|
|
7
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
92
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
50
|
|
|
|
3
|
|
|
1
|
50
|
|
|
|
147
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
88
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
168
|
|
|
1
|
50
|
|
|
|
205
|
|
|
31
|
50
|
|
|
|
1875
|
|
|
31
|
|
|
|
|
92
|
|
|
31
|
|
|
|
|
83
|
|
|
31
|
|
|
|
|
81
|
|
|
31
|
|
|
|
|
42
|
|
|
31
|
|
|
|
|
50
|
|
|
31
|
|
|
|
|
112
|
|
|
31
|
|
|
|
|
125
|
|
|
31
|
|
|
|
|
96
|
|
|
31
|
|
|
|
|
596
|
|
|
31
|
|
|
|
|
84
|
|
|
31
|
|
|
|
|
51
|
|
|
31
|
|
|
|
|
90
|
|
|
31
|
|
|
|
|
83
|
|
|
31
|
|
|
|
|
77
|
|
|
31
|
|
|
|
|
50
|
|
|
31
|
|
|
|
|
54
|
|
|
31
|
|
|
|
|
107
|
|
|
31
|
|
|
|
|
100
|
|
|
31
|
|
|
|
|
72
|
|
|
31
|
|
|
|
|
506
|
|
|
31
|
|
|
|
|
88
|
|
|
31
|
|
|
|
|
50
|
|
|
31
|
|
|
|
|
95
|
|
|
31
|
|
|
|
|
71
|
|
|
31
|
|
|
|
|
74
|
|
|
31
|
|
|
|
|
61
|
|
|
31
|
|
|
|
|
50
|
|
|
31
|
|
|
|
|
101
|
|
|
31
|
|
|
|
|
92
|
|
|
31
|
|
|
|
|
80
|
|
|
31
|
|
|
|
|
447
|
|
42
|
31
|
|
|
|
|
570
|
return MarpaX::Languages::M4::Impl::Value->new( |
43
|
|
|
|
|
|
|
$argumentsGroupLeft->_value_elements, $lparen, |
44
|
|
|
|
|
|
|
$argumentsGroupMiddle->_value_elements, $rparen, |
45
|
|
|
|
|
|
|
$argumentsGroupRight->_value_elements |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
1
|
50
|
66
|
1
|
|
3545
|
method create (Str|M4Macro @lexemes --> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
4457
|
|
4
|
|
|
1
|
50
|
|
|
|
173
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
154
|
|
|
1
|
|
|
|
|
150
|
|
|
4457
|
|
|
|
|
1761119
|
|
|
4457
|
|
|
|
|
18871
|
|
|
4457
|
|
|
|
|
11707
|
|
|
9856
|
|
|
|
|
12053
|
|
|
9856
|
|
|
|
|
27251
|
|
|
4457
|
|
|
|
|
7088
|
|
50
|
4457
|
|
|
|
|
71429
|
return MarpaX::Languages::M4::Impl::Value->new(@lexemes); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
1
|
50
|
|
1
|
|
1976
|
method fakeOneVoidParam (--> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
15
|
|
2
|
|
|
1
|
|
|
|
|
92
|
|
|
1
|
|
|
|
|
3025
|
|
|
15
|
|
|
|
|
11545
|
|
|
15
|
|
|
|
|
54
|
|
|
15
|
|
|
|
|
29
|
|
54
|
15
|
|
|
|
|
236
|
return MarpaX::Languages::M4::Impl::Value->new(''); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
1
|
50
|
33
|
1
|
|
4282
|
method firstArg (Undef|ConsumerOf[M4Value] $argumentsGroup? --> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
1838
|
|
3
|
|
|
1
|
100
|
|
|
|
123
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
191
|
|
|
1
|
|
|
|
|
2721
|
|
|
1838
|
|
|
|
|
121658
|
|
|
1838
|
|
|
|
|
4752
|
|
|
1838
|
|
|
|
|
5498
|
|
|
1838
|
|
|
|
|
5338
|
|
|
1830
|
|
|
|
|
2728
|
|
|
1830
|
|
|
|
|
5132
|
|
|
1838
|
|
|
|
|
35247
|
|
58
|
|
|
|
|
|
|
# |
59
|
|
|
|
|
|
|
# $argumentsGroup is nullable |
60
|
|
|
|
|
|
|
# |
61
|
1838
|
100
|
|
|
|
4136
|
if ( Undef->check($argumentsGroup) ) { |
62
|
8
|
|
|
|
|
206
|
return MarpaX::Languages::M4::Impl::Value->new(''); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
else { |
65
|
1830
|
|
|
|
|
43940
|
return $argumentsGroup->value_concat( $self->macro, |
66
|
|
|
|
|
|
|
$self->paramPos ); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
1
|
50
|
33
|
1
|
|
4313
|
method nextArg (ConsumerOf[M4Value] $arguments, Undef|ConsumerOf[M4Value] $argumentsGroup) { |
|
1
|
50
|
33
|
2666
|
|
2
|
|
|
1
|
50
|
|
|
|
118
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
146
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
3
|
|
|
1
|
50
|
|
|
|
249
|
|
|
1
|
|
|
|
|
2723
|
|
|
2666
|
|
|
|
|
105876
|
|
|
2666
|
|
|
|
|
6344
|
|
|
2666
|
|
|
|
|
5651
|
|
|
2666
|
|
|
|
|
6500
|
|
|
2666
|
|
|
|
|
4112
|
|
|
2666
|
|
|
|
|
3662
|
|
|
2666
|
|
|
|
|
7902
|
|
|
2666
|
|
|
|
|
8320
|
|
|
2666
|
|
|
|
|
6663
|
|
|
2666
|
|
|
|
|
48675
|
|
|
2666
|
|
|
|
|
5805
|
|
|
2666
|
|
|
|
|
3539
|
|
|
2666
|
|
|
|
|
5500
|
|
|
2666
|
|
|
|
|
41349
|
|
71
|
2666
|
|
|
|
|
49257
|
$self->paramPos( $self->paramPos + 1 ); |
72
|
|
|
|
|
|
|
# |
73
|
|
|
|
|
|
|
# $argumentsGroup is nullable |
74
|
|
|
|
|
|
|
# |
75
|
2666
|
50
|
|
|
|
110178
|
if ( !Undef->check($argumentsGroup) ) { |
76
|
2666
|
|
|
|
|
55245
|
$argumentsGroup->value_concat( $self->macro, $self->paramPos ); |
77
|
2666
|
|
|
|
|
8909
|
return $arguments->value_push( $argumentsGroup->value_elements ) |
78
|
|
|
|
|
|
|
; # Per def there is one element |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
else { |
81
|
0
|
|
|
|
|
|
return $arguments->value_push(''); # Per def there is one element |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
1; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
__END__ |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=pod |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=encoding UTF-8 |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 NAME |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
MarpaX::Languages::M4::Impl::Parser::Actions - M4 Marpa parser actions |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 VERSION |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
version 0.018 |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 AUTHOR |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Jean-Damien Durand <jeandamiendurand@free.fr> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Jean-Damien Durand. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
112
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=cut |