gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, feature/typed-regex, updated. gawk-4.1.0


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, feature/typed-regex, updated. gawk-4.1.0-2037-g7a985e9
Date: Wed, 26 Oct 2016 18:55:44 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/typed-regex has been updated
       via  7a985e9734fe4517c92c86bc45cfea20129aa482 (commit)
      from  627c1b8f9913547703c7c53b0716b913f327a402 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=7a985e9734fe4517c92c86bc45cfea20129aa482

commit 7a985e9734fe4517c92c86bc45cfea20129aa482
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Oct 26 21:54:48 2016 +0300

    Move to master's copy of doc to make merges easy.
    Save real doc diff in a separate file.

diff --git a/doc/gawk.texi b/doc/gawk.texi
index 87fe661..3c31cef 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -6284,70 +6284,6 @@ str = "hi"      @ii{String variable}
 re = /foo/      @ii{Wrong!} re @ii{is the result of} $0 ~ /foo/
 @end example
 
-For a number of more advanced use cases (described later on in this
address@hidden), it would be nice to have regexp constants that
-are @dfn{strongly typed}; in other words, that denote a regexp useful
-for matching, and not an expression.
-
address@hidden provides this feature.  A strongly typed regexp constant
-looks almost like a regular regexp constant, except that it is preceded
-by an @samp{@@} sign:
-
address@hidden
-re = @@/foo/     @ii{Regexp variable}
address@hidden example
-
-Strongly typed regexp constants @emph{cannot} be used eveywhere that a
-regular regexp constant can, because this would make the language even more
-confusing.  Instead, you may use them only in certain contexts:
-
address@hidden @bullet
address@hidden
-On the righthand side of the @samp{~} and @samp{!~} operators: @samp{some_var 
~ @@/foo/}
-(@pxref{Regexp Usage}).
-
address@hidden
-In the @code{case} part of a @code{switch} statement
-(@pxref{Switch Statement}).
-
address@hidden
-As an argument to one of the built-in functions that accept regexp constants:
address@hidden()},
address@hidden()},
address@hidden()},
address@hidden()},
address@hidden()},
-and
address@hidden()}
-(@pxref{String Functions}).
-
address@hidden
-As a parameter in a call to a user-defined function
-(@pxref{User-defined}).
-
address@hidden
-On the righthand side of an assignment to a variable: @samp{some_var = 
@@/foo/}.
-In this case, the type of @code{some_var} is regexp. Additionally, 
@code{some_var}
-can be used with @samp{~} and @samp{!~}, passed to one of the built-in 
functions
-listed above, or passed as a parameter to a user-defined function.
address@hidden itemize
-
-You may use the @code{typeof()} built-in function
-(@pxref{Type Functions})
-to determine if a variable or function parameter is
-a regexp variable.
-
-The true power of this feature comes from the ability to create variables that
-have regexp type. Such variables can be passed on to user-defined functions,
-without the confusing aspects of computed regular expressions created from
-strings or string constants. They may also be passed through indirect function
-calls (@pxref{Indirect Calls})
-onto the built-in functions that accept regexp constants.
-
-When used in numeric conversions, strongly typed regexp variables convert
-to zero. When used in string conversions, they convert to the string
-value of the original regexp text.
-
 @node Regexp Summary
 @section Summary
 
@@ -6391,11 +6327,6 @@ treated as regular expressions).
 case sensitivity of regexp matching.  In other @command{awk}
 versions, use @code{tolower()} or @code{toupper()}.
 
address@hidden
-Strongly typed regexp constants (@code{@@/.../}) enable
-certain advanced use cases to be described later on in the
address@hidden
-
 @end itemize
 
 
@@ -19706,9 +19637,6 @@ Return one of the following strings, depending upon the 
type of @var{x}:
 @item "array"
 @var{x} is an array.
 
address@hidden "regexp"
address@hidden is a strongly typed regexp (@pxref{Strong Regexp Constants}).
-
 @item "number"
 @var{x} is a number.
 
@@ -19765,8 +19693,7 @@ ends up turning it into a scalar.
 @end quotation
 
 The @code{typeof()} function is general; it allows you to determine
