1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-10 12:47:45 +03:00
mal/matlab/step0_repl.m
Joel Martin e0188ffe5b Matlab: fix hash-map equality and keywords.
- hash-map equality is related to #161.
2015-11-30 14:09:38 -06:00

29 lines
421 B
Matlab

function step0_repl(varargin), main(varargin), end
% read
function ret = READ(str)
ret = str;
end
% eval
function ret = EVAL(ast, env)
ret = ast;
end
% print
function ret = PRINT(ast)
ret = ast;
end
% REPL
function ret = rep(str, env)
ret = PRINT(EVAL(READ(str), env));
end
function main(args)
while (true)
line = input('user> ', 's');
fprintf('%s\n', rep(line, ''));
end
end