From 9de6b35985271b81110ba0beb2e532b3635a6531 Mon Sep 17 00:00:00 2001 From: John Wickerson Date: Mon, 11 Feb 2019 10:55:05 +0000 Subject: [PATCH] Fix, thanks to Ethan Sarif-Kattan https://github.com/LangProc/langproc-2018-lab/issues/7#issuecomment-460373453 --- 2-parsers/src/maths_parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-parsers/src/maths_parser.y b/2-parsers/src/maths_parser.y index 47584d0..e7cba10 100644 --- a/2-parsers/src/maths_parser.y +++ b/2-parsers/src/maths_parser.y @@ -42,11 +42,11 @@ ROOT : EXPR { g_root = $1; } -/* TODO-3 : Add support for (x+6) and (10-y). You'll need to add production rules, and create an AddOperator or +/* TODO-3 : Add support for (x + 6) and (10 - y). You'll need to add production rules, and create an AddOperator or SubOperator. */ EXPR : TERM { $$ = $1; } -/* TODO-4 : Add support (x*6) and (z/11). */ +/* TODO-4 : Add support (x * 6) and (z / 11). */ TERM : FACTOR { $$ = $1; } /* TODO-2 : Add a rule for variable, base on the pattern of number. */