[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua parser generator?
- From: Miles Bader <miles@...>
- Date: Sat, 10 Oct 2009 13:26:03 +0900
David Given <firstname.lastname@example.org> writes:
> Failing that, is there any way of making LPEG parse abstract tokens and
> not bytes from a string?
Hmm, write (usually more or less trivial) lpeg descriptions of your
tokens and use them in your grammar? Lpeg does the job of both Yacc and
The details depend on the sort of tokens you have and their grammar, but
almost every lpeg parser does something like this, so there are lots and
lots of examples around.
I'd rather be consing.