I am trying to write a grammar for a state transition language using Antlr4
This system has variables (e.g., states) that are declared once and can be referenced elsewhere.
My question is: does Antlr4 support cross-references as in XText?
If Antlr4 does not provide this functionality, I guess an "easy" way to do it is by having a memory Map that parses the tokens and stores the information in this Map?