mike-lischke / vscode-antlr4

ANTLR4 language support for Visual Studio Code
http://www.soft-gems.net
MIT License
436 stars 61 forks source link

railroad diagram: empty route and repeating routes are ambigious #238

Open amryounis opened 11 months ago

amryounis commented 11 months ago

it is not clear which is which:

image

mike-lischke commented 11 months ago

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?

amryounis commented 11 months ago

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

mike-lischke commented 11 months ago

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.