fix .%
This commit is contained in:
parent
9d0722bf2f
commit
f039a5d688
@ -1730,13 +1730,13 @@ TokEntry *Yap_tokenizer(struct stream_desc *inp_stream, bool store_comments,
|
|||||||
(chtype(pch) == BS || chtype(pch) == EF || pch == '%')) {
|
(chtype(pch) == BS || chtype(pch) == EF || pch == '%')) {
|
||||||
t->Tok = Ord(kind = eot_tok);
|
t->Tok = Ord(kind = eot_tok);
|
||||||
// consume...
|
// consume...
|
||||||
|
if (ch == '%')
|
||||||
|
return l;
|
||||||
ch = getchr(inp_stream);
|
ch = getchr(inp_stream);
|
||||||
if (chtype(ch) == EF) {
|
if (chtype(ch) == EF) {
|
||||||
mark_eof(inp_stream);
|
mark_eof(inp_stream);
|
||||||
t->TokInfo = TermEof;
|
t->TokInfo = TermEof;
|
||||||
} else {
|
} else {
|
||||||
if (ch == '%')
|
|
||||||
continue;
|
|
||||||
t->TokInfo = TermNewLine;
|
t->TokInfo = TermNewLine;
|
||||||
}
|
}
|
||||||
return l;
|
return l;
|
||||||
@ -1748,6 +1748,8 @@ TokEntry *Yap_tokenizer(struct stream_desc *inp_stream, bool store_comments,
|
|||||||
if (och == '.') {
|
if (och == '.') {
|
||||||
if (chtype(ch) == BS || chtype(ch) == EF || ch == '%') {
|
if (chtype(ch) == BS || chtype(ch) == EF || ch == '%') {
|
||||||
t->Tok = Ord(kind = eot_tok);
|
t->Tok = Ord(kind = eot_tok);
|
||||||
|
if (ch == '%')
|
||||||
|
return l;
|
||||||
if (chtype(ch) == EF) {
|
if (chtype(ch) == EF) {
|
||||||
mark_eof(inp_stream);
|
mark_eof(inp_stream);
|
||||||
t->TokInfo = TermEof;
|
t->TokInfo = TermEof;
|
||||||
|
Reference in New Issue
Block a user