According to Geoff Hutchison:
> Last night I found the problem for relative filenames in the config parser.
...
> Now the first two lines and the last line of both of these
> correspond, but it's the rest of the code that's missing. But it was
> getting late, so I didn't have much time to think about how to
> implement the rest.
That's the easy part. What's not clear to me either is the best way to
get the current file name.
> My guess is we'll want to save the filename off
> the top of the stack before we throw it away and then we can pretty
> much just re-use the code. In other words:
>
> at line 115:
> include_stack[include_stack_ptr++] =
> YY_CURRENT_BUFFER;
>
> Here we grab include_stack[include_stack_ptr] *before* we increment
> the pointer and do our directory munging.
>
> If someone gets to it, great. If not, I'll try to work on it tonight.
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. :-)
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.