Did you know ... Search Documentation:
Pack dcg_extras -- prolog/dcg_extras.pl
PublicShow source

Taken from The Power of Prolog by Markus Triska

It's recommended to set the flag to write lists of characters as strings:

:- set_prolog_flag(double_quotes, chars).
See also
- https://www.metalevel.at/prolog/dcg
 seq(-List)// is det
seq(+List)// is det
Describes a sequence of elements.
?- phrase(("Hello, ",seq(Cs),"!"), "Hello, all!").
Cs = "all" ;
false.
 seqq(-List)// is det
seqq(+List)// is det
Describes a sequence of sequences.
?- phrase(seqq(["ab","cd","ef"]), Ls).
   Ls = "abcdef".
 ...// is det
Describes "any sequence at all"
?- phrase((...,"you",...,"!"), "Hello, you all!").
   true ;
   false.