class Fluent::Config::LiteralParser

def scan_nonquoted_string(boundary_charset = LINE_END)

def scan_nonquoted_string(boundary_charset = LINE_END)
  charset = /(?!#{boundary_charset})./
  string = []
  while true
    if s = scan(/\#/)
      string << '#'
    elsif s = scan(charset)
      string << s
    else
      break
    end
  end
  if string.empty?
    return nil
  end
  string.join
end