lua-users home
lua-l archive

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


This is an appeal for help with pattern matching. I appreciate
that one can ask too much of the pattern matching provided
in stringlib, and that for things like syntax colouring one
really needs a full-blooded parser. However, maybe there are
some wizards out there who can save me a lot of mental effort.
How do I specify a pattern for a Lua keyword?
How do I say that either the keyword begins a line or is
preceded by a character matching [^%w_], and that either
it ends a line or is followed by a character matching [^%w_],
for example?
It would be useful to have a little dictionary of useful
patterns on the Lua website.
-- 
Gavin Wraith (gavin@wraith.u-net.com) or (gavinw@sussex.ac.uk)
Home page: http://www.wraith.u-net.com/