Re: Help with Lexer/Parser Internals Please!
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Help with Lexer/Parser Internals Please!
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2015年9月23日 13:34:28 -0300
> t = Set{'cat', 'dog'}
>
> seems short enough and very readable
Or simply
t = Set'cat, dog'
where
function Set(s)
local t={}
for k in s:gmatch("%w+") do
t[k]=true
end
return t
end
Adapt the pattern "%w+" as needed.