]>
Repositorios git - scryer-prolog.git/commit
ADDED: Support for higher-order non-terminals phrase//[2,3]
These non-terminals take a grammar rule body and additional arguments
as arguments. These arguments are appended to the first argument.
A key motivation for the introduction of these non-terminals is found
in the discussion and sample code provided by @bakaq in:
https://github.com/mthom/scryer-prolog/discussions/2260
In this way, portable higher-order DCG programming is possible while
keeping the logical grammar rule expansion implementation dependent.
Example:
?- phrase(phrase('.', a, []), Cs).
Cs = "a".