You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two ways to render a "zero or more" (i.e. `*`) repeat. One
is to put nothing on the main forward line and to put the pattern on
the recurrent edge, and the other is to put the pattern on the main
forward line and to have an empty recurrent edge and an empty bypass
edge.
That is, for the latter, we can think of `thing*` as `(thing+)?`.
Doing it that latter way means an additional edge, but it buys us
something big in return, which is that it keeps all the patterns going
in the forward direction. Doing it the other way means the patterns
have to be reversed so as to put them underneath on that recurrent
edge, and it means that readers then have to read them right to left.
Reversing the elements also causes a bug in some diagrams where the
lines end up running in opposing directions and so the trains crash
into each other. See:
- #1787 (comment)
Keeping things in the forward direction avoids this problem.
In this commit, we'll leave in place all the infrastructure for
reversing the elements though it is no longer used. We can of course
pull this out later.
0 commit comments