fixed precedence testing
This commit is contained in:
@ -1,3 +1,6 @@
|
||||
/* Syntax Analyzer with Bison (3.8.2) */
|
||||
/* The Translators - Spring 2025 */
|
||||
|
||||
%{
|
||||
#include <stdio.h>
|
||||
#include "../src/symbol_table.c"
|
||||
@ -178,6 +181,7 @@ rec_op :
|
||||
DOT
|
||||
|
||||
expression:
|
||||
|
||||
constant {printf("constant expression\n");}
|
||||
| SUB_OR_NEG expression %prec UMINUS {printf("negative expression\n");}
|
||||
| NOT expression {printf("not expression\n");}
|
||||
@ -193,7 +197,8 @@ expression:
|
||||
| assignable {printf("assignable expression\n");}
|
||||
| L_PAREN expression R_PAREN {printf("paren expression\n");}
|
||||
| memOp assignable
|
||||
;
|
||||
;
|
||||
|
||||
|
||||
ablock:
|
||||
L_PAREN argument_list R_PAREN
|
||||
|
Reference in New Issue
Block a user