[NTG-context] Off-topic: Struggles with LPEG grammar
Taco Hoekwater
taco at elvenkind.com
Mon Dec 21 15:18:56 CET 2020
Hi,
Also good reading are the first sections in Roberto’s paper:
http://www.inf.puc-rio.br/~roberto/docs/peg.pdf
>
> In reality it just means that I was trying to add a new rule to solve
> the second part of the puzzle (hidden on the website until you solve
> the first part), which read something like
> 6: 3 | 3 6
> which would in theory be translated into something like
> r6 = lpeg.V"r3" + lpeg.V"r3" * lpeg.V"r6",
> if PEGs worked the way I imagined they worked, that is. Apparently they don't :)
Try this, blind guess:
r6 = lpeg.V"r3" * lpeg.V”r6” + lpeg.V"r3",
Best wishes,
Taco
Taco Hoekwater
Elvenkind BV
More information about the ntg-context
mailing list