On Fri, 18 Aug 2000, Gilles Detillieux wrote:
> I don't think YY_CURRENT_BUFFER has the file name. Only the FILE pointer,
> a buffer and some state info. You'd need to have a separate name stack,
> using the same index, to save and pop off any file names. I think the
> initial file name, for the top level config file, get saved and it may
> be accessible by a config.getFileName(), so the conf_lexer.yxx code
> will need to use that for level 0, and put the name on the stack for
> subsequent includes. There isn't a method for setting the file name
> outside the HtConfiguration class, nor do I think there should be (but
> I may be wrong on that point). I'll code it if you'll test it. :-)
Yes, you're right. You don't want to put the names on the stack as it
stands now because then you'll have to "remeber" where you were. So it
puts the current state of the buffer.
I'm always willing to test. But I think it'd be better to put the
*directory* and not the filename into the new stack. It's easy enough to
test if the include filename is relative and adjust the current directory
accordingly. The less directory-path munging we have to do, the better.
(Easier to read, faster and less bug-prone, IMHO.)
So if you write up something you think will work, I'll test it tonight. If
not, I'll try this approach as well.
-Geoff
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.