I'm working on a project that requires me to read, and parse, the htdig.conf file in PHP. Although PHP has pretty good Regular Expression capabilities, I can't quite seem to find the pattern that converts the .conf file into an array of parameters and their values. Can anyone point me to where in the htdig code this parsing takes place? I've looked in a couple different
For the older version, take a look at the Configuration.h/.cc files in htlib. The attributes are parsed out in the Read method.
places and found a reference to something called Bison, but I'm not sure that I'm looking in the right place.
In the 3.2 branch a new parser was introduced. The code now uses HtConfiguration, which extends the Configuration class and overrides the Read method (see the HtConfiguration.h/.cc files in htcommon). The new version relies on flex and bison (GNU's answer to lex and yacc) for generation of the lexer and parser code. This is perhaps more than you want to get into if you are looking to parse a file with PHP ;)
Jim
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ ht://Dig general mailing list: <[EMAIL PROTECTED]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general

