Resolving of References in NTAs
Problem
Unresolved references in NTAs are not resolved when calling treeResolveAll()
, because this method traverses using the getChild()
method.
Discussion
For NTAs specified in the grammar with /SomeNTA/
, this can be solved by generating specific treeResolveAll()
methods for the nonterminals containing such NTAs.
For NTAs specified in an aspect, this is hard to solve, because we don't know about these NTAs at all in the relast preprocessor.
However, this points to another problem. While getChild()
is marked as low-level
, it is still used in some cases. Thus, resolving should be triggered there instead of in the high-level getters.
Finally, since @johannes.mey is preparing a complete overhaul of the resolution mechanism with the goal of not having any resolver logic in the final generated classes, all of this discussion might be obsolete.