Path: ...!weretis.net!feeder9.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock Newsgroups: comp.lang.prolog Subject: Re: DCG restrictions on the left-hand side [Novacore] Date: Tue, 30 Jul 2024 20:43:44 +0200 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 30 Jul 2024 18:43:45 -0000 (UTC) Injection-Info: solani.org; logging-data="614035"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.2 Cancel-Lock: sha1:+jLeMoby7XI3H4g3jeYRAlmLU2M= In-Reply-To: X-User-ID: eJwNyMEBwCAIA8CVTIUg41Qg+4/Q3vN8E6wwOs3lar04thcATUQVWT12p9Y+UDxjcUhE32sx2ZxHf6kwmZ4fXhwVsw== Bytes: 1697 Lines: 31 In Novacore we are lucky, its a side effect of phrase translating the head and a multi-file check: ?- [user]. p;q --> r. Fehler: Kann Prädikat ;/2 nicht umdefinieren, nicht als Mehrdateien markiert. But might work out differently if a DCG is expanded and asserted. Ok, its actually not so bad: ?- expand_term((p;q --> r), X), assertz(X). Fehler: Kann Prädikat ;/2 nicht aktualisieren. user auf 1 Mild Shock schrieb: > Guess how many newer Prolog systems allow this here: > > ?- [user]. > p;q --> r. >    true. > > On the other hand SWI-Prolog disallows it: > > ?- [user]. > p;q --> r. > > ERROR: user://1:29: > ERROR:    No permission to define dcg_nonterminal `p;q'