Files
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

48 lines
896 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

xlate:
proc;
/* translate an M-expression to S-expression form */
if accum = 'label' then
do;
line = line || '(LABEL';
call scan();
if accum = '[' then
call scan();
else
call syntax();
call x_var();
call x_exp();
if accum = ']' then
call scan();
else
call syntax();
line = line || ')';
end;
else
if accum = 'lambda' then
do;
line = line || '(LAMBDA ';
call scan();
if accum = '[' then
call scan();
else
call syntax();
call x_formal();
call xx();
if accum = ']' then
call scan();
else
call syntax();
end;
else
do;
line = line ||'(';
call x_func();
if accum = '[' then
call scan();
else
call syntax();
do while (accum ^= ']');
call x_arg();
end;
end;