arr-ai / wbnf

ωBNF implementation
Apache License 2.0
7 stars 4 forks source link

Possible missing operator or (variant thereof) #1

Closed marcelocantos closed 4 years ago

marcelocantos commented 4 years ago

Background: A design goal of wBNF is to provide all possible binary operators. This means not just making all binary operations expressible, but to allow it without repeating either term. For instance, a(ba)* matches a b-separated list of a. However we had to repeat a to express this. The a:b operator exists to close this gap.

The problem: wBNF is incomplete. There is no way to say a(ba){m,n} without repeating a.

One solution is as follows: a:{m,n}b = a(ba){m,n}.

ChloePlanet commented 4 years ago

Won't fix.