c-lex.c: Sync with C++ frontend.
authorJason Merrill <jason@gcc.gnu.org>
Wed, 4 Aug 1999 19:55:31 +0000 (15:55 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 4 Aug 1999 19:55:31 +0000 (15:55 -0400)
commitfbb186135db4c9918e5f6cb0d8b5c5279ed356d8
tree0b909457c993dd96ebfd9fdf0ee4b221030ae739
parent825b4dde6b73d6405ab663d6a05de723b0678151
c-lex.c: Sync with C++ frontend.

* c-lex.c: Sync with C++ frontend.
(linemode): New variable.
(parse_float): imag, conversion_errno, and type are output only.
(yylex): Adjust.  Move initial '.' case into main switch.
Use linemode.
(handle_generic_pragma): Just deal with tokens.
(readescape): Use ISXDIGIT and ISGRAPH.
* c-parse.in: Add END_OF_LINE token.

* c-lex.c (lang_init): Generalize.
(nextchar): Remove.  Replace uses with UNGETC.
(skip_white_space): Handle linemode here.  Optimize for cpplib.
(skip_white_space_on_line): Remove.
(extend_token_buffer_to): New fn.
(extend_token_buffer): Use it.
(read_line_number, check_newline): Just deal with tokens.
(token_getch, token_put_back): New fns.
(yylex): Use them.  More cpplib optimizations.  Simplify.

* c-lex.c (init_parse): Set cpp_token to CPP_DIRECTIVE.
(consume_string): Make this smart about USE_CPPLIB.
(check_newline): Rewrite to be intelligent about USE_CPPLIB.
(yylex): Rewrite to be intelligent about USE_CPPLIB.
Also, clean up cases where we redundantly set token_buffer[0].
(read_line_number): New fn.
(ignore_escape_flag): New variable.

From-SVN: r28507
gcc/ChangeLog
gcc/c-lex.c
gcc/c-parse.c
gcc/c-parse.h
gcc/c-parse.in
gcc/c-parse.y