recognize expressions

This commit is contained in:
ceriel
1990-09-07 14:56:24 +00:00
parent 2c9fbebe4e
commit 24920dfa75
15 changed files with 527 additions and 84 deletions

View File

@@ -447,16 +447,24 @@ type(p_type *ptp; int *type_index;)
;
structure_type(register p_type tp;)
{ register struct fields *fldp; }
{ register struct fields *fldp;
register p_symbol s;
}
:
integer_const(&(tp->ty_size)) /* size in bytes */
{ open_scope((p_symbol) 0, 0); }
[ { fldp = get_field_space(tp); }
name(&(fldp->fld_name))
{ s = NewSymbol(fldp->fld_name, CurrentScope, FIELD, currnam);
s->sy_field = fldp;
}
type(&(fldp->fld_type), (int *) 0) ','
integer_const(&(fldp->fld_pos)) ',' /* offset in bits */
integer_const(&(fldp->fld_bitsize)) ';' /* size in bits */
]*
';' { end_field(tp); }
';' { end_field(tp);
close_scope();
}
;
enum_type(register p_type tp;)