Date: Mon, 12 Jan 2004 13:39:51 -0500 From: Charles Swiger <cswiger@mac.com> To: Philip Schulz <ph.schulz@gmx.de> Cc: questions@freebsd.org Subject: Re: [OT] Configuration file parsing Message-ID: <B4FA0D92-452E-11D8-A7A0-003065ABFD92@mac.com> In-Reply-To: <21321.1073904325@www46.gmx.net> References: <21321.1073904325@www46.gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 12, 2004, at 5:45 AM, Philip Schulz wrote: > I'm currently working on a program which will be used in a closed > company > environment. The programm is written in C. For this program, I need to > find > a way of parsing a configuration file. I found a library which can do > exactly what I need, it's GLib's lexical scanner [1]. What are your requirements for this configuation file? Something that deals with "classic" Unix config files (ie, along the lines of /etc/rc.conf and the like), with #-style comments and simple key-value assignment should only take a few hours to whip up, if you can't use GLib or other GPL'ed code for your circumstances. If you need something fancier, consider lex and yacc (or flex & bison), but XML property lists are another alternative that might be more flexible. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B4FA0D92-452E-11D8-A7A0-003065ABFD92>