From be2b855ffef0804f77ae8dbb95b25a6ea529cffe Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 14 Apr 2020 15:58:25 -0700 Subject: [PATCH] Rename inaccurately named rule --- code/compiler/11/parser.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/compiler/11/parser.y b/code/compiler/11/parser.y index 8160358..686e79e 100644 --- a/code/compiler/11/parser.y +++ b/code/compiler/11/parser.y @@ -41,7 +41,7 @@ extern yy::parser::symbol_type yylex(); %type > branches %type > constructors %type > typeList -%type type nullaryType typeListElement +%type type nonArrowType typeListElement %type aAdd aMul case app appBase %type data %type defn @@ -141,11 +141,11 @@ constructor ; type - : nullaryType ARROW type { $$ = parsed_type_ptr(new parsed_type_arr(std::move($1), std::move($3))); } - | nullaryType { $$ = std::move($1); } + : nonArrowType ARROW type { $$ = parsed_type_ptr(new parsed_type_arr(std::move($1), std::move($3))); } + | nonArrowType { $$ = std::move($1); } ; -nullaryType +nonArrowType : UID typeList { $$ = parsed_type_ptr(new parsed_type_app(std::move($1), std::move($2))); } | LID { $$ = parsed_type_ptr(new parsed_type_var(std::move($1))); } | OPAREN type CPAREN { $$ = std::move($2); }