]> Repositorios git - scryer-prolog.git/commitdiff
offset variable indexing for semi-context notations
authorMark Thom <[email protected]>
Mon, 19 Nov 2018 04:51:53 +0000 (21:51 -0700)
committerMark Thom <[email protected]>
Mon, 19 Nov 2018 04:51:53 +0000 (21:51 -0700)
src/prolog/lib/dcgs.pl

index d92e6d2bfe80ee6ee83f110c743431a7b3dad5dd..6f3e092f95f11597bd9793bfd60b047c3a18c57e 100644 (file)
@@ -34,7 +34,7 @@ expand_dcgs(Term0, N, (ModHead :- ModBody)) :-
     append(Args, ['$VAR'(N), SemiContextArgs], ModArgs),
     ModHead =.. [RuleName | ModArgs],
     nonvar(Body),
-    expand_body(Body, ModBody, 0, N1).
+    expand_body(Body, ModBody, N, N1).
 expand_dcgs(Term0, N, (ModHead :- ModBody)) :-
     nonvar(Term0),
     Term0 = (Head --> Body),