-
Notifications
You must be signed in to change notification settings - Fork 0
Metadata grammar
Leon Starr edited this page Jul 23, 2026
·
11 revisions
This example metadata section is taken from an older version of the Elevator Management domain's class model.
metadata
Title : Elevator Management Class Model
Author : Leon Starr
Document ID : mint.elevator3.td.1
Version : 3.4.0
Creation date : June 21, 2018
Modification date : December 8, 2022
Organization : Model Integration, LLC / www.modelint.com
Copyright notice > MIT
Organization logo > mint
Now let's see how the grammar defines the overall structure above.
Note that the excerpt below is cut and paste for explanation — when in doubt look at the file itself.
// Metadata
metadata = metadata_header data_item*
metadata_header = "metadata" EOL* // Metadata header
data_item = INDENT item_name SP* (resource_item / text_item) EOL* // Metadata item
item_name = iword (delim word)* // Meta data item starts with initial cap
resource_item = '>' SP* word (delim word)* // Resource is a name
text_item = ':' SP* r'.*' // Field content can be any text
The metadata section starts with an unindented header which is just the keyword metadata.
It is followed by zero or many data items, each indented and naming either an item or a resource.
Document ID : mint.elevator3.td.1
The name of an item is followed by a colon and a text_item which is any string you want to supply. The single white space on each side of the colon is for readability, but not required by the grammar.
Copyright 2023-2026 © Leon Starr under MIT Open Source License