diff --git a/Makefile b/Makefile index 550945abd30..3fa863c49b9 100644 --- a/Makefile +++ b/Makefile @@ -21,5 +21,5 @@ test: glcpp @(cd tests; ./glcpp-test) clean: - rm -f glcpp-lex.c glcpp-parse.c *.o *~ + rm -f glcpp glcpp-lex.c glcpp-parse.c *.o *~ rm -f tests/*.out tests/*.gcc tests/*.expected tests/*~ diff --git a/glcpp-parse.y b/glcpp-parse.y index f972ec372b8..58afd724b6a 100644 --- a/glcpp-parse.y +++ b/glcpp-parse.y @@ -177,13 +177,20 @@ argument: | argument word { _string_list_append_item ($1, $2); talloc_free ($2); + $$ = $1; } | argument SPACE word { _string_list_append_item ($1, " "); _string_list_append_item ($1, $3); talloc_free ($3); + $$ = $1; + } +| argument '(' argument ')' { + _string_list_append_item ($1, "("); + _string_list_append_list ($1, $3); + _string_list_append_item ($1, ")"); + $$ = $1; } -| argument '(' argument ')' ; directive_with_newline: