I am currently designing a DHCPD GUI for my final major project at university but i cant find anything about whats the best language for text file parsing. I am obviously trying to parse the DHCPD.conf file and edit it accordingly.
Thanks!

Recommended Answers

All 10 Replies

For just parsing, it's probably Haskell, using the library Parsec.

Thanks, this is a start for me to look into! I have looked a little into Haskell but the loading times seem to be a bit high, i would settle for a happy medium between speed and text file parsing

Loading times? What are you talking about?

I'm not valueing Perl above Haskell, but you could look into it.

There is no such thing as "best langauge for text file parsing". There are number of langiages which ccould be suitable for example Python or Perl

If you're making a GUI, you should just use what ever language you prefer for writing the GUI. Loading a configuration file like that in just about any language will likely be parsed quicker than you'll even notice.

Python has a very good support for Regular Expressions. It is very fast also.
Microsoft is about to release a new language called "M". Currently, the CTP version is available.It has a support wherein you can define your own grammar and the M language will be able to help you parse the input file based on the grammar defined by you. So you can define the grammar for DHCPD.conf file and parse it very easily.

Perl is supposed to be one for this purpose..
But as someone already pointed out you should use the language selected for rest of your application, unless you really have a huge amount of data to process, in which case you might wanna do it separately using a more efficient tool.

I vote for python too, have used a lot for parsing and simple GUI dev... works like a charm and needs no getting used too, plus support is everywhere on the web...

Snobol is designed specifically for string manipulation

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.