From f039a5d68811acd4c3fbc88a4e3c98cd7365cb8d Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 26 Apr 2016 15:26:35 +0100 Subject: [PATCH] fix .% --- C/scanner.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C/scanner.c b/C/scanner.c index 6fc84ae25..4aab7521f 100755 --- a/C/scanner.c +++ b/C/scanner.c @@ -1730,13 +1730,13 @@ TokEntry *Yap_tokenizer(struct stream_desc *inp_stream, bool store_comments, (chtype(pch) == BS || chtype(pch) == EF || pch == '%')) { t->Tok = Ord(kind = eot_tok); // consume... + if (ch == '%') + return l; ch = getchr(inp_stream); if (chtype(ch) == EF) { mark_eof(inp_stream); t->TokInfo = TermEof; } else { - if (ch == '%') - continue; t->TokInfo = TermNewLine; } return l; @@ -1748,6 +1748,8 @@ TokEntry *Yap_tokenizer(struct stream_desc *inp_stream, bool store_comments, if (och == '.') { if (chtype(ch) == BS || chtype(ch) == EF || ch == '%') { t->Tok = Ord(kind = eot_tok); + if (ch == '%') + return l; if (chtype(ch) == EF) { mark_eof(inp_stream); t->TokInfo = TermEof;