}
tyfields:
-/*| epsilon */
- | tyfield
- {$1}
- | tyfield COMMA tyfields
+ | ID COLON ID
{
- let tyfield = $1 in
- let tyfields = $3 in
- sprintf "%s, %s" tyfield tyfields
+ let id_1 = $1 in
+ let id_2 = $3 in
+ sprintf "%s : %s" id_1 id_2
}
-
-tyfield:
- | ID COLON ID
+ | ID COLON ID COMMA tyfields
{
- let id = $1 in
- let type_id = $3 in
- sprintf "tyfield[%s, %s]" id type_id
+ let id_1 = $1 in
+ let id_2 = $3 in
+ let tyfield = sprintf "%s : %s" id_1 id_2 in
+ let tyfields = $5 in
+ sprintf "%s, %s" tyfield tyfields
}
rec_field_assignments: