From: Nick Bowler Date: Wed, 20 Jul 2011 00:18:02 +0000 (-0400) Subject: Make semicolons after declarations optional. X-Git-Tag: v1~125 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/c916345f9c09c713d714d77785366d3c3e2df1d7 Make semicolons after declarations optional. They're annoying, don't make sense for type names, weren't required by cdecl, and don't actually do anything productive. --- diff --git a/src/parse.y b/src/parse.y index 1cda21f..cd88d2f 100644 --- a/src/parse.y +++ b/src/parse.y @@ -233,7 +233,9 @@ input: T_ENGLISH english { *out = $1; }; -declaration: declspecs declarators T_SEMICOLON { +semi: | T_SEMICOLON + +declaration: declspecs declarators semi { $$ = $2; for (struct cdecl *i = $$; i; i = i->next)