Compare commits

...

2 Commits

Author SHA1 Message Date
Tony Garnock-Jones e20c81763b Alternative representation of dataspacePatterns 2024-04-09 09:14:01 +02:00
Tony Garnock-Jones 40ca168eac Repair typo 2024-04-09 09:13:51 +02:00
2 changed files with 12 additions and 8 deletions

View File

@ -6,14 +6,18 @@ embeddedType EntityRef.Cap .
# One key difference is that Dataspace patterns are extensible, in that
# they ignore fields not mentioned in DCompound patterns.
Pattern = DDiscard / DBind / DLit / DCompound .
Pattern =
/ @discard <_>
/ <bind @pattern Pattern>
/ <lit @value AnyAtom>
/ <g @type GroupType @entries { any: Pattern ...:... }>
.
DDiscard = <_>.
DBind = <bind @pattern Pattern>.
DLit = <lit @value AnyAtom>.
DCompound = <rec @label any @fields { int: Pattern ...:... }>
/ <arr @items { int: Pattern ...:... }>
/ <dict @entries { any: Pattern ...:... }> .
GroupType =
/ <rec @label any>
/ <arr>
/ <dict>
.
AnyAtom =
/ @bool bool

View File

@ -60,7 +60,7 @@ NoisePreSharedKeys = @present { preSharedKeys: [bytes ...] } / @invalid { preSha
# complete Noise "transport message"; when `complete`, the whole thing is likewise a complete
# "transport message".
#
# Retraction of the `Introduction` ends the session from the initiator-side; retraction of the
# Retraction of the `Initiator` ends the session from the initiator-side; retraction of the
# `<accepted ...>` assertion ends the session from the responder-side.
SessionItem = Initiator / Packet .