diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-06-23 14:56:42 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-06-23 14:56:42 -0300 |
commit | 664da61c079f762d835ea6f875cdf3da96982bab (patch) | |
tree | 0acb6ddebd549b1efea9c875b641be02c75d6221 | |
parent | 8bc00db24975f52b52e6ef8184c216ce2feae9fd (diff) | |
download | lpeg-664da61c079f762d835ea6f875cdf3da96982bab.tar.gz lpeg-664da61c079f762d835ea6f875cdf3da96982bab.tar.bz2 lpeg-664da61c079f762d835ea6f875cdf3da96982bab.zip |
Copyright notice in module 're'
-rw-r--r-- | re.html | 34 | ||||
-rw-r--r-- | re.lua | 10 |
2 files changed, 10 insertions, 34 deletions
@@ -100,7 +100,7 @@ equivalent to <code>p / defs[name]</code></td></tr> | |||
100 | <tr><td><code>p => name</code></td> <td>match-time capture | 100 | <tr><td><code>p => name</code></td> <td>match-time capture |
101 | equivalent to <code>lpeg.Cmt(p, defs[name])</code></td></tr> | 101 | equivalent to <code>lpeg.Cmt(p, defs[name])</code></td></tr> |
102 | <tr><td><code>p ~> name</code></td> <td>fold capture | 102 | <tr><td><code>p ~> name</code></td> <td>fold capture |
103 | equivalent to <code>lpeg.Cf(p, defs[name])</code></td></tr> | 103 | (deprecated)</td></tr> |
104 | <tr><td><code>p >> name</code></td> <td>accumulator capture | 104 | <tr><td><code>p >> name</code></td> <td>accumulator capture |
105 | equivalent to <code>(p % defs[name])</code></td></tr> | 105 | equivalent to <code>(p % defs[name])</code></td></tr> |
106 | </tbody></table> | 106 | </tbody></table> |
@@ -458,37 +458,9 @@ print(re.match(p, p)) -- a self description must match itself | |||
458 | <h2><a name="license">License</a></h2> | 458 | <h2><a name="license">License</a></h2> |
459 | 459 | ||
460 | <p> | 460 | <p> |
461 | Copyright © 2008-2023 Lua.org, PUC-Rio. | 461 | This module is part of the <a href="lpeg.html">LPeg</a> package and shares |
462 | </p> | 462 | its <a href="lpeg.html#license">license</a>. |
463 | <p> | ||
464 | Permission is hereby granted, free of charge, | ||
465 | to any person obtaining a copy of this software and | ||
466 | associated documentation files (the "Software"), | ||
467 | to deal in the Software without restriction, | ||
468 | including without limitation the rights to use, | ||
469 | copy, modify, merge, publish, distribute, sublicense, | ||
470 | and/or sell copies of the Software, | ||
471 | and to permit persons to whom the Software is | ||
472 | furnished to do so, | ||
473 | subject to the following conditions: | ||
474 | </p> | ||
475 | |||
476 | <p> | ||
477 | The above copyright notice and this permission notice | ||
478 | shall be included in all copies or substantial portions of the Software. | ||
479 | </p> | ||
480 | 463 | ||
481 | <p> | ||
482 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
483 | EXPRESS OR IMPLIED, | ||
484 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
485 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
486 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
487 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
488 | TORT OR OTHERWISE, ARISING FROM, | ||
489 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
490 | THE SOFTWARE. | ||
491 | </p> | ||
492 | 464 | ||
493 | </div> <!-- id="content" --> | 465 | </div> <!-- id="content" --> |
494 | 466 | ||
@@ -1,3 +1,7 @@ | |||
1 | -- | ||
2 | -- Copyright 2007-2023, Lua.org & PUC-Rio (see 'lpeg.html' for license) | ||
3 | -- written by Roberto Ierusalimschy | ||
4 | -- | ||
1 | 5 | ||
2 | -- imported functions and modules | 6 | -- imported functions and modules |
3 | local tonumber, type, print, error = tonumber, type, print, error | 7 | local tonumber, type, print, error = tonumber, type, print, error |
@@ -9,14 +13,14 @@ local m = require"lpeg" | |||
9 | -- on 'mm' | 13 | -- on 'mm' |
10 | local mm = m | 14 | local mm = m |
11 | 15 | ||
12 | -- pattern's metatable | 16 | -- patterns' metatable |
13 | local mt = getmetatable(mm.P(0)) | 17 | local mt = getmetatable(mm.P(0)) |
14 | 18 | ||
15 | 19 | ||
20 | local version = _VERSION | ||
16 | 21 | ||
17 | -- No more global accesses after this point | 22 | -- No more global accesses after this point |
18 | local version = _VERSION | 23 | _ENV = nil -- does no harm in Lua 5.1 |
19 | if version == "Lua 5.2" then _ENV = nil end | ||
20 | 24 | ||
21 | 25 | ||
22 | local any = m.P(1) | 26 | local any = m.P(1) |