-if a variable or function parameter is a scalar, an array, or a strongly
-typed regexp.
+if a variable or function parameter is a scalar, an array.
 
 @code{isarray()} is deprecated; you should use @code{typeof()} instead.
 You should replace any existing uses of @samp{isarray(var)} in your
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 6159450..14a1748 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -6068,70 +6068,6 @@ str = "hi"      @ii{String variable}
 re = /foo/      @ii{Wrong!} re @ii{is the result of} $0 ~ /foo/
 @end example
 
-For a number of more advanced use cases (described later on in this
address@hidden), it would be nice to have regexp constants that
-are @dfn{strongly typed}; in other words, that denote a regexp useful
-for matching, and not an expression.
-
address@hidden provides this feature.  A strongly typed regexp constant
-looks almost like a regular regexp constant, except that it is preceded
-by an @samp{@@} sign:
-
address@hidden
-re = @@/foo/     @ii{Regexp variable}
address@hidden example
-
-Strongly typed regexp constants @emph{cannot} be used eveywhere that a
-regular regexp constant can, because this would make the language even more
-confusing.  Instead, you may use them only in certain contexts:
-
address@hidden @bullet
address@hidden
-On the righthand side of the @samp{~} and @samp{!~} operators: @samp{some_var 
~ @@/foo/}
-(@pxref{Regexp Usage}).
-
address@hidden
-In the @code{case} part of a @code{switch} statement
-(@pxref{Switch Statement}).
-
address@hidden
-As an argument to one of the built-in functions that accept regexp constants:
address@hidden()},
address@hidden()},
address@hidden()},
address@hidden()},
address@hidden()},
-and
address@hidden()}
-(@pxref{String Functions}).
-
address@hidden
-As a parameter in a call to a user-defined function
-(@pxref{User-defined}).
-
address@hidden
-On the righthand side of an assignment to a variable: @samp{some_var = 
@@/foo/}.
-In this case, the type of @code{some_var} is regexp. Additionally, 
@code{some_var}
-can be used with @samp{~} and @samp{!~}, passed to one of the built-in 
functions
-listed above, or passed as a parameter to a user-defined function.
address@hidden itemize
-
-You may use the @code{typeof()} built-in function
-(@pxref{Type Functions})
-to determine if a variable or function parameter is
-a regexp variable.
-
-The true power of this feature comes from the ability to create variables that
-have regexp type. Such variables can be passed on to user-defined functions,
-without the confusing aspects of computed regular expressions created from
-strings or string constants. They may also be passed through indirect function
-calls (@pxref{Indirect Calls})
-onto the built-in functions that accept regexp constants.
-
-When used in numeric conversions, strongly typed regexp variables convert
-to zero. When used in string conversions, they convert to the string
-value of the original regexp text.
-
 @node Regexp Summary
 @section Summary
 
@@ -6175,11 +6111,6 @@ treated as regular expressions).
 case sensitivity of regexp matching.  In other @command{awk}
 versions, use @code{tolower()} or @code{toupper()}.
 
address@hidden
-Strongly typed regexp constants (@code{@@/.../}) enable
-certain advanced use cases to be described later on in the
address@hidden
-
 @end itemize
 
 
@@ -18750,9 +18681,6 @@ Return one of the following strings, depending upon the 
type of @var{x}:
 @item "array"
 @var{x} is an array.
 
address@hidden "regexp"
address@hidden is a strongly typed regexp (@pxref{Strong Regexp Constants}).
-
 @item "number"
 @var{x} is a number.
 
@@ -18809,8 +18737,7 @@ ends up turning it into a scalar.
 @end quotation
 
 The @code{typeof()} function is general; it allows you to determine
-if a variable or function parameter is a scalar, an array, or a strongly
-typed regexp.
+if a variable or function parameter is a scalar, an array.
 
 @code{isarray()} is deprecated; you should use @code{typeof()} instead.
 You should replace any existing uses of @samp{isarray(var)} in your
