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