There is an old idea called “railroad diagrams” that attempts to do so. This post might be interesting:
Searching for that terms also finds other resources like this PDF from here.