Re: phrase/3 predicate

Josef Frydl <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Now, Rem is built and let say   Rem ="123", if I say phrase(Rem, "1234", _) it  does not succeeds , but if I paste the Rem value in it works


?- phrase("123", "1234", _).
true.

?- A = "123",phrase(A,"1234",_).
A = [49, 50, 51].
ends there

or
phrase(Rem, "1      2   3  4",[]).
false.


Aug 29, 2013, at 5:11 PM, Feliks Kluzniak wrote:

> Offline:
> 
> Do you mean that Rem is uninstantiated, i.e., you are using it in a query different from the one that computes Rem?
> 
> That is most likely not the case, so please be more explicit in your question.
> 
> -- F.
> 
> 
> On Aug 29, 2013, at 23:04, Josef Frydl <[email protected]> wrote:
> 
>> Can you please tell me how I can use the  phrase predicate in dynamically created grammar?
>> 
>> phrase(Rem, <things to be parsed>,[]). does not work, but if I paste the value of Rem manually it works,
>> 
>> Thanks Josef Frydl
>> _______________________________________________
>> SWI-Prolog mailing list
>> [email protected]
>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.