fix regression: checking for EOT should first peek, and if happy consume the blank after the dot.

This commit is contained in:
Vítor Santos Costa
2016-02-18 22:10:40 +00:00
parent 091be7677a
commit ad91eb0ec9
5 changed files with 28 additions and 8 deletions

View File

@@ -1745,6 +1745,8 @@ TokEntry *Yap_tokenizer(struct stream_desc *inp_stream, bool store_comments,
if (ch == '.' && (pch = Yap_peek(inp_stream - GLOBAL_Stream)) &&
(chtype(pch) == BS || chtype(pch) == EF || pch == '%')) {
t->Tok = Ord(kind = eot_tok);
// consume...
ch = getchr(inp_stream);
if (chtype(ch) == EF) {
mark_eof(inp_stream);
t->TokInfo = TermEof;