]> git.saurik.com Git - bison.git/commitdiff
src/scan-gram.l (<SC_BRACED_CODE>"}"): Append ";" only in braced code,
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 Dec 2002 02:26:51 +0000 (02:26 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 Dec 2002 02:26:51 +0000 (02:26 +0000)
not in unions etc.

src/scan-gram.l

index a1fbac5ea7c65a47803a46bfaff87991d8c9e951..a2c61fd67e9ea92fb6dcbd59aff19aef47ef5b93 100644 (file)
@@ -559,7 +559,7 @@ splice       (\\[ \f\t\v]*\n)*
        should also diagnose other Bison extensions like %yacc.
        Perhaps there should also be a GCC-style --pedantic-errors
        option, so that such warnings are diagnosed as errors.  */
        should also diagnose other Bison extensions like %yacc.
        Perhaps there should also be a GCC-style --pedantic-errors
        option, so that such warnings are diagnosed as errors.  */
-    if (outer_brace && ! yacc_flag)
+    if (outer_brace && token_type == BRACED_CODE && ! yacc_flag)
       obstack_1grow (&obstack_for_string, ';');
 
     obstack_1grow (&obstack_for_string, '}');
       obstack_1grow (&obstack_for_string, ';');
 
     obstack_1grow (&obstack_for_string, '}');