lua-users home
lua-l archive

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


> local R = lpeg.R
> local S = lpeg.S
>
> local upp, low = R'AZ', R'az'
> local oct, dec = R'07', R'09'
> local hex      = dec + R'AF' + R'af'
> local letter   = upp + low
> local alnum    = letter + dec + '_'
> local endline  = S'\r\n\f'
> local newline  = '\r\n' + endline

To these, I would add:

nondigit = P"_" + R"az" + R"AZ"
nonzero_digit = R"19"
sign = S"-+"