diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-13 19:34:53 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-13 19:34:53 +0000 |
commit | 10a1fc0bc485cb0ac20aff586182a66932d3be64 (patch) | |
tree | f254672190f29738d34a6db9078388456efb4dac /c_compiler/src/c_parser.y | |
parent | 8d3db310926c414d199fca62f0c349a263543096 (diff) | |
download | Compiler-10a1fc0bc485cb0ac20aff586182a66932d3be64.tar.gz Compiler-10a1fc0bc485cb0ac20aff586182a66932d3be64.zip |
Reformatted and working
Diffstat (limited to 'c_compiler/src/c_parser.y')
-rw-r--r-- | c_compiler/src/c_parser.y | 3 |
1 files changed, 2 insertions, 1 deletions
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;} ; |