OSDN Git Service

2004-05-13 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / gengtype-yacc.y
index 18b65f1..02136dc 100644 (file)
@@ -212,11 +212,16 @@ struct_fields: { $$ = NULL; }
                    p->line = lexer_line;
                    $$ = p;
                  }
+              | type ':' bitfieldlen ';' struct_fields
+                 { $$ = $5; }
               ;
 
 bitfieldopt: /* empty */
-            | ':' NUM
-            | ':' ID
+            | ':' bitfieldlen
+            ;
+
+bitfieldlen: NUM | ID
+               { }
             ;
 
 type: SCALAR
@@ -274,6 +279,7 @@ option:   ID
             { $$ = create_option ($1, (void *)$3); }
        | type_option '(' type ')'
            { $$ = create_option ($1, adjust_field_type ($3, NULL)); }
+       ;
 
 optionseq: option
              {
@@ -302,4 +308,5 @@ stringseq: STRING
               free ((void *)$2);
               $$ = s;
             }
+          ;
 %%