lua-users home
lua-l archive

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


David Given <dg@cowlark.com> 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
Lex.

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.


-Miles

-- 
I'd rather be consing.