Fix precedence bugs, test on homework

This commit is contained in:
Jan-Niclas Loosen
2025-12-09 19:58:11 +01:00
parent 4e6f93b353
commit b3e20a52eb
6 changed files with 122 additions and 38 deletions

View File

@@ -6,10 +6,10 @@ import ply.yacc as yacc
import compiler as ast
from triplalex import tokens
# Operator precedence
precedence = (
('left', 'SEMICOLON'),
('right', 'IN'),
('left', 'SEMICOLON'),
('right', 'ASSIGN'),
('left', 'COMP'),
('left', 'EQOP'),
('left', 'AOP'),