$dec
is built
concatenating the keys of the symbol table hash %s
.
The code is then indented and the different components
are articulated through a HERE document:
sub output_code { my ($trans, $dec) = @_; # Indent $$trans =~ s/^/\t/gm; # Output the code print << "TRANSLATION"; .sub 'main' :main \t.local num $$dec $$trans .end TRANSLATIONThe call to
output_code
finishes the job:
output_code(\$t->{trans}, \$dec);