code: def nonterminal(n):
      
      def match_nonterminal(s, grm=None, pos=0):
          if grm is None: grm = {}
          expr = grm[n]
          return expr(s, grm, pos)
      return match_nonterminal
docs: Create a PEG function to match a nonterminal.