diff --git a/samples/like.txt b/samples/like.txt new file mode 100644 index 000000000..e33996413 --- /dev/null +++ b/samples/like.txt @@ -0,0 +1 @@ +I like it. Anything can follow! \ No newline at end of file diff --git a/samples/test_phrase_from_file.pl b/samples/test_phrase_from_file.pl new file mode 100644 index 000000000..ecfa7195a --- /dev/null +++ b/samples/test_phrase_from_file.pl @@ -0,0 +1,8 @@ +:- use_module(library(pio)). +:- use_module(library(dcgs)). + +like(What) --> "I like ", seq(What), ".", ... . + +test :- phrase_from_file(like(What), 'samples/like.txt'), write_term(What,[double_quotes(true)]), nl, fail; true. + +% $ tpl -g test,halt samples/test_phrase_from_file.pl