in reply to Configuration file parsing?

heh, it seems like every damned post I put on here is touting the greatness of Parse::RecDescent, but yes, i agree with the previous poster 100% that you should look into this, and have Parse::RecDescent generate an automata for you that you can then distribute without having to have your users have Parse::RecDescent.

However, I think it is a little bit more involved than that. The most important thing that I learned in both my compiler class and my programming language theory class in college was that belive it or not, we would ALL be using compiler theory and programming language theory for the rest of our professional lives. The professor made it very clear to us that we needed to understand that things such as UI's and configuration files, were really just a subset of the concept of a programming language, and if we didn't take the rules of proper programming language design into account, our users, and those that maintained our code would curse our names 'till the very end.

If you are at a point whereby you are willing to scrap your current configuration system, then I suggest you do so, and you take a few days to think about a few things. This configuration language, is going to have to be expressive enough for you to accomplsih what you need accomplished, and extensible enough for you to be able to grow it out however it needs to be grown out in the future. Things to take into account are:

if your "meta language" fits all of those, then you will be able to use it for a long time successfully. my second bit of advice is spend some time upfront defining the BNF for it, so that if the enviroment changes, you will always have the formal language defenition to fall back on to create a parser. If you take all of these things into account, and you use the proper modules (i'm telling you, Parse::RecDescent is a gift from whatever god or gods may or may not exist) you should have no problems expanding this into the future.