Hi All

I've re-written Genealogy::Gedcom::Date, and V 2.00 will be released
next week. I'm about to start updating the docs.

There are massive internal changes, and hence the V 2.00.

Gone are these methods: parse_approximate_date(), parse_date_escape(),
parse_datetime(), parse_date_period(), parse_date_range(),
parse_date_value(), parse_interpreted_date(), debug(), method_index(),
months_in_gregorian() and style().

All calls are now thru parse(). And calendar() replaces and extends style().

So, why do this? Because I have finally used Marpa [1] to specify the
BNF of dates as per the Gedcom V 5 spec.

However, the latter only includes a tiny number of calendars: french,
gregorian, hebrew and julian. I've decided to accept suggestions re
other languages.

So, if you're interested in support for others, send me a list of the
abbreviated month names in your language. Include the day month year
order, and how dates BC are written.

E.g.: This is part of the new Marpa-style BNF [2]. Put very simply,
'::=' declares a rule and '~' declares a lexeme.

french_date     ::= year_bc
                | year
                | french_r_month year
                | day french_r_month year

year_bc         ::= year bc

year            ::= number

bc              ~ 'bc'
                | 'b.c.'

day             ~ digit
                | digit digit

digit           ~ [0-9]

french_r_month  ~ 'vend' | 'brum' | 'frim' | 'nivo' | 'pluv'
                | 'vent' | 'germ' | 'flor' | 'prai' | 'mess'
                | 'ther' | 'fruc' | 'comp'

number          ~ digit+

:discard        ~ whitespace
whitespace      ~ [\s]+

The special lexeme :discard hopefully explains why the definition of bc
does not need 'B C' and 'B. C.'. And, no, discarding whitespace does
/not/ affect recognition of tokens which have nothing but whitespace
between them.

You don't have to provide BNF, just enough for me to construct the BNF.

As for existing code, I plan to release new versions of Gedcom::Date V
0.90 and Genealogy::Gedcom::Date V 1.17 next week. But, no bugs will be
fixed, ever, in those modules. The update will only say those modules
are deprecated, and will be removed from CPAN some time around
2017-01-01 (sic). So you have 1+ year's notice. Of course the code will
still be available via backpan [3].

If you don't want to upgrade, them let me know. I'll preserve
Gedcom::Date on CPAN only if it's of monumental significance, but be
warned, Genealogy::Gedcom::Date V 2.00 will be released, and eventually
V 1.17 will be deleted.

[1] http://savage.net.au/Marpa.html. No, I did not write Marpa.

[2] Another warning! Marpa's BNF only bears a slight resemblance to the
original BNF.

See https://metacpan.org/pod/distribution/Marpa-R2/pod/Scanless/DSL.pod
for an introduction to the vast array of new features.

See also http://savage.net.au/Marpa/html/Marpa.R2.DSL.Structure.html.

[3] http://gitpan.integra.net/

--
Ron Savage - savage.net.au

Reply via email to