def parse_check_defined_node(name, flag)
      isdef = node_defined?(name)

      if isdef != flag
        isdef ? err(RedefinedError, "#{name} already defined") :
          err(UndefinedError, "#{name} not defined yet")
      end
    end
def parse_check_defined_node(name, flag)
      isdef = node_defined?(name)

      if isdef != flag
        isdef ? err(RedefinedError, "#{name} already defined") :
          err(UndefinedError, "#{name} not defined yet")
      end
    end
Check to see if node with given name is defined.  flag tells the
 method about our expectation.  flag=true means that we make sure
 that name is defined.  flag=false is the opposite.