def lookup_identifier(name)
      if has_rule?(name)
        ident = lookup_rule(name)
      elsif has_terminal?(name)
        ident = @terminals[name]
      else
        ident = nil
      end

      return ident
    end
def lookup_identifier(name)
      if has_rule?(name)
        ident = lookup_rule(name)
      elsif has_terminal?(name)
        ident = @terminals[name]
      else
        ident = nil
      end

      return ident
    end
Looks up an identifier from the list of terminals and/or rules. Rules take
 precedence over terminals.

 If no rule/terminal could be found nil is returned instead.

 @param [String] name
 @return [LL::Rule|LL::Terminal|NilClass]