line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
use Moops; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# PODNAME: MarpaX::Languages::M4::Impl::Parser::Actions |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: M4 Marpa parser actions |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
3317
|
class MarpaX::Languages::M4::Impl::Parser::Actions { |
|
1
|
|
|
1
|
|
27
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
88
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
330
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
61
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
80
|
|
|
1
|
|
|
|
|
28
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
3760
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
377
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
138
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
82
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
190
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
911
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1763
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
98
|
|
|
1
|
|
|
|
|
6490
|
|
|
0
|
|
|
|
|
0
|
|
8
|
1
|
|
|
1
|
|
368
|
use MarpaX::Languages::M4::Impl::Value; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
9
|
|
9
|
1
|
|
|
1
|
|
52
|
use MarpaX::Languages::M4::Type::Value -all; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
10
|
1
|
|
|
1
|
|
867
|
use MarpaX::Languages::M4::Type::Macro -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
11
|
1
|
|
|
1
|
|
766
|
use Types::Common::Numeric -all; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
13
|
our $VERSION = '0.019'; # 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
|
|
|
|
|
407106
|
default => sub {$MarpaX::Languages::M4::Impl::Parser::macro} |
24
|
1
|
|
|
|
|
7
|
); |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
3071
|
has paramPos => ( |
27
|
|
|
|
|
|
|
is => 'rw', |
28
|
|
|
|
|
|
|
isa => PositiveOrZeroInt, |
29
|
|
|
|
|
|
|
default => 0 |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
1
|
50
|
33
|
1
|
|
10221
|
method createArgumentsGroup (Undef|ConsumerOf[M4Value] $tokens?) { |
|
1
|
50
|
|
4558
|
|
3
|
|
|
1
|
100
|
|
|
|
134
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
209
|
|
|
1
|
|
|
|
|
1074
|
|
|
4558
|
|
|
|
|
739887
|
|
|
4558
|
|
|
|
|
13434
|
|
|
4558
|
|
|
|
|
11553
|
|
|
4558
|
|
|
|
|
13263
|
|
|
4455
|
|
|
|
|
6196
|
|
|
4455
|
|
|
|
|
11316
|
|
|
4558
|
|
|
|
|
87741
|
|
33
|
4558
|
100
|
|
|
|
14201
|
if ( !Undef->check($tokens) ) { |
34
|
4455
|
|
|
|
|
49114
|
return $tokens; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
else { |
37
|
103
|
|
|
|
|
2858
|
return MarpaX::Languages::M4::Impl::Value->new(); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
1
|
50
|
33
|
1
|
|
6421
|
method mergeArgumentsGroup (ConsumerOf[M4Value] $argumentsGroupLeft, Str $lparen, ConsumerOf[M4Value] $argumentsGroupMiddle, Str $rparen, ConsumerOf[M4Value] $argumentsGroupRight) { |
|
1
|
50
|
33
|
31
|
|
3
|
|
|
1
|
50
|
33
|
|
|
119
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
175
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
92
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
157
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
3
|
|
|
1
|
50
|
|
|
|
87
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
135
|
|
|
1
|
50
|
|
|
|
257
|
|
|
31
|
50
|
|
|
|
2217
|
|
|
31
|
|
|
|
|
145
|
|
|
31
|
|
|
|
|
118
|
|
|
31
|
|
|
|
|
116
|
|
|
31
|
|
|
|
|
59
|
|
|
31
|
|
|
|
|
56
|
|
|
31
|
|
|
|
|
168
|
|
|
31
|
|
|
|
|
171
|
|
|
31
|
|
|
|
|
113
|
|
|
31
|
|
|
|
|
727
|
|
|
31
|
|
|
|
|
101
|
|
|
31
|
|
|
|
|
67
|
|
|
31
|
|
|
|
|
115
|
|
|
31
|
|
|
|
|
93
|
|
|
31
|
|
|
|
|
131
|
|
|
31
|
|
|
|
|
63
|
|
|
31
|
|
|
|
|
71
|
|
|
31
|
|
|
|
|
151
|
|
|
31
|
|
|
|
|
146
|
|
|
31
|
|
|
|
|
102
|
|
|
31
|
|
|
|
|
623
|
|
|
31
|
|
|
|
|
102
|
|
|
31
|
|
|
|
|
52
|
|
|
31
|
|
|
|
|
117
|
|
|
31
|
|
|
|
|
146
|
|
|
31
|
|
|
|
|
99
|
|
|
31
|
|
|
|
|
51
|
|
|
31
|
|
|
|
|
60
|
|
|
31
|
|
|
|
|
134
|
|
|
31
|
|
|
|
|
121
|
|
|
31
|
|
|
|
|
81
|
|
|
31
|
|
|
|
|
532
|
|
42
|
31
|
|
|
|
|
712
|
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
|
|
3299
|
method create (Str|M4Macro @lexemes --> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
4457
|
|
2
|
|
|
1
|
50
|
|
|
|
125
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
158
|
|
|
1
|
|
|
|
|
158
|
|
|
4457
|
|
|
|
|
1904581
|
|
|
4457
|
|
|
|
|
18576
|
|
|
4457
|
|
|
|
|
11654
|
|
|
9856
|
|
|
|
|
12582
|
|
|
9856
|
|
|
|
|
27242
|
|
|
4457
|
|
|
|
|
7383
|
|
50
|
4457
|
|
|
|
|
77923
|
return MarpaX::Languages::M4::Impl::Value->new(@lexemes); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
1
|
50
|
|
1
|
|
1973
|
method fakeOneVoidParam (--> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
15
|
|
3
|
|
|
1
|
|
|
|
|
268
|
|
|
1
|
|
|
|
|
3203
|
|
|
15
|
|
|
|
|
12653
|
|
|
15
|
|
|
|
|
64
|
|
|
15
|
|
|
|
|
36
|
|
54
|
15
|
|
|
|
|
248
|
return MarpaX::Languages::M4::Impl::Value->new(''); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
1
|
50
|
33
|
1
|
|
4483
|
method firstArg (Undef|ConsumerOf[M4Value] $argumentsGroup? --> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
1838
|
|
3
|
|
|
1
|
100
|
|
|
|
161
|
|
|
1
|
50
|
|
|
|
7
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
220
|
|
|
1
|
|
|
|
|
2972
|
|
|
1838
|
|
|
|
|
132030
|
|
|
1838
|
|
|
|
|
5148
|
|
|
1838
|
|
|
|
|
5366
|
|
|
1838
|
|
|
|
|
5446
|
|
|
1830
|
|
|
|
|
3021
|
|
|
1830
|
|
|
|
|
5259
|
|
|
1838
|
|
|
|
|
37553
|
|
58
|
|
|
|
|
|
|
# |
59
|
|
|
|
|
|
|
# $argumentsGroup is nullable |
60
|
|
|
|
|
|
|
# |
61
|
1838
|
100
|
|
|
|
5319
|
if ( Undef->check($argumentsGroup) ) { |
62
|
8
|
|
|
|
|
258
|
return MarpaX::Languages::M4::Impl::Value->new(''); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
else { |
65
|
1830
|
|
|
|
|
49342
|
return $argumentsGroup->value_concat( $self->macro, |
66
|
|
|
|
|
|
|
$self->paramPos ); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
1
|
50
|
33
|
1
|
|
4717
|
method nextArg (ConsumerOf[M4Value] $arguments, Undef|ConsumerOf[M4Value] $argumentsGroup) { |
|
1
|
50
|
33
|
2666
|
|
2
|
|
|
1
|
50
|
|
|
|
159
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
168
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
234
|
|
|
1
|
|
|
|
|
2824
|
|
|
2666
|
|
|
|
|
112802
|
|
|
2666
|
|
|
|
|
7930
|
|
|
2666
|
|
|
|
|
6236
|
|
|
2666
|
|
|
|
|
6377
|
|
|
2666
|
|
|
|
|
5060
|
|
|
2666
|
|
|
|
|
3658
|
|
|
2666
|
|
|
|
|
9892
|
|
|
2666
|
|
|
|
|
10085
|
|
|
2666
|
|
|
|
|
7188
|
|
|
2666
|
|
|
|
|
50579
|
|
|
2666
|
|
|
|
|
6461
|
|
|
2666
|
|
|
|
|
4562
|
|
|
2666
|
|
|
|
|
6376
|
|
|
2666
|
|
|
|
|
43375
|
|
71
|
2666
|
|
|
|
|
53852
|
$self->paramPos( $self->paramPos + 1 ); |
72
|
|
|
|
|
|
|
# |
73
|
|
|
|
|
|
|
# $argumentsGroup is nullable |
74
|
|
|
|
|
|
|
# |
75
|
2666
|
50
|
|
|
|
119698
|
if ( !Undef->check($argumentsGroup) ) { |
76
|
2666
|
|
|
|
|
58589
|
$argumentsGroup->value_concat( $self->macro, $self->paramPos ); |
77
|
2666
|
|
|
|
|
11036
|
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.019 |
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 |