Merge branch 'josh_11_7' of gitlab.cs.wallawalla.edu:lustje/language-interpreter-lab into josh_11_7

This commit is contained in:
vel 2024-11-13 17:51:04 -08:00
commit afdc01e5f7
Signed by: velvox
GPG Key ID: 59D9762F674151DF
1 changed files with 10 additions and 8 deletions

View File

@ -114,18 +114,20 @@ op_parm : mathmaticalexpr
| booleanexpr | booleanexpr
| type_expr | type_expr
; ;
term : mathmaticalexpr term : mathmaticalexpr
;
math_op : TOKEN_ADD
| TOKEN_SUB
| TOKEN_MULTIPLY
| TOKEN_DIVIDE
| TOKEN_EXPONENTIAL
; ;
mathmaticalexpr : type_expr mathmaticalexpr : type_expr
| mathmaticalexpr math_op term
| container_expr | container_expr
| type_expr container_expr | type_expr container_expr
| mathmaticalexpr TOKEN_ADD term ;
| mathmaticalexpr TOKEN_SUB term container_expr : TOKEN_LEFT_PARENTHESIS op_parms TOKEN_RIGHT_PARENTHESIS
| mathmaticalexpr TOKEN_MULTIPLY term
| mathmaticalexpr TOKEN_DIVIDE term
| mathmaticalexpr TOKEN_EXPONENTIAL term
;
container_expr : TOKEN_LEFT_PARENTHESIS op_parms_list TOKEN_RIGHT_PARENTHESIS
; ;
booleanexpr : mathmaticalexpr TOKEN_LESS_THAN term booleanexpr : mathmaticalexpr TOKEN_LESS_THAN term
| mathmaticalexpr TOKEN_GREATER_THAN term | mathmaticalexpr TOKEN_GREATER_THAN term