Browse Source

Update schemas for new embedded syntax; steps toward pattern support

main
Tony Garnock-Jones 1 year ago
parent
commit
3412eabcff
  1. 11
      dataspace-patterns.prs
  2. 7
      dataspace.prs
  3. 4
      gatekeeper.prs
  4. 2
      protocol.prs
  5. 11
      secure-chat-protocol.prs

11
dataspace-patterns.prs

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
version 1 .
; Dataspace patterns: a sublanguage of attenuation patterns.
Pattern = DDiscard / DBind / DLit / DCompound .
DDiscard = <_>.
DBind = <bind @name symbol @pattern Pattern>.
DLit = <lit @value any>.
DCompound = @rec <compound <rec @label any @arity int> @members { int: Pattern ...:... }>
/ @arr <compound <arr @arity int> @members { int: Pattern ...:... }>
/ @dict <compound <dict> @members { any: Pattern ...:... }> .

7
dataspace.prs

@ -1,9 +1,4 @@ @@ -1,9 +1,4 @@
version 1 .
embeddedType Actor.Ref .
;As implemented
Observe = <Observe @label symbol @observer embedded>.
; ;As will be implemented soon
; Observe = <Observe @pattern Pattern @observer embedded>.
.
Observe = <Observe @pattern dataspace-patterns.Pattern @observer #!any>.

4
gatekeeper.prs

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
version 1 .
embeddedType Actor.Ref .
Resolve = <resolve @sturdyref sturdy.SturdyRef @observer embedded>.
Bind = <bind @oid any @key bytes @target embedded>.
Resolve = <resolve @sturdyref sturdy.SturdyRef @observer #!#!any>.
Bind = <bind @oid any @key bytes @target #!any>.

2
protocol.prs

@ -11,4 +11,4 @@ TurnEvent = [@oid Oid @event Event]. @@ -11,4 +11,4 @@ TurnEvent = [@oid Oid @event Event].
Assert = <assert @assertion Assertion @handle Handle>.
Retract = <retract @handle Handle>.
Message = <message @body Assertion>.
Sync = <sync @peer embedded>.
Sync = <sync @peer #!#t>.

11
secure-chat-protocol.prs

@ -3,9 +3,16 @@ embeddedType Actor.Ref . @@ -3,9 +3,16 @@ embeddedType Actor.Ref .
UserId = int .
Join = <joinedUser @uid UserId @handle embedded>.
Join = <joinedUser @uid UserId @handle #!Session>.
NickClaim = <claimNick @uid UserId @name string @k embedded>.
Session = @observeUsers <Observe =user @observer #!UserInfo>
/ @observeSpeech <Observe =says @observer #!Says>
/ NickClaim
/ Says
.
NickClaim = <claimNick @uid UserId @name string @k #!NickClaimResponse>.
NickClaimResponse = #t / NickConflict .
UserInfo = <user @uid UserId @name string>.

Loading…
Cancel
Save