Allow empty date as string (needed for compatibility with Lifelines).
authorPeter Verthez <Peter.Verthez@advalvas.be>
Fri, 16 Aug 2002 16:20:19 +0000 (16:20 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Fri, 16 Aug 2002 16:20:19 +0000 (16:20 +0000)
gedcom/gedcom_date.y

index 282b8641ddaf69e2d8b9b4fc6050ef5c57f86a01..1ba65fa4698b42797403162667123129f47399c0 100644 (file)
@@ -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);