diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-11 07:00:12 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-11 07:00:12 +0000 |
commit | 83dcbb5c2cda40183ea0c159c0d5a418b46b3509 (patch) | |
tree | 943c0f0881bcaf2f5425616b1754f072979eb4b6 /gcc/cppinit.c | |
parent | 3dc88cea431f903b55fbc215a99da441f0f827ca (diff) | |
download | gcc-83dcbb5c2cda40183ea0c159c0d5a418b46b3509.tar.gz |
* cpphash.h (struct tokenrun): New.
(struct cpp_context): New member bol.
(struct cpp_reader): New members.
(_cpp_init_tokenrun): New.
* cppinit.c (cpp_create_reader): Set up the token runs.
* cpplex.c (lex_directive, lex_token, next_tokenrun): New.
(lex_token): New internalised version of _cpp_lex_token. Don't
handle directives or the multiple include opimisation here any
more. Simply lex a token.
* cpplib.c (run_directive): Clear bol.
(_cpp_pop_buffer): Set bol.
* cppmacro.c (funlike_invocation_p): Keep tokens whilst parsing
arguments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 8b8f56979ab..8029746bab1 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -511,6 +511,12 @@ cpp_create_reader (table, lang) /* Indicate date and time not yet calculated. */ pfile->date.type = CPP_EOF; + /* Create a token buffer for the lexer. */ + _cpp_init_tokenrun (&pfile->base_run, 250); + pfile->cur_run = &pfile->base_run; + pfile->cur_token = pfile->base_run.base; + pfile->state.bol = 1; + /* Initialise the base context. */ pfile->context = &pfile->base_context; pfile->base_context.macro = 0; |