Hacker News new | past | comments | ask | show | jobs | submit login

Not sure why you were downvoted. This is the way to go IMO. Declare your options like writing a man page. Let docopt generate your option handling code. There is an implementation for C. https://github.com/docopt/docopt.c



That's a generator for docopt parsers, written in python, targeting C. The closest docopt (variant) in C that I know of is the one I wrote: https://github.com/jaroslov/docoptc . Although, at best, I'd say that code is "looking for a maintainer".


There is a decent C++ one. What's wrong with the C people? Heck, they live and die by parsers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: