lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I just updated some little details in the documentation of LPeg
0.10. (It is not very polite to do these changes without changing file
names, but this is a pre-1.0 version...)

In particular, I added a line in HISTORY about a small incompatibility
with 0.9 that I had forgot to mention. In 0.10, "and" predicates
("positive look-aheads") do not keep captures as they did in 0.9.
This restores the equivalence "&e == !!e" of original PEG and solves
a subtle bug in 0.9:

  x = re.compile[[   {~ (&(. ([a-z]* -> '*')) ([a-z]+ -> '+') ' '*)* ~}  ]]
  print(x:match"alo alo")


-- Roberto