Bring in the (sort of) compiler.

This commit is contained in:
Simon Forman
2019-04-28 07:59:47 -07:00
parent 36fa5ee151
commit 67112de952
2 changed files with 594 additions and 0 deletions
+9
View File
@@ -197,3 +197,12 @@ jcmpl(Name, Expression, Rule) :-
rule(Head, [], Head ).
rule(Head, [A|B], Head :- maplist(call, [A|B])).
% Simple DCGs to expand/contract definitions.
expando, Body --> [Def], {Def Body}.
contracto, [Def] --> {Def Body}, Body.
% phrase(expando, ExprIn, ExprOut).