moreati / ppeg

A Python port of Lua's LPeg pattern matching library
MIT License
6 stars 2 forks source link

Pattern(function) support #10

Open moreati opened 9 years ago

moreati commented 9 years ago

lpeg.P(func) "returns a pattern equivalent to a match-time capture over the empty string". PPeg throws an exception

>>> from _ppeg import Pattern as P
>>> P(str)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Pattern argument must be None, or convertible to a string or an integer
moreati commented 9 years ago

related to #3