From 664da61c079f762d835ea6f875cdf3da96982bab Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 23 Jun 2023 14:56:42 -0300 Subject: Copyright notice in module 're' --- re.html | 34 +++------------------------------- re.lua | 10 +++++++--- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/re.html b/re.html index 114d968..ddad801 100644 --- a/re.html +++ b/re.html @@ -100,7 +100,7 @@ equivalent to p / defs[name] p => name match-time capture equivalent to lpeg.Cmt(p, defs[name]) p ~> name fold capture -equivalent to lpeg.Cf(p, defs[name]) +(deprecated) p >> name accumulator capture equivalent to (p % defs[name]) @@ -458,37 +458,9 @@ print(re.match(p, p)) -- a self description must match itself

License

-Copyright © 2008-2023 Lua.org, PUC-Rio. -

-

-Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), -to deal in the Software without restriction, -including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, -and to permit persons to whom the Software is -furnished to do so, -subject to the following conditions: -

- -

-The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. -

+This module is part of the LPeg package and shares +its license. -

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -

diff --git a/re.lua b/re.lua index 5044e9e..1fb9fa9 100644 --- a/re.lua +++ b/re.lua @@ -1,3 +1,7 @@ +-- +-- Copyright 2007-2023, Lua.org & PUC-Rio (see 'lpeg.html' for license) +-- written by Roberto Ierusalimschy +-- -- imported functions and modules local tonumber, type, print, error = tonumber, type, print, error @@ -9,14 +13,14 @@ local m = require"lpeg" -- on 'mm' local mm = m --- pattern's metatable +-- patterns' metatable local mt = getmetatable(mm.P(0)) +local version = _VERSION -- No more global accesses after this point -local version = _VERSION -if version == "Lua 5.2" then _ENV = nil end +_ENV = nil -- does no harm in Lua 5.1 local any = m.P(1) -- cgit v1.2.3-55-g6feb