mike-lischke/vscode-antlr4

railroad diagram: empty route and repeating routes are ambigious

amryounis opened this issue · 3 comments

it is not clear which is which:

image

As the name implies, read it like a train would go. From start you can only drive to infoResponse or bestMoveResponse. From the both you can go back (a loop) or continue forward until your reach the branch going down right before EOF back to the beginning (another loop). There's no misinterpretation possible here. Additionally, you can drive around bestMoveResponse to skip it. From there you cannot go back (the track ends after the loop back).

So, what's not clear here?

first thank you for your reply. while the provided description provides clear interpretation, I still see it unclear from my side.

you might agree with me that following one provides easier visual interpretation of the roads:

image

Yes, it's slightly better than the one above. Unfortunately, I have not much influence to the rendering, as that is done by a 3rd party lib.

Side note: this example seems a bit contrived, given that you can go from start to end and back in an endless loop without consuming anything.