fix grammer expansion.
This commit is contained in:
parent
fadec66d2c
commit
065a88d0cc
@ -4,7 +4,7 @@
|
|||||||
% Purpose: Macros to apply a predicate to all elements
|
% Purpose: Macros to apply a predicate to all elements
|
||||||
% of a list or to all sub-terms of a term.
|
% of a list or to all sub-terms of a term.
|
||||||
|
|
||||||
:- reexport(library(maplist), [selectlist/3,
|
:- reexport(maplist, [selectlist/3,
|
||||||
checklist/2,
|
checklist/2,
|
||||||
maplist/2,
|
maplist/2,
|
||||||
maplist/3,
|
maplist/3,
|
||||||
@ -24,6 +24,6 @@
|
|||||||
]).
|
]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library(expand_macros)).
|
:- use_module(expand_macros,[]).
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
:- use_module(library(lists), [append/3]).
|
:- use_module(library(lists), [append/3]).
|
||||||
:- use_module(library(charsio), [format_to_chars/3, read_from_chars/2]).
|
:- use_module(library(charsio), [format_to_chars/3, read_from_chars/2]).
|
||||||
:- use_module(library(error), [must_be/2]).
|
:- use_module(library(error), [must_be/2]).
|
||||||
|
:- use_module(library(occurs), [sub_term/2]).
|
||||||
|
|
||||||
:- multifile user:goal_expansion/3.
|
:- multifile user:goal_expansion/3.
|
||||||
|
|
||||||
@ -393,6 +394,7 @@ user:goal_expansion(sumnodes(Meta, Term, AccIn, AccOut), Mod, Goal) :-
|
|||||||
),
|
),
|
||||||
RecursiveCall)
|
RecursiveCall)
|
||||||
], Module).
|
], Module).
|
||||||
|
:- unhide('$translate_rule').
|
||||||
% stolen from SWI-Prolog
|
% stolen from SWI-Prolog
|
||||||
user:goal_expansion(phrase(NT,Xs), Mod, NTXsNil) :-
|
user:goal_expansion(phrase(NT,Xs), Mod, NTXsNil) :-
|
||||||
user:goal_expansion(phrase(NT,Xs,[]), Mod, NTXsNil).
|
user:goal_expansion(phrase(NT,Xs,[]), Mod, NTXsNil).
|
||||||
@ -418,6 +420,7 @@ user:goal_expansion(phrase(NT,Xs0,Xs), _Mod, NewGoal) :-
|
|||||||
NewGoal = NewGoal1
|
NewGoal = NewGoal1
|
||||||
; ( Xs0 = Xs0c, NewGoal1 ) = NewGoal
|
; ( Xs0 = Xs0c, NewGoal1 ) = NewGoal
|
||||||
).
|
).
|
||||||
|
:- hide('$translate_rule').
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%
|
||||||
% utilities
|
% utilities
|
||||||
|
Reference in New Issue
Block a user