Class ResolveNamesVisitor


  • public class ResolveNamesVisitor
    extends Visitor
    A visitor which creates associations between objects according to their names obtained from the input file.

    Missing implicit subrules are inferred.

    Because the AST was constructed in one pass, backward references are not yet solved. This visitor resolves them (along with the backward references).

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void visit​(Decoder decoder)
      First saves all rule names and then traverses the rule subtrees.
      void visit​(Rule rule)
      Adds item(s) to the map from rule names to rules.
      void visit​(Subrule subrule)
      Associates the subrule with the rule.
      void visit​(Value value)
      Associates the value with the rule.
      void visit​(Variant variant)
      Associates the variant with the subrule which it returns.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResolveNamesVisitor

        public ResolveNamesVisitor()