| regex is overkill if there are only simple tags or equals signs to parse. But there will not be any speed penalty that you would ever notice, even for complex expressions and large files. Think how fast you can grep for some word in zillions of files -- regex at work.
Regards,
Mike
----- Original Message -----
From: "Iain Duncan"
To:
Sent: Sunday, February 12, 2006 3:29 PM
Subject: Re: [Cs-dev] Config file parsing?
>
>> My confusion, I thought you meant command line not configuration file.
>
> No worries, it was worth looking at anyway. ;)
>
>> The boost program_options library handles configuration files as well as command lines.
>>
>> The csound5/frontends/CsoundVST/CsoundFile.cpp file has examples of parsing CSD files, by reading a line at a time and looking for tags. It would be easy to adapt this to looking for equals signs.
>
> I was thinking of doing much the same thing using the boost regex
> library, is that a bad idea? Is it overkill? It seems the natural way
> for me just because that's what I'm used to using with python, but
> perhaps it will be needlessly slow.
>
> Thanks for the tip,
> Iain
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |