strip modules from GRBody in phrase/3 (#1565)
This commit is contained in:
@@ -20,12 +20,14 @@ phrase(GRBody, S0) :-
|
|||||||
phrase(GRBody, S0, []).
|
phrase(GRBody, S0, []).
|
||||||
|
|
||||||
phrase(GRBody, S0, S) :-
|
phrase(GRBody, S0, S) :-
|
||||||
|
strip_module(GRBody, M, GRBody1),
|
||||||
( var(GRBody) ->
|
( var(GRBody) ->
|
||||||
instantiation_error(phrase/3)
|
instantiation_error(phrase/3)
|
||||||
; dcg_constr(GRBody),
|
; nonvar(GRBody1),
|
||||||
dcg_body(GRBody, S0, S, GRBody1) ->
|
dcg_constr(GRBody1),
|
||||||
call(GRBody1)
|
dcg_body(GRBody1, S0, S, GRBody2) ->
|
||||||
; call(GRBody, S0, S)
|
call(GRBody2)
|
||||||
|
; call(M:GRBody1, S0, S)
|
||||||
).
|
).
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user