diff options
author | pacien | 2018-06-06 15:03:36 +0200 |
---|---|---|
committer | pacien | 2018-06-06 15:03:36 +0200 |
commit | 52cd016f5604555c04337f26e947ae32b8ee41b4 (patch) | |
tree | e27cb8eb9a44abf25bd1f3b48a1019e605a4b036 /src | |
parent | 00b8cb6be126d6cfeacf932b5595df9824cdf412 (diff) | |
download | tpc-compiler-52cd016f5604555c04337f26e947ae32b8ee41b4.tar.gz |
fix bss flag
Diffstat (limited to 'src')
-rw-r--r-- | src/generator.c | 2 | ||||
-rw-r--r-- | src/tpc.y | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/generator.c b/src/generator.c index 553161a..e4b79e3 100644 --- a/src/generator.c +++ b/src/generator.c | |||
@@ -13,7 +13,7 @@ void gen_prologue() { | |||
13 | } | 13 | } |
14 | 14 | ||
15 | void gen_prologue_continue(bool *bss_done) { | 15 | void gen_prologue_continue(bool *bss_done) { |
16 | if (!*bss_done) return; | 16 | if (*bss_done) return; |
17 | 17 | ||
18 | fprintf(output, "format_int db \"%%d\",10,0\n"); | 18 | fprintf(output, "format_int db \"%%d\",10,0\n"); |
19 | fprintf(output, "format_char db \"%%c\",10,0\n"); | 19 | fprintf(output, "format_char db \"%%c\",10,0\n"); |
@@ -181,8 +181,8 @@ F: | |||
181 | | IDENT '(' Arguments ')' { $$ = gen_function_call($<ident>1, $<num>3); } | 181 | | IDENT '(' Arguments ')' { $$ = gen_function_call($<ident>1, $<num>3); } |
182 | ; | 182 | ; |
183 | LValue: | 183 | LValue: |
184 | IDENT { gen_check($<ident>1, scope); strcpy($$, $1);} | 184 | IDENT { gen_check($<ident>1, scope); strcpy($$, $1); } |
185 | | IDENT '[' Exp ']' { gen_check($<ident>1, scope); strcpy($$, $1);} | 185 | | IDENT '[' Exp ']' { gen_check($<ident>1, scope); strcpy($$, $1); } |
186 | ; | 186 | ; |
187 | Arguments: | 187 | Arguments: |
188 | ListExp | 188 | ListExp |