our
$VERSION
= 0.002_010;
our
hashref
$properties
= {};
our
string_hashref::method
$ast_to_rperl__generate
=
sub
{
(
my
object
$self
,
my
string_hashref
$modes
) =
@_
;
my
string_hashref
$rperl_source_group
= {
PMC
=>
q{}
};
if
( (
ref
$self
) ne
'Literal_232'
) {
die
RPerl::Parser::rperl_rule__replace(
'ERROR ECVGEASRP00, CODE GENERATOR, ABSTRACT SYNTAX TO RPERL: grammar rule '
. (
ref
$self
)
.
' found where Literal_232 expected, dying'
)
.
"\n"
;
}
my
string
$value
=
$self
->{children}->[0];
$rperl_source_group
->{PMC} .=
$value
;
return
$rperl_source_group
;
};
our
string_hashref::method
$ast_to_cpp__generate__CPPOPS_PERLTYPES
=
sub
{
(
my
object
$self
,
my
string_hashref
$modes
) =
@_
;
my
string_hashref
$cpp_source_group
= {
CPP
=>
q{// <<< RP::O::E::SE::L::S __DUMMY_SOURCE_CODE CPPOPS_PERLTYPES >>>}
.
"\n"
};
return
$cpp_source_group
;
};
our
string_hashref::method
$ast_to_cpp__generate__CPPOPS_CPPTYPES
=
sub
{
(
my
object
$self
,
my
string_hashref
$modes
) =
@_
;
my
string_hashref
$cpp_source_group
;
if
( (
ref
$self
) ne
'Literal_232'
) {
die
RPerl::Parser::rperl_rule__replace(
'ERROR ECVGEASCP00, CODE GENERATOR, ABSTRACT SYNTAX TO C++: grammar rule '
. (
ref
$self
) .
' found where Literal_232 expected, dying'
) .
"\n"
;
}
$cpp_source_group
->{CPP} =
$self
->{children}->[0];
if
((
substr
$cpp_source_group
->{CPP}, 0, 1) eq
q{'}
) {
if
((
substr
$cpp_source_group
->{CPP}, -1, 1) eq
q{'}
) {
substr
$cpp_source_group
->{CPP}, 0, 1,
q{"}
;
substr
$cpp_source_group
->{CPP}, -1, 1,
q{"}
;
}
else
{
die
RPerl::Parser::rperl_rule__replace(
'ERROR ECVGEASCP52, CODE GENERATOR, ABSTRACT SYNTAX TO C++: string literal started with single-quote but not terminated with single-quote, dying'
) .
"\n"
;
}
}
elsif
((
substr
$cpp_source_group
->{CPP}, 0, 2) eq
'q{'
) {
if
((
substr
$cpp_source_group
->{CPP}, -1, 1) eq
'}'
) {
substr
$cpp_source_group
->{CPP}, 0, 2,
q{"}
;
substr
$cpp_source_group
->{CPP}, -1, 1,
q{"}
;
}
else
{
die
RPerl::Parser::rperl_rule__replace(
'ERROR ECVGEASCP53, CODE GENERATOR, ABSTRACT SYNTAX TO C++: string literal started with q-left-brace single-quote but not terminated with right-brace, dying'
) .
"\n"
;
}
}
$cpp_source_group
->{CPP} =
'(const string) '
.
$cpp_source_group
->{CPP};
return
$cpp_source_group
;
};
1;