#include #include //#include "gate.h" //#include "logic.h" #include "lex.h" #include "parse.h" int main(int argc, char **argv) { FILE *fd = NULL; if (argc != 2) { fprintf(stderr, "Syntax: %s file.hence\n", argv[0]); return 1; } // gate_init(); fd = fopen(argv[1], "r"); if (!fd) { perror("fopen"); return 1; } struct token *tok = lex_file(argv[1], fd); if (!tok) { return 1; } int p = parse(argv[1], fd, tok); // gate_set_input("a", LOGIC_LOW); // gate_set_input("b", LOGIC_LOW); // gate_update(); // gate_dump(); return p; }