didoudiaz/gprolog

phrase/2 too eager execution

Opened this issue · 1 comments

UWN commented
| ?- phrase(([a],{1}),[]).

no, unexpected.
   type_error(callable,...). % expected, but not found

The idea is that the logical grammar rule expansion happens without any error conditions satisfied, and then the expanded term is called.

UWN commented

Also note that minor modifications make the error appear as expected (#37):


| ?- phrase((!,[a],{1}),[]).
uncaught exception: error(type_error(callable,(!,[]=[a|_292],1,_292=[])),phrase/2)