Tracks the CCL side of reverse / parent navigation. Parent feature:
cinchapi/concourse#781.
Summary
Add a reverse-navigation marker ^ to navigation keys so a stop can be
traversed backward, to the parent: the records that link to the current
record. ^ alone means the parent via any key; ^key means the parent via
that key. Reverse stops compose with forward stops, the transitive * suffix,
per-stop bracket timestamps, and scope prefixes.
Scope
- Lexer: accept a leading
^ on navigation-key segments in the key-bearing
tokens (PERIOD_SEPARATED_STRING, ASTERISK_SUFFIXED_STRING,
NAVIGATION_SCOPE_OPEN) and a standalone ^ segment. Disambiguate a ^-led
key from a ^-led unquoted value.
- AST: add a reverse direction to
NavigationKeyStop (alongside the transitive
flag and timestamp), with the key optional for bare ^; propagate through
NavigationKeySymbol (stop parsing, components, base key, parameter
stripping, scope-prefix parsing).
- Regenerate the parser from the grammar; do not hand-edit generated sources.
- Update
CCL_REFERENCE.md (Navigation Keys section).
Behavior / contract
^key round-trips through parse and toString; ^ is a valid single-segment
navigation key.
- Composes:
^.a, ^key.a, ^*, ^[t], ^.(...).
- The reverse marker names the source key, or none for bare
^. There is no
auto-paired inverse.
Acceptance Criteria
Tracks the CCL side of reverse / parent navigation. Parent feature:
cinchapi/concourse#781.
Summary
Add a reverse-navigation marker
^to navigation keys so a stop can betraversed backward, to the parent: the records that link to the current
record.
^alone means the parent via any key;^keymeans the parent viathat key. Reverse stops compose with forward stops, the transitive
*suffix,per-stop bracket timestamps, and scope prefixes.
Scope
^on navigation-key segments in the key-bearingtokens (
PERIOD_SEPARATED_STRING,ASTERISK_SUFFIXED_STRING,NAVIGATION_SCOPE_OPEN) and a standalone^segment. Disambiguate a^-ledkey from a
^-led unquoted value.NavigationKeyStop(alongside the transitiveflag and timestamp), with the key optional for bare
^; propagate throughNavigationKeySymbol(stop parsing, components, base key, parameterstripping, scope-prefix parsing).
CCL_REFERENCE.md(Navigation Keys section).Behavior / contract
^keyround-trips through parse and toString;^is a valid single-segmentnavigation key.
^.a,^key.a,^*,^[t],^.(...).^. There is noauto-paired inverse.
Acceptance Criteria
^,^key, and reverse stops mixed with forward stops,*,[t], and scope prefixes.NavigationKeyStopandNavigationKeySymbolmodel the reverse directionand round-trip.
^still parses, or is documented torequire quoting.
CCL_REFERENCE.mdupdated.