[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LPEG 're' module self-test fails
- From: Nick Gammon <nick@...>
- Date: Sat, 18 Jun 2016 11:29:07 +1000
On this page: http://www.inf.puc-rio.br/~roberto/lpeg/re.html
there is a self-test for the 're' module grammar (near the end). In particular:
print(re.match(p, p)) -- a self description must match itself
However testing with Lua 5.1.5, LPEG 1.0.0 and re 1.44, the test fails (it prints nil).
After extensive experimentation, it appears that changing the rule:
exp <- S (alternative / grammar)
to:
exp <- S (grammar / alternative)
fixes the problem. Does this seem valid? If so, could the web page be updated please?
- Nick