lua-users home
lua-l archive

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

David Given <> 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.