#include #include "kalmia.h" int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "You must specify a file to parse!\n"); return -1; } FILE *in = fopen(argv[1], "r"); if (in == NULL) { fprintf(stderr, "Could not open file \"%s\"\n", argv[1]); return -1; } yyscan_t scanner; kalmialex_init(&scanner); kalmiaset_in(in, scanner); kalmiaparse(scanner); kalmialex_destroy(scanner); return 0; }