You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
%{
#include "bconfig.h"
| type '*'
{ $$ = create_pointer ($1); }
| STRUCT ID '{' struct_fields '}'
- {
- new_structure ($2, 0, &lexer_line, $4, NULL);
- $$ = find_structure ($2, 0);
- }
+ { $$ = new_structure ($2, 0, &lexer_line, $4, NULL); }
| STRUCT ID
{ $$ = find_structure ($2, 0); }
| UNION ID '{' struct_fields '}'
- {
- new_structure ($2, 1, &lexer_line, $4, NULL);
- $$ = find_structure ($2, 1);
- }
+ { $$ = new_structure ($2, 1, &lexer_line, $4, NULL); }
| UNION ID
{ $$ = find_structure ($2, 1); }
| ENUM ID
;
option: ID
- { $$ = create_option ($1, (void *)""); }
+ { $$ = create_option (NULL, $1, (void *)""); }
| ID '(' stringseq ')'
- { $$ = create_option ($1, (void *)$3); }
+ { $$ = create_option (NULL, $1, (void *)$3); }
| type_option '(' type ')'
- { $$ = create_option ($1, adjust_field_type ($3, NULL)); }
+ { $$ = create_option (NULL, $1, adjust_field_type ($3, NULL)); }
| NESTED_PTR '(' type ',' stringseq ',' stringseq ')'
{
struct nested_ptr_data d;
d.type = adjust_field_type ($3, NULL);
d.convert_to = $5;
d.convert_from = $7;
- $$ = create_option ("nested_ptr",
+ $$ = create_option (NULL, "nested_ptr",
xmemdup (&d, sizeof (d), sizeof (d)));
}
;