aboutsummaryrefslogtreecommitdiff
path: root/atom_dcg.pl
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-02-13 13:25:39 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-02-13 13:25:39 +0100
commit92f7852b6979239214848b7ebb4046d52e4aba06 (patch)
treedf49eb01bc34c2acebdc3ad42f505cdb64afdae9 /atom_dcg.pl
downloadEpisodeBrowser-92f7852b6979239214848b7ebb4046d52e4aba06.tar.gz
Begin Win32 re-implementation.
Diffstat (limited to 'atom_dcg.pl')
-rw-r--r--atom_dcg.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/atom_dcg.pl b/atom_dcg.pl
new file mode 100644
index 0000000..74689d5
--- /dev/null
+++ b/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)
+ ).