blob: fb5ce8f47fb7ee4f87561336fa30ed9eb166f9c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <stdio.h>
#include <string.h>
#include "gate.h"
#include "logic.h"
#include "parser.h"
int main(int argc, char **argv) {
char buf[4096];
FILE *fd = stdin;
(void)argc;
(void)argv;
gate_init();
while (NULL != fgets(buf, sizeof(buf), fd)) {
if (parse_line(buf)) {
return 1;
}
}
gate_set_input("a", LOGIC_LOW);
gate_set_input("b", LOGIC_LOW);
gate_update();
gate_dump();
return 0;
}
|