diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-28 21:13:35 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-28 21:13:35 +0000 |
commit | 9751c00e176f73ca4a921e9b9b15486d875da475 (patch) | |
tree | e48c58ce615d53fe8e02183447bad8c0843a2462 /gcc/c-lex.c | |
parent | f23abae55e71b922f87e25034768ad92d2cefcff (diff) | |
download | gcc-9751c00e176f73ca4a921e9b9b15486d875da475.tar.gz |
* c-lex.h (parse_in): Change parse_in to a cpp_reader *.
* c-decl.c (c_decode_option): Update to match.
* c-lex.c (init_c_lex, yyparse): Update to match.
* c-lang.c (lang_init_options): Use cpp_create_reader.
* cppinit.c (cpp_init): Rename initialize.
(cpp_reader_init): Rename cpp_create_reader. Create the
reader. Initialize cpplib if appropriate.
* cpplib.h (cpp_create_reader) New prototype.
(cpp_init, cpp_reader_init): Delete prototypes.
* cppmain.c (general_init, setup_callbacks): New functions.
(main): Use them.
* fix-header.c (scan_in): Change type to cpp_reader *.
(read_scan_file): Update for new cpplib interface and scan_in type.
* cp/decl.c (parse_in): Change to cpp_reader *.
(lang_decode_option): Update.
* cp/lex.c (lang_init_options): Use new cpplib interface.
(init_cp_pragma, finish_parse, handle_pragma_implementation): Update.
* cp/spew.c (read_token): Update.
* objc/objc-act.c (lang_init_options): Update new cpplib interface.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37826 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 959b10331b5..c76d86c3d46 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -122,12 +122,12 @@ init_c_lex (filename) GET_ENVIRONMENT (literal_codeset, "LANG"); #endif - parse_in.cb.ident = cb_ident; - parse_in.cb.change_file = cb_change_file; - parse_in.cb.def_pragma = cb_def_pragma; + parse_in->cb.ident = cb_ident; + parse_in->cb.change_file = cb_change_file; + parse_in->cb.def_pragma = cb_def_pragma; - /* Make sure parse_in.digraphs matches flag_digraphs. */ - CPP_OPTION (&parse_in, digraphs) = flag_digraphs; + /* Make sure parse_in->digraphs matches flag_digraphs. */ + CPP_OPTION (parse_in, digraphs) = flag_digraphs; if (filename == 0 || !strcmp (filename, "-")) filename = "stdin"; @@ -145,7 +145,7 @@ init_c_lex (filename) int yyparse() { - if (! cpp_start_read (&parse_in, orig_filename)) + if (! cpp_start_read (parse_in, orig_filename)) return 1; /* cpplib has emitted an error. */ return yyparse_1(); @@ -951,13 +951,13 @@ c_lex (value) retry: timevar_push (TV_CPP); - cpp_get_token (&parse_in, &tok); + cpp_get_token (parse_in, &tok); timevar_pop (TV_CPP); /* The C++ front end does horrible things with the current line number. To ensure an accurate line number, we must reset it every time we return a token. */ - lex_lineno = cpp_get_line (&parse_in)->line; + lex_lineno = cpp_get_line (parse_in)->line; *value = NULL_TREE; lineno = lex_lineno; |