From 09ec144a99f1234a37d04854bdfb81485540be97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 15 Feb 2022 15:38:57 +0100 Subject: Put C code and Prolog code in separate directories. --- pl/atom_dcg.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pl/atom_dcg.pl (limited to 'pl/atom_dcg.pl') diff --git a/pl/atom_dcg.pl b/pl/atom_dcg.pl new file mode 100644 index 0000000..74689d5 --- /dev/null +++ b/pl/atom_dcg.pl @@ -0,0 +1,11 @@ +:- module(atom_dcg, [atom_phrase/2]). + +:- meta_predicate atom_phrase(2, ?). + +atom_phrase(G, A) :- + ( var(A) + -> phrase(G, C), + atom_codes(A, C) + ; atom_codes(A, C), + phrase(G, C) + ). -- cgit v1.2.3