Re: back quote as an operator

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 12/21/2013 12:23 AM, Abdallah, Samer wrote:
> I was too quick to write -- I've now found the --tradtional flag and all is well.
> Except the DCG problem from my other post…

Long term reliance on the --traditional flag is not very likely to be
a good idea.  The first option should be to get rid of ` as a symbol
because (AFAIK), ISO defines that `...` is quoted material (but doesn't
give a meaning to it).

The flag has become module-aware to make it possible for modules with
different ideas to co-exist in the same program.  The module declaration
can be made independent using op(150, yfx, '`').  The usage can enabled
inside a module using the flag.  Not ideal, but given the status wrt.
ISO, I think it is acceptable.  Of course, if you see a better compromise,
please suggest.

	--- Jan


> 
> Samer
> 
> 
> On 20 Dec 2013, at 22:11, "Abdallah, Samer" <[email protected]>
>  wrote:
> 
>> Hello,
>> I've just tried installing version 7 and have hit a problem because
>> of the new meaning of back quotes to mean a list of character codes.
>> I have a module who's sole purpose is to export some operators, including
>> back quote as a unary operator, like this:
>>
>> module(ops, [
>> 	% …..
>> 	,	op(150,yfx,`)
>> 	% ….
>> 	]).
>>
>> I've worked how out to put
>> 	:- set_prolog_flag( back_quotes, symbol_char).
>>
>> in my .plrc, and so loading module ops from the top level works fine.
>> However, if I try to use module ops from within some other module,
>> I get the error "string to long" because SWIPL goes back to interpreting
>> back quotes as a string delimiter.
>>
>> How can I get back to the old behaviour?
>>
>> thanks,
>> Samer.
>>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: signature.asc
>> Type: application/pgp-signature
>> Size: 495 bytes
>> Desc: Message signed with OpenPGP using GPGMail
>> URL: <https://lists.iai.uni-bonn.de/pipermail/swi-prolog/attachments/20131220/aeba2320/attachment.bin>
>> _______________________________________________
>> SWI-Prolog mailing list
>> [email protected]
>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>>
> 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 495 bytes
> Desc: Message signed with OpenPGP using GPGMail
> URL: <https://lists.iai.uni-bonn.de/pipermail/swi-prolog/attachments/20131220/9cb1262d/attachment.bin>
> _______________________________________________
> 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.