Another cleanup possibility - parser
Eric S. Raymond
esr at thyrsus.com
Fri Jan 27 15:43:31 UTC 2017
Hal Murray <hmurray at megapathdsl.net>:
>
> The current config file parser is 2 passes. The first pass collects the info
> in memory. The second pass does the work. I think that structure is
> leftover from when it could write out the config file, but that was removed a
> long time ago.
>
> If we can't write it out, there is no need for a parsed copy in memory. I'll
> bet a lot of stuff can be simplified if the in-memory copy is eliminated.
>
> Another quirk with the two passes is that the order and timing differs from
> what you would probably expect.
You may be right, but this is a can of worms I am not yet wiilling to
open.
I'm not even sure abandoning the parse-tree approach would lead to
simpler code - it does have some advantages in terms of being able to
group together the processing of options that are syntactically
related.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the devel
mailing list