[Gedcom-parse-devel] DATE is not LR (I think)
Status: Beta
Brought to you by:
verthezp
From: prapp <pr...@er...> - 2001-12-28 03:28:35
|
I think that GEDCOM dates are not LR for two reasons: 1) date_phrase matches, for example, "1 SEP 1993 or 1994" but you don't know that is a date_phrase til you get past the 1993 (and find out it is not a valid date) 2) "25" looks like the start of a day month year, but is actually just a year If I am correct, it will be more difficult to parse dates with a bison grammar, yes ? In fact, I decided to do a custom date parse, because I don't know enough to handle the phrase backtracking. (Also because I'm revising an existing date parser in LifeLines which is custom, and is a freeform, non-LR parser). (I think I'll use some context-sensitivity in calendars eventually -- if I add support for the Islam calendar eventually, I can recognize it by the month name, and then can expect AH or BH as an optional trailer instead of AD or BC). I'm not planning to worry about a BC-equivalent for the Hebrew or Roman calendars :) (both go back pretty far, and probably have no standard trailer for such) |