Source-Changes-HG archive

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

[src/trunk]: src/external/mit/lua/dist/doc after-import fixes, conflict resol...



details:   https://anonhg.NetBSD.org/src/rev/b50b7df9dccd
branches:  trunk
changeset: 823563:b50b7df9dccd
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Wed Apr 26 12:36:53 2017 +0000

description:
after-import fixes, conflict resolution

diffstat:

 external/mit/lua/dist/doc/contents.html |    7 +-
 external/mit/lua/dist/doc/lua.1         |    5 +-
 external/mit/lua/dist/doc/luac.1        |    2 +-
 external/mit/lua/dist/doc/manual.html   |  281 ++++++++++++++++++++-----------
 external/mit/lua/dist/doc/readme.html   |    6 +-
 5 files changed, 189 insertions(+), 112 deletions(-)

diffs (truncated from 744 to 300 lines):

diff -r 31b51d67ec25 -r b50b7df9dccd external/mit/lua/dist/doc/contents.html
--- a/external/mit/lua/dist/doc/contents.html   Wed Apr 26 11:38:37 2017 +0000
+++ b/external/mit/lua/dist/doc/contents.html   Wed Apr 26 12:36:53 2017 +0000
@@ -32,7 +32,7 @@
 
 <P>
 <SMALL>
-Copyright &copy; 2015&ndash;2016 Lua.org, PUC-Rio.
+Copyright &copy; 2015&ndash;2017 Lua.org, PUC-Rio.
 Freely available under the terms of the
 <A HREF="http://www.lua.org/license.html";>Lua license</A>.
 </SMALL>
@@ -512,6 +512,7 @@
 <A HREF="manual.html#luaL_newmetatable">luaL_newmetatable</A><BR>
 <A HREF="manual.html#luaL_newstate">luaL_newstate</A><BR>
 <A HREF="manual.html#luaL_openlibs">luaL_openlibs</A><BR>
+<A HREF="manual.html#luaL_opt">luaL_opt</A><BR>
 <A HREF="manual.html#luaL_optinteger">luaL_optinteger</A><BR>
 <A HREF="manual.html#luaL_optlstring">luaL_optlstring</A><BR>
 <A HREF="manual.html#luaL_optnumber">luaL_optnumber</A><BR>
@@ -608,10 +609,10 @@
 
 <P CLASS="footer">
 Last update:
-Thu Jan 14 10:14:28 BRST 2016
+Thu Dec 22 18:29:39 BRST 2016
 </P>
 <!--
-Last change: revised for Lua 5.3.3
+Last change: revised for Lua 5.3.4
 -->
 
 </BODY>
diff -r 31b51d67ec25 -r b50b7df9dccd external/mit/lua/dist/doc/lua.1
--- a/external/mit/lua/dist/doc/lua.1   Wed Apr 26 11:38:37 2017 +0000
+++ b/external/mit/lua/dist/doc/lua.1   Wed Apr 26 12:36:53 2017 +0000
@@ -1,6 +1,7 @@
-.\"    $NetBSD: lua.1,v 1.5 2016/09/08 02:21:31 salazar Exp $
+.\"    $NetBSD: lua.1,v 1.6 2017/04/26 12:36:53 mbalmer Exp $
 .\"
-.TH LUA 1 "Date: 2014/12/10 15:55:45 "
+.\" Id: lua.man,v 1.14 2016/10/17 15:43:50 lhf Exp 
+.TH LUA 1 "Date: 2016/10/17 15:43:50 "
 .SH NAME
 lua \- Lua interpreter
 .SH SYNOPSIS
diff -r 31b51d67ec25 -r b50b7df9dccd external/mit/lua/dist/doc/luac.1
--- a/external/mit/lua/dist/doc/luac.1  Wed Apr 26 11:38:37 2017 +0000
+++ b/external/mit/lua/dist/doc/luac.1  Wed Apr 26 12:36:53 2017 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: luac.1,v 1.4 2016/09/08 02:21:31 salazar Exp $
+.\"    $NetBSD: luac.1,v 1.5 2017/04/26 12:36:53 mbalmer Exp $
 .\"
 .\" Id: luac.man,v 1.29 2011/11/16 13:53:40 lhf Exp 
 .TH LUAC 1 "Date: 2011/11/16 13:53:40 "
diff -r 31b51d67ec25 -r b50b7df9dccd external/mit/lua/dist/doc/manual.html
--- a/external/mit/lua/dist/doc/manual.html     Wed Apr 26 11:38:37 2017 +0000
+++ b/external/mit/lua/dist/doc/manual.html     Wed Apr 26 12:36:53 2017 +0000
@@ -19,7 +19,7 @@
 
 <P>
 <SMALL>
-Copyright &copy; 2015&ndash;2016 Lua.org, PUC-Rio.
+Copyright &copy; 2015&ndash;2017 Lua.org, PUC-Rio.
 Freely available under the terms of the
 <a href="http://www.lua.org/license.html";>Lua license</a>.
 </SMALL>
@@ -35,7 +35,7 @@
 <!-- ====================================================================== -->
 <p>
 
-<!-- Id: manual.of,v 1.162 2016/05/30 15:57:03 roberto Exp  -->
+<!-- Id: manual.of,v 1.167 2017/01/09 15:18:11 roberto Exp  -->
 
 
 
@@ -216,7 +216,7 @@
 
 <p>
 Tables are the sole data-structuring mechanism in Lua;
-they can be used to represent ordinary arrays, sequences,
+they can be used to represent ordinary arrays, lists,
 symbol tables, sets, records, graphs, trees, etc.
 To represent records, Lua uses the field name as an index.
 The language supports this representation by
@@ -226,13 +226,6 @@
 
 
 <p>
-We use the term <em>sequence</em> to denote a table where
-the set of all positive numeric keys is equal to {1..<em>n</em>}
-for some non-negative integer <em>n</em>,
-which is called the length of the sequence (see <a href="#3.4.7">&sect;3.4.7</a>).
-
-
-<p>
 Like indices,
 the values of table fields can be of any type.
 In particular,
@@ -378,6 +371,9 @@
 will call the message handler again.
 If this loop goes on for too long,
 Lua breaks it and returns an appropriate message.
+(The message handler is called only for regular runtime errors.
+It is not called for memory-allocation errors
+nor for errors while running finalizers.)
 
 
 
@@ -873,7 +869,7 @@
 <p>
 Only objects that have an explicit construction
 are removed from weak tables.
-Values, such as numbers and light C functions,
+Values, such as numbers and light C&nbsp;functions,
 are not subject to garbage collection,
 and therefore are not removed from weak tables
 (unless their associated values are collected).
@@ -1084,7 +1080,7 @@
 <code>and</code> is a reserved word, but <code>And</code> and <code>AND</code>
 are two different, valid names.
 As a convention,
-programs should avoid creating 
+programs should avoid creating
 names that start with an underscore followed by
 one or more uppercase letters (such as <a href="#pdf-_VERSION"><code>_VERSION</code></a>).
 
@@ -1101,7 +1097,7 @@
 </pre>
 
 <p>
-<em>Literal strings</em>
+A <em>short literal string</em>
 can be delimited by matching single or double quotes,
 and can contain the following C-like escape sequences:
 '<code>\a</code>' (bell),
@@ -1114,7 +1110,7 @@
 '<code>\\</code>' (backslash),
 '<code>\"</code>' (quotation mark [double quote]),
 and '<code>\'</code>' (apostrophe [single quote]).
-A backslash followed by a real newline
+A backslash followed by a line break
 results in a newline in the string.
 The escape sequence '<code>\z</code>' skips the following span
 of white-space characters,
@@ -1122,13 +1118,13 @@
 it is particularly useful to break and indent a long literal string
 into multiple lines without adding the newlines and spaces
 into the string contents.
-
-
-<p>
-Strings in Lua can contain any 8-bit value, including embedded zeros,
-which can be specified as '<code>\0</code>'.
-More generally,
-we can specify any byte in a literal string by its numeric value.
+A short literal string cannot contain unescaped line breaks
+nor escapes not forming a valid escape sequence.
+
+
+<p>
+We can specify any byte in a short literal string by its numeric value
+(including embedded zeros).
 This can be done
 with the escape sequence <code>\x<em>XX</em></code>,
 where <em>XX</em> is a sequence of exactly two hexadecimal digits,
@@ -1172,17 +1168,6 @@
 
 
 <p>
-Any byte in a literal string not
-explicitly affected by the previous rules represents itself.
-However, Lua opens files for parsing in text mode,
-and the system file functions may have problems with
-some control characters.
-So, it is safer to represent
-non-text data as a quoted literal with
-explicit escape sequences for the non-text characters.
-
-
-<p>
 For convenience,
 when the opening long bracket is immediately followed by a newline,
 the newline is not included in the string.
@@ -1203,6 +1188,17 @@
 </pre>
 
 <p>
+Any byte in a literal string not
+explicitly affected by the previous rules represents itself.
+However, Lua opens files for parsing in text mode,
+and the system file functions may have problems with
+some control characters.
+So, it is safer to represent
+non-text data as a quoted literal with
+explicit escape sequences for the non-text characters.
+
+
+<p>
 A <em>numeric constant</em> (or <em>numeral</em>)
 can be written with an optional fractional part
 and an optional decimal exponent,
@@ -1212,7 +1208,7 @@
 Hexadecimal constants also accept an optional fractional part
 plus an optional binary exponent,
 marked by a letter '<code>p</code>' or '<code>P</code>'.
-A numeric constant with a radix point or an exponent 
+A numeric constant with a radix point or an exponent
 denotes a float;
 otherwise,
 if its value fits in an integer,
@@ -1897,7 +1893,7 @@
 
 
 <p>
-Floor division (<code>//</code>) is a division 
+Floor division (<code>//</code>) is a division
 that rounds the quotient towards minus infinity,
 that is, the floor of the division of its operands.
 
@@ -1959,7 +1955,7 @@
 The C API also converts both integers to floats and
 floats to integers, as needed.
 Moreover, string concatenation accepts numbers as arguments,
-besides strings. 
+besides strings.
 
 
 <p>
@@ -1997,7 +1993,7 @@
 
 
 <p>
-All conversions from strings to numbers 
+All conversions from strings to numbers
 accept both a dot and the current locale mark
 as the radix character.
 (The Lua lexer, however, accepts only a dot.)
@@ -2140,37 +2136,66 @@
 
 <p>
 The length operator is denoted by the unary prefix operator <code>#</code>.
+
+
+<p>
 The length of a string is its number of bytes
 (that is, the usual meaning of string length when each
 character is one byte).
 
 
 <p>
+The length operator applied on a table
+returns a border in that table.
+A <em>border</em> in a table <code>t</code> is any natural number
+that satisfies the following condition:
+
+<pre>
+     (border == 0 or t[border] ~= nil) and t[border + 1] == nil
+</pre><p>
+In words,
+a border is any (natural) index in a table
+where a non-nil value is followed by a nil value
+(or zero, when index 1 is nil).
+
+
+<p>
+A table with exactly one border is called a <em>sequence</em>.
+For instance, the table <code>{10, 20, 30, 40, 50}</code> is a sequence,
+as it has only one border (5).
+The table <code>{10, 20, 30, nil, 50}</code> has two borders (3 and 5),
+and therefore it is not a sequence.
+The table <code>{nil, 20, 30, nil, nil, 60, nil}</code>
+has three borders (0, 3, and 6),
+so it is not a sequence, too.
+The table <code>{}</code> is a sequence with border 0.
+Note that non-natural keys do not interfere
+with whether a table is a sequence.
+
+
+<p>
+When <code>t</code> is a sequence,
+<code>#t</code> returns its only border,
+which corresponds to the intuitive notion of the length of the sequence.
+When <code>t</code> is not a sequence,
+<code>#t</code> can return any of its borders.
+(The exact one depends on details of
+the internal representation of the table,
+which in turn can depend on how the table was populated and
+the memory addresses of its non-numeric keys.)
+
+
+<p>
+The computation of the length of a table
+has a guaranteed worst time of <em>O(log n)</em>,
+where <em>n</em> is the largest natural key in the table.
+
+
+<p>
 A program can modify the behavior of the length operator for
 any value but strings through the <code>__len</code> metamethod (see <a href="#2.4">&sect;2.4</a>).



Home | Main Index | Thread Index | Old Index