lua-users home
lua-l archive

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




On 27/07/15 04:46 AM, Dirk Laurie wrote:
2015-07-27 3:47 GMT+02:00 Soni L. <fakedme@gmail.com>:

TL;DR: Let's keep features that are available in both Lua patterns and
full regex as similar as possible to their traditional syntax in full
regex. Creating large amounts of unnecessary differences and confusion
for the sake of a small performance gain is not worth the frustration
it would cause.

There are a few added benefits. With ClEx, (test) would be a group (test)
even when inserted inside a set [(test)]. Name me one regex engine where you
can do that!
Being in timezone +02:00, I was happily asleep in bed while all this
was unfolding, so though I seem to replying to the most recent message,
it's actually to the whole thread.

1. There's no code on the github site. It's just a description of
what the code will do. There has been feedback from one
reader, who asks for examples showing e.g. how ClEx would
code the string recipes on the Lua Wiki.
2. Presumably what will be delivered is a C module that can be
required as "clex", returning a table that one can install as
a drop-in replacement for "string" by
      getmetatable"".__index = clex
after which traditional 'string' is still available explicitly but not
via object-style syntax.
3. Once (2) is possible, I shall regard ClEx as something that
one can discuss on Lua-L. Until then, it is a specification for
unwritten software that can adequately be discussed on
GitHub Gist.

ClEx applies the goals of Lua, extensibility and embeddability, to pattern matching.

--
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.