From 08a8e874eb6c863d1af3c09df29126b5928ae693 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Tue, 15 Oct 1996 19:24:49 +0000 Subject: [PATCH] Allow no field defs in record instance with { } --- src/dbStatic/dbYacc.y | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/dbStatic/dbYacc.y b/src/dbStatic/dbYacc.y index 03003940f..0c711ad62 100644 --- a/src/dbStatic/dbYacc.y +++ b/src/dbStatic/dbYacc.y @@ -64,8 +64,7 @@ menu_body: '{' choice_list '}' { if(dbStaticDebug>2) printf("menu_body\n"); dbMenuBody(); -} - | include ; +}; choice_list: choice_list choice | choice; @@ -73,7 +72,8 @@ choice: tokenCHOICE '(' tokenSTRING ',' tokenSTRING ')' { if(dbStaticDebug>2) printf("choice %s %s\n",$3,$5); dbMenuChoice($3,$5); -} ; +} + | include; recordtype_head: '(' tokenSTRING ')' { @@ -163,7 +163,17 @@ record_head: '(' tokenSTRING ',' tokenSTRING ')' dbRecordHead($2,$4); }; -record_body: '{' record_field_list '}' +record_body: /*Null*/ +{ + if(dbStaticDebug>2) printf("null record_body\n"); + dbRecordBody(); +} + | '{' '}' +{ + if(dbStaticDebug>2) printf("record_body - no fields\n"); + dbRecordBody(); +} + | '{' record_field_list '}' { if(dbStaticDebug>2) printf("record_body\n"); dbRecordBody();