File Coverage

blib/lib/Language/Befunge/Ops/Unefunge98.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 15 15 100.0


line stmt bran cond sub pod time code
1             #
2             # This file is part of Language::Befunge.
3             # Copyright (c) 2001-2009 Jerome Quelin, all rights reserved.
4             #
5             # This program is free software; you can redistribute it and/or modify
6             # it under the same terms as Perl itself.
7             #
8             #
9              
10             package Language::Befunge::Ops::Unefunge98;
11             require 5.010;
12              
13 4     4   4994 use strict;
  4         7  
  4         157  
14 4     4   22 use warnings;
  4         8  
  4         123  
15              
16 4     4   821 use Language::Befunge::Ops;
  4         11  
  4         48  
17              
18             sub get_ops_map {
19             return {
20 7     7 1 672 '0' => \&Language::Befunge::Ops::num_push_number,
21             '1' => \&Language::Befunge::Ops::num_push_number,
22             '2' => \&Language::Befunge::Ops::num_push_number,
23             '3' => \&Language::Befunge::Ops::num_push_number,
24             '4' => \&Language::Befunge::Ops::num_push_number,
25             '5' => \&Language::Befunge::Ops::num_push_number,
26             '6' => \&Language::Befunge::Ops::num_push_number,
27             '7' => \&Language::Befunge::Ops::num_push_number,
28             '8' => \&Language::Befunge::Ops::num_push_number,
29             '9' => \&Language::Befunge::Ops::num_push_number,
30             'a' => \&Language::Befunge::Ops::num_push_number,
31             'b' => \&Language::Befunge::Ops::num_push_number,
32             'c' => \&Language::Befunge::Ops::num_push_number,
33             'd' => \&Language::Befunge::Ops::num_push_number,
34             'e' => \&Language::Befunge::Ops::num_push_number,
35             'f' => \&Language::Befunge::Ops::num_push_number,
36             '"' => \&Language::Befunge::Ops::str_enter_string_mode,
37             "'" => \&Language::Befunge::Ops::str_fetch_char,
38             's' => \&Language::Befunge::Ops::str_store_char,
39             '+' => \&Language::Befunge::Ops::math_addition,
40             '-' => \&Language::Befunge::Ops::math_substraction,
41             '*' => \&Language::Befunge::Ops::math_multiplication,
42             '/' => \&Language::Befunge::Ops::math_division,
43             '%' => \&Language::Befunge::Ops::math_remainder,
44             '>' => \&Language::Befunge::Ops::dir_go_east,
45             '<' => \&Language::Befunge::Ops::dir_go_west,
46             '?' => \&Language::Befunge::Ops::dir_go_away,
47             '[' => \&Language::Befunge::Ops::dir_turn_left,
48             ']' => \&Language::Befunge::Ops::dir_turn_right,
49             'r' => \&Language::Befunge::Ops::dir_reverse,
50             'x' => \&Language::Befunge::Ops::dir_set_delta,
51             '!' => \&Language::Befunge::Ops::decis_neg,
52             '`' => \&Language::Befunge::Ops::decis_gt,
53             '_' => \&Language::Befunge::Ops::decis_horiz_if,
54             '|' => \&Language::Befunge::Ops::decis_vert_if,
55             'w' => \&Language::Befunge::Ops::decis_cmp,
56             ' ' => \&Language::Befunge::Ops::flow_space,
57             'z' => \&Language::Befunge::Ops::flow_no_op,
58             ';' => \&Language::Befunge::Ops::flow_comments,
59             '#' => \&Language::Befunge::Ops::flow_trampoline,
60             'j' => \&Language::Befunge::Ops::flow_jump_to,
61             'k' => \&Language::Befunge::Ops::flow_repeat,
62             '@' => \&Language::Befunge::Ops::flow_kill_thread,
63             'q' => \&Language::Befunge::Ops::flow_quit,
64             '$' => \&Language::Befunge::Ops::stack_pop,
65             ':' => \&Language::Befunge::Ops::stack_duplicate,
66             '\\' => \&Language::Befunge::Ops::stack_swap,
67             'n' => \&Language::Befunge::Ops::stack_clear,
68             '{' => \&Language::Befunge::Ops::block_open,
69             '}' => \&Language::Befunge::Ops::block_close,
70             'u' => \&Language::Befunge::Ops::bloc_transfer,
71             'g' => \&Language::Befunge::Ops::store_get,
72             'p' => \&Language::Befunge::Ops::store_put,
73             '.' => \&Language::Befunge::Ops::stdio_out_num,
74             ',' => \&Language::Befunge::Ops::stdio_out_ascii,
75             '&' => \&Language::Befunge::Ops::stdio_in_num,
76             '~' => \&Language::Befunge::Ops::stdio_in_ascii,
77             'i' => \&Language::Befunge::Ops::stdio_in_file,
78             'o' => \&Language::Befunge::Ops::stdio_out_file,
79             '=' => \&Language::Befunge::Ops::stdio_sys_exec,
80             'y' => \&Language::Befunge::Ops::sys_info,
81             't' => \&Language::Befunge::Ops::spawn_ip,
82             '(' => \&Language::Befunge::Ops::lib_load,
83             ')' => \&Language::Befunge::Ops::lib_unload,
84             'A' => \&Language::Befunge::Ops::lib_run_instruction,
85             'B' => \&Language::Befunge::Ops::lib_run_instruction,
86             'C' => \&Language::Befunge::Ops::lib_run_instruction,
87             'D' => \&Language::Befunge::Ops::lib_run_instruction,
88             'E' => \&Language::Befunge::Ops::lib_run_instruction,
89             'F' => \&Language::Befunge::Ops::lib_run_instruction,
90             'G' => \&Language::Befunge::Ops::lib_run_instruction,
91             'H' => \&Language::Befunge::Ops::lib_run_instruction,
92             'I' => \&Language::Befunge::Ops::lib_run_instruction,
93             'J' => \&Language::Befunge::Ops::lib_run_instruction,
94             'K' => \&Language::Befunge::Ops::lib_run_instruction,
95             'L' => \&Language::Befunge::Ops::lib_run_instruction,
96             'M' => \&Language::Befunge::Ops::lib_run_instruction,
97             'N' => \&Language::Befunge::Ops::lib_run_instruction,
98             'O' => \&Language::Befunge::Ops::lib_run_instruction,
99             'P' => \&Language::Befunge::Ops::lib_run_instruction,
100             'Q' => \&Language::Befunge::Ops::lib_run_instruction,
101             'R' => \&Language::Befunge::Ops::lib_run_instruction,
102             'S' => \&Language::Befunge::Ops::lib_run_instruction,
103             'T' => \&Language::Befunge::Ops::lib_run_instruction,
104             'U' => \&Language::Befunge::Ops::lib_run_instruction,
105             'V' => \&Language::Befunge::Ops::lib_run_instruction,
106             'W' => \&Language::Befunge::Ops::lib_run_instruction,
107             'X' => \&Language::Befunge::Ops::lib_run_instruction,
108             'Y' => \&Language::Befunge::Ops::lib_run_instruction,
109             'Z' => \&Language::Befunge::Ops::lib_run_instruction,
110             };
111             }
112              
113             1;
114              
115             __END__