Nicolas,

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 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).

Daniel

Daniel Diaz wrote:
Thanks for this bug report.

Will be fixed

Daniel

Nicolas Pelletier wrote:
Hello,

I found the following behaviour both in GNU Prolog 1.3.1 and GNU
Prolog 20090310, which I believe is incorrect:

nico...@tamago:~/tmp$ gprolog
GNU Prolog 1.3.2
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz
| ?- X = 0''.
uncaught exception: error(syntax_error('user_input:1 (char:8) quote
character expected here'),read_term/3)

I expected the substitution X = 39 as the result of my query. Would
you please look into this problem ?

Thanks in advance.





--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.



_______________________________________________
Bug-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-prolog

Reply via email to