protected Object constructObject(Node node){
  if (constructedObjects.containsKey(node)) {
    return constructedObjects.get(node);
  }
  if (recursiveObjects.contains(node)) {
    throw new ConstructorException(null,null,"found unconstructable recursive node",node.getStartMark());
  }
  recursiveObjects.add(node);
  Construct constructor=getConstructor(node);
  Object data=constructor.construct(node);
  constructedObjects.put(node,data);
  recursiveObjects.remove(node);
  if (node.isTwoStepsConstruction()) {
    constructor.construct2ndStep(node,data);
  }
  return data;
}

protected Object constructObject ( Node node ) { if ( constructedObjects . containsKey ( node ) ) { return constructedObjects . get ( node ) ; } if ( recursiveObjects . contains ( node ) ) { throw new ConstructorException ( null , null , "found unconstructable recursive node" , node . getStartMark ( ) ) ; } recursiveObjects . add ( node ) ; Construct constructor = getConstructor ( node ) ; Object data = constructor . construct ( node ) ; constructedObjects . put ( node , data ) ; recursiveObjects . remove ( node ) ; if ( node . isTwoStepsConstruction ( ) ) { constructor . construct2ndStep ( node , data ) ; } return data ; }
construct object from the specified node . return existing instance if the node is already constructed .
