aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-10-06 13:12:28 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-10-06 14:39:21 -0400
commit563010bc7d2ad932b6096e90c048f8a6cdccef82 (patch)
treee30f9cac2cd28ab3522fb21b74204342b35e3530
parent6524b096a1e38bbb7f0645f410af348211e8349d (diff)
Fix input/output to correct function names
input/output created write/read respectively fixed to read/write.
-rw-r--r--main.c1
-rw-r--r--makefile2
-rw-r--r--pc.l4
3 files changed, 3 insertions, 4 deletions
diff --git a/main.c b/main.c
index 246bfb0..c1de792 100644
--- a/main.c
+++ b/main.c
@@ -148,7 +148,6 @@ ptree *t;
} else if (t->type != LIST) {
return 1;
} else {
- fprintf(stderr, "PTR: %x\n", t);
yyerror("NOT A PARAMETER LIST\n");
}
diff --git a/makefile b/makefile
index ddf089f..a24e21f 100644
--- a/makefile
+++ b/makefile
@@ -1,5 +1,5 @@
CC = gcc
-FLAGS = -g -O0 -Wall -ggdb3
+FLAGS = -g -O0 -Wall -ggdb3 -Wno-parentheses
YACC = yacc
LEX = lex
diff --git a/pc.l b/pc.l
index 229b763..553d495 100644
--- a/pc.l
+++ b/pc.l
@@ -35,7 +35,7 @@ id [A-Za-z][A-Za-z0-9_]*
return PROG;
}
-input {
+output {
node *tmp;
tmp = scope_insert(cur_scope, strdup("write"));
tmp->func_info = malloc(sizeof(struct fi));
@@ -46,7 +46,7 @@ input {
return IO;
}
-output {
+input {
node *tmp;
tmp = scope_insert(cur_scope, strdup("read"));
tmp->func_info = malloc(sizeof(struct fi));