| 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::EnumConstValue; | ||
| 5 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | # ABSTRACT: Parsing of a enum_const_value | ||
| 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::EnumConstValue; | ||
| 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 { return { | ||
| 29 | 0 | ▶ | "'exhausted" => sub { $_[0]->exhausted }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 30 | } | ||
| 31 | 0 | ▶ | } |
|
Subroutine
callbacks: not called CC=1 SCAR=6.9
| |||
| 32 | |||
| 33 | # --------------- | ||
| 34 | # Grammar actions | ||
| 35 | # --------------- | ||
| 36 | sub _EnumConstValue { | ||
| 37 | # my ($self, $type_name_index, $const_name_index) = @_; | ||
| 38 | |||
| 39 | 0 | ▶ | MarpaX::Java::ClassFile::Struct::EnumConstValue->new( |
|
Subroutine
_EnumConstValue: not called CC=1 SCAR=6.9
| |||
| 40 | _constant_pool => $_[0]->constant_pool, | ||
| 41 | type_name_index => $_[1], | ||
| 42 | const_name_index => $_[2], | ||
| 43 | ) | ||
| 44 | } | ||
| 45 | |||
| 46 | with 'MarpaX::Java::ClassFile::Role::Parser'; | ||
| 47 | |||
| 48 | 1; | ||
| 49 | |||
| 50 | =pod | ||
| 51 | |||
| 52 | =encoding UTF-8 | ||
| 53 | |||
| 54 | =head1 NAME | ||
| 55 | |||
| 56 | MarpaX::Java::ClassFile::BNF::EnumConstValue - Parsing of a enum_const_value | ||
| 57 | |||
| 58 | =head1 VERSION | ||
| 59 | |||
| 60 | version 0.008 | ||
| 61 | |||
| 62 | =head1 AUTHOR | ||
| 63 | |||
| 64 | Jean-Damien Durand <jeandamiendurand@free.fr> | ||
| 65 | |||
| 66 | =head1 COPYRIGHT AND LICENSE | ||
| 67 | |||
| 68 | This software is copyright (c) 2016 by Jean-Damien Durand. | ||
| 69 | |||
| 70 | This is free software; you can redistribute it and/or modify it under | ||
| 71 | the same terms as the Perl 5 programming language system itself. | ||
| 72 | |||
| 73 | =cut | ||
| 74 | |||
| 75 | __DATA__ | ||
| 76 | __[ bnf ]__ | ||
| 77 | EnumConstValue ::= type_name_index const_name_index action => _EnumConstValue | ||
| 78 | type_name_index ::= U2 action => u2 | ||
| 79 | const_name_index ::= U2 action => u2 | ||