code: def literal(x):
      
      xlen = len(x)
      msg = 'Expected: "{}"'.format(x)
      def match_literal(s, grm=None, pos=0):
          if s[:xlen] == x:
              return PegreResult(s[xlen:], x, (pos, pos+xlen))
          raise PegreError(msg, pos)
      return match_literal
docs: Create a PEG function to consume a literal.