PathSegment =
'/'
ResourceName:resource
(
("(" Number:key ")")?
(
(seq("/$links") PathSegment:link)
| PathSegment: next
)?
) -> { resource: resource, key: key, link: link, property: next }
,