Grammar5
in package
FinalYes
Grammars of the GEDCOM 5.x primitive elements that spec/<version>/primitives.yaml names; dates are in DateGrammar5. Keywords and labels are case-insensitive, as in the gedcom7code tests.
5.5.5 is stricter: "< " and "> " before an age, no zero parts or leading zeroes in ages, times without a leading zero in the hour and with a two-digit fraction.
Table of Contents
Constants
- DATES : mixed = ['DATE_VALUE' => true, 'DATE_PERIOD' => true, '...
- NAMES : mixed = ['AGE_AT_EVENT' => 'an age, e.g. "35y 3m", "<1y...
- Human-readable names for messages.
- NAMES_555 : mixed = ['AGE_AT_EVENT' => 'an age, e.g. "35y 3m", "< 1...
- Names that differ in 5.5.5.
Methods
- matches() : bool
- Whether the value matches the grammar; true for grammars this class does not check.
Constants
DATES
public
mixed
DATES
= ['DATE_VALUE' => true, 'DATE_PERIOD' => true, 'DATE_EXACT' => true]
NAMES
Human-readable names for messages.
public
mixed
NAMES
= ['AGE_AT_EVENT' => 'an age, e.g. "35y 3m", "<1y" or "CHILD"', 'DATE_VALUE' => 'a date, e.g. "6 DEC 1907", "ABT @#DJULIAN@ 1650" or "(date phrase)"', 'DATE_PERIOD' => 'a date period, e.g. "FROM 1900 TO 1910" or "TO 1850"', 'DATE_EXACT' => 'an exact date, e.g. "6 DEC 1907"', 'GEDCOM_VERSION_NUMBER' => 'a version number, e.g. "5.5.5"', 'NAME_PERSONAL' => 'a personal name (text with at most one /surname/)', 'NUMBER' => 'a number', 'PLACE_LATITUDE' => 'a latitude, e.g. "N50.45"', 'PLACE_LONGITUDE' => 'a longitude, e.g. "E30.52"', 'PLACE_NAME' => 'a place name, parts separated by ", "', 'PRODUCT_VERSION_NUMBER' => 'a version number, e.g. "2.1" or "10.0.3.64"', 'TIME_VALUE' => 'a time, e.g. "14:30" or "14:30:15.25"']
NAMES_555
Names that differ in 5.5.5.
public
mixed
NAMES_555
= ['AGE_AT_EVENT' => 'an age, e.g. "35y 3m", "< 1y" or "CHILD"']
Methods
matches()
Whether the value matches the grammar; true for grammars this class does not check.
public
static matches(string $grammar, string $value[, bool $v555 = false ]) : bool
Parameters
- $grammar : string
- $value : string
- $v555 : bool = false