I think I solved the problem. What I didn’t mention in my initial post was I’d tried to solve the problem by introducing an intermediate nonterminal like so:
expression is defined as expression followed by ::period:: and <identifier>. It is recursive.
A grammar can be recursive, but not left-recursive. It must consume at least one token before starting a new recursion. This Wikipedia articles provide all the information you need: Left recursion.
ANTLR4 has time to apply algorithms to resolve left-recursion. In the context of Hoa\Compiler, we don’t, because it is executed directly. Since recent changes, we are able to “save” the compiler into a file (kind of serialisation). This is a good opportunity to apply more algorithms to simplify the grammar, remove left-recursion etc. probably.