# This is a grammar file which describes a format for storing a family tree. # The format is similar to that accepted by the family tree program which you can find elsewhere on this site. However, that program was written before SSS and so the format needed some small changes to conform to the SSS conventions. The main change is that all the string data is now enclosed in quotes. Incidentally, this makes the data much more readable. Another change is that "M" and "F" have been replaced with "MALE" and "FEMALE" simply so that they are long enough to be keywords. # I have also made some small changes that seemed like a good idea. It is now possible to list the children from a marriage without giving its year and place. There is now a defined order for listing the various features of a person, namely "BORN", "DIED", "TITLES", "QUALIFICATIONS", "PROFESSION". It is now possible to have places with spaces in their names. None of the changes is ground-breaking. # A unique identifier for a person. I normally use initials followed by year of birth ('APT1975' for example). personID ::= {Person {CONSTANT}} # The sex of a person. sex ::= { M {"MALE"} F {"FEMALE"}} # The optional "BORN" section of a person line, which starts with a year and place. born ::= {Some {"BORN" STRING STRING}} # The optional "DIED" section of a person line, which starts with a year and place. died ::= {Some {"DIED" STRING STRING}} # One of a person's titles. title ::= {Title {STRING}} # The optional "TITLES" section of a person line. titles ::= {Some {"TITLES" title*}} # One of a person's qualifications. qual ::= {Qual {STRING}} # The optional "QUALIFICATIONS" section of a person line. quals ::= {Some {"QUALIFICATIONS" qual*}} # The optional "PROFESSION" section of a person line. profs ::= {Some {"PROFESSION" STRING}} # The optional "CHILDREN" section at the end of a marriage line. children ::= {Some {"CHILDREN" personID*}} # The year and place of a marriage. This part is optional. marriage ::= {Some {STRING STRING children?}} declaration ::= { Comment {COMMENT} Person {"PERSON" personID sex STRING born? died? titles? quals? profs?} Note {"NOTE" personID STRING} Marriage {"MARRIAGE" personID personID marriage? children?} } ROOT declaration*