+#include "gmqcc.h"
+
+static const char *output = "progs.dat";
+static const char *input = NULL;
+
+#define OptReq(opt, body) \
+ case opt: \
+ if (argv[0][2]) argarg = argv[0]+2; \
+ else { \
+ if (argc < 2) { \
+ printf("option -%c requires an argument\n", opt); \
+ exit(1); \
+ } \
+ argarg = argv[1]; \
+ --argc; \
+ ++argv; \
+ } \
+ do { body } while (0); \
+ break;
+
+#define LongReq(opt, body) \
+ if (!strcmp(argv[0], opt)) { \
+ if (argc < 2) { \
+ printf("option " opt " requires an argument\n"); \
+ exit(1); \
+ } \
+ argarg = argv[1]; \
+ --argc; \
+ ++argv; \
+ do { body } while (0); \
+ break; \
+ } else if (!strncmp(argv[0], opt "=", sizeof(opt "="))) \
+ { \
+ argarg = argv[0] + sizeof(opt "="); \
+ do { body } while (0); \
+ break; \
+ }
+
+bool parser_compile(const char *filename, const char *datfile);