#include "i18n.h" #ifdef TEST #include "logerr.h" #include "catalog.h" #include #endif const char *const MSGS[] = { "", [MSG_USAGE_FIRST]="Usage:\n", [MSG_USAGE_1]=" " NAME_MACRO_STRING " -p FILE [-o DIRECTORY]\n", [MSG_USAGE_2]=" " NAME_MACRO_STRING " -l FILE [-o DIRECTORY]\n", [MSG_USAGE_LAST]=" " NAME_MACRO_STRING " [-hV]\n", [MSG_HELP_FIRST]="\n", [MSG_HELP_1]="\n", [MSG_HELP_2]="Options:\n", [MSG_HELP_3]=" -p FILE parser file to be processed\n", [MSG_HELP_4]=" -l FILE lexer file to be processed\n", [MSG_HELP_5]=" -o DIRECTORY output where to place the\n", [MSG_HELP_6]=" generated files (default .)\n", [MSG_HELP_7]=" -h, --help show this help message\n", [MSG_HELP_8]=" -V, --version print the version number\n", [MSG_HELP_9]="\n", [MSG_HELP_10]="\n", [MSG_HELP_11]="Run the " NAME_MACRO_STRING "(1) parser program.\n", [MSG_HELP_12]="\n", [MSG_HELP_13]="Here is the explanation for what it does, and the synopsis\n", [MSG_HELP_14]="of its usage.\n", [MSG_HELP_15]="\n", [MSG_HELP_16]="See \"man " NAME_MACRO_STRING "\" for usage information and\n", [MSG_HELP_17]="\"man " NAME_MACRO_STRING ".tutorial\" for a beginner introduction.\n", [MSG_HELP_18]="\n", [MSG_HELP_19]="\n", [MSG_HELP_20]="Examples:\n", [MSG_HELP_21]="\n", [MSG_HELP_22]=" Do a one-line parser:\n", [MSG_HELP_23]="\n", [MSG_HELP_24]=" $ " NAME_MACRO_STRING " run md.grammar < README.md\n", [MSG_HELP_25]="\n", [MSG_HELP_26]="\n", [MSG_HELP_27]=" Compile the grammer:\n", [MSG_HELP_28]="\n", [MSG_HELP_LAST]=" $ " NAME_MACRO_STRING " build csv.grammar > dunno.alsodunno\n", [MSG_VERSION]= NAME_MACRO_STRING " " VERSION_MACRO_STRING " " DATE_MACRO_STRING "\n", NULL }; #ifdef TEST int main(void) { int rc = 0; if (getenv("DUMP_TRANSLATABLE_STRINGS")) { if (dump_translatable_strings(MSGS)) { logerr("dump_translatable_strings(MSGS)\n"); rc = -1; goto out; } } out: return !!rc; } #endif