File Coverage

blib/lib/Language/Befunge/Ops/Befunge98.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 18 18 100.0


line stmt bran cond sub pod time code
1             #
2             # This file is part of Language-Befunge
3             #
4             # This software is copyright (c) 2003 by Jerome Quelin.
5             #
6             # This is free software; you can redistribute it and/or modify it under
7             # the same terms as the Perl 5 programming language system itself.
8             #
9 62     62   2365 use 5.010;
  62         247  
10 62     62   233 use strict;
  62         79  
  62         1318  
11 62     62   211 use warnings;
  62         65  
  62         3059  
12              
13             package Language::Befunge::Ops::Befunge98;
14             # ABSTRACT: operations supported by a Befunge-98 interpreter
15             $Language::Befunge::Ops::Befunge98::VERSION = '5.000';
16 62     62   7604 use Language::Befunge::Ops;
  62         79  
  62         491  
17              
18             sub get_ops_map {
19             return {
20 64     64 1 4301 '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_north,
47             'v' => \&Language::Befunge::Ops::dir_go_south,
48             '?' => \&Language::Befunge::Ops::dir_go_away,
49             '[' => \&Language::Befunge::Ops::dir_turn_left,
50             ']' => \&Language::Befunge::Ops::dir_turn_right,
51             'r' => \&Language::Befunge::Ops::dir_reverse,
52             'x' => \&Language::Befunge::Ops::dir_set_delta,
53             '!' => \&Language::Befunge::Ops::decis_neg,
54             '`' => \&Language::Befunge::Ops::decis_gt,
55             '_' => \&Language::Befunge::Ops::decis_horiz_if,
56             '|' => \&Language::Befunge::Ops::decis_vert_if,
57             'w' => \&Language::Befunge::Ops::decis_cmp,
58             ' ' => \&Language::Befunge::Ops::flow_space,
59             'z' => \&Language::Befunge::Ops::flow_no_op,
60             ';' => \&Language::Befunge::Ops::flow_comments,
61             '#' => \&Language::Befunge::Ops::flow_trampoline,
62             'j' => \&Language::Befunge::Ops::flow_jump_to,
63             'k' => \&Language::Befunge::Ops::flow_repeat,
64             '@' => \&Language::Befunge::Ops::flow_kill_thread,
65             'q' => \&Language::Befunge::Ops::flow_quit,
66             '$' => \&Language::Befunge::Ops::stack_pop,
67             ':' => \&Language::Befunge::Ops::stack_duplicate,
68             '\\' => \&Language::Befunge::Ops::stack_swap,
69             'n' => \&Language::Befunge::Ops::stack_clear,
70             '{' => \&Language::Befunge::Ops::block_open,
71             '}' => \&Language::Befunge::Ops::block_close,
72             'u' => \&Language::Befunge::Ops::bloc_transfer,
73             'g' => \&Language::Befunge::Ops::store_get,
74             'p' => \&Language::Befunge::Ops::store_put,
75             '.' => \&Language::Befunge::Ops::stdio_out_num,
76             ',' => \&Language::Befunge::Ops::stdio_out_ascii,
77             '&' => \&Language::Befunge::Ops::stdio_in_num,
78             '~' => \&Language::Befunge::Ops::stdio_in_ascii,
79             'i' => \&Language::Befunge::Ops::stdio_in_file,
80             'o' => \&Language::Befunge::Ops::stdio_out_file,
81             '=' => \&Language::Befunge::Ops::stdio_sys_exec,
82             'y' => \&Language::Befunge::Ops::sys_info,
83             't' => \&Language::Befunge::Ops::spawn_ip,
84             '(' => \&Language::Befunge::Ops::lib_load,
85             ')' => \&Language::Befunge::Ops::lib_unload,
86             'A' => \&Language::Befunge::Ops::lib_run_instruction,
87             'B' => \&Language::Befunge::Ops::lib_run_instruction,
88             'C' => \&Language::Befunge::Ops::lib_run_instruction,
89             'D' => \&Language::Befunge::Ops::lib_run_instruction,
90             'E' => \&Language::Befunge::Ops::lib_run_instruction,
91             'F' => \&Language::Befunge::Ops::lib_run_instruction,
92             'G' => \&Language::Befunge::Ops::lib_run_instruction,
93             'H' => \&Language::Befunge::Ops::lib_run_instruction,
94             'I' => \&Language::Befunge::Ops::lib_run_instruction,
95             'J' => \&Language::Befunge::Ops::lib_run_instruction,
96             'K' => \&Language::Befunge::Ops::lib_run_instruction,
97             'L' => \&Language::Befunge::Ops::lib_run_instruction,
98             'M' => \&Language::Befunge::Ops::lib_run_instruction,
99             'N' => \&Language::Befunge::Ops::lib_run_instruction,
100             'O' => \&Language::Befunge::Ops::lib_run_instruction,
101             'P' => \&Language::Befunge::Ops::lib_run_instruction,
102             'Q' => \&Language::Befunge::Ops::lib_run_instruction,
103             'R' => \&Language::Befunge::Ops::lib_run_instruction,
104             'S' => \&Language::Befunge::Ops::lib_run_instruction,
105             'T' => \&Language::Befunge::Ops::lib_run_instruction,
106             'U' => \&Language::Befunge::Ops::lib_run_instruction,
107             'V' => \&Language::Befunge::Ops::lib_run_instruction,
108             'W' => \&Language::Befunge::Ops::lib_run_instruction,
109             'X' => \&Language::Befunge::Ops::lib_run_instruction,
110             'Y' => \&Language::Befunge::Ops::lib_run_instruction,
111             'Z' => \&Language::Befunge::Ops::lib_run_instruction,
112             };
113             }
114              
115             1;
116              
117             __END__