code: function opt(pattern, defval) {
          return new Pattern(pattern + '?', function (str, pos) {
              return pattern.exec(str, pos) || { res: defval, end: pos };
          });
      }
docs: parses an optional pattern