aboutsummaryrefslogtreecommitdiffstats
path: root/c_parser
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-02-17 17:39:59 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-02-17 17:39:59 +0000
commitce93fb7754f4565f70fe5572bd7d4a2c368ea9cd (patch)
treebb2ed7a87ebf13fe47a6392850d99d18bd361249 /c_parser
parent73e70e48560ca6a90ff6854d12fe0be46c825015 (diff)
downloadCompiler-ce93fb7754f4565f70fe5572bd7d4a2c368ea9cd.tar.gz
Compiler-ce93fb7754f4565f70fe5572bd7d4a2c368ea9cd.zip
Added %empty
Diffstat (limited to 'c_parser')
-rw-r--r--c_parser/src/c_parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/c_parser/src/c_parser.y b/c_parser/src/c_parser.y
index 86594aa..bdafa5b 100644
--- a/c_parser/src/c_parser.y
+++ b/c_parser/src/c_parser.y
@@ -52,7 +52,7 @@ EXT_DECLARATION : DECLARATION { $$ = $1; }
FUNC_DEF : DECLARATION_SPEC T_IDENTIFIER T_LRB PARAMETER_LIST T_RRB COMPOUND_STATEMENT { $$ = new ast_Function(*$2, $4, $6); }
;
-PARAMETER_LIST : { $$ = new ast_ParamList(); }
+PARAMETER_LIST : %empty { $$ = new ast_ParamList(); }
| PARAMETER { $$ = new ast_ParamList($1); }
| PARAMETER_LIST T_CMA PARAMETER { $$->push($3); }
;