Andy Smith <andy-newsstrugglers.net> writes:
Maybe libtc can be of some use. It has a config file pr with a> Right now I have a project that has a "bind-style" config file that is
> pd with the aid of flex and bison. It looks a bit like this:
> Then the pr produced by bison reads the config file and fills in each
> section's structure with the relevant values.
> All well and good, but now I come to a stage where I want to add module
> functionality to this software, and some of the modules I wish to write may
> extend the config file syntax.
> I'm very new to bison (yacc) and I don't really understand how I might
> achieve this, since the syntax of my config file seems to need to be
> defined at compile-time whereas modules are obviously a run-time thing.
> Might anyone have any tips?
similar syntax. The pr will accept any names of keys and reads
the entire file into memory. Then you use some functions to extract
the information you want. The drawback is that you won't catch
spelling errors and the like.