bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Literal quote character causes exception.


From: Nicolas Pelletier
Subject: Re: Literal quote character causes exception.
Date: Tue, 6 Oct 2009 21:18:17 +0900

Hello,

On Tue, Oct 6, 2009 at 19:46, Daniel Diaz <address@hidden> wrote:
>
> after looking carefully at the ISO standard, there is no bug here. ISO says
> the syntax is:
>
> 0'<single quoted char>
>
> where <single quoted char> is a character that could appear in a quoted
> string. So if you want to use ' inside either you have to write it twice
> ('') or to escape it \'
>
> You should use one of the valid forms: 0''' or 0'\'

I see... Yes, on re-reading, I was wrong.

> I agree the result is not very nice...
> In 1.3.2 I will relax the lexer to also accept 0'' (to remain compatible
> with other Prolog systems).

Thank you. Compatibility is indeed how I ran into this case: Logtalk
includes in its contributions directory a XML parser, which loaded
fine when used over SWI Prolog, but failed to load when user over GNU
Prolog. Running further tests now with XSB shows there are varying
interpretations on what the standard says...

Regards,

-- 
Nicolas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]