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 <nejigane@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This module is dependent on Parse::Yapp module for parsing. Parse::Yapp
http://min-caml.sourceforge.net/index-e.html
To install Language::MinCaml, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Language::MinCaml
CPAN shell
perl -MCPAN -e shell install Language::MinCaml
For more information on module installation, please visit the detailed CPAN module installation guide.