This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ideas for cpplib
- To: Zack Weinberg <zack at rabi dot columbia dot edu>
- Subject: Re: ideas for cpplib
- From: Per Bothner <bothner at cygnus dot com>
- Date: Tue, 13 Oct 1998 22:19:21 -0700
- cc: egcs at cygnus dot com
> A question - is #import supposed to block that file from both future
> #imports and #includes (as if you had a pragma once or a guard ifdef)
> or just #import?
I don't know. (I don't much care, either ...)
> Something along these lines could work. However, I'm fairly certain
> that the overhead of trying to do comments and backslash-newline at
> the same time as macro and directive parsing is bad enough that it's
> worth messing with the input buffer over.
One idea is that you would have an invariant that any characters
between cur and rlimit are "clean" and do not include backslashes,
comments, trigraphs, or CR/NL. When cur==rlimit, GET will call
a function to ge the next character; this function will handle
the processing of the complicated characters, and either leave cur
pointing at the next regular character, or set rlimit==cur.
--Per Bothner
Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner