Why does this not work?
David W. Hankins
David_Hankins at isc.org
Tue Feb 24 17:25:11 UTC 2009
On Mon, Feb 23, 2009 at 07:24:30PM -0600, David McGaughey wrote:
> If I replace the include with the contents of the file, it works perfectly.
Unfortunately, 'include' is processed by the PARSER, not the LEXER.
This is like programmer legalese to most folks, so the point is that
the file is read like "a second config file", the same function
creates a new parser instance, which attaches a new lexer instance,
which opens the named file and starts reading lexicons on behalf
of the parser, which is reading those as if from the global root
So no matter where 'include' appears in the config file, it always
behaves as though the file's contents were entered in the global
We should probably make it illegal or warn when the include isn't
written in the global scope, but it's almost as much work as just
fixing it so the lexer can process the statement like you'd expect.
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins
More information about the dhcp-users