fire-eggs / YAGP

"Yet Another GEDCOM Parser" - newer/faster/complete GEDCOM parser in C#
Apache License 2.0
9 stars 3 forks source link

Parsing terminates on missing level #35

Open fire-eggs opened 6 years ago

fire-eggs commented 6 years ago

V208252.ged shows a limitation where the parser bails if a line is missing its level value.

Here is the record in question (lines 2585-2598):

0 @I184@ INDI 1 NAME Nellie D. /Beall/ 2 SURN Beall GIVN Nellie D. 1 SEX F 1 _UID C5E77ECCC7163E49BB23E6430EA0B9DEA644 1 FAMS @F92@ 1 NOTE Gilpin County Brides' and Groom's Marriage Index 1864-1944 2 CONT http://www.colorado.gov/dpa/doit/archives/marriage/gilpin_index.htm 2 CONT By Marjorie A. Benham, Colorado State Archives Volunteer. 2 CONT Visit that site and you might find more members of this family. 1 CHAN 2 DATE 26 Nov 2008 3 TIME 00:13:34

At FileRead.cs, line 191 (ProcessLine()), the code bails because there is no level value. This is a reasonable, albeit conservative, reaction.

Consider changing the code to merely accumulate the offending line into the current record, and continue to search forward to the next leading '0' as the beginning of the next record.

The concern would be if a large chunk of the file is missing, so that two, possibly mismatched, records are smushed together.