aboutsummaryrefslogtreecommitdiff
path: root/pl/atom_dcg.pl
blob: 74689d5eaf4ba88e90337fafa831664b050bb783 (plain)
1
2
3
4
5
6
7
8
9
10
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)
	).