diff --git a/doc/regex-add-doc.diff b/doc/regex-add-doc.diff
new file mode 100644
index 0000000..93b2a6e
--- /dev/null
+++ b/doc/regex-add-doc.diff
@@ -0,0 +1,107 @@
+diff --git a/tmp/gawktexi.in b/doc/gawktexi.in
+index 14a1748..6159450 100644
+--- a/tmp/gawktexi.in
++++ b/doc/gawktexi.in
+@@ -6068,6 +6068,70 @@ str = "hi"      @ii{String variable}
+ re = /foo/      @ii{Wrong!} re @ii{is the result of} $0 ~ /foo/
+ @end example
+ 
++For a number of more advanced use cases (described later on in this
address@hidden), it would be nice to have regexp constants that
++are @dfn{strongly typed}; in other words, that denote a regexp useful
++for matching, and not an expression.
++
address@hidden provides this feature.  A strongly typed regexp constant
++looks almost like a regular regexp constant, except that it is preceded
++by an @samp{@@} sign:
++
address@hidden
++re = @@/foo/     @ii{Regexp variable}
address@hidden example
++
++Strongly typed regexp constants @emph{cannot} be used eveywhere that a
++regular regexp constant can, because this would make the language even more
++confusing.  Instead, you may use them only in certain contexts:
++
address@hidden @bullet
address@hidden
++On the righthand side of the @samp{~} and @samp{!~} operators: @samp{some_var 
~ @@/foo/}
++(@pxref{Regexp Usage}).
++
address@hidden
++In the @code{case} part of a @code{switch} statement
++(@pxref{Switch Statement}).
++
address@hidden
++As an argument to one of the built-in functions that accept regexp constants:
address@hidden()},
address@hidden()},
address@hidden()},
address@hidden()},
address@hidden()},
++and
address@hidden()}
++(@pxref{String Functions}).
++
address@hidden
++As a parameter in a call to a user-defined function
++(@pxref{User-defined}).
++
address@hidden
++On the righthand side of an assignment to a variable: @samp{some_var = 
@@/foo/}.
++In this case, the type of @code{some_var} is regexp. Additionally, 
@code{some_var}
++can be used with @samp{~} and @samp{!~}, passed to one of the built-in 
functions
++listed above, or passed as a parameter to a user-defined function.
address@hidden itemize
++
++You may use the @code{typeof()} built-in function
++(@pxref{Type Functions})
++to determine if a variable or function parameter is
++a regexp variable.
++
++The true power of this feature comes from the ability to create variables that
++have regexp type. Such variables can be passed on to user-defined functions,
++without the confusing aspects of computed regular expressions created from
++strings or string constants. They may also be passed through indirect function
++calls (@pxref{Indirect Calls})
++onto the built-in functions that accept regexp constants.
++
++When used in numeric conversions, strongly typed regexp variables convert
++to zero. When used in string conversions, they convert to the string
++value of the original regexp text.
++
+ @node Regexp Summary
+ @section Summary
+ 
+@@ -6111,6 +6175,11 @@ treated as regular expressions).
+ case sensitivity of regexp matching.  In other @command{awk}
+ versions, use @code{tolower()} or @code{toupper()}.
+ 
address@hidden
++Strongly typed regexp constants (@code{@@/.../}) enable
++certain advanced use cases to be described later on in the
address@hidden
++
+ @end itemize
+ 
+ 
+@@ -18681,6 +18750,9 @@ Return one of the following strings, depending upon 
the type of @var{x}:
+ @item "array"
+ @var{x} is an array.
+ 
address@hidden "regexp"
address@hidden is a strongly typed regexp (@pxref{Strong Regexp Constants}).
++
+ @item "number"
+ @var{x} is a number.
+ 
+@@ -18737,7 +18809,8 @@ ends up turning it into a scalar.
+ @end quotation
+ 
+ The @code{typeof()} function is general; it allows you to determine
+-if a variable or function parameter is a scalar, an array.
++if a variable or function parameter is a scalar, an array, or a strongly
++typed regexp.
+ 
+ @code{isarray()} is deprecated; you should use @code{typeof()} instead.
+ You should replace any existing uses of @samp{isarray(var)} in your

-----------------------------------------------------------------------

Summary of changes:
 doc/gawk.texi          |   75 +--------------------------------
 doc/gawktexi.in        |   75 +--------------------------------
 doc/regex-add-doc.diff |  107 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 148 deletions(-)
 create mode 100644 doc/regex-add-doc.diff


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]