lua-users home
lua-l archive

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

2015-07-18 22:12 GMT+02:00 Sean Conner <>:

>   But this also works:
>> for word in line:gmatch"(%w+)%s*" do print(word) end

>   No need for a patch unless you *want* a space or an end-of-line (or
> string) at the end of each word.  If you want that, them I might suggest
> LPeg for your parsing needs.

I agree, of course. It's just that I like to test functionality extensions
by implementing them and discovering whether I continue using
them when the toy is not so new any more.

We may one day have LPeg in Lua itself. It was mooted by Roberto
as a candidate for 5.3. Enriching the present pattern syntax is not
supportive of that goal.