drop comment levels.

This commit is contained in:
Vítor Santos Costa 2012-03-04 15:28:04 +00:00
parent fbe846e74a
commit b02d34e400

View File

@ -602,10 +602,13 @@ raw_read2(ReadData _PL_rd ARG_LD)
discardBuffer(cbuf); discardBuffer(cbuf);
setErrorLocation(pos, _PL_rd); setErrorLocation(pos, _PL_rd);
rawSyntaxError("end_of_file_in_block_comment"); rawSyntaxError("end_of_file_in_block_comment");
#ifndef __YAP_PROLOG__
/* YAP does not support comment levels in original scanner */
case '*': case '*':
if ( last == '/' ) if ( last == '/' )
level++; level++;
break; break;
#endif
case '/': case '/':
if ( last == '*' && if ( last == '*' &&
(--level == 0 || _PL_rd->strictness) ) (--level == 0 || _PL_rd->strictness) )