Hi,

it is not a bug, the flag controls back quoted tokens, i.e. surrounded with a backquote ` not a quote '.
So you should use:


| ?- atom_chars(`\'`, CS).

CS = [\,'''']


Daniel


Le 23/05/2013 15:08, Yi Dai a écrit :
Hi,


I am using gprolog 1.4.4.  According to the manual, by default, the flag `back_quotes` is set to ` atom_no_escape`, which means no escape sequence is supported inside back quotes.  But I surprisingly find that it is not the case.  Below is a dialog of an interactive session:


GNU Prolog 1.4.4 (32 bits)
Compiled Apr 29 2013, 20:41:58 with gcc
By Daniel Diaz
Copyright (C) 1999-2013 Daniel Diaz
| ?- current_prolog_flag(back_quotes, X).

X = atom_no_escape

yes
| ?- atom_chars('''', CS).

CS = ['''']

yes
| ?- atom_chars('\'', CS).

CS = ['''']

yes
| ?- atom_chars('\\', CS).

CS = [\]

yes
| ?- atom_chars('\n', CS).

CS = ['\n']

yes
| ?- atom_chars('\''', CS).
uncaught exception: error(syntax_error('user_input:6 (char:23) unexpected newline'),read_term/3)


Apparently escape sequences are still allowed.  How can I disable it?  Note that turning on the flag ` strict_iso` does not help.  Is this a bug?


Regards,


Yi

--
Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé.

_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog


--
Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé.



_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog

Reply via email to