line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
use Moops; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# PODNAME: MarpaX::Languages::M4::Impl::Parser::Actions |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: M4 Marpa parser actions |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
2965
|
class MarpaX::Languages::M4::Impl::Parser::Actions { |
|
1
|
|
|
1
|
|
26
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
279
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
58
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
79
|
|
|
1
|
|
|
|
|
28
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3584
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
354
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
130
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
79
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
183
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
850
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1612
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
94
|
|
|
1
|
|
|
|
|
6328
|
|
|
0
|
|
|
|
|
0
|
|
8
|
1
|
|
|
1
|
|
368
|
use MarpaX::Languages::M4::Impl::Value; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
9
|
1
|
|
|
1
|
|
55
|
use MarpaX::Languages::M4::Type::Value -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
10
|
1
|
|
|
1
|
|
925
|
use MarpaX::Languages::M4::Type::Macro -all; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
11
|
1
|
|
|
1
|
|
733
|
use Types::Common::Numeric -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
12
|
our $VERSION = '0.020'; # 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
|
|
|
|
|
467153
|
default => sub {$MarpaX::Languages::M4::Impl::Parser::macro} |
24
|
1
|
|
|
|
|
4
|
); |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
2700
|
has paramPos => ( |
27
|
|
|
|
|
|
|
is => 'rw', |
28
|
|
|
|
|
|
|
isa => PositiveOrZeroInt, |
29
|
|
|
|
|
|
|
default => 0 |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
1
|
50
|
33
|
1
|
|
9982
|
method createArgumentsGroup (Undef|ConsumerOf[M4Value] $tokens?) { |
|
1
|
50
|
|
4558
|
|
3
|
|
|
1
|
100
|
|
|
|
139
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
100
|
|
|
|
3
|
|
|
1
|
|
|
|
|
182
|
|
|
1
|
|
|
|
|
1059
|
|
|
4558
|
|
|
|
|
766100
|
|
|
4558
|
|
|
|
|
14202
|
|
|
4558
|
|
|
|
|
12704
|
|
|
4558
|
|
|
|
|
12683
|
|
|
4455
|
|
|
|
|
6699
|
|
|
4455
|
|
|
|
|
12582
|
|
|
4558
|
|
|
|
|
89085
|
|
33
|
4558
|
100
|
|
|
|
14613
|
if ( !Undef->check($tokens) ) { |
34
|
4455
|
|
|
|
|
49519
|
return $tokens; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
else { |
37
|
103
|
|
|
|
|
2955
|
return MarpaX::Languages::M4::Impl::Value->new(); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
1
|
50
|
33
|
1
|
|
6811
|
method mergeArgumentsGroup (ConsumerOf[M4Value] $argumentsGroupLeft, Str $lparen, ConsumerOf[M4Value] $argumentsGroupMiddle, Str $rparen, ConsumerOf[M4Value] $argumentsGroupRight) { |
|
1
|
50
|
33
|
31
|
|
2
|
|
|
1
|
50
|
33
|
|
|
139
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
190
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
99
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
155
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
86
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
134
|
|
|
1
|
50
|
|
|
|
230
|
|
|
31
|
50
|
|
|
|
2338
|
|
|
31
|
|
|
|
|
154
|
|
|
31
|
|
|
|
|
162
|
|
|
31
|
|
|
|
|
156
|
|
|
31
|
|
|
|
|
68
|
|
|
31
|
|
|
|
|
88
|
|
|
31
|
|
|
|
|
201
|
|
|
31
|
|
|
|
|
193
|
|
|
31
|
|
|
|
|
135
|
|
|
31
|
|
|
|
|
785
|
|
|
31
|
|
|
|
|
135
|
|
|
31
|
|
|
|
|
76
|
|
|
31
|
|
|
|
|
136
|
|
|
31
|
|
|
|
|
135
|
|
|
31
|
|
|
|
|
137
|
|
|
31
|
|
|
|
|
59
|
|
|
31
|
|
|
|
|
62
|
|
|
31
|
|
|
|
|
166
|
|
|
31
|
|
|
|
|
165
|
|
|
31
|
|
|
|
|
109
|
|
|
31
|
|
|
|
|
592
|
|
|
31
|
|
|
|
|
176
|
|
|
31
|
|
|
|
|
83
|
|
|
31
|
|
|
|
|
148
|
|
|
31
|
|
|
|
|
116
|
|
|
31
|
|
|
|
|
95
|
|
|
31
|
|
|
|
|
80
|
|
|
31
|
|
|
|
|
55
|
|
|
31
|
|
|
|
|
157
|
|
|
31
|
|
|
|
|
154
|
|
|
31
|
|
|
|
|
111
|
|
|
31
|
|
|
|
|
537
|
|
42
|
31
|
|
|
|
|
733
|
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
|
|
3401
|
method create (Str|M4Macro @lexemes --> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
4457
|
|
3
|
|
|
1
|
50
|
|
|
|
112
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
156
|
|
|
1
|
|
|
|
|
155
|
|
|
4457
|
|
|
|
|
1973861
|
|
|
4457
|
|
|
|
|
24797
|
|
|
4457
|
|
|
|
|
12287
|
|
|
9856
|
|
|
|
|
13735
|
|
|
9856
|
|
|
|
|
32135
|
|
|
4457
|
|
|
|
|
8046
|
|
50
|
4457
|
|
|
|
|
81012
|
return MarpaX::Languages::M4::Impl::Value->new(@lexemes); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
1
|
50
|
|
1
|
|
1806
|
method fakeOneVoidParam (--> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
15
|
|
2
|
|
|
1
|
|
|
|
|
94
|
|
|
1
|
|
|
|
|
2934
|
|
|
15
|
|
|
|
|
12543
|
|
|
15
|
|
|
|
|
78
|
|
|
15
|
|
|
|
|
37
|
|
54
|
15
|
|
|
|
|
268
|
return MarpaX::Languages::M4::Impl::Value->new(''); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
1
|
50
|
33
|
1
|
|
4056
|
method firstArg (Undef|ConsumerOf[M4Value] $argumentsGroup? --> ConsumerOf[M4Value]) { |
|
1
|
50
|
|
1838
|
|
2
|
|
|
1
|
100
|
|
|
|
133
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
211
|
|
|
1
|
|
|
|
|
2620
|
|
|
1838
|
|
|
|
|
136209
|
|
|
1838
|
|
|
|
|
7005
|
|
|
1838
|
|
|
|
|
6648
|
|
|
1838
|
|
|
|
|
6547
|
|
|
1830
|
|
|
|
|
2959
|
|
|
1830
|
|
|
|
|
8192
|
|
|
1838
|
|
|
|
|
39808
|
|
58
|
|
|
|
|
|
|
# |
59
|
|
|
|
|
|
|
# $argumentsGroup is nullable |
60
|
|
|
|
|
|
|
# |
61
|
1838
|
100
|
|
|
|
5173
|
if ( Undef->check($argumentsGroup) ) { |
62
|
8
|
|
|
|
|
206
|
return MarpaX::Languages::M4::Impl::Value->new(''); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
else { |
65
|
1830
|
|
|
|
|
54580
|
return $argumentsGroup->value_concat( $self->macro, |
66
|
|
|
|
|
|
|
$self->paramPos ); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
1
|
50
|
33
|
1
|
|
4385
|
method nextArg (ConsumerOf[M4Value] $arguments, Undef|ConsumerOf[M4Value] $argumentsGroup) { |
|
1
|
50
|
33
|
2666
|
|
2
|
|
|
1
|
50
|
|
|
|
147
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
157
|
|
|
1
|
50
|
|
|
|
16
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
207
|
|
|
1
|
|
|
|
|
2664
|
|
|
2666
|
|
|
|
|
112560
|
|
|
2666
|
|
|
|
|
8409
|
|
|
2666
|
|
|
|
|
7780
|
|
|
2666
|
|
|
|
|
7451
|
|
|
2666
|
|
|
|
|
5256
|
|
|
2666
|
|
|
|
|
4222
|
|
|
2666
|
|
|
|
|
9953
|
|
|
2666
|
|
|
|
|
11604
|
|
|
2666
|
|
|
|
|
10339
|
|
|
2666
|
|
|
|
|
52015
|
|
|
2666
|
|
|
|
|
7320
|
|
|
2666
|
|
|
|
|
3778
|
|
|
2666
|
|
|
|
|
5753
|
|
|
2666
|
|
|
|
|
43770
|
|
71
|
2666
|
|
|
|
|
53934
|
$self->paramPos( $self->paramPos + 1 ); |
72
|
|
|
|
|
|
|
# |
73
|
|
|
|
|
|
|
# $argumentsGroup is nullable |
74
|
|
|
|
|
|
|
# |
75
|
2666
|
50
|
|
|
|
124609
|
if ( !Undef->check($argumentsGroup) ) { |
76
|
2666
|
|
|
|
|
60278
|
$argumentsGroup->value_concat( $self->macro, $self->paramPos ); |
77
|
2666
|
|
|
|
|
11676
|
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.020 |
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 |