OSDN Git Service

* approved by rth
[pf3gnuchains/gcc-fork.git] / gcc / gengtype-yacc.y
index ba33407..3ff92d3 100644 (file)
@@ -73,6 +73,7 @@ typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
                     lexer_toplevel_done = 1;
                   }
                 ';'
+                  {}
                | ENT_STRUCT options '{' struct_fields '}'
                   {
                     new_structure ($1->u.s.tag, UNION_P ($1), &lexer_line,
@@ -80,11 +81,12 @@ typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
                     lexer_toplevel_done = 1;
                   }
                 ';'
+                  {}
                ;
 
 externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
                 {
-                  note_variable ($4, adjust_field_type ($3, $2), $2, 
+                  note_variable ($4, adjust_field_type ($3, $2), $2,
                                  &lexer_line);
                 }
              | ENT_EXTERNSTATIC options lasttype ID ARRAY semiequal
@@ -101,7 +103,7 @@ externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
              ;
 
 lasttype: type
-           { 
+           {
              lexer_toplevel_done = 1;
              $$ = $1;
            }
@@ -121,7 +123,7 @@ yacc_union: ENT_YACCUNION options struct_fields '}' yacc_typematch
 yacc_typematch: /* empty */
                   { $$ = NULL; }
                | yacc_typematch PERCENT_ID yacc_ids
-                  { 
+                  {
                     pair_p p;
                     for (p = $3; p->next != NULL; p = p->next)
                       {
@@ -154,7 +156,7 @@ yacc_typematch: /* empty */
 yacc_ids: /* empty */
        { $$ = NULL; }
      | yacc_ids ID
-        { 
+        {
          pair_p p = xcalloc (1, sizeof (*p));
          p->next = $1;
          p->line = lexer_line;
@@ -272,7 +274,7 @@ option:     type_option '(' type ')'
             $$ = o;
           }
        | ID '(' STRING ')'
-          { 
+          {
             options_p o = xmalloc (sizeof (*o));
             o->name = $1;
             o->info = (void *)$3;
@@ -292,7 +294,7 @@ optionseq: option
              }
            ;
 
-optionseqopt: { $$ = NULL }
+optionseqopt: { $$ = NULL; }
              | optionseq { $$ = $1; }
              ;
 %%