]> git.draconx.ca Git - cdecl99.git/commitdiff
Make semicolons after declarations optional.
authorNick Bowler <nbowler@draconx.ca>
Wed, 20 Jul 2011 00:18:02 +0000 (20:18 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 20 Jul 2011 00:18:02 +0000 (20:18 -0400)
They're annoying, don't make sense for type names, weren't required by
cdecl, and don't actually do anything productive.

src/parse.y

index 1cda21f14d7c39328518345667a31d705c019cfc..cd88d2fa6bef511810561fba32a941802b63b465 100644 (file)
@@ -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)