Opag, which stands for "Option Parser Generator", is a program to generate C or C++ code which parses command line options. It takes as input a description of the command line options you want your program to support. The output is a C or C++ function which finds these options in an array of strings (typically "argv", the second parameter of the "main" function) and sets variables accordingly. Short (single character) as well as long (GNU style) options are supported. It is also possbile to associate a help string with each option. Opag uses these to create a macro which expands to a string containing a nicely formatted description of the options.