From 10a1fc0bc485cb0ac20aff586182a66932d3be64 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 13 Mar 2017 19:34:53 +0000 Subject: Reformatted and working --- c_compiler/src/c_parser.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'c_compiler/src/c_parser.y') diff --git a/c_compiler/src/c_parser.y b/c_compiler/src/c_parser.y index e87f8f7..ea21879 100644 --- a/c_compiler/src/c_parser.y +++ b/c_compiler/src/c_parser.y @@ -100,7 +100,8 @@ FunctionDefinition: DeclarationSpec T_IDENTIFIER T_LRB ParameterList T_RRB CompoundStatement { $$ = new Function(*$2, $4, $6); delete $2; } ; -ParameterList:% empty { $$ = new Declaration(); } +ParameterList: + %empty { $$ = new Declaration(); } | Parameter { $$ = $1; } | ParameterList T_CMA Parameter { $3->linkDeclaration($$); $$ = $3;} ; -- cgit