How to write a parser in C?

I need to write a parser for a simple web configuration file. Which functional program would be a good option, ML or Haskell?

  • Please note I am new to both of them.

  • Answer:

    I've found parser combinators in Haskell to be easier than the alternatives in the MLs. But really, don't.  Use Yaml.  Unless your configuration syntax is so onerous that you actually need to hack your own parser, chances are you'd just implement something sorta-like-yaml-but-worse anyway.  At least, that's how it usually goes.

Alec Heller at Quora Visit the source

Was this solution helpful to you?

Other answers

I'm curious about the need to write a parser too. Quite a few people have done stuff like this by writing what are in effect subsets of Python. Just a few assignments, say, with a procedure call.

Bill Bell

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.