Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type interpreter_error =
| StackUnderflow
| TypeError of value
| Break of interpreter
| InvalidDereference
| Unreachable
type word =
| Value of value
| Builtin of interpreter -> (interpreter, interpreter_error) result
| Subroutine of word list
| DoLoop of word list
| BeginUntilLoop of word list
| IfThen of word list
| IfElseThen of word list * word list
type parser = {
comment_count : int;
state : parser_state list;
words : (string, word list) Hashtbl.t;
memory_count : int;
}
val string_of_parser_error : parser_error -> string
val string_of_interpreter_error : interpreter_error -> string
val get_float : value -> float
val value_of_bool : bool -> value
val bool_of_value : value -> bool
val push : interpreter -> value -> interpreter
val pushs : interpreter -> value list -> interpreter
val pop : interpreter -> (value * interpreter, interpreter_error) result
val pop_n :
interpreter ->
int ->
(value list * interpreter, interpreter_error) result
val split_string : string -> String.t list
val builtin_of_string : string -> word option
val parse : parser -> string -> (parser * word option, parser_error) result
val parse_words :
parser ->
string list ->
(parser * word list, parser_error) result
val interpret_begin_until_loop :
interpreter ->
word list ->
(interpreter, interpreter_error) result
val interpret_do_loop :
interpreter ->
word list ->
(interpreter, interpreter_error) result
val interpret_words :
interpreter ->
word list ->
(interpreter, interpreter_error) result
val interpret : interpreter -> word -> (interpreter, interpreter_error) result