code: def optional(e, default=Ignore):
      
      def match_optional(s, grm=None, pos=0):
          try:
              return e(s, grm, pos)
          except PegreError:
              return PegreResult(s, default, (pos, pos))
      return match_optional
docs: Create a PEG function to optionally match an expression.