From: Peter Verthez Date: Fri, 16 Aug 2002 16:20:19 +0000 (+0000) Subject: Allow empty date as string (needed for compatibility with Lifelines). X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=bd6f144d30a06cb896a0c9544e4af5f42848bae7;p=gedcom-parse.git Allow empty date as string (needed for compatibility with Lifelines). --- diff --git a/gedcom/gedcom_date.y b/gedcom/gedcom_date.y index 282b864..1ba65fa 100644 --- a/gedcom/gedcom_date.y +++ b/gedcom/gedcom_date.y @@ -109,10 +109,19 @@ date_value : date { make_date_value(DV_NO_MODIFIER, | date_interpr | date_phrase { make_date_value(DV_PHRASE, def_date, def_date, $1); } + | /* empty */ + { + /* If empty string: return empty string in 'phrase' + member as fallback */ + /* Note: this can only happen in compatibility mode */ + make_date_value(DV_PHRASE, + def_date, def_date, curr_line_value); + } | error { /* On error: put entire string in 'phrase' member as fallback */ make_date_value(DV_PHRASE, - def_date, def_date, curr_line_value); } + def_date, def_date, curr_line_value); + } ; date : ESC_DATE_GREG date_greg { copy_date(&$$, date_s);