novy-syndicate/schemas/sturdy.prs

45 lines
1.5 KiB
Plaintext
Raw Normal View History

version 1 .
pointer Actor.Ref .
; Each Attenuation is a stage. The sequence of Attenuations is run RIGHT-TO-LEFT.
; That is, the newest Attenuations are at the right.
2021-03-23 11:18:57 +00:00
SturdyRef = <ref @oid any [@caveatChain Attenuation ...] @sig bytes>.
; An individual Attenuation is run RIGHT-TO-LEFT.
; That is, the newest Caveats are at the right.
Attenuation = [Caveat ...].
; embodies 1st-party caveats over assertion structure, but nothing else
; can add 3rd-party caveats and richer predicates later
Caveat = Rewrite / Alts .
Rewrite = <rewrite @pattern Pattern @template Template>.
2021-03-23 11:18:57 +00:00
Alts = <or [@alternatives Rewrite ...]>.
Resolve = <resolve @sturdyref SturdyRef @observer ref>.
2021-04-19 11:00:08 +00:00
Bind = <bind @oid any @key bytes @target ref>.
;---------------------------------------------------------------------------
ConstructorSpec = CRec / CArr / CDict .
CRec = <rec @label any @arity int>.
CArr = <arr @arity int>.
CDict = <dict>.
Lit = <lit @value any>.
2021-04-16 20:36:34 +00:00
Pattern = PDiscard / PAtom / PPointer / PBind / PAnd / PNot / Lit / PCompound .
PDiscard = <_>.
2021-04-16 20:36:34 +00:00
PAtom = =Boolean / =Float / =Double / =SignedInteger / =String / =ByteString / =Symbol .
PPointer = =Pointer .
PBind = <bind @name symbol @pattern Pattern>.
2021-03-23 11:18:57 +00:00
PAnd = <and [@patterns Pattern ...]>.
PNot = <not @pattern Pattern>.
2021-03-23 11:18:57 +00:00
PCompound = <compound @ctor ConstructorSpec @members PCompoundMembers>.
PCompoundMembers = { any: Pattern ...:... }.
Template = TRef / Lit / TCompound .
TRef = <ref @name symbol>.
2021-03-23 11:18:57 +00:00
TCompound = <compound @ctor ConstructorSpec @members TCompoundMembers>.
TCompoundMembers = { any: Template ...:... }.