Commit 480709cc by Neil Booth Committed by Neil Booth

cpphash.h (struct cpp_buffer): Delete read_ahead and extra_char.

	* cpphash.h (struct cpp_buffer): Delete read_ahead and extra_char.
	* cpplex.c (lex_percent, lex_dot): Remove.
	(get_effective_char, skip_block_comment, skip_line_comment,
	parse_identifier_slow, parse_number, parse_string, save_comment,
	_cpp_lex_direct): Update to do lookback freely.
	(IF_NEXT_IS, BACKUP): New macros.
	* cpplib.c (cpp_push_buffer): Don't set read_ahead and extra_char.
	* cppmacro.c (paste_tokens): Update.

From-SVN: r46392
parent 28d8dc3a
2001-10-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cpphash.h (struct cpp_buffer): Delete read_ahead and extra_char.
* cpplex.c (lex_percent, lex_dot): Remove.
(get_effective_char, skip_block_comment, skip_line_comment,
parse_identifier_slow, parse_number, parse_string, save_comment,
_cpp_lex_direct): Update to do lookback freely.
(IF_NEXT_IS, BACKUP): New macros.
* cpplib.c (cpp_push_buffer): Don't set read_ahead and extra_char.
* cppmacro.c (paste_tokens): Update.
2001-10-20 Nick Clifton <nickc@cambridge.redhat.com>
* doc/invoke.texi (i386 and x86-64 Options): Fix typo.
......
......@@ -171,10 +171,9 @@ struct spec_nodes
struct cpp_buffer
{
const unsigned char *cur; /* current position */
const unsigned char *backup_to; /* if peeked character is not wanted */
const unsigned char *rlimit; /* end of valid data */
const unsigned char *line_base; /* start of current line */
cppchar_t read_ahead; /* read ahead character */
cppchar_t extra_char; /* extra read-ahead for long tokens. */
struct cpp_buffer *prev;
......
......@@ -1784,10 +1784,6 @@ cpp_push_buffer (pfile, buffer, len, from_stage3, return_at_eof)
new->line_base = new->buf = new->cur = buffer;
new->rlimit = buffer + len;
/* No read ahead or extra char initially. */
new->read_ahead = EOF;
new->extra_char = EOF;
new->from_stage3 = from_stage3;
new->prev = pfile->buffer;
new->return_at_eof = return_at_eof;
......
......@@ -392,8 +392,7 @@ paste_tokens (pfile, plhs, rhs)
/* Set pfile->cur_token as required by _cpp_lex_direct. */
pfile->cur_token = _cpp_temp_token (pfile);
*plhs = _cpp_lex_direct (pfile);
valid = (pfile->buffer->cur == pfile->buffer->rlimit
&& pfile->buffer->read_ahead == EOF);
valid = pfile->buffer->cur == pfile->buffer->rlimit;
_cpp_pop_buffer (pfile);
return valid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment