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.y | |
parent | d6b038578577f7c0f4eeb95e35e6a2113e6d9732 (diff) |
Add io functions to base scope
Diffstat (limited to 'pc.y')
-rw-r--r-- | pc.y | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -26,6 +26,7 @@ extern scope *cur_scope; } %token PROG +%token IO %token VAR %token PROC FUNC %token BEG END @@ -94,7 +95,7 @@ extern scope *cur_scope; %% program - :PROG ID '(' id_list ')' ';' + :PROG ID '(' io_list ')' ';' var_declarations sub_prog_declarations compound_statement @@ -105,7 +106,6 @@ program print_tree($9); #endif free_tree($9); - free_tree($4); #ifdef DEBUG print_scope(cur_scope); #endif @@ -113,6 +113,11 @@ program } ; +io_list + :IO + |io_list ',' IO +; + id_list :ID { |