ClassFile/BNF/ConstantUtf8Info.pm

filter: Statementstmt 75.0% 15 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 5 / 10 Podpod n/a totaltotal 66.6% 20 / 30 SCAR 0.2
CC
1
Cov
75%
grammar
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.0
« ClassFile/BNF/ClassesArray.pm ↑ Summary ClassFile/BNF/ExceptionTableArray.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package MarpaX::Java::ClassFile::BNF::ConstantUtf8Info;
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Parsing of a CONSTANT_Utf8_info
8  
9 our $VERSION = '0.008'; # VERSION
10  
11 our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY
12  
13 1 ▶use Data::Section -setup;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use MarpaX::Java::ClassFile::Util::BNF qw/:all/;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 #
16 # require because we do not import ANYTHING from these module, just require they are loaded
17 #
18 require Marpa::R2;
19 require MarpaX::Java::ClassFile::Struct::ConstantUtf8Info;
20  
21 my $_data = ${ __PACKAGE__->section_data('bnf') };
22 my $_grammar = Marpa::R2::Scanless::G->new( { source => \__PACKAGE__->bnf($_data) } );
23  
24 # --------------------------------------------------------
25 # What role MarpaX::Java::ClassFile::Role::Parser requires
26 # --------------------------------------------------------
27 0 ▶sub grammar { $_grammar }
Subroutine grammar: not called CC=1 SCAR=6.9
28 sub callbacks {
29 return {
30 0 ▶ "'exhausted" => sub { $_[0]->exhausted },
Subroutine __ANON__: not called CC=1 SCAR=6.9
31 0 ▶ 'U2$' => sub { $_[0]->lexeme_read_managed($_[0]->pauseU2) }
Subroutine __ANON__: not called CC=1 SCAR=6.9
32 }
33 0 ▶}
Subroutine callbacks: not called CC=1 SCAR=6.9
34  
35 # ---------------
36 # Grammar actions
37 # ---------------
38 sub _ConstantUtf8Info {
39 # my ($self, $tag, $length, $MANAGED) = @_;
40  
41 0 ▶ MarpaX::Java::ClassFile::Struct::ConstantUtf8Info->new(
Subroutine _ConstantUtf8Info: not called CC=1 SCAR=6.9
42 _perlvalue => $_[0]->utf8($_[3]),
43 tag => $_[1],
44 length => $_[2],
45 bytes => $_[3]
46 )
47 }
48  
49 with 'MarpaX::Java::ClassFile::Role::Parser';
50  
51 1;
52  
53 =pod
54  
55 =encoding UTF-8
56  
57 =head1 NAME
58  
59 MarpaX::Java::ClassFile::BNF::ConstantUtf8Info - Parsing of a CONSTANT_Utf8_info
60  
61 =head1 VERSION
62  
63 version 0.008
64  
65 =head1 AUTHOR
66  
67 Jean-Damien Durand <jeandamiendurand@free.fr>
68  
69 =head1 COPYRIGHT AND LICENSE
70  
71 This software is copyright (c) 2016 by Jean-Damien Durand.
72  
73 This is free software; you can redistribute it and/or modify it under
74 the same terms as the Perl 5 programming language system itself.
75  
76 =cut
77  
78 __DATA__
79 __[ bnf ]__
80 :lexeme ~ <U2> pause => after event => 'U2$'
81  
82 ConstantUtf8Info ::= tag length MANAGED action => _ConstantUtf8Info
83 tag ::= [\x{01}] action => u1
84 length ::= U2 action => u2
« ClassFile/BNF/ClassesArray.pm ↑ Summary ClassFile/BNF/ExceptionTableArray.pm »