diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-25 20:31:31 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-29 21:53:16 -0400 |
commit | e6234f0793c3e7d9978831d884d420a5dbb5bfb1 (patch) | |
tree | 41b44541d08f448ba5e3ebaadb46b0ce288c317c /pc.l | |
parent | d6b038578577f7c0f4eeb95e35e6a2113e6d9732 (diff) |
Add io functions to base scope
Diffstat (limited to 'pc.l')
-rw-r--r-- | pc.l | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -34,6 +34,22 @@ id [A-Za-z][A-Za-z0-9_]* return PROG; } +input { + node *tmp; + tmp = scope_insert(cur_scope, "write"); + tmp->func_info = malloc(sizeof(struct fi)); + + return IO; +} + +output { + node *tmp; + tmp = scope_insert(cur_scope, "read"); + tmp->func_info = malloc(sizeof(struct fi)); + + return IO; +} + "var" { debug_print(VAR, NULL); return VAR; |