Closed njamescouk closed 2 years ago
That's because OneOrMore doesn't take N children, it takes one or two, with the second being the optional separator between each repetition. If you want them to be lined up horizontally you need to wrap them in an explicit Sequence there so they collectively form a single object to pass as the first argument.
(Note that your non-stacked example does not illustrate (A B?)+
, but rather A (B? A)+
, as expected if the B?
was the separator between repetitions of A
.)
Thanks for the clarification, will revisit my problem.
Whilst messing about with railroad-diagrams I ended doing a diagram essentially for the regex
(A B? C?)+
When the components of the regex are Stack()ed everything seems fine, when not stackedC
is missing. The regex(A B? C?)
renders as I would expect in both cases. HTML illustrating this below:Please advise.