Language::MinCaml - MinCaml Interpreter
use Language::MinCaml; # interpret a string Language::MinCaml->interpret_string(<<EOC); let rec gcd m n = if m = 0 then n else if m <= n then gcd m (n - m) else gcd n (m - n) in print_int (gcd 100 125) EOC # or, interpret a source file Language::MinCaml->interpret_file('/path/to/source.ml');
Language::MinCaml is an interpreter of MinCaml which is a subset of programming language ML.
MinCaml was originally defined by Eijiro Sumii, and he implemented the MinCaml compiler with OCaml for educational purposes.
Interpret a string representing a MinCaml code.
Interpret a MinCaml code in a file pointed to by $file_path.
Support skipping comment lines '(* .. *)'.
Support other built-in functions (Now only print_int and print_float).
Improve error messages.
Yu Nejigane <email@example.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.