7

BNF is Backus Normal Form (or Backus–Naur Form) and is a standard way to define a grammar for a syntax. It makes it easy for parsers to digest data. I was thinking of writing some erlang code for genealogy and wanted to parse my gedcom for the data. Easiest way is using BNF and I assume all the existing .ged parsers have buried in them somewhere the BNF for GED. Is it available open-source anywhere?

5

While there may be an official standard GED grammar, there are many nonstandard tags that are now widely used. Therefore, using BNF may or may not be the "easiest way".

Nevertheless, a quick google brings up this Gedcom 5.5.1 grammar file.

| improve this answer | |
  • thank you. I googled and all I got was lots of pages explaining BNF (apparently the bnf outweighed the .ged in my search but not yours). I had been learning about bnf and apparently google 'remembered'. Or I'm just google inept. Thanks again - this is just what I was searching for. Wrt to non-standard tags - I'm not doing a generic parser - just one for my file. So if any nonstandard tags in my myheritage file I'll just have to add them to bnf. – Duncan Aug 29 '15 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.