diff --git a/pl/grammar.yap b/pl/grammar.yap index 39775ae31..debb5dc75 100644 --- a/pl/grammar.yap +++ b/pl/grammar.yap @@ -132,9 +132,6 @@ phrase(PhraseDef, WordList) :- phrase(PhraseDef, WordList, []). -phrase(_:[], S, S) :- !. -phrase(_:[H|T], S0, S) :- !, - lists:append([H|T], S, S0). phrase(P, S0, S) :- call(P, S0, S). @@ -142,6 +139,8 @@ phrase(P, S0, S) :- [](S, S). +[](H, T, S0, S) :- lists:append([H|T], S, S0). + '.'(H,T, S0, S) :- lists:append([H|T], S, S0).