lua-users home
lua-l archive

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

On Mon, Jun 25, 2012 at 12:18 PM, sergei karhof <> wrote:
> Basically, Rexx parsing is about chopping up strings into chunks,
> according to user-defined criteria, and serially assigning them to
> variables.

Somewhat similar is SIP (Simple Input Patterns, aka 'Lua string
patterns for Dummies'):

 ==> res=={'name','dolly'}
==> res=={second='smith',first='john'}

Nothing is magic in these strings, except for $TYPE [ {OPTIONAL_NAME}
].  Any space is treated as %s+

If I were redesigning this, I'd make the 'out' argument res optional,
and then it would return a new table.

Actually _assigning local variables_ is another matter, but David
Manura posted a most elegant solution, which I can't find.

steve d.