lpeg Questions
1
So I am playing with lpeg to replace a boost spirit grammar, I must say boost::spirit is far more elegant and natural than lpeg. However it is a bitch to work with due to the constraints of current...
Sodality asked 1/11, 2011 at 15:20
2
Solved
In a normal PEG (parsing expression grammar) this is a valid grammar:
values <- number (comma values)*
number <- [0-9]+
comma <- ','
However, if I try to write this using LPeg the recur...
1
Solved
The following pattern (from this page) matches only strings with balanced parentheses:
b = lpeg.P{ "(" * ((1 - lpeg.S"()") + lpeg.V(1))^0 * ")" }
What does 1- in 1 - lpeg.S"()" mean?
function g...
1
Solved
Part of a Lua application of mine is a search bar, and I'm trying to make it understand boolean expressions. I'm using LPeg, but the current grammar gives a strange result:
> re, yajl = require...
Shoddy asked 13/1, 2012 at 1:38
1
© 2022 - 2024 — McMap. All rights reserved.