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
In the example 12_select-stmt_diagram.txt, a lot of line length and tracing work for the eye can be saved if the box exit is not forced to be at the same y level as the entry. For example, the marked "extra loop" here could be omitted:
The text was updated successfully, but these errors were encountered:
Yes, this is unfortunate. The reason for this behavior is that all RailroadNode-implementors are in fact just boxes that are stacked into bigger boxes. The connector always returns to the same height it entered from, making the lego-blocks always fit. This also results in "lets go all the way up to exit my box" and the wrapping box "lets go all the way down to go around the box I just wrapped". I see three options here:
Do nothing. The implementation is simple and the visual justification is that you can anticipate the logical connections between entering and exiting connectors by just looking at their hight. In the example above, I don't need to search all (!) the paths entering Compounded SELECT to figure out where the syntax continues.
There is a exit_height() method defined on RailroadNode, which is currently not used. While I thought this might make it possible to relax the "looping", this is probably just wrong: The wrapped Elements just can't have control over where the connector should go, as the wrapping and the wrapped elements have to negotiate what the best solution is ("It seem desireable to return downwards now, but this will cause bigger problems somewhere else").
Have RailroadNode-implementors just leave the connector dangling somewhere and make it the job of each wrapping Element to return the connector to the desired height. This change of contract is probably the right solution.
Forgo the entire fixed connector drawing and use A* under some waypoint-constraints. This is too complex to justify.
The A*-solution would also solve the Limiting-case in the example above: The Optional connector runs all the way to the right before reconnecting to the main line, while it could reconnect right after EXPR. Again, I think this is something to be done in a re-implementation.
In the example 12_select-stmt_diagram.txt, a lot of line length and tracing work for the eye can be saved if the box exit is not forced to be at the same y level as the entry. For example, the marked "extra loop" here could be omitted:
The text was updated successfully, but these errors were encountered: