Browse Source

Pattern decomposition

main
Tony Garnock-Jones 1 year ago
parent
commit
a932fa1428
  1. 10
      dataspace-patterns.prs

10
dataspace-patterns.prs

@ -6,6 +6,10 @@ Pattern = DDiscard / DBind / DLit / DCompound . @@ -6,6 +6,10 @@ 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 ...:... }> .
DCompound = @rec <compound @ctor CRec @members { int: Pattern ...:... }>
/ @arr <compound @ctor CArr @members { int: Pattern ...:... }>
/ @dict <compound @ctor CDict @members { any: Pattern ...:... }> .
CRec = <rec @label any @arity int>.
CArr = <arr @arity int>.
CDict = <dict>.

Loading…
Cancel
Save