4 ms·
I've used http://docopt.org/ http://docopt.org/ in the past for a toy project. It's an interesting concept where you define the command line "help" syntax and
by chli 6y ago
I've used http://docopt.org/ http://docopt.org/ in the past for a toy project.
It's an interesting concept where you define the command line "help" syntax and it generates an arguments structure and an associated parser. I've used the C version, I believe the C++ version is better maintained.
- thechao 6y agoDocopt is great until you start digging in and discover the author doesn't have the first clue about parsing. I don't mean in the sense of "weird opinions about recursive descent", but in the literal sense of "has no idea what parsing is or means". The internal implementation is a gigantic clusterfuck of the worst sort of poorly constructed, unmaintainable code you could imagine. I maintain two ports of docopt and I'm telling you not to use it.