[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5510-g28fa4da6
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5510-g28fa4da6 |
Date: |
Mon, 12 Aug 2024 10:41:29 -0400 (EDT) |
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, gawk-5.3-stable has been updated
via 28fa4da6c815acc45870d390d33c6e373c2d8668 (commit)
via 236c878905784dccf28e1ff43070c3731f9195d3 (commit)
from 7a521fe4b37f8554ca53ef3236f0352e391aaa1d (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=28fa4da6c815acc45870d390d33c6e373c2d8668
commit 28fa4da6c815acc45870d390d33c6e373c2d8668
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Mon Aug 12 17:41:07 2024 +0300
Doc improvement.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 7102717b..9a76a779 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi: Improve indexing for @include/@load/@namespace
+ and use "directive" consistently to describe them. Thanks to
+ Antonio Colombo for pointing out the need.
+
2024-08-05 Arnold D. Robbins <arnold@skeeve.com>
* gawk.texi: Small consistency fix.
diff --git a/doc/gawk.info b/doc/gawk.info
index 644c33f4..5e3d6f66 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -2761,7 +2761,7 @@ The following list describes options mandated by the
POSIX standard:
suffix for your platform will be supplied by default, so it need
not be specified in the extension name. The extension
initialization routine should be named âdl_load()â. An alternative
- is to use the â@loadâ keyword inside the program to load a shared
+ is to use the â@loadâ directive inside the program to load a shared
library. This advanced feature is described in detail in *note
Dynamic Extensions::.
@@ -3211,7 +3211,7 @@ source files. If the extension is not found, the path is
searched again
after adding the appropriate shared library suffix for the platform.
For example, on GNU/Linux systems, the suffix â.soâ is used. The search
path specified is also used for extensions loaded via the â@loadâ
-keyword (*note Loading Shared Libraries::).
+directive (*note Loading Shared Libraries::).
If âAWKLIBPATHâ does not exist in the environment, or if it has an
empty value, âgawkâ uses a default path; this is typically
@@ -3367,13 +3367,13 @@ File: gawk.info, Node: Include Files, Next: Loading
Shared Libraries, Prev: E
This minor node describes a feature that is specific to âgawkâ.
- The â@includeâ keyword can be used to read external âawkâ source
+ The â@includeâ directive can be used to read external âawkâ source
files. This gives you the ability to split large âawkâ source files
into smaller, more manageable pieces, and also lets you reuse common
âawkâ code from various âawkâ scripts. In other words, you can group
together âawkâ functions used to carry out specific tasks into external
files. These files can be used just like function libraries, using the
-â@includeâ keyword in conjunction with the âAWKPATHâ environment
+â@includeâ directive in conjunction with the âAWKPATHâ environment
variable. Note that source files may also be included using the â-iâ
option.
@@ -3398,7 +3398,7 @@ and here is âtest2â:
⣠This is script test2.
âgawkâ runs the âtest2â script, which includes âtest1â using the
-â@includeâ keyword. So, to include external âawkâ source files, you
+â@includeâ directive. So, to include external âawkâ source files, you
just use â@includeâ followed by the name of the file to be included,
enclosed in double quotes.
@@ -3445,7 +3445,7 @@ in more than one directory; the more complex the working
environment is,
the more directories you may need to organize the files to be included.
Given the ability to specify multiple â-fâ options, the â@includeâ
-mechanism is not strictly necessary. However, the â@includeâ keyword
+mechanism is not strictly necessary. However, the â@includeâ directive
can help you in constructing self-contained âgawkâ programs, thus
reducing the need for writing complex and tedious command lines. In
particular, â@includeâ is very useful for writing CGI scripts to be run
@@ -3470,7 +3470,7 @@ File: gawk.info, Node: Loading Shared Libraries, Next:
Obsolete, Prev: Includ
This minor node describes a feature that is specific to âgawkâ.
- The â@loadâ keyword can be used to read external âawkâ extensions
+ The â@loadâ directive can be used to read external âawkâ extensions
(stored as system shared libraries). This allows you to link in
compiled code that may offer superior performance and/or give you access
to extended capabilities not supported by the âawkâ language. The
@@ -3584,11 +3584,11 @@ File: gawk.info, Node: Invoking Summary, Prev:
Undocumented, Up: Invoking Gaw
to set the exit status.
⢠âgawkâ allows you to include other âawkâ source files into your
- program using the â@includeâ statement and/or the â-iâ and
â-fâ
+ program using the â@includeâ directive and/or the â-iâ and
â-fâ
command-line options.
⢠âgawkâ allows you to load additional functions written in C or C++
- using the â@loadâ statement and/or the â-lâ option. (This
advanced
+ using the â@loadâ directive and/or the â-lâ option. (This
advanced
feature is described later, in *note Dynamic Extensions::.)
@@ -6399,9 +6399,9 @@ second field on the â@includeâ line.
included twice. *Note Close Files And Pipes::.
One deficiency of this program is that it does not process nested
-â@includeâ statements (i.e., â@includeâ statements in included files)
+â@includeâ directives (i.e., â@includeâ directives in included files)
the way a true macro preprocessor would. *Note Igawk Program:: for a
-program that does handle nested â@includeâ statements.
+program that does handle nested â@includeâ directives.
---------- Footnotes ----------
@@ -20938,7 +20938,7 @@ to be able to write programs in the following manner:
The following program, âigawk.shâ, provides this service. It
simulates âgawkâ's searching of the âAWKPATHâ variable and also allows
ânestedâ includes (i.e., a file that is included with â@includeâ can
-contain further â@includeâ statements). âigawkâ makes an effort to
only
+contain further â@includeâ directives). âigawkâ makes an effort to
only
include files once, so that nested includes don't accidentally include a
library function twice.
@@ -20966,7 +20966,7 @@ language.(1) It works as follows:
program at the correct point.
3. Run an âawkâ program (naturally) over the shell variable's contents
- to expand â@includeâ statements. The expanded program is placed in
+ to expand â@includeâ directives. The expanded program is placed in
a second shell variable.
4. Run the expanded program with âgawkâ and any other original
@@ -21002,7 +21002,7 @@ are several cases of interest:
â-fâ, â--fileâ, â--file=â, â-Wfile=â
The file name is appended to the shell variable âprogramâ with an
- â@includeâ statement. The âexprâ utility is used to remove the
+ â@includeâ directive. The âexprâ utility is used to remove the
leading option part of the argument (e.g., â--file=â). (Typical
âshâ usage would be to use the âechoâ and âsedâ utilities to
do
this work. Unfortunately, some versions of âechoâ evaluate escape
@@ -21106,7 +21106,7 @@ the original âawkâ program.
shell variable âexpand_progâ. Doing this keeps the shell script
readable. The âawkâ program reads through the user's program, one line
at a time, using âgetlineâ (*note Getline::). The input file names and
-â@includeâ statements are managed using a stack. As each â@includeâ is
+â@includeâ directives are managed using a stack. As each â@includeâ is
encountered, the current file name is "pushed" onto the stack and the
file named in the â@includeâ directive becomes the current file name.
As each file is finished, the stack is "popped," and the previous input
@@ -21252,7 +21252,7 @@ There are four key simplifications that make the
program work better:
⢠Using a âgetlineâ loop in the âBEGINâ rule does it all in one
place. It is not necessary to call out to a separate loop for
- processing nested â@includeâ statements.
+ processing nested â@includeâ directives.
⢠Instead of saving the expanded program in a temporary file, putting
it in a shell variable avoids some potential security problems.
@@ -21523,7 +21523,7 @@ File: gawk.info, Node: Programs Exercises, Prev:
Programs Summary, Up: Sample
these files upon startup. Instead, it would be very simple to
modify âigawkâ to do this. Since âigawkâ can process nested
â@includeâ directives, âdefault.awkâ could simply contain
- â@includeâ statements for the desired library functions. Make this
+ â@includeâ directives for the desired library functions. Make this
change.
13. Modify âanagram.awkâ (*note Anagram Program::), to avoid the use
@@ -29386,7 +29386,7 @@ create a GNU/Linux shared library:
$ gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g -IIDIR filefuncs.c
$ gcc -o filefuncs.so -shared filefuncs.o
- Once the library exists, it is loaded by using the â@loadâ keyword:
+ Once the library exists, it is loaded by using the â@loadâ directive:
# file testff.awk
@load "filefuncs"
@@ -36353,11 +36353,24 @@ Index
* {} (braces), statements, grouping: Statements. (line 10)
* @ (at-sign), @-notation for indirect function calls: Indirect Calls.
(line 47)
-* @ (at-sign), @include directive: Include Files. (line 8)
-* @ (at-sign), @load directive: Loading Shared Libraries.
+* @ (at-sign), @include directive: Options. (line 180)
+* @ (at-sign), @include directive <1>: Include Files. (line 8)
+* @ (at-sign), @include directive <2>: Glossary. (line 379)
+* @ (at-sign), @load directive: Options. (line 209)
+* @ (at-sign), @load directive <1>: AWKLIBPATH Variable. (line 6)
+* @ (at-sign), @load directive <2>: Loading Shared Libraries.
(line 8)
-* @ (at-sign), @namespace directive: Changing The Namespace.
+* @ (at-sign), @load directive <3>: Auto-set. (line 205)
+* @ (at-sign), @load directive <4>: Using extensions. (line 10)
+* @ (at-sign), @load directive <5>: Using Internal File Ops.
+ (line 15)
+* @ (at-sign), @namespace directive: Options. (line 30)
+* @ (at-sign), @namespace directive <1>: Options. (line 140)
+* @ (at-sign), @namespace directive <2>: Options. (line 191)
+* @ (at-sign), @namespace directive <3>: Changing The Namespace.
(line 6)
+* @ (at-sign), @namespace directive <4>: Namespace And Features.
+ (line 9)
* @ (at-sign), @namespace directive, BEGIN, BEGINFILE, END, ENDFILE and:
Changing The Namespace.
(line 37)
* * (asterisk), * operator, as multiplication operator: Precedence.
@@ -36685,11 +36698,24 @@ Index
* asterisk (*), *= operator <1>: Precedence. (line 94)
* at-sign (@), @-notation for indirect function calls: Indirect Calls.
(line 47)
-* at-sign (@), @include directive: Include Files. (line 8)
-* at-sign (@), @load directive: Loading Shared Libraries.
+* at-sign (@), @include directive: Options. (line 180)
+* at-sign (@), @include directive <1>: Include Files. (line 8)
+* at-sign (@), @include directive <2>: Glossary. (line 379)
+* at-sign (@), @load directive: Options. (line 209)
+* at-sign (@), @load directive <1>: AWKLIBPATH Variable. (line 6)
+* at-sign (@), @load directive <2>: Loading Shared Libraries.
(line 8)
-* at-sign (@), @namespace directive: Changing The Namespace.
+* at-sign (@), @load directive <3>: Auto-set. (line 205)
+* at-sign (@), @load directive <4>: Using extensions. (line 10)
+* at-sign (@), @load directive <5>: Using Internal File Ops.
+ (line 15)
+* at-sign (@), @namespace directive: Options. (line 30)
+* at-sign (@), @namespace directive <1>: Options. (line 140)
+* at-sign (@), @namespace directive <2>: Options. (line 191)
+* at-sign (@), @namespace directive <3>: Changing The Namespace.
(line 6)
+* at-sign (@), @namespace directive <4>: Namespace And Features.
+ (line 9)
* at-sign (@), @namespace directive, BEGIN, BEGINFILE, END, ENDFILE and:
Changing The Namespace.
(line 37)
* atan2: Numeric Functions. (line 11)
@@ -38347,7 +38373,9 @@ Index
* in operator, testing if array element exists: Reference to Elements.
(line 38)
* in operator, use in loops: Scanning an Array. (line 17)
-* @include directive: Include Files. (line 8)
+* @include directive: Options. (line 180)
+* @include directive <1>: Include Files. (line 8)
+* @include directive <2>: Glossary. (line 379)
* including files, @include directive: Include Files. (line 8)
* increment operators: Increment Ops. (line 6)
* index: String Functions. (line 174)
@@ -38551,8 +38579,14 @@ Index
* list debugger command: Miscellaneous Debugger Commands.
(line 73)
* list function definitions, in debugger: Debugger Info. (line 30)
-* @load directive: Loading Shared Libraries.
+* @load directive: Options. (line 209)
+* @load directive <1>: AWKLIBPATH Variable. (line 6)
+* @load directive <2>: Loading Shared Libraries.
(line 8)
+* @load directive <3>: Auto-set. (line 205)
+* @load directive <4>: Using extensions. (line 10)
+* @load directive <5>: Using Internal File Ops.
+ (line 15)
* loading extensions: Options. (line 209)
* loading extensions, @load directive: Loading Shared Libraries.
(line 8)
@@ -38653,10 +38687,15 @@ Index
* namespace, pushing and popping: Changing The Namespace.
(line 29)
* namespace, standard awk, global: Global Namespace. (line 6)
-* @namespace directive: Changing The Namespace.
+* @namespace directive: Options. (line 30)
+* @namespace directive <1>: Options. (line 140)
+* @namespace directive <2>: Options. (line 191)
+* @namespace directive <3>: Changing The Namespace.
(line 6)
-* @namespace directive <1>: Changing The Namespace.
+* @namespace directive <4>: Changing The Namespace.
(line 37)
+* @namespace directive <5>: Namespace And Features.
+ (line 9)
* namespaces, backwards compatibility: Namespace Summary. (line 28)
* namespaces, changing: Changing The Namespace.
(line 6)
@@ -39932,588 +39971,588 @@ Node: Intro Summary122874
Node: Invoking Gawk123828
Node: Command Line125390
Node: Options126240
-Ref: Options-Footnote-1145580
-Ref: Options-Footnote-2145815
-Node: Other Arguments145840
-Node: Naming Standard Input150005
-Node: Environment Variables151275
-Node: AWKPATH Variable151849
-Ref: AWKPATH Variable-Footnote-1155433
-Ref: AWKPATH Variable-Footnote-2155467
-Node: AWKLIBPATH Variable155858
-Ref: AWKLIBPATH Variable-Footnote-1157631
-Node: Other Environment Variables158026
-Node: Exit Status162502
-Node: Include Files163215
-Node: Loading Shared Libraries167267
-Node: Obsolete168757
-Node: Undocumented169505
-Node: Invoking Summary169802
-Node: Regexp172827
-Node: Regexp Usage174321
-Node: Escape Sequences176422
-Ref: Escape Sequences-Footnote-1183957
-Node: Regexp Operators184035
-Node: Regexp Operator Details184528
-Ref: Regexp Operator Details-Footnote-1192539
-Node: Interval Expressions192698
-Ref: Interval Expressions-Footnote-1194965
-Node: Bracket Expressions195063
-Ref: table-char-classes197619
-Node: Leftmost Longest201117
-Node: Computed Regexps202473
-Node: GNU Regexp Operators205988
-Node: Case-sensitivity211085
-Ref: Case-sensitivity-Footnote-1214035
-Ref: Case-sensitivity-Footnote-2214278
-Node: Regexp Summary214390
-Node: Reading Files215912
-Node: Records218231
-Node: awk split records219506
-Node: gawk split records224388
-Ref: gawk split records-Footnote-1229676
-Node: Fields229713
-Ref: Fields-Footnote-1232629
-Node: Nonconstant Fields232749
-Ref: Nonconstant Fields-Footnote-1235057
-Node: Changing Fields235273
-Node: Field Separators241571
-Node: Default Field Splitting244440
-Node: Regexp Field Splitting245582
-Node: Single Character Fields249411
-Node: Comma Separated Fields250500
-Ref: table-csv-examples251904
-Node: Command Line Field Separator254203
-Node: Full Line Fields257579
-Ref: Full Line Fields-Footnote-1259157
-Ref: Full Line Fields-Footnote-2259203
-Node: Field Splitting Summary259308
-Node: Constant Size261625
-Node: Fixed width data262369
-Node: Skipping intervening265884
-Node: Allowing trailing data266686
-Node: Fields with fixed data267747
-Node: Splitting By Content269369
-Ref: Splitting By Content-Footnote-1273819
-Node: More CSV273982
-Node: FS versus FPAT275640
-Node: Testing field creation276840
-Node: Multiple Line278614
-Node: Getline285083
-Node: Plain Getline287671
-Node: Getline/Variable290319
-Node: Getline/File291515
-Node: Getline/Variable/File292963
-Ref: Getline/Variable/File-Footnote-1294608
-Node: Getline/Pipe294704
-Node: Getline/Variable/Pipe297512
-Node: Getline/Coprocess298695
-Node: Getline/Variable/Coprocess300018
-Node: Getline Notes300784
-Node: Getline Summary304761
-Ref: table-getline-variants305205
-Node: Read Timeout306109
-Ref: Read Timeout-Footnote-1310071
-Node: Retrying Input310129
-Node: Command-line directories311396
-Node: Input Summary312334
-Node: Input Exercises315714
-Node: Printing316152
-Node: Print318095
-Node: Print Examples319596
-Node: Output Separators322441
-Node: OFMT324548
-Node: Printf326261
-Node: Basic Printf327066
-Node: Control Letters328701
-Node: Format Modifiers334147
-Node: Printf Examples340419
-Node: Redirection342960
-Node: Special FD350732
-Ref: Special FD-Footnote-1354030
-Node: Special Files354108
-Node: Other Inherited Files354737
-Node: Special Network355802
-Node: Special Caveats356690
-Node: Close Files And Pipes357673
-Ref: Close Files And Pipes-Footnote-1363797
-Node: Close Return Value363945
-Ref: table-close-pipe-return-values365216
-Ref: Close Return Value-Footnote-1366047
-Node: Noflush366203
-Node: Nonfatal367711
-Node: Output Summary370126
-Node: Output Exercises371412
-Node: Expressions372103
-Node: Values373303
-Node: Constants373981
-Node: Scalar Constants374676
-Ref: Scalar Constants-Footnote-1377252
-Ref: Scalar Constants-Footnote-2377502
-Node: Nondecimal-numbers377582
-Node: Regexp Constants380695
-Node: Using Constant Regexps381241
-Node: Standard Regexp Constants381887
-Node: Strong Regexp Constants385183
-Node: Variables389026
-Node: Using Variables389691
-Node: Assignment Options391665
-Node: Conversion394216
-Node: Strings And Numbers394748
-Ref: Strings And Numbers-Footnote-1397958
-Node: Locale influences conversions398067
-Ref: table-locale-affects400905
-Node: All Operators401547
-Node: Arithmetic Ops402188
-Node: Concatenation405011
-Ref: Concatenation-Footnote-1407947
-Node: Assignment Ops408066
-Ref: table-assign-ops413193
-Node: Increment Ops414574
-Node: Truth Values and Conditions418165
-Node: Truth Values419259
-Node: Typing and Comparison420339
-Node: Variable Typing421171
-Ref: Variable Typing-Footnote-1427815
-Ref: Variable Typing-Footnote-2427895
-Node: Comparison Operators427976
-Ref: table-relational-ops428403
-Node: POSIX String Comparison432079
-Ref: POSIX String Comparison-Footnote-1433836
-Ref: POSIX String Comparison-Footnote-2433979
-Node: Boolean Ops434063
-Ref: Boolean Ops-Footnote-1438737
-Node: Conditional Exp438833
-Node: Function Calls440613
-Node: Precedence444560
-Node: Locales448423
-Node: Expressions Summary450099
-Node: Patterns and Actions452754
-Node: Pattern Overview453890
-Node: Regexp Patterns455615
-Node: Expression Patterns456161
-Node: Ranges460066
-Node: BEGIN/END463240
-Node: Using BEGIN/END464049
-Ref: Using BEGIN/END-Footnote-1466957
-Node: I/O And BEGIN/END467067
-Node: BEGINFILE/ENDFILE469549
-Node: Empty472979
-Node: Using Shell Variables473296
-Node: Action Overview475632
-Node: Statements478068
-Node: If Statement479964
-Node: While Statement481527
-Node: Do Statement483615
-Node: For Statement484799
-Node: Switch Statement488154
-Node: Break Statement490703
-Node: Continue Statement492895
-Node: Next Statement494826
-Node: Nextfile Statement497305
-Node: Exit Statement500158
-Node: Built-in Variables502685
-Node: User-modified503862
-Node: Auto-set512069
-Ref: Auto-set-Footnote-1530153
-Ref: Auto-set-Footnote-2530371
-Node: ARGC and ARGV530427
-Node: Pattern Action Summary534856
-Node: Arrays537462
-Node: Array Basics538835
-Node: Array Intro539683
-Ref: figure-array-elements541694
-Ref: Array Intro-Footnote-1544547
-Node: Reference to Elements544679
-Node: Assigning Elements547199
-Node: Array Example547694
-Node: Scanning an Array549656
-Node: Controlling Scanning552751
-Ref: Controlling Scanning-Footnote-1559386
-Node: Numeric Array Subscripts559710
-Node: Uninitialized Subscripts561978
-Node: Delete563651
-Ref: Delete-Footnote-1566463
-Node: Multidimensional566520
-Node: Multiscanning569723
-Node: Arrays of Arrays571390
-Node: Arrays Summary575694
-Node: Functions577881
-Node: Built-in579013
-Node: Calling Built-in580202
-Node: Boolean Functions582242
-Node: Numeric Functions582804
-Ref: Numeric Functions-Footnote-1586989
-Ref: Numeric Functions-Footnote-2587672
-Ref: Numeric Functions-Footnote-3587724
-Node: String Functions588000
-Ref: String Functions-Footnote-1614451
-Ref: String Functions-Footnote-2614583
-Ref: String Functions-Footnote-3614839
-Node: Gory Details614926
-Ref: table-sub-escapes616935
-Ref: table-sub-proposed618566
-Ref: table-posix-sub620061
-Ref: table-gensub-escapes621734
-Ref: Gory Details-Footnote-1622653
-Node: I/O Functions622807
-Ref: table-system-return-values629483
-Ref: I/O Functions-Footnote-1631645
-Ref: I/O Functions-Footnote-2631793
-Node: Time Functions631913
-Ref: Time Functions-Footnote-1643625
-Ref: Time Functions-Footnote-2643693
-Ref: Time Functions-Footnote-3643855
-Ref: Time Functions-Footnote-4643966
-Ref: Time Functions-Footnote-5644082
-Ref: Time Functions-Footnote-6644309
-Node: Bitwise Functions644587
-Ref: table-bitwise-ops645185
-Ref: Bitwise Functions-Footnote-1651427
-Ref: Bitwise Functions-Footnote-2651604
-Node: Type Functions651799
-Node: I18N Functions653970
-Node: User-defined655705
-Node: Definition Syntax656451
-Ref: Definition Syntax-Footnote-1662269
-Node: Function Example662344
-Ref: Function Example-Footnote-1665323
-Node: Function Calling665345
-Node: Calling A Function665937
-Node: Variable Scope666907
-Node: Pass By Value/Reference669961
-Node: Function Caveats672689
-Ref: Function Caveats-Footnote-1674780
-Node: Return Statement674900
-Node: Dynamic Typing677932
-Node: Dynamic Typing Awk678510
-Node: Dynamic Typing Gawk680648
-Node: Indirect Calls684018
-Node: Functions Summary695155
-Node: Library Functions698121
-Ref: Library Functions-Footnote-1701669
-Ref: Library Functions-Footnote-2701814
-Node: Library Names701989
-Ref: Library Names-Footnote-1705760
-Ref: Library Names-Footnote-2705987
-Node: General Functions706081
-Node: Strtonum Function707351
-Node: Assert Function710433
-Node: Round Function713883
-Node: Cliff Random Function715455
-Node: Ordinal Functions716479
-Ref: Ordinal Functions-Footnote-1719582
-Ref: Ordinal Functions-Footnote-2719834
-Node: Join Function720048
-Ref: Join Function-Footnote-1721846
-Node: Getlocaltime Function722050
-Node: Readfile Function725824
-Node: Shell Quoting727853
-Node: Isnumeric Function729309
-Node: To CSV Function730745
-Node: Data File Management732837
-Node: Filetrans Function733469
-Node: Rewind Function737745
-Node: File Checking739716
-Ref: File Checking-Footnote-1741082
-Node: Empty Files741287
-Node: Ignoring Assigns743350
-Node: Getopt Function744924
-Ref: Getopt Function-Footnote-1760742
-Node: Passwd Functions760954
-Ref: Passwd Functions-Footnote-1770089
-Node: Group Functions770177
-Ref: Group Functions-Footnote-1778301
-Node: Walking Arrays778512
-Node: Library Functions Summary781558
-Node: Library Exercises782978
-Node: Sample Programs783463
-Node: Running Examples784245
-Node: Clones784997
-Node: Cut Program786265
-Node: Egrep Program796689
-Node: Id Program805994
-Node: Split Program816086
-Ref: Split Program-Footnote-1826299
-Node: Tee Program826484
-Node: Uniq Program829390
-Node: Wc Program837250
-Node: Bytes vs. Characters837645
-Node: Using extensions839245
-Node: wc program840023
-Node: Miscellaneous Programs845016
-Node: Dupword Program846241
-Node: Alarm Program848290
-Node: Translate Program853193
-Ref: Translate Program-Footnote-1857902
-Node: Labels Program858180
-Ref: Labels Program-Footnote-1861615
-Node: Word Sorting861699
-Node: History Sorting865873
-Node: Extract Program868146
-Node: Simple Sed876399
-Node: Igawk Program879609
-Ref: Igawk Program-Footnote-1894819
-Ref: Igawk Program-Footnote-2895025
-Ref: Igawk Program-Footnote-3895155
-Node: Anagram Program895282
-Node: Signature Program898368
-Node: Programs Summary899618
-Node: Programs Exercises900872
-Ref: Programs Exercises-Footnote-1905174
-Node: Advanced Features905260
-Node: Nondecimal Data907741
-Node: Boolean Typed Values909371
-Node: Array Sorting911328
-Node: Controlling Array Traversal912057
-Ref: Controlling Array Traversal-Footnote-1920560
-Node: Array Sorting Functions920682
-Ref: Array Sorting Functions-Footnote-1926779
-Node: Two-way I/O926987
-Ref: Two-way I/O-Footnote-1934958
-Ref: Two-way I/O-Footnote-2935149
-Node: TCP/IP Networking935231
-Node: Profiling938399
-Node: Persistent Memory948069
-Ref: Persistent Memory-Footnote-1957641
-Node: Extension Philosophy957772
-Node: Advanced Features Summary959299
-Node: Internationalization961565
-Node: I18N and L10N963267
-Node: Explaining gettext963962
-Ref: Explaining gettext-Footnote-1970098
-Ref: Explaining gettext-Footnote-2970291
-Node: Programmer i18n970456
-Ref: Programmer i18n-Footnote-1975568
-Node: Translator i18n975617
-Node: String Extraction976447
-Ref: String Extraction-Footnote-1977623
-Node: Printf Ordering977721
-Ref: Printf Ordering-Footnote-1980579
-Node: I18N Portability980647
-Ref: I18N Portability-Footnote-1983207
-Node: I18N Example983274
-Ref: I18N Example-Footnote-1986668
-Ref: I18N Example-Footnote-2986741
-Node: Gawk I18N986858
-Node: I18N Summary987512
-Node: Debugger988909
-Node: Debugging989929
-Node: Debugging Concepts990378
-Node: Debugging Terms992195
-Node: Awk Debugging994798
-Ref: Awk Debugging-Footnote-1995771
-Node: Sample Debugging Session995907
-Node: Debugger Invocation996457
-Node: Finding The Bug998082
-Node: List of Debugger Commands1004714
-Node: Breakpoint Control1006091
-Node: Debugger Execution Control1009913
-Node: Viewing And Changing Data1013387
-Node: Execution Stack1017121
-Node: Debugger Info1018802
-Node: Miscellaneous Debugger Commands1023097
-Node: Readline Support1028338
-Node: Limitations1029282
-Node: Debugging Summary1031906
-Node: Namespaces1033205
-Node: Global Namespace1034332
-Node: Qualified Names1035766
-Node: Default Namespace1036801
-Node: Changing The Namespace1037574
-Node: Naming Rules1039256
-Node: Internal Name Management1041211
-Node: Namespace Example1042281
-Node: Namespace And Features1044858
-Node: Namespace Summary1046313
-Node: Arbitrary Precision Arithmetic1047824
-Node: Computer Arithmetic1049343
-Ref: table-numeric-ranges1053268
-Ref: table-floating-point-ranges1053765
-Ref: Computer Arithmetic-Footnote-11054423
-Node: Math Definitions1054480
-Ref: table-ieee-formats1057512
-Node: MPFR features1058085
-Node: MPFR On Parole1058538
-Ref: MPFR On Parole-Footnote-11059379
-Node: MPFR Intro1059538
-Node: FP Math Caution1061222
-Ref: FP Math Caution-Footnote-11062294
-Node: Inexactness of computations1062667
-Node: Inexact representation1063698
-Node: Comparing FP Values1065079
-Node: Errors accumulate1066337
-Node: Strange values1067802
-Ref: Strange values-Footnote-11070456
-Node: Getting Accuracy1070561
-Node: Try To Round1073298
-Node: Setting precision1074205
-Ref: table-predefined-precision-strings1074910
-Node: Setting the rounding mode1076794
-Ref: table-gawk-rounding-modes1077176
-Ref: Setting the rounding mode-Footnote-11081228
-Node: Arbitrary Precision Integers1081411
-Ref: Arbitrary Precision Integers-Footnote-11084621
-Node: Checking for MPFR1084774
-Node: POSIX Floating Point Problems1086264
-Ref: POSIX Floating Point Problems-Footnote-11091084
-Node: Floating point summary1091122
-Node: Dynamic Extensions1093378
-Node: Extension Intro1094975
-Node: Plugin License1096277
-Node: Extension Mechanism Outline1097090
-Ref: figure-load-extension1097541
-Ref: figure-register-new-function1099119
-Ref: figure-call-new-function1100228
-Node: Extension API Description1102343
-Node: Extension API Functions Introduction1104072
-Ref: table-api-std-headers1105966
-Node: General Data Types1110407
-Ref: General Data Types-Footnote-11119553
-Node: Memory Allocation Functions1119856
-Ref: Memory Allocation Functions-Footnote-11124573
-Node: Constructor Functions1124672
-Node: API Ownership of MPFR and GMP Values1128573
-Node: Registration Functions1130126
-Node: Extension Functions1130830
-Node: Exit Callback Functions1136404
-Node: Extension Version String1137718
-Node: Input Parsers1138413
-Node: Output Wrappers1153032
-Node: Two-way processors1157874
-Node: Printing Messages1160227
-Ref: Printing Messages-Footnote-11161438
-Node: Updating ERRNO1161591
-Node: Requesting Values1162390
-Ref: table-value-types-returned1163143
-Node: Accessing Parameters1165202
-Node: Symbol Table Access1166483
-Node: Symbol table by name1166995
-Ref: Symbol table by name-Footnote-11170196
-Node: Symbol table by cookie1170328
-Ref: Symbol table by cookie-Footnote-11174597
-Node: Cached values1174661
-Ref: Cached values-Footnote-11178293
-Node: Array Manipulation1178450
-Ref: Array Manipulation-Footnote-11179549
-Node: Array Data Types1179586
-Ref: Array Data Types-Footnote-11182404
-Node: Array Functions1182500
-Node: Flattening Arrays1187529
-Node: Creating Arrays1194577
-Node: Redirection API1199419
-Node: Extension API Variables1202436
-Node: Extension Versioning1203159
-Ref: gawk-api-version1203588
-Node: Extension GMP/MPFR Versioning1205375
-Node: Extension API Informational Variables1207079
-Node: Extension API Boilerplate1208332
-Node: Changes from API V11212462
-Node: Finding Extensions1214094
-Node: Extension Example1214669
-Node: Internal File Description1215491
-Node: Internal File Ops1219783
-Ref: Internal File Ops-Footnote-11231333
-Node: Using Internal File Ops1231481
-Ref: Using Internal File Ops-Footnote-11233912
-Node: Extension Samples1234190
-Node: Extension Sample File Functions1235759
-Node: Extension Sample Fnmatch1243884
-Node: Extension Sample Fork1245479
-Node: Extension Sample Inplace1246755
-Node: Extension Sample Ord1250857
-Node: Extension Sample Readdir1251733
-Ref: table-readdir-file-types1252522
-Node: Extension Sample Revout1253878
-Node: Extension Sample Rev2way1254475
-Node: Extension Sample Read write array1255227
-Node: Extension Sample Readfile1258501
-Node: Extension Sample Time1259632
-Node: Extension Sample API Tests1261632
-Node: gawkextlib1262140
-Node: Extension summary1265172
-Node: Extension Exercises1269020
-Node: Language History1270290
-Node: V7/SVR3.11272002
-Node: SVR41274352
-Node: POSIX1275884
-Node: BTL1277309
-Node: POSIX/GNU1278076
-Ref: Gawk Extension Functions1281466
-Node: Feature History1284890
-Node: Common Extensions1304731
-Node: Ranges and Locales1306206
-Ref: Ranges and Locales-Footnote-11310991
-Ref: Ranges and Locales-Footnote-21311018
-Ref: Ranges and Locales-Footnote-31311253
-Node: Contributors1311476
-Node: History summary1317667
-Node: Installation1319109
-Node: Gawk Distribution1320073
-Node: Getting1320565
-Node: Extracting1321564
-Node: Distribution contents1323270
-Node: Unix Installation1331160
-Node: Quick Installation1331980
-Node: Compiling with MPFR1334520
-Node: Shell Startup Files1335226
-Node: Additional Configuration Options1336383
-Node: Configuration Philosophy1338766
-Node: Compiling from Git1341266
-Node: Building the Documentation1341825
-Node: Non-Unix Installation1343237
-Node: PC Installation1343713
-Node: PC Binary Installation1344582
-Node: PC Compiling1345475
-Node: PC Using1346653
-Node: Cygwin1350369
-Node: MSYS1351621
-Node: OpenVMS Installation1352247
-Node: OpenVMS Compilation1352928
-Ref: OpenVMS Compilation-Footnote-11354411
-Node: OpenVMS Dynamic Extensions1354469
-Node: OpenVMS Installation Details1356105
-Node: OpenVMS Running1358536
-Node: OpenVMS GNV1362673
-Node: Bugs1363428
-Node: Bug definition1364348
-Node: Bug address1367949
-Node: Usenet1371518
-Node: Performance bugs1372731
-Node: Asking for help1375735
-Node: Maintainers1377722
-Node: Other Versions1378749
-Node: Installation summary1388353
-Node: Notes1389735
-Node: Compatibility Mode1390545
-Node: Additions1391367
-Node: Accessing The Source1392312
-Node: Adding Code1393843
-Node: New Ports1400954
-Node: Derived Files1405457
-Ref: Derived Files-Footnote-11411268
-Ref: Derived Files-Footnote-21411303
-Ref: Derived Files-Footnote-31411914
-Node: Future Extensions1412028
-Node: Implementation Limitations1412698
-Node: Extension Design1413940
-Node: Old Extension Problems1415100
-Ref: Old Extension Problems-Footnote-11416672
-Node: Extension New Mechanism Goals1416733
-Ref: Extension New Mechanism Goals-Footnote-11420203
-Node: Extension Other Design Decisions1420404
-Node: Extension Future Growth1422601
-Node: Notes summary1423221
-Node: Basic Concepts1424431
-Node: Basic High Level1425116
-Ref: figure-general-flow1425398
-Ref: figure-process-flow1426100
-Ref: Basic High Level-Footnote-11429470
-Node: Basic Data Typing1429659
-Node: Glossary1433067
-Node: Copying1465945
-Node: GNU Free Documentation License1503503
-Node: Index1528626
+Ref: Options-Footnote-1145582
+Ref: Options-Footnote-2145817
+Node: Other Arguments145842
+Node: Naming Standard Input150007
+Node: Environment Variables151277
+Node: AWKPATH Variable151851
+Ref: AWKPATH Variable-Footnote-1155435
+Ref: AWKPATH Variable-Footnote-2155469
+Node: AWKLIBPATH Variable155860
+Ref: AWKLIBPATH Variable-Footnote-1157635
+Node: Other Environment Variables158030
+Node: Exit Status162506
+Node: Include Files163219
+Node: Loading Shared Libraries167279
+Node: Obsolete168771
+Node: Undocumented169519
+Node: Invoking Summary169816
+Node: Regexp172841
+Node: Regexp Usage174335
+Node: Escape Sequences176436
+Ref: Escape Sequences-Footnote-1183971
+Node: Regexp Operators184049
+Node: Regexp Operator Details184542
+Ref: Regexp Operator Details-Footnote-1192553
+Node: Interval Expressions192712
+Ref: Interval Expressions-Footnote-1194979
+Node: Bracket Expressions195077
+Ref: table-char-classes197633
+Node: Leftmost Longest201131
+Node: Computed Regexps202487
+Node: GNU Regexp Operators206002
+Node: Case-sensitivity211099
+Ref: Case-sensitivity-Footnote-1214049
+Ref: Case-sensitivity-Footnote-2214292
+Node: Regexp Summary214404
+Node: Reading Files215926
+Node: Records218245
+Node: awk split records219520
+Node: gawk split records224402
+Ref: gawk split records-Footnote-1229690
+Node: Fields229727
+Ref: Fields-Footnote-1232643
+Node: Nonconstant Fields232763
+Ref: Nonconstant Fields-Footnote-1235071
+Node: Changing Fields235287
+Node: Field Separators241585
+Node: Default Field Splitting244454
+Node: Regexp Field Splitting245596
+Node: Single Character Fields249425
+Node: Comma Separated Fields250514
+Ref: table-csv-examples251918
+Node: Command Line Field Separator254217
+Node: Full Line Fields257593
+Ref: Full Line Fields-Footnote-1259171
+Ref: Full Line Fields-Footnote-2259217
+Node: Field Splitting Summary259322
+Node: Constant Size261639
+Node: Fixed width data262383
+Node: Skipping intervening265898
+Node: Allowing trailing data266700
+Node: Fields with fixed data267761
+Node: Splitting By Content269383
+Ref: Splitting By Content-Footnote-1273833
+Node: More CSV273996
+Node: FS versus FPAT275654
+Node: Testing field creation276854
+Node: Multiple Line278628
+Node: Getline285097
+Node: Plain Getline287685
+Node: Getline/Variable290333
+Node: Getline/File291529
+Node: Getline/Variable/File292977
+Ref: Getline/Variable/File-Footnote-1294622
+Node: Getline/Pipe294718
+Node: Getline/Variable/Pipe297526
+Node: Getline/Coprocess298709
+Node: Getline/Variable/Coprocess300032
+Node: Getline Notes300798
+Node: Getline Summary304775
+Ref: table-getline-variants305219
+Node: Read Timeout306123
+Ref: Read Timeout-Footnote-1310085
+Node: Retrying Input310143
+Node: Command-line directories311410
+Node: Input Summary312348
+Node: Input Exercises315728
+Node: Printing316166
+Node: Print318109
+Node: Print Examples319610
+Node: Output Separators322455
+Node: OFMT324562
+Node: Printf326275
+Node: Basic Printf327080
+Node: Control Letters328715
+Node: Format Modifiers334161
+Node: Printf Examples340433
+Node: Redirection342974
+Node: Special FD350746
+Ref: Special FD-Footnote-1354044
+Node: Special Files354122
+Node: Other Inherited Files354751
+Node: Special Network355816
+Node: Special Caveats356704
+Node: Close Files And Pipes357687
+Ref: Close Files And Pipes-Footnote-1363811
+Node: Close Return Value363959
+Ref: table-close-pipe-return-values365230
+Ref: Close Return Value-Footnote-1366061
+Node: Noflush366217
+Node: Nonfatal367725
+Node: Output Summary370140
+Node: Output Exercises371426
+Node: Expressions372117
+Node: Values373317
+Node: Constants373995
+Node: Scalar Constants374690
+Ref: Scalar Constants-Footnote-1377266
+Ref: Scalar Constants-Footnote-2377516
+Node: Nondecimal-numbers377596
+Node: Regexp Constants380709
+Node: Using Constant Regexps381255
+Node: Standard Regexp Constants381901
+Node: Strong Regexp Constants385197
+Node: Variables389040
+Node: Using Variables389705
+Node: Assignment Options391679
+Node: Conversion394230
+Node: Strings And Numbers394762
+Ref: Strings And Numbers-Footnote-1397972
+Node: Locale influences conversions398081
+Ref: table-locale-affects400919
+Node: All Operators401561
+Node: Arithmetic Ops402202
+Node: Concatenation405025
+Ref: Concatenation-Footnote-1407961
+Node: Assignment Ops408080
+Ref: table-assign-ops413207
+Node: Increment Ops414588
+Node: Truth Values and Conditions418179
+Node: Truth Values419273
+Node: Typing and Comparison420353
+Node: Variable Typing421185
+Ref: Variable Typing-Footnote-1427829
+Ref: Variable Typing-Footnote-2427909
+Node: Comparison Operators427990
+Ref: table-relational-ops428417
+Node: POSIX String Comparison432093
+Ref: POSIX String Comparison-Footnote-1433850
+Ref: POSIX String Comparison-Footnote-2433993
+Node: Boolean Ops434077
+Ref: Boolean Ops-Footnote-1438751
+Node: Conditional Exp438847
+Node: Function Calls440627
+Node: Precedence444574
+Node: Locales448437
+Node: Expressions Summary450113
+Node: Patterns and Actions452768
+Node: Pattern Overview453904
+Node: Regexp Patterns455629
+Node: Expression Patterns456175
+Node: Ranges460080
+Node: BEGIN/END463254
+Node: Using BEGIN/END464063
+Ref: Using BEGIN/END-Footnote-1466971
+Node: I/O And BEGIN/END467081
+Node: BEGINFILE/ENDFILE469563
+Node: Empty472993
+Node: Using Shell Variables473310
+Node: Action Overview475646
+Node: Statements478082
+Node: If Statement479978
+Node: While Statement481541
+Node: Do Statement483629
+Node: For Statement484813
+Node: Switch Statement488168
+Node: Break Statement490717
+Node: Continue Statement492909
+Node: Next Statement494840
+Node: Nextfile Statement497319
+Node: Exit Statement500172
+Node: Built-in Variables502699
+Node: User-modified503876
+Node: Auto-set512083
+Ref: Auto-set-Footnote-1530167
+Ref: Auto-set-Footnote-2530385
+Node: ARGC and ARGV530441
+Node: Pattern Action Summary534870
+Node: Arrays537476
+Node: Array Basics538849
+Node: Array Intro539697
+Ref: figure-array-elements541708
+Ref: Array Intro-Footnote-1544561
+Node: Reference to Elements544693
+Node: Assigning Elements547213
+Node: Array Example547708
+Node: Scanning an Array549670
+Node: Controlling Scanning552765
+Ref: Controlling Scanning-Footnote-1559400
+Node: Numeric Array Subscripts559724
+Node: Uninitialized Subscripts561992
+Node: Delete563665
+Ref: Delete-Footnote-1566477
+Node: Multidimensional566534
+Node: Multiscanning569737
+Node: Arrays of Arrays571404
+Node: Arrays Summary575708
+Node: Functions577895
+Node: Built-in579027
+Node: Calling Built-in580216
+Node: Boolean Functions582256
+Node: Numeric Functions582818
+Ref: Numeric Functions-Footnote-1587003
+Ref: Numeric Functions-Footnote-2587686
+Ref: Numeric Functions-Footnote-3587738
+Node: String Functions588014
+Ref: String Functions-Footnote-1614465
+Ref: String Functions-Footnote-2614597
+Ref: String Functions-Footnote-3614853
+Node: Gory Details614940
+Ref: table-sub-escapes616949
+Ref: table-sub-proposed618580
+Ref: table-posix-sub620075
+Ref: table-gensub-escapes621748
+Ref: Gory Details-Footnote-1622667
+Node: I/O Functions622821
+Ref: table-system-return-values629497
+Ref: I/O Functions-Footnote-1631659
+Ref: I/O Functions-Footnote-2631807
+Node: Time Functions631927
+Ref: Time Functions-Footnote-1643639
+Ref: Time Functions-Footnote-2643707
+Ref: Time Functions-Footnote-3643869
+Ref: Time Functions-Footnote-4643980
+Ref: Time Functions-Footnote-5644096
+Ref: Time Functions-Footnote-6644323
+Node: Bitwise Functions644601
+Ref: table-bitwise-ops645199
+Ref: Bitwise Functions-Footnote-1651441
+Ref: Bitwise Functions-Footnote-2651618
+Node: Type Functions651813
+Node: I18N Functions653984
+Node: User-defined655719
+Node: Definition Syntax656465
+Ref: Definition Syntax-Footnote-1662283
+Node: Function Example662358
+Ref: Function Example-Footnote-1665337
+Node: Function Calling665359
+Node: Calling A Function665951
+Node: Variable Scope666921
+Node: Pass By Value/Reference669975
+Node: Function Caveats672703
+Ref: Function Caveats-Footnote-1674794
+Node: Return Statement674914
+Node: Dynamic Typing677946
+Node: Dynamic Typing Awk678524
+Node: Dynamic Typing Gawk680662
+Node: Indirect Calls684032
+Node: Functions Summary695169
+Node: Library Functions698135
+Ref: Library Functions-Footnote-1701683
+Ref: Library Functions-Footnote-2701828
+Node: Library Names702003
+Ref: Library Names-Footnote-1705774
+Ref: Library Names-Footnote-2706001
+Node: General Functions706095
+Node: Strtonum Function707365
+Node: Assert Function710447
+Node: Round Function713897
+Node: Cliff Random Function715469
+Node: Ordinal Functions716493
+Ref: Ordinal Functions-Footnote-1719596
+Ref: Ordinal Functions-Footnote-2719848
+Node: Join Function720062
+Ref: Join Function-Footnote-1721860
+Node: Getlocaltime Function722064
+Node: Readfile Function725838
+Node: Shell Quoting727867
+Node: Isnumeric Function729323
+Node: To CSV Function730759
+Node: Data File Management732851
+Node: Filetrans Function733483
+Node: Rewind Function737759
+Node: File Checking739730
+Ref: File Checking-Footnote-1741096
+Node: Empty Files741301
+Node: Ignoring Assigns743364
+Node: Getopt Function744938
+Ref: Getopt Function-Footnote-1760756
+Node: Passwd Functions760968
+Ref: Passwd Functions-Footnote-1770103
+Node: Group Functions770191
+Ref: Group Functions-Footnote-1778315
+Node: Walking Arrays778526
+Node: Library Functions Summary781572
+Node: Library Exercises782992
+Node: Sample Programs783477
+Node: Running Examples784259
+Node: Clones785011
+Node: Cut Program786279
+Node: Egrep Program796703
+Node: Id Program806008
+Node: Split Program816100
+Ref: Split Program-Footnote-1826313
+Node: Tee Program826498
+Node: Uniq Program829404
+Node: Wc Program837264
+Node: Bytes vs. Characters837659
+Node: Using extensions839259
+Node: wc program840037
+Node: Miscellaneous Programs845030
+Node: Dupword Program846255
+Node: Alarm Program848304
+Node: Translate Program853207
+Ref: Translate Program-Footnote-1857916
+Node: Labels Program858194
+Ref: Labels Program-Footnote-1861629
+Node: Word Sorting861713
+Node: History Sorting865887
+Node: Extract Program868160
+Node: Simple Sed876413
+Node: Igawk Program879623
+Ref: Igawk Program-Footnote-1894833
+Ref: Igawk Program-Footnote-2895039
+Ref: Igawk Program-Footnote-3895169
+Node: Anagram Program895296
+Node: Signature Program898382
+Node: Programs Summary899632
+Node: Programs Exercises900886
+Ref: Programs Exercises-Footnote-1905188
+Node: Advanced Features905274
+Node: Nondecimal Data907755
+Node: Boolean Typed Values909385
+Node: Array Sorting911342
+Node: Controlling Array Traversal912071
+Ref: Controlling Array Traversal-Footnote-1920574
+Node: Array Sorting Functions920696
+Ref: Array Sorting Functions-Footnote-1926793
+Node: Two-way I/O927001
+Ref: Two-way I/O-Footnote-1934972
+Ref: Two-way I/O-Footnote-2935163
+Node: TCP/IP Networking935245
+Node: Profiling938413
+Node: Persistent Memory948083
+Ref: Persistent Memory-Footnote-1957655
+Node: Extension Philosophy957786
+Node: Advanced Features Summary959313
+Node: Internationalization961579
+Node: I18N and L10N963281
+Node: Explaining gettext963976
+Ref: Explaining gettext-Footnote-1970112
+Ref: Explaining gettext-Footnote-2970305
+Node: Programmer i18n970470
+Ref: Programmer i18n-Footnote-1975582
+Node: Translator i18n975631
+Node: String Extraction976461
+Ref: String Extraction-Footnote-1977637
+Node: Printf Ordering977735
+Ref: Printf Ordering-Footnote-1980593
+Node: I18N Portability980661
+Ref: I18N Portability-Footnote-1983221
+Node: I18N Example983288
+Ref: I18N Example-Footnote-1986682
+Ref: I18N Example-Footnote-2986755
+Node: Gawk I18N986872
+Node: I18N Summary987526
+Node: Debugger988923
+Node: Debugging989943
+Node: Debugging Concepts990392
+Node: Debugging Terms992209
+Node: Awk Debugging994812
+Ref: Awk Debugging-Footnote-1995785
+Node: Sample Debugging Session995921
+Node: Debugger Invocation996471
+Node: Finding The Bug998096
+Node: List of Debugger Commands1004728
+Node: Breakpoint Control1006105
+Node: Debugger Execution Control1009927
+Node: Viewing And Changing Data1013401
+Node: Execution Stack1017135
+Node: Debugger Info1018816
+Node: Miscellaneous Debugger Commands1023111
+Node: Readline Support1028352
+Node: Limitations1029296
+Node: Debugging Summary1031920
+Node: Namespaces1033219
+Node: Global Namespace1034346
+Node: Qualified Names1035780
+Node: Default Namespace1036815
+Node: Changing The Namespace1037588
+Node: Naming Rules1039270
+Node: Internal Name Management1041225
+Node: Namespace Example1042295
+Node: Namespace And Features1044872
+Node: Namespace Summary1046327
+Node: Arbitrary Precision Arithmetic1047838
+Node: Computer Arithmetic1049357
+Ref: table-numeric-ranges1053282
+Ref: table-floating-point-ranges1053779
+Ref: Computer Arithmetic-Footnote-11054437
+Node: Math Definitions1054494
+Ref: table-ieee-formats1057526
+Node: MPFR features1058099
+Node: MPFR On Parole1058552
+Ref: MPFR On Parole-Footnote-11059393
+Node: MPFR Intro1059552
+Node: FP Math Caution1061236
+Ref: FP Math Caution-Footnote-11062308
+Node: Inexactness of computations1062681
+Node: Inexact representation1063712
+Node: Comparing FP Values1065093
+Node: Errors accumulate1066351
+Node: Strange values1067816
+Ref: Strange values-Footnote-11070470
+Node: Getting Accuracy1070575
+Node: Try To Round1073312
+Node: Setting precision1074219
+Ref: table-predefined-precision-strings1074924
+Node: Setting the rounding mode1076808
+Ref: table-gawk-rounding-modes1077190
+Ref: Setting the rounding mode-Footnote-11081242
+Node: Arbitrary Precision Integers1081425
+Ref: Arbitrary Precision Integers-Footnote-11084635
+Node: Checking for MPFR1084788
+Node: POSIX Floating Point Problems1086278
+Ref: POSIX Floating Point Problems-Footnote-11091098
+Node: Floating point summary1091136
+Node: Dynamic Extensions1093392
+Node: Extension Intro1094989
+Node: Plugin License1096291
+Node: Extension Mechanism Outline1097104
+Ref: figure-load-extension1097555
+Ref: figure-register-new-function1099133
+Ref: figure-call-new-function1100242
+Node: Extension API Description1102357
+Node: Extension API Functions Introduction1104086
+Ref: table-api-std-headers1105980
+Node: General Data Types1110421
+Ref: General Data Types-Footnote-11119567
+Node: Memory Allocation Functions1119870
+Ref: Memory Allocation Functions-Footnote-11124587
+Node: Constructor Functions1124686
+Node: API Ownership of MPFR and GMP Values1128587
+Node: Registration Functions1130140
+Node: Extension Functions1130844
+Node: Exit Callback Functions1136418
+Node: Extension Version String1137732
+Node: Input Parsers1138427
+Node: Output Wrappers1153046
+Node: Two-way processors1157888
+Node: Printing Messages1160241
+Ref: Printing Messages-Footnote-11161452
+Node: Updating ERRNO1161605
+Node: Requesting Values1162404
+Ref: table-value-types-returned1163157
+Node: Accessing Parameters1165216
+Node: Symbol Table Access1166497
+Node: Symbol table by name1167009
+Ref: Symbol table by name-Footnote-11170210
+Node: Symbol table by cookie1170342
+Ref: Symbol table by cookie-Footnote-11174611
+Node: Cached values1174675
+Ref: Cached values-Footnote-11178307
+Node: Array Manipulation1178464
+Ref: Array Manipulation-Footnote-11179563
+Node: Array Data Types1179600
+Ref: Array Data Types-Footnote-11182418
+Node: Array Functions1182514
+Node: Flattening Arrays1187543
+Node: Creating Arrays1194591
+Node: Redirection API1199433
+Node: Extension API Variables1202450
+Node: Extension Versioning1203173
+Ref: gawk-api-version1203602
+Node: Extension GMP/MPFR Versioning1205389
+Node: Extension API Informational Variables1207093
+Node: Extension API Boilerplate1208346
+Node: Changes from API V11212476
+Node: Finding Extensions1214108
+Node: Extension Example1214683
+Node: Internal File Description1215505
+Node: Internal File Ops1219797
+Ref: Internal File Ops-Footnote-11231347
+Node: Using Internal File Ops1231495
+Ref: Using Internal File Ops-Footnote-11233928
+Node: Extension Samples1234206
+Node: Extension Sample File Functions1235775
+Node: Extension Sample Fnmatch1243900
+Node: Extension Sample Fork1245495
+Node: Extension Sample Inplace1246771
+Node: Extension Sample Ord1250873
+Node: Extension Sample Readdir1251749
+Ref: table-readdir-file-types1252538
+Node: Extension Sample Revout1253894
+Node: Extension Sample Rev2way1254491
+Node: Extension Sample Read write array1255243
+Node: Extension Sample Readfile1258517
+Node: Extension Sample Time1259648
+Node: Extension Sample API Tests1261648
+Node: gawkextlib1262156
+Node: Extension summary1265188
+Node: Extension Exercises1269036
+Node: Language History1270306
+Node: V7/SVR3.11272018
+Node: SVR41274368
+Node: POSIX1275900
+Node: BTL1277325
+Node: POSIX/GNU1278092
+Ref: Gawk Extension Functions1281482
+Node: Feature History1284906
+Node: Common Extensions1304747
+Node: Ranges and Locales1306222
+Ref: Ranges and Locales-Footnote-11311007
+Ref: Ranges and Locales-Footnote-21311034
+Ref: Ranges and Locales-Footnote-31311269
+Node: Contributors1311492
+Node: History summary1317683
+Node: Installation1319125
+Node: Gawk Distribution1320089
+Node: Getting1320581
+Node: Extracting1321580
+Node: Distribution contents1323286
+Node: Unix Installation1331176
+Node: Quick Installation1331996
+Node: Compiling with MPFR1334536
+Node: Shell Startup Files1335242
+Node: Additional Configuration Options1336399
+Node: Configuration Philosophy1338782
+Node: Compiling from Git1341282
+Node: Building the Documentation1341841
+Node: Non-Unix Installation1343253
+Node: PC Installation1343729
+Node: PC Binary Installation1344598
+Node: PC Compiling1345491
+Node: PC Using1346669
+Node: Cygwin1350385
+Node: MSYS1351637
+Node: OpenVMS Installation1352263
+Node: OpenVMS Compilation1352944
+Ref: OpenVMS Compilation-Footnote-11354427
+Node: OpenVMS Dynamic Extensions1354485
+Node: OpenVMS Installation Details1356121
+Node: OpenVMS Running1358552
+Node: OpenVMS GNV1362689
+Node: Bugs1363444
+Node: Bug definition1364364
+Node: Bug address1367965
+Node: Usenet1371534
+Node: Performance bugs1372747
+Node: Asking for help1375751
+Node: Maintainers1377738
+Node: Other Versions1378765
+Node: Installation summary1388369
+Node: Notes1389751
+Node: Compatibility Mode1390561
+Node: Additions1391383
+Node: Accessing The Source1392328
+Node: Adding Code1393859
+Node: New Ports1400970
+Node: Derived Files1405473
+Ref: Derived Files-Footnote-11411284
+Ref: Derived Files-Footnote-21411319
+Ref: Derived Files-Footnote-31411930
+Node: Future Extensions1412044
+Node: Implementation Limitations1412714
+Node: Extension Design1413956
+Node: Old Extension Problems1415116
+Ref: Old Extension Problems-Footnote-11416688
+Node: Extension New Mechanism Goals1416749
+Ref: Extension New Mechanism Goals-Footnote-11420219
+Node: Extension Other Design Decisions1420420
+Node: Extension Future Growth1422617
+Node: Notes summary1423237
+Node: Basic Concepts1424447
+Node: Basic High Level1425132
+Ref: figure-general-flow1425414
+Ref: figure-process-flow1426116
+Ref: Basic High Level-Footnote-11429486
+Node: Basic Data Typing1429675
+Node: Glossary1433083
+Node: Copying1465961
+Node: GNU Free Documentation License1503519
+Node: Index1528642
End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 00abf0a2..ecfff556 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -3868,6 +3868,9 @@ This option may be given multiple times; the @command{awk}
program consists of the concatenation of the contents of
each specified @var{source-file}.
+@cindex @code{@@} (at-sign) @subentry @code{@@namespace} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@namespace} directive
+@cindex @code{@@namespace} directive @sortas{namespace directive}
Files named with @option{-f} are treated as if they had @samp{@@namespace
"awk"}
at their beginning. @xref{Changing The Namespace}, for more information
on this advanced feature.
@@ -4030,6 +4033,9 @@ $ @kbd{gawk -e 'BEGIN @{ a = 5 ;' -e 'print a @}'}
However, this is no longer true. If you have any scripts that
rely upon this feature, you should revise them.
+@cindex @code{@@} (at-sign) @subentry @code{@@namespace} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@namespace} directive
+@cindex @code{@@namespace} directive @sortas{namespace directive}
This is because each @var{program-text} is treated as if it had
@samp{@@namespace "awk"} at its beginning. @xref{Changing The Namespace},
for more information.
@@ -4099,6 +4105,9 @@ that @command{gawk} accepts and then exit.
@cindex @option{-i} option
@cindex @option{--include} option
@cindex @command{awk} programs @subentry location of
+@cindex @code{@@} (at-sign) @subentry @code{@@include} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@include} directive
+@cindex @code{@@include} directive @sortas{include directive}
Read an @command{awk} source library from @var{source-file}. This option
is completely equivalent to using the @code{@@include} directive inside
your program. It is very similar to the @option{-f} option,
@@ -4111,6 +4120,9 @@ input. Thus, after processing an @option{-i} argument,
@command{gawk}
still expects to find the main source code via the @option{-f} option
or on the command line.
+@cindex @code{@@} (at-sign) @subentry @code{@@namespace} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@namespace} directive
+@cindex @code{@@namespace} directive @sortas{namespace directive}
Files named with @option{-i} are treated as if they had @samp{@@namespace
"awk"}
at their beginning. @xref{Changing The Namespace}, for more information.
@@ -4146,13 +4158,16 @@ causes a fatal error.
@cindex loading extensions
@cindex @env{AWKLIBPATH} environment variable
@cindex environment variables @subentry @env{AWKLIBPATH}
+@cindex @code{@@} (at-sign) @subentry @code{@@load} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@load} directive
+@cindex @code{@@load} directive @sortas{load directive}
Load a dynamic extension named @var{ext}. Extensions
are stored as system shared libraries.
This option searches for the library using the @env{AWKLIBPATH}
environment variable. The correct library suffix for your platform will be
supplied by default, so it need not be specified in the extension name.
The extension initialization routine should be named @code{dl_load()}.
-An alternative is to use the @code{@@load} keyword inside the program to load
+An alternative is to use the @code{@@load} directive inside the program to load
a shared library. This advanced feature is described in detail in
@ref{Dynamic Extensions}.
@item @option{-L}[@var{value}]
@@ -4745,6 +4760,9 @@ found, and @command{gawk} no longer needs to use
@env{AWKPATH}.
@cindex directories @subentry searching @subentry for loadable extensions
@cindex search paths @subentry for loadable extensions
@cindex differences in @command{awk} and @command{gawk} @subentry
@code{AWKLIBPATH} environment variable
+@cindex @code{@@} (at-sign) @subentry @code{@@load} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@load} directive
+@cindex @code{@@load} directive @sortas{load directive}
The @env{AWKLIBPATH} environment variable is similar to the @env{AWKPATH}
variable, but it is used to search for loadable extensions (stored as
@@ -4753,7 +4771,7 @@ than for source files. If the extension is not found,
the path is
searched again after adding the appropriate shared library suffix for
the platform. For example, on GNU/Linux systems, the suffix @samp{.so}
is used. The search path specified is also used for extensions loaded
-via the @code{@@load} keyword (@pxref{Loading Shared Libraries}).
+via the @code{@@load} directive (@pxref{Loading Shared Libraries}).
If @env{AWKLIBPATH} does not exist in the environment, or if it has
an empty value, @command{gawk} uses a default path; this
@@ -4966,13 +4984,13 @@ This @value{SECTION} describes a feature that is
specific to @command{gawk}.
@cindex @code{@@include} directive @sortas{include directive}
@cindex @env{AWKPATH} environment variable
@cindex environment variables @subentry @env{AWKPATH}
-The @code{@@include} keyword can be used to read external @command{awk} source
+The @code{@@include} directive can be used to read external @command{awk}
source
files. This gives you the ability to split large @command{awk} source files
into smaller, more manageable pieces, and also lets you reuse common
@command{awk}
code from various @command{awk} scripts. In other words, you can group
together @command{awk} functions used to carry out specific tasks
into external files. These files can be used just like function libraries,
-using the @code{@@include} keyword in conjunction with the @env{AWKPATH}
+using the @code{@@include} directive in conjunction with the @env{AWKPATH}
environment variable. Note that source files may also be included
using the @option{-i} option.
@@ -5007,7 +5025,7 @@ $ @kbd{gawk -f test2}
@command{gawk} runs the @file{test2} script, which includes @file{test1}
using the @code{@@include}
-keyword. So, to include external @command{awk} source files, you just
+directive. So, to include external @command{awk} source files, you just
use @code{@@include} followed by the name of the file to be included,
enclosed in double quotes.
@@ -5073,7 +5091,7 @@ to be included.
Given the ability to specify multiple @option{-f} options, the
@code{@@include} mechanism is not strictly necessary.
-However, the @code{@@include} keyword
+However, the @code{@@include} directive
can help you in constructing self-contained @command{gawk} programs,
thus reducing the need for writing complex and tedious command lines.
In particular, @code{@@include} is very useful for writing CGI scripts
@@ -5102,7 +5120,7 @@ This @value{SECTION} describes a feature that is specific
to @command{gawk}.
@cindex @code{@@load} directive @sortas{load directive}
@cindex @env{AWKLIBPATH} environment variable
@cindex environment variables @subentry @env{AWKLIBPATH}
-The @code{@@load} keyword can be used to read external @command{awk} extensions
+The @code{@@load} directive can be used to read external @command{awk}
extensions
(stored as system shared libraries).
This allows you to link in compiled code that may offer superior
performance and/or give you access to extended capabilities not supported
@@ -5345,12 +5363,12 @@ an @command{awk} program to set the exit status.
@item
@command{gawk} allows you to include other @command{awk} source files into
-your program using the @code{@@include} statement and/or the @option{-i}
+your program using the @code{@@include} directive and/or the @option{-i}
and @option{-f} command-line options.
@item
@command{gawk} allows you to load additional functions written in C
-or C++ using the @code{@@load} statement and/or the @option{-l} option.
+or C++ using the @code{@@load} directive and/or the @option{-l} option.
(This advanced feature is described later, in @ref{Dynamic Extensions}.)
@end itemize
@@ -9018,11 +9036,11 @@ included twice.
@xref{Close Files And Pipes}.
One deficiency of this program is that it does not process nested
-@code{@@include} statements
-(i.e., @code{@@include} statements in included files)
+@code{@@include} directives
+(i.e., @code{@@include} directives in included files)
the way a true macro preprocessor would.
@xref{Igawk Program} for a program
-that does handle nested @code{@@include} statements.
+that does handle nested @code{@@include} directives.
@node Getline/Pipe
@subsection Using @code{getline} from a Pipe
@@ -16023,6 +16041,9 @@ The identifier is an array.
@item "builtin"
The identifier is a built-in function.
+@cindex @code{@@} (at-sign) @subentry @code{@@load} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@load} directive
+@cindex @code{@@load} directive @sortas{load directive}
@item "extension"
The identifier is an extension function loaded via
@code{@@load} or @option{-l}.
@@ -26865,6 +26886,9 @@ Loadable extensions are presented in full detail in
@ref{Dynamic Extensions}.
They provide a way to add functions to @command{gawk} which can call
out to other facilities written in C or C++.
+@cindex @code{@@} (at-sign) @subentry @code{@@load} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@load} directive
+@cindex @code{@@load} directive @sortas{load directive}
For the purposes of
@file{wc.awk}, it's enough to know that the extension is loaded
with the @code{@@load} directive, and the additional function we
@@ -28268,7 +28292,7 @@ BEGIN @{
The following program, @file{igawk.sh}, provides this service.
It simulates @command{gawk}'s searching of the @env{AWKPATH} variable
and also allows @dfn{nested} includes (i.e., a file that is included
-with @code{@@include} can contain further @code{@@include} statements).
+with @code{@@include} can contain further @code{@@include} directives).
@command{igawk} makes an effort to only include files once, so that nested
includes don't accidentally include a library function twice.
@@ -28306,7 +28330,7 @@ gets the text of the file included in the program at
the correct point.
@item
Run an @command{awk} program (naturally) over the shell variable's contents to
expand
-@code{@@include} statements. The expanded program is placed in a second
+@code{@@include} directives. The expanded program is placed in a second
shell variable.
@item
@@ -28344,7 +28368,7 @@ These are saved and passed on to @command{gawk}.
@item @option{-f}, @option{--file}, @option{--file=}, @option{-Wfile=}
The @value{FN} is appended to the shell variable @code{program} with an
-@code{@@include} statement.
+@code{@@include} directive.
The @command{expr} utility is used to remove the leading option part of the
argument (e.g., @samp{--file=}).
(Typical @command{sh} usage would be to use the @command{echo} and
@command{sed}
@@ -28468,7 +28492,7 @@ is stored in the shell variable @code{expand_prog}.
Doing this keeps
the shell script readable. The @command{awk} program
reads through the user's program, one line at a time, using @code{getline}
(@pxref{Getline}). The input
-@value{FN}s and @code{@@include} statements are managed using a stack.
+@value{FN}s and @code{@@include} directives are managed using a stack.
As each @code{@@include} is encountered, the current @value{FN} is
``pushed'' onto the stack and the file named in the @code{@@include}
directive becomes the current @value{FN}. As each file is finished,
@@ -28660,7 +28684,7 @@ considerably.
@item
Using a @code{getline} loop in the @code{BEGIN} rule does it all in one
place. It is not necessary to call out to a separate loop for processing
-nested @code{@@include} statements.
+nested @code{@@include} directives.
@item
Instead of saving the expanded program in a temporary file, putting it in a
shell variable
@@ -29102,7 +29126,7 @@ suggested that @command{gawk} be modified to
automatically read these files
upon startup. Instead, it would be very simple to modify @command{igawk}
to do this. Since @command{igawk} can process nested @code{@@include}
directives, @file{default.awk} could simply contain @code{@@include}
-statements for the desired library functions.
+directives for the desired library functions.
Make this change.
@item
@@ -33702,6 +33726,9 @@ with other important @command{gawk} features.
@cindex namespaces @subentry interaction with @subentry pretty printer
@cindex profiler, interaction with namespaces
@cindex pretty printer, interaction with namespaces
+@cindex @code{@@} (at-sign) @subentry @code{@@namespace} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@namespace} directive
+@cindex @code{@@namespace} directive @sortas{namespace directive}
The profiler and pretty-printer (@pxref{Profiling}) have been enhanced
to understand namespaces and the namespace naming rules presented in
@ref{Naming Rules}. In particular, the output groups functions in the same
@@ -39069,7 +39096,10 @@ $ @kbd{gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g
-I@var{idir} filefuncs.c}
$ @kbd{gcc -o filefuncs.so -shared filefuncs.o}
@end example
-Once the library exists, it is loaded by using the @code{@@load} keyword:
+@cindex @code{@@} (at-sign) @subentry @code{@@load} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@load} directive
+@cindex @code{@@load} directive @sortas{load directive}
+Once the library exists, it is loaded by using the @code{@@load} directive:
@example
# file testff.awk
@@ -45928,6 +45958,9 @@ Emacs editor. GNU Emacs is the most widely used
version of Emacs today.
@item FSF
See ``Free Software Foundation.''
+@cindex @code{@@} (at-sign) @subentry @code{@@include} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@include} directive
+@cindex @code{@@include} directive @sortas{include directive}
@item Function
A part of an @command{awk} program that can be invoked from every point of
the program, to perform a task. @command{awk} has several built-in
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=236c878905784dccf28e1ff43070c3731f9195d3
commit 236c878905784dccf28e1ff43070c3731f9195d3
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Mon Aug 12 17:39:30 2024 +0300
Fix in pretty printer for namespaces.
diff --git a/ChangeLog b/ChangeLog
index 0d084f35..e21de4ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-08-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (push_ns_onto_namespace_chain): New function.
+ (mk_function, set_namespace): Use it.
+
2024-08-12 Arnold D. Robbins <arnold@skeeve.com>
Fix some C23 compilation issues. THanks to
diff --git a/awkgram.c b/awkgram.c
index d340dcaf..6fd16c43 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -108,6 +108,7 @@ static char *tokexpand(void);
static NODE *set_profile_text(NODE *n, const char *str, size_t len);
static int check_qualified_special(char *token);
static char *qualify_name(const char *name, size_t len);
+static void push_ns_onto_namespace_chain(INSTRUCTION *comment);
static INSTRUCTION *trailing_comment;
static INSTRUCTION *outer_comment;
static INSTRUCTION *interblock_comment;
@@ -235,7 +236,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-#line 239 "awkgram.c"
+#line 240 "awkgram.c"
# ifndef YY_CAST
# ifdef __cplusplus
@@ -950,27 +951,27 @@ static const yytype_int8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
{
- 0, 235, 235, 236, 241, 251, 255, 267, 275, 289,
- 300, 310, 320, 346, 356, 358, 363, 373, 375, 380,
- 382, 384, 390, 394, 399, 429, 441, 453, 459, 468,
- 486, 487, 498, 504, 512, 513, 517, 517, 551, 550,
- 584, 599, 601, 606, 607, 627, 632, 633, 637, 648,
- 653, 660, 768, 819, 869, 995, 1017, 1038, 1048, 1058,
- 1068, 1079, 1092, 1110, 1109, 1126, 1144, 1144, 1246, 1246,
- 1279, 1309, 1317, 1318, 1324, 1325, 1332, 1337, 1350, 1365,
- 1367, 1375, 1382, 1384, 1392, 1401, 1403, 1412, 1413, 1421,
- 1426, 1426, 1439, 1446, 1459, 1463, 1485, 1486, 1492, 1493,
- 1502, 1503, 1508, 1513, 1530, 1532, 1534, 1541, 1542, 1548,
- 1549, 1554, 1556, 1563, 1565, 1573, 1578, 1589, 1590, 1595,
- 1597, 1604, 1606, 1614, 1619, 1629, 1630, 1635, 1636, 1641,
- 1648, 1652, 1654, 1656, 1669, 1686, 1696, 1703, 1705, 1710,
- 1712, 1714, 1722, 1724, 1729, 1731, 1736, 1738, 1740, 1797,
- 1799, 1801, 1803, 1805, 1807, 1809, 1811, 1825, 1830, 1835,
- 1861, 1867, 1869, 1871, 1873, 1875, 1877, 1882, 1886, 1918,
- 1926, 1932, 1938, 1951, 1952, 1953, 1958, 1963, 1967, 1971,
- 1986, 2007, 2012, 2049, 2086, 2087, 2093, 2094, 2099, 2101,
- 2108, 2125, 2142, 2144, 2151, 2156, 2162, 2174, 2186, 2195,
- 2199, 2204, 2208, 2212, 2216, 2221, 2222, 2226, 2230, 2234
+ 0, 236, 236, 237, 242, 252, 256, 268, 276, 290,
+ 301, 311, 321, 347, 357, 359, 364, 374, 376, 381,
+ 383, 385, 391, 395, 400, 430, 442, 454, 460, 469,
+ 487, 488, 499, 505, 513, 514, 518, 518, 552, 551,
+ 585, 600, 602, 607, 608, 628, 633, 634, 638, 649,
+ 654, 661, 769, 820, 870, 996, 1018, 1039, 1049, 1059,
+ 1069, 1080, 1093, 1111, 1110, 1127, 1145, 1145, 1247, 1247,
+ 1280, 1310, 1318, 1319, 1325, 1326, 1333, 1338, 1351, 1366,
+ 1368, 1376, 1383, 1385, 1393, 1402, 1404, 1413, 1414, 1422,
+ 1427, 1427, 1440, 1447, 1460, 1464, 1486, 1487, 1493, 1494,
+ 1503, 1504, 1509, 1514, 1531, 1533, 1535, 1542, 1543, 1549,
+ 1550, 1555, 1557, 1564, 1566, 1574, 1579, 1590, 1591, 1596,
+ 1598, 1605, 1607, 1615, 1620, 1630, 1631, 1636, 1637, 1642,
+ 1649, 1653, 1655, 1657, 1670, 1687, 1697, 1704, 1706, 1711,
+ 1713, 1715, 1723, 1725, 1730, 1732, 1737, 1739, 1741, 1798,
+ 1800, 1802, 1804, 1806, 1808, 1810, 1812, 1826, 1831, 1836,
+ 1862, 1868, 1870, 1872, 1874, 1876, 1878, 1883, 1887, 1919,
+ 1927, 1933, 1939, 1952, 1953, 1954, 1959, 1964, 1968, 1972,
+ 1987, 2008, 2013, 2050, 2087, 2088, 2094, 2095, 2100, 2102,
+ 2109, 2126, 2143, 2145, 2152, 2157, 2163, 2175, 2187, 2196,
+ 2200, 2205, 2209, 2213, 2217, 2222, 2223, 2227, 2231, 2235
};
#endif
@@ -1952,22 +1953,22 @@ yyreduce:
switch (yyn)
{
case 2: /* program: %empty */
-#line 235 "awkgram.y"
+#line 236 "awkgram.y"
{ yyval = NULL; }
-#line 1958 "awkgram.c"
+#line 1959 "awkgram.c"
break;
case 3: /* program: program rule */
-#line 237 "awkgram.y"
+#line 238 "awkgram.y"
{
rule = 0;
yyerrok;
}
-#line 1967 "awkgram.c"
+#line 1968 "awkgram.c"
break;
case 4: /* program: program nls */
-#line 242 "awkgram.y"
+#line 243 "awkgram.y"
{
if (yyvsp[0] != NULL) {
if (yyvsp[-1] == NULL)
@@ -1977,19 +1978,19 @@ yyreduce:
}
yyval = yyvsp[-1];
}
-#line 1981 "awkgram.c"
+#line 1982 "awkgram.c"
break;
case 5: /* program: program LEX_EOF */
-#line 252 "awkgram.y"
+#line 253 "awkgram.y"
{
next_sourcefile();
}
-#line 1989 "awkgram.c"
+#line 1990 "awkgram.c"
break;
case 6: /* program: program error */
-#line 256 "awkgram.y"
+#line 257 "awkgram.y"
{
rule = 0;
/*
@@ -1998,11 +1999,11 @@ yyreduce:
*/
/* yyerrok; */
}
-#line 2002 "awkgram.c"
+#line 2003 "awkgram.c"
break;
case 7: /* rule: pattern action */
-#line 268 "awkgram.y"
+#line 269 "awkgram.y"
{
(void) append_rule(yyvsp[-1], yyvsp[0]);
if (pending_comment != NULL) {
@@ -2010,11 +2011,11 @@ yyreduce:
pending_comment = NULL;
}
}
-#line 2014 "awkgram.c"
+#line 2015 "awkgram.c"
break;
case 8: /* rule: pattern statement_term */
-#line 276 "awkgram.y"
+#line 277 "awkgram.y"
{
if (rule != Rule) {
msg(_("%s blocks must have an action part"),
ruletab[rule]);
@@ -2028,11 +2029,11 @@ yyreduce:
(void) append_rule(yyvsp[-1], NULL);
}
}
-#line 2032 "awkgram.c"
+#line 2033 "awkgram.c"
break;
case 9: /* rule: function_prologue action */
-#line 290 "awkgram.y"
+#line 291 "awkgram.y"
{
in_function = false;
(void) mk_function(yyvsp[-1], yyvsp[0]);
@@ -2043,11 +2044,11 @@ yyreduce:
}
yyerrok;
}
-#line 2047 "awkgram.c"
+#line 2048 "awkgram.c"
break;
case 10: /* rule: '@' LEX_INCLUDE source statement_term */
-#line 301 "awkgram.y"
+#line 302 "awkgram.y"
{
want_source = false;
at_seen--;
@@ -2057,11 +2058,11 @@ yyreduce:
}
yyerrok;
}
-#line 2061 "awkgram.c"
+#line 2062 "awkgram.c"
break;
case 11: /* rule: '@' LEX_LOAD library statement_term */
-#line 311 "awkgram.y"
+#line 312 "awkgram.y"
{
want_source = false;
at_seen--;
@@ -2071,11 +2072,11 @@ yyreduce:
}
yyerrok;
}
-#line 2075 "awkgram.c"
+#line 2076 "awkgram.c"
break;
case 12: /* rule: '@' LEX_NAMESPACE namespace statement_term */
-#line 321 "awkgram.y"
+#line 322 "awkgram.y"
{
/*
* 1/2022:
@@ -2098,11 +2099,11 @@ yyreduce:
yyerrok;
}
-#line 2102 "awkgram.c"
+#line 2103 "awkgram.c"
break;
case 13: /* source: FILENAME */
-#line 347 "awkgram.y"
+#line 348 "awkgram.y"
{
void *srcfile = NULL;
@@ -2112,23 +2113,23 @@ yyreduce:
bcfree(yyvsp[0]);
yyval = (INSTRUCTION *) srcfile;
}
-#line 2116 "awkgram.c"
+#line 2117 "awkgram.c"
break;
case 14: /* source: FILENAME error */
-#line 357 "awkgram.y"
+#line 358 "awkgram.y"
{ yyval = NULL; }
-#line 2122 "awkgram.c"
+#line 2123 "awkgram.c"
break;
case 15: /* source: error */
-#line 359 "awkgram.y"
+#line 360 "awkgram.y"
{ yyval = NULL; }
-#line 2128 "awkgram.c"
+#line 2129 "awkgram.c"
break;
case 16: /* library: FILENAME */
-#line 364 "awkgram.y"
+#line 365 "awkgram.y"
{
void *srcfile;
@@ -2138,58 +2139,58 @@ yyreduce:
bcfree(yyvsp[0]);
yyval = (INSTRUCTION *) srcfile;
}
-#line 2142 "awkgram.c"
+#line 2143 "awkgram.c"
break;
case 17: /* library: FILENAME error */
-#line 374 "awkgram.y"
+#line 375 "awkgram.y"
{ yyval = NULL; }
-#line 2148 "awkgram.c"
+#line 2149 "awkgram.c"
break;
case 18: /* library: error */
-#line 376 "awkgram.y"
+#line 377 "awkgram.y"
{ yyval = NULL; }
-#line 2154 "awkgram.c"
+#line 2155 "awkgram.c"
break;
case 19: /* namespace: FILENAME */
-#line 381 "awkgram.y"
+#line 382 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 2160 "awkgram.c"
+#line 2161 "awkgram.c"
break;
case 20: /* namespace: FILENAME error */
-#line 383 "awkgram.y"
+#line 384 "awkgram.y"
{ yyval = NULL; }
-#line 2166 "awkgram.c"
+#line 2167 "awkgram.c"
break;
case 21: /* namespace: error */
-#line 385 "awkgram.y"
+#line 386 "awkgram.y"
{ yyval = NULL; }
-#line 2172 "awkgram.c"
+#line 2173 "awkgram.c"
break;
case 22: /* pattern: %empty */
-#line 390 "awkgram.y"
+#line 391 "awkgram.y"
{
rule = Rule;
yyval = NULL;
}
-#line 2181 "awkgram.c"
+#line 2182 "awkgram.c"
break;
case 23: /* pattern: exp */
-#line 395 "awkgram.y"
+#line 396 "awkgram.y"
{
rule = Rule;
}
-#line 2189 "awkgram.c"
+#line 2190 "awkgram.c"
break;
case 24: /* pattern: exp comma exp */
-#line 400 "awkgram.y"
+#line 401 "awkgram.y"
{
INSTRUCTION *tp;
@@ -2219,11 +2220,11 @@ yyreduce:
yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]),
tp);
rule = Rule;
}
-#line 2223 "awkgram.c"
+#line 2224 "awkgram.c"
break;
case 25: /* pattern: LEX_BEGIN */
-#line 430 "awkgram.y"
+#line 431 "awkgram.y"
{
static int begin_seen = 0;
@@ -2235,11 +2236,11 @@ yyreduce:
yyvsp[0]->source_file = source;
yyval = yyvsp[0];
}
-#line 2239 "awkgram.c"
+#line 2240 "awkgram.c"
break;
case 26: /* pattern: LEX_END */
-#line 442 "awkgram.y"
+#line 443 "awkgram.y"
{
static int end_seen = 0;
@@ -2251,31 +2252,31 @@ yyreduce:
yyvsp[0]->source_file = source;
yyval = yyvsp[0];
}
-#line 2255 "awkgram.c"
+#line 2256 "awkgram.c"
break;
case 27: /* pattern: LEX_BEGINFILE */
-#line 454 "awkgram.y"
+#line 455 "awkgram.y"
{
yyvsp[0]->in_rule = rule = BEGINFILE;
yyvsp[0]->source_file = source;
yyval = yyvsp[0];
}
-#line 2265 "awkgram.c"
+#line 2266 "awkgram.c"
break;
case 28: /* pattern: LEX_ENDFILE */
-#line 460 "awkgram.y"
+#line 461 "awkgram.y"
{
yyvsp[0]->in_rule = rule = ENDFILE;
yyvsp[0]->source_file = source;
yyval = yyvsp[0];
}
-#line 2275 "awkgram.c"
+#line 2276 "awkgram.c"
break;
case 29: /* action: l_brace statements r_brace opt_semi opt_nls */
-#line 469 "awkgram.y"
+#line 470 "awkgram.y"
{
INSTRUCTION *ip = make_braced_statements(yyvsp[-4], yyvsp[-3],
yyvsp[-2]);
@@ -2290,11 +2291,11 @@ yyreduce:
yyval = ip;
}
-#line 2294 "awkgram.c"
+#line 2295 "awkgram.c"
break;
case 31: /* func_name: FUNC_CALL */
-#line 488 "awkgram.y"
+#line 489 "awkgram.y"
{
const char *name = yyvsp[0]->lextok;
char *qname = qualify_name(name, strlen(name));
@@ -2305,36 +2306,36 @@ yyreduce:
}
yyval = yyvsp[0];
}
-#line 2309 "awkgram.c"
+#line 2310 "awkgram.c"
break;
case 32: /* func_name: lex_builtin */
-#line 499 "awkgram.y"
+#line 500 "awkgram.y"
{
yyerror(_("`%s' is a built-in function, it cannot be
redefined"),
tokstart);
YYABORT;
}
-#line 2319 "awkgram.c"
+#line 2320 "awkgram.c"
break;
case 33: /* func_name: '@' LEX_EVAL */
-#line 505 "awkgram.y"
+#line 506 "awkgram.y"
{
yyval = yyvsp[0];
at_seen--;
}
-#line 2328 "awkgram.c"
+#line 2329 "awkgram.c"
break;
case 36: /* $@1: %empty */
-#line 517 "awkgram.y"
+#line 518 "awkgram.y"
{ want_param_names = FUNC_HEADER; }
-#line 2334 "awkgram.c"
+#line 2335 "awkgram.c"
break;
case 37: /* function_prologue: LEX_FUNCTION func_name '(' $@1 opt_param_list
r_paren opt_nls */
-#line 518 "awkgram.y"
+#line 519 "awkgram.y"
{
INSTRUCTION *func_comment = NULL;
// Merge any comments found in the parameter list with those
@@ -2360,17 +2361,17 @@ yyreduce:
yyval = yyvsp[-6];
want_param_names = FUNC_BODY;
}
-#line 2364 "awkgram.c"
+#line 2365 "awkgram.c"
break;
case 38: /* $@2: %empty */
-#line 551 "awkgram.y"
+#line 552 "awkgram.y"
{ want_regexp = true; }
-#line 2370 "awkgram.c"
+#line 2371 "awkgram.c"
break;
case 39: /* regexp: a_slash $@2 REGEXP */
-#line 553 "awkgram.y"
+#line 554 "awkgram.y"
{
NODE *n, *exp;
char *re;
@@ -2399,11 +2400,11 @@ yyreduce:
yyval->opcode = Op_match_rec;
yyval->memory = n;
}
-#line 2403 "awkgram.c"
+#line 2404 "awkgram.c"
break;
case 40: /* typed_regexp: TYPED_REGEXP */
-#line 585 "awkgram.y"
+#line 586 "awkgram.y"
{
char *re;
size_t len;
@@ -2416,23 +2417,23 @@ yyreduce:
yyval->opcode = Op_push_re;
yyval->memory = make_typed_regex(re, len);
}
-#line 2420 "awkgram.c"
+#line 2421 "awkgram.c"
break;
case 41: /* a_slash: '/' */
-#line 600 "awkgram.y"
+#line 601 "awkgram.y"
{ bcfree(yyvsp[0]); }
-#line 2426 "awkgram.c"
+#line 2427 "awkgram.c"
break;
case 43: /* statements: %empty */
-#line 606 "awkgram.y"
+#line 607 "awkgram.y"
{ yyval = NULL; }
-#line 2432 "awkgram.c"
+#line 2433 "awkgram.c"
break;
case 44: /* statements: statements statement */
-#line 608 "awkgram.y"
+#line 609 "awkgram.y"
{
if (yyvsp[0] == NULL) {
yyval = yyvsp[-1];
@@ -2452,29 +2453,29 @@ yyreduce:
yyerrok;
}
-#line 2456 "awkgram.c"
+#line 2457 "awkgram.c"
break;
case 45: /* statements: statements error */
-#line 628 "awkgram.y"
+#line 629 "awkgram.y"
{ yyval = NULL; }
-#line 2462 "awkgram.c"
+#line 2463 "awkgram.c"
break;
case 46: /* statement_term: nls */
-#line 632 "awkgram.y"
+#line 633 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 2468 "awkgram.c"
+#line 2469 "awkgram.c"
break;
case 47: /* statement_term: semi opt_nls */
-#line 633 "awkgram.y"
+#line 634 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 2474 "awkgram.c"
+#line 2475 "awkgram.c"
break;
case 48: /* statement: semi opt_nls */
-#line 638 "awkgram.y"
+#line 639 "awkgram.y"
{
if (yyvsp[0] != NULL) {
INSTRUCTION *ip;
@@ -2485,31 +2486,31 @@ yyreduce:
} else
yyval = NULL;
}
-#line 2489 "awkgram.c"
+#line 2490 "awkgram.c"
break;
case 49: /* statement: l_brace statements r_brace */
-#line 649 "awkgram.y"
+#line 650 "awkgram.y"
{
trailing_comment = yyvsp[0]; // NULL or comment
yyval = make_braced_statements(yyvsp[-2], yyvsp[-1], yyvsp[0]);
}
-#line 2498 "awkgram.c"
+#line 2499 "awkgram.c"
break;
case 50: /* statement: if_statement */
-#line 654 "awkgram.y"
+#line 655 "awkgram.y"
{
if (do_pretty_print)
yyval = list_prepend(yyvsp[0],
instruction(Op_exec_count));
else
yyval = yyvsp[0];
}
-#line 2509 "awkgram.c"
+#line 2510 "awkgram.c"
break;
case 51: /* statement: LEX_SWITCH '(' exp r_paren opt_nls l_brace
case_statements opt_nls r_brace */
-#line 661 "awkgram.y"
+#line 662 "awkgram.y"
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
INSTRUCTION *ip, *nextc, *tbreak;
@@ -2617,11 +2618,11 @@ yyreduce:
break_allowed--;
fix_break_continue(ip, tbreak, NULL);
}
-#line 2621 "awkgram.c"
+#line 2622 "awkgram.c"
break;
case 52: /* statement: LEX_WHILE '(' exp r_paren opt_nls statement */
-#line 769 "awkgram.y"
+#line 770 "awkgram.y"
{
/*
* -----------------
@@ -2672,11 +2673,11 @@ yyreduce:
continue_allowed--;
fix_break_continue(ip, tbreak, tcont);
}
-#line 2676 "awkgram.c"
+#line 2677 "awkgram.c"
break;
case 53: /* statement: LEX_DO opt_nls statement LEX_WHILE '(' exp r_paren
opt_nls */
-#line 820 "awkgram.y"
+#line 821 "awkgram.y"
{
/*
* -----------------
@@ -2726,11 +2727,11 @@ yyreduce:
/* else
$1 and $4 are NULLs */
}
-#line 2730 "awkgram.c"
+#line 2731 "awkgram.c"
break;
case 54: /* statement: LEX_FOR '(' NAME LEX_IN simple_variable r_paren
opt_nls statement */
-#line 870 "awkgram.y"
+#line 871 "awkgram.y"
{
INSTRUCTION *ip;
char *var_name = yyvsp[-5]->lextok;
@@ -2856,11 +2857,11 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2860 "awkgram.c"
+#line 2861 "awkgram.c"
break;
case 55: /* statement: LEX_FOR '(' opt_simple_stmt semi opt_nls exp semi
opt_nls opt_simple_stmt r_paren opt_nls statement */
-#line 996 "awkgram.y"
+#line 997 "awkgram.y"
{
if (yyvsp[-7] != NULL) {
merge_comments(yyvsp[-7], NULL);
@@ -2882,11 +2883,11 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2886 "awkgram.c"
+#line 2887 "awkgram.c"
break;
case 56: /* statement: LEX_FOR '(' opt_simple_stmt semi opt_nls semi opt_nls
opt_simple_stmt r_paren opt_nls statement */
-#line 1018 "awkgram.y"
+#line 1019 "awkgram.y"
{
if (yyvsp[-6] != NULL) {
merge_comments(yyvsp[-6], NULL);
@@ -2907,22 +2908,22 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2911 "awkgram.c"
+#line 2912 "awkgram.c"
break;
case 57: /* statement: non_compound_stmt */
-#line 1039 "awkgram.y"
+#line 1040 "awkgram.y"
{
if (do_pretty_print)
yyval = list_prepend(yyvsp[0],
instruction(Op_exec_count));
else
yyval = yyvsp[0];
}
-#line 2922 "awkgram.c"
+#line 2923 "awkgram.c"
break;
case 58: /* non_compound_stmt: LEX_BREAK statement_term */
-#line 1049 "awkgram.y"
+#line 1050 "awkgram.y"
{
if (! break_allowed)
error_ln(yyvsp[-1]->source_line,
@@ -2932,11 +2933,11 @@ regular_loop:
if (yyvsp[0] != NULL)
yyval = list_append(yyval, yyvsp[0]);
}
-#line 2936 "awkgram.c"
+#line 2937 "awkgram.c"
break;
case 59: /* non_compound_stmt: LEX_CONTINUE statement_term */
-#line 1059 "awkgram.y"
+#line 1060 "awkgram.y"
{
if (! continue_allowed)
error_ln(yyvsp[-1]->source_line,
@@ -2946,11 +2947,11 @@ regular_loop:
if (yyvsp[0] != NULL)
yyval = list_append(yyval, yyvsp[0]);
}
-#line 2950 "awkgram.c"
+#line 2951 "awkgram.c"
break;
case 60: /* non_compound_stmt: LEX_NEXT statement_term */
-#line 1069 "awkgram.y"
+#line 1070 "awkgram.y"
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule && rule != Rule)
@@ -2961,11 +2962,11 @@ regular_loop:
if (yyvsp[0] != NULL)
yyval = list_append(yyval, yyvsp[0]);
}
-#line 2965 "awkgram.c"
+#line 2966 "awkgram.c"
break;
case 61: /* non_compound_stmt: LEX_NEXTFILE statement_term */
-#line 1080 "awkgram.y"
+#line 1081 "awkgram.y"
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule == BEGIN || rule == END || rule == ENDFILE)
@@ -2978,11 +2979,11 @@ regular_loop:
if (yyvsp[0] != NULL)
yyval = list_append(yyval, yyvsp[0]);
}
-#line 2982 "awkgram.c"
+#line 2983 "awkgram.c"
break;
case 62: /* non_compound_stmt: LEX_EXIT opt_exp statement_term */
-#line 1093 "awkgram.y"
+#line 1094 "awkgram.y"
{
/* Initialize the two possible jump targets, the actual target
* is resolved at run-time.
@@ -2999,20 +3000,20 @@ regular_loop:
if (yyvsp[0] != NULL)
yyval = list_append(yyval, yyvsp[0]);
}
-#line 3003 "awkgram.c"
+#line 3004 "awkgram.c"
break;
case 63: /* $@3: %empty */
-#line 1110 "awkgram.y"
+#line 1111 "awkgram.y"
{
if (! in_function)
yyerror(_("`return' used outside function context"));
}
-#line 3012 "awkgram.c"
+#line 3013 "awkgram.c"
break;
case 64: /* non_compound_stmt: LEX_RETURN $@3 opt_fcall_exp statement_term
*/
-#line 1113 "awkgram.y"
+#line 1114 "awkgram.y"
{
if (called_from_eval)
yyvsp[-3]->opcode = Op_K_return_from_eval;
@@ -3026,28 +3027,28 @@ regular_loop:
if (yyvsp[0] != NULL)
yyval = list_append(yyval, yyvsp[0]);
}
-#line 3030 "awkgram.c"
+#line 3031 "awkgram.c"
break;
case 65: /* non_compound_stmt: simple_stmt statement_term */
-#line 1127 "awkgram.y"
+#line 1128 "awkgram.y"
{
if (yyvsp[0] != NULL)
yyval = list_append(yyvsp[-1], yyvsp[0]);
else
yyval = yyvsp[-1];
}
-#line 3041 "awkgram.c"
+#line 3042 "awkgram.c"
break;
case 66: /* $@4: %empty */
-#line 1144 "awkgram.y"
+#line 1145 "awkgram.y"
{ in_print = true; in_parens = 0; }
-#line 3047 "awkgram.c"
+#line 3048 "awkgram.c"
break;
case 67: /* simple_stmt: print $@4 print_expression_list output_redir */
-#line 1145 "awkgram.y"
+#line 1146 "awkgram.y"
{
/*
* Optimization: plain `print' has no expression list, so $3 is
null.
@@ -3148,17 +3149,17 @@ regular_print:
}
}
}
-#line 3152 "awkgram.c"
+#line 3153 "awkgram.c"
break;
case 68: /* $@5: %empty */
-#line 1246 "awkgram.y"
+#line 1247 "awkgram.y"
{ sub_counter = 0; }
-#line 3158 "awkgram.c"
+#line 3159 "awkgram.c"
break;
case 69: /* simple_stmt: LEX_DELETE NAME $@5 delete_subscript_list */
-#line 1247 "awkgram.y"
+#line 1248 "awkgram.y"
{
char *arr = yyvsp[-2]->lextok;
@@ -3191,11 +3192,11 @@ regular_print:
yyval = list_append(list_append(yyvsp[0], yyvsp[-2]),
yyvsp[-3]);
}
}
-#line 3195 "awkgram.c"
+#line 3196 "awkgram.c"
break;
case 70: /* simple_stmt: LEX_DELETE '(' NAME ')' */
-#line 1284 "awkgram.y"
+#line 1285 "awkgram.y"
{
static bool warned = false;
char *arr = yyvsp[-1]->lextok;
@@ -3221,54 +3222,54 @@ regular_print:
fatal(_("`delete' is not allowed with
FUNCTAB"));
}
}
-#line 3225 "awkgram.c"
+#line 3226 "awkgram.c"
break;
case 71: /* simple_stmt: exp */
-#line 1310 "awkgram.y"
+#line 1311 "awkgram.y"
{
yyval = optimize_assignment(yyvsp[0]);
}
-#line 3233 "awkgram.c"
+#line 3234 "awkgram.c"
break;
case 72: /* opt_simple_stmt: %empty */
-#line 1317 "awkgram.y"
+#line 1318 "awkgram.y"
{ yyval = NULL; }
-#line 3239 "awkgram.c"
+#line 3240 "awkgram.c"
break;
case 73: /* opt_simple_stmt: simple_stmt */
-#line 1319 "awkgram.y"
+#line 1320 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3245 "awkgram.c"
+#line 3246 "awkgram.c"
break;
case 74: /* case_statements: %empty */
-#line 1324 "awkgram.y"
+#line 1325 "awkgram.y"
{ yyval = NULL; }
-#line 3251 "awkgram.c"
+#line 3252 "awkgram.c"
break;
case 75: /* case_statements: case_statements case_statement */
-#line 1326 "awkgram.y"
+#line 1327 "awkgram.y"
{
if (yyvsp[-1] == NULL)
yyval = list_create(yyvsp[0]);
else
yyval = list_prepend(yyvsp[-1], yyvsp[0]);
}
-#line 3262 "awkgram.c"
+#line 3263 "awkgram.c"
break;
case 76: /* case_statements: case_statements error */
-#line 1333 "awkgram.y"
+#line 1334 "awkgram.y"
{ yyval = NULL; }
-#line 3268 "awkgram.c"
+#line 3269 "awkgram.c"
break;
case 77: /* case_statement: LEX_CASE case_value colon opt_nls statements */
-#line 1338 "awkgram.y"
+#line 1339 "awkgram.y"
{
INSTRUCTION *casestmt = yyvsp[0];
if (yyvsp[0] == NULL)
@@ -3281,11 +3282,11 @@ regular_print:
bcfree(yyvsp[-2]);
yyval = yyvsp[-4];
}
-#line 3285 "awkgram.c"
+#line 3286 "awkgram.c"
break;
case 78: /* case_statement: LEX_DEFAULT colon opt_nls statements */
-#line 1351 "awkgram.y"
+#line 1352 "awkgram.y"
{
INSTRUCTION *casestmt = yyvsp[0];
if (yyvsp[0] == NULL)
@@ -3297,17 +3298,17 @@ regular_print:
yyvsp[-3]->comment = yyvsp[-1];
yyval = yyvsp[-3];
}
-#line 3301 "awkgram.c"
+#line 3302 "awkgram.c"
break;
case 79: /* case_value: YNUMBER */
-#line 1366 "awkgram.y"
+#line 1367 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3307 "awkgram.c"
+#line 3308 "awkgram.c"
break;
case 80: /* case_value: '-' YNUMBER */
-#line 1368 "awkgram.y"
+#line 1369 "awkgram.y"
{
NODE *n = yyvsp[0]->memory;
(void) force_number(n);
@@ -3315,28 +3316,28 @@ regular_print:
bcfree(yyvsp[-1]);
yyval = yyvsp[0];
}
-#line 3319 "awkgram.c"
+#line 3320 "awkgram.c"
break;
case 81: /* case_value: '+' YNUMBER */
-#line 1376 "awkgram.y"
+#line 1377 "awkgram.y"
{
NODE *n = yyvsp[0]->lasti->memory;
bcfree(yyvsp[-1]);
add_sign_to_num(n, '+');
yyval = yyvsp[0];
}
-#line 3330 "awkgram.c"
+#line 3331 "awkgram.c"
break;
case 82: /* case_value: YSTRING */
-#line 1383 "awkgram.y"
+#line 1384 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3336 "awkgram.c"
+#line 3337 "awkgram.c"
break;
case 83: /* case_value: regexp */
-#line 1385 "awkgram.y"
+#line 1386 "awkgram.y"
{
if (yyvsp[0]->memory->type == Node_regex)
yyvsp[0]->opcode = Op_push_re;
@@ -3344,57 +3345,57 @@ regular_print:
yyvsp[0]->opcode = Op_push;
yyval = yyvsp[0];
}
-#line 3348 "awkgram.c"
+#line 3349 "awkgram.c"
break;
case 84: /* case_value: typed_regexp */
-#line 1393 "awkgram.y"
+#line 1394 "awkgram.y"
{
assert((yyvsp[0]->memory->flags & REGEX) == REGEX);
yyvsp[0]->opcode = Op_push_re;
yyval = yyvsp[0];
}
-#line 3358 "awkgram.c"
+#line 3359 "awkgram.c"
break;
case 85: /* print: LEX_PRINT */
-#line 1402 "awkgram.y"
+#line 1403 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3364 "awkgram.c"
+#line 3365 "awkgram.c"
break;
case 86: /* print: LEX_PRINTF */
-#line 1404 "awkgram.y"
+#line 1405 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3370 "awkgram.c"
+#line 3371 "awkgram.c"
break;
case 88: /* print_expression_list: '(' expression_list r_paren */
-#line 1414 "awkgram.y"
+#line 1415 "awkgram.y"
{
yyval = yyvsp[-1];
}
-#line 3378 "awkgram.c"
+#line 3379 "awkgram.c"
break;
case 89: /* output_redir: %empty */
-#line 1421 "awkgram.y"
+#line 1422 "awkgram.y"
{
in_print = false;
in_parens = 0;
yyval = NULL;
}
-#line 3388 "awkgram.c"
+#line 3389 "awkgram.c"
break;
case 90: /* $@6: %empty */
-#line 1426 "awkgram.y"
+#line 1427 "awkgram.y"
{ in_print = false; in_parens = 0; }
-#line 3394 "awkgram.c"
+#line 3395 "awkgram.c"
break;
case 91: /* output_redir: IO_OUT $@6 common_exp */
-#line 1427 "awkgram.y"
+#line 1428 "awkgram.y"
{
if (yyvsp[-2]->redir_type == redirect_twoway
&& yyvsp[0]->lasti->opcode == Op_K_getline_redir
@@ -3404,22 +3405,22 @@ regular_print:
lintwarn(_("concatenation as I/O `>' redirection target
is ambiguous"));
yyval = list_prepend(yyvsp[0], yyvsp[-2]);
}
-#line 3408 "awkgram.c"
+#line 3409 "awkgram.c"
break;
case 92: /* if_statement: LEX_IF '(' exp r_paren opt_nls statement */
-#line 1440 "awkgram.y"
+#line 1441 "awkgram.y"
{
if (yyvsp[-1] != NULL)
yyvsp[-5]->comment = yyvsp[-1];
add_lint(yyvsp[-3], LINT_assign_in_cond);
yyval = mk_condition(yyvsp[-3], yyvsp[-5], yyvsp[0], NULL,
NULL);
}
-#line 3419 "awkgram.c"
+#line 3420 "awkgram.c"
break;
case 93: /* if_statement: LEX_IF '(' exp r_paren opt_nls statement LEX_ELSE
opt_nls statement */
-#line 1448 "awkgram.y"
+#line 1449 "awkgram.y"
{
if (yyvsp[-4] != NULL)
yyvsp[-8]->comment = yyvsp[-4];
@@ -3428,19 +3429,19 @@ regular_print:
add_lint(yyvsp[-6], LINT_assign_in_cond);
yyval = mk_condition(yyvsp[-6], yyvsp[-8], yyvsp[-3],
yyvsp[-2], yyvsp[0]);
}
-#line 3432 "awkgram.c"
+#line 3433 "awkgram.c"
break;
case 94: /* nls: NEWLINE */
-#line 1460 "awkgram.y"
+#line 1461 "awkgram.y"
{
yyval = yyvsp[0];
}
-#line 3440 "awkgram.c"
+#line 3441 "awkgram.c"
break;
case 95: /* nls: nls NEWLINE */
-#line 1464 "awkgram.y"
+#line 1465 "awkgram.y"
{
if (yyvsp[-1] != NULL && yyvsp[0] != NULL) {
if (yyvsp[-1]->memory->comment_type == EOL_COMMENT) {
@@ -3458,59 +3459,59 @@ regular_print:
} else
yyval = NULL;
}
-#line 3462 "awkgram.c"
+#line 3463 "awkgram.c"
break;
case 96: /* opt_nls: %empty */
-#line 1485 "awkgram.y"
+#line 1486 "awkgram.y"
{ yyval = NULL; }
-#line 3468 "awkgram.c"
+#line 3469 "awkgram.c"
break;
case 97: /* opt_nls: nls */
-#line 1487 "awkgram.y"
+#line 1488 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3474 "awkgram.c"
+#line 3475 "awkgram.c"
break;
case 98: /* input_redir: %empty */
-#line 1492 "awkgram.y"
+#line 1493 "awkgram.y"
{ yyval = NULL; }
-#line 3480 "awkgram.c"
+#line 3481 "awkgram.c"
break;
case 99: /* input_redir: '<' simp_exp */
-#line 1494 "awkgram.y"
+#line 1495 "awkgram.y"
{
bcfree(yyvsp[-1]);
yyval = yyvsp[0];
}
-#line 3489 "awkgram.c"
+#line 3490 "awkgram.c"
break;
case 100: /* opt_param_list: %empty */
-#line 1502 "awkgram.y"
+#line 1503 "awkgram.y"
{ yyval = NULL; }
-#line 3495 "awkgram.c"
+#line 3496 "awkgram.c"
break;
case 101: /* opt_param_list: param_list */
-#line 1504 "awkgram.y"
+#line 1505 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3501 "awkgram.c"
+#line 3502 "awkgram.c"
break;
case 102: /* param_list: NAME */
-#line 1509 "awkgram.y"
+#line 1510 "awkgram.y"
{
yyvsp[0]->param_count = 0;
yyval = list_create(yyvsp[0]);
}
-#line 3510 "awkgram.c"
+#line 3511 "awkgram.c"
break;
case 103: /* param_list: param_list comma NAME */
-#line 1514 "awkgram.y"
+#line 1515 "awkgram.y"
{
if (yyvsp[-2] != NULL && yyvsp[0] != NULL) {
yyvsp[0]->param_count = yyvsp[-2]->lasti->param_count +
1;
@@ -3527,76 +3528,76 @@ regular_print:
} else
yyval = NULL;
}
-#line 3531 "awkgram.c"
+#line 3532 "awkgram.c"
break;
case 104: /* param_list: error */
-#line 1531 "awkgram.y"
+#line 1532 "awkgram.y"
{ yyval = NULL; }
-#line 3537 "awkgram.c"
+#line 3538 "awkgram.c"
break;
case 105: /* param_list: param_list error */
-#line 1533 "awkgram.y"
+#line 1534 "awkgram.y"
{ yyval = yyvsp[-1]; }
-#line 3543 "awkgram.c"
+#line 3544 "awkgram.c"
break;
case 106: /* param_list: param_list comma error */
-#line 1535 "awkgram.y"
+#line 1536 "awkgram.y"
{ yyval = yyvsp[-2]; }
-#line 3549 "awkgram.c"
+#line 3550 "awkgram.c"
break;
case 107: /* opt_exp: %empty */
-#line 1541 "awkgram.y"
+#line 1542 "awkgram.y"
{ yyval = NULL; }
-#line 3555 "awkgram.c"
+#line 3556 "awkgram.c"
break;
case 108: /* opt_exp: exp */
-#line 1543 "awkgram.y"
+#line 1544 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3561 "awkgram.c"
+#line 3562 "awkgram.c"
break;
case 109: /* opt_expression_list: %empty */
-#line 1548 "awkgram.y"
+#line 1549 "awkgram.y"
{ yyval = NULL; }
-#line 3567 "awkgram.c"
+#line 3568 "awkgram.c"
break;
case 110: /* opt_expression_list: expression_list */
-#line 1550 "awkgram.y"
+#line 1551 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3573 "awkgram.c"
+#line 3574 "awkgram.c"
break;
case 111: /* expression_list: exp */
-#line 1555 "awkgram.y"
+#line 1556 "awkgram.y"
{ yyval = mk_expression_list(NULL, yyvsp[0]); }
-#line 3579 "awkgram.c"
+#line 3580 "awkgram.c"
break;
case 112: /* expression_list: expression_list comma exp */
-#line 1557 "awkgram.y"
+#line 1558 "awkgram.y"
{
if (yyvsp[-1] != NULL)
yyvsp[-2]->lasti->comment = yyvsp[-1];
yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);
yyerrok;
}
-#line 3590 "awkgram.c"
+#line 3591 "awkgram.c"
break;
case 113: /* expression_list: error */
-#line 1564 "awkgram.y"
+#line 1565 "awkgram.y"
{ yyval = NULL; }
-#line 3596 "awkgram.c"
+#line 3597 "awkgram.c"
break;
case 114: /* expression_list: expression_list error */
-#line 1566 "awkgram.y"
+#line 1567 "awkgram.y"
{
/*
* Returning the expression list instead of NULL lets
@@ -3604,66 +3605,66 @@ regular_print:
*/
yyval = yyvsp[-1];
}
-#line 3608 "awkgram.c"
+#line 3609 "awkgram.c"
break;
case 115: /* expression_list: expression_list error exp */
-#line 1574 "awkgram.y"
+#line 1575 "awkgram.y"
{
/* Ditto */
yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);
}
-#line 3617 "awkgram.c"
+#line 3618 "awkgram.c"
break;
case 116: /* expression_list: expression_list comma error */
-#line 1579 "awkgram.y"
+#line 1580 "awkgram.y"
{
/* Ditto */
if (yyvsp[-1] != NULL)
yyvsp[-2]->lasti->comment = yyvsp[-1];
yyval = yyvsp[-2];
}
-#line 3628 "awkgram.c"
+#line 3629 "awkgram.c"
break;
case 117: /* opt_fcall_expression_list: %empty */
-#line 1589 "awkgram.y"
+#line 1590 "awkgram.y"
{ yyval = NULL; }
-#line 3634 "awkgram.c"
+#line 3635 "awkgram.c"
break;
case 118: /* opt_fcall_expression_list: fcall_expression_list */
-#line 1591 "awkgram.y"
+#line 1592 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3640 "awkgram.c"
+#line 3641 "awkgram.c"
break;
case 119: /* fcall_expression_list: fcall_exp */
-#line 1596 "awkgram.y"
+#line 1597 "awkgram.y"
{ yyval = mk_expression_list(NULL, yyvsp[0]); }
-#line 3646 "awkgram.c"
+#line 3647 "awkgram.c"
break;
case 120: /* fcall_expression_list: fcall_expression_list comma fcall_exp */
-#line 1598 "awkgram.y"
+#line 1599 "awkgram.y"
{
if (yyvsp[-1] != NULL)
yyvsp[-2]->lasti->comment = yyvsp[-1];
yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);
yyerrok;
}
-#line 3657 "awkgram.c"
+#line 3658 "awkgram.c"
break;
case 121: /* fcall_expression_list: error */
-#line 1605 "awkgram.y"
+#line 1606 "awkgram.y"
{ yyval = NULL; }
-#line 3663 "awkgram.c"
+#line 3664 "awkgram.c"
break;
case 122: /* fcall_expression_list: fcall_expression_list error */
-#line 1607 "awkgram.y"
+#line 1608 "awkgram.y"
{
/*
* Returning the expression list instead of NULL lets
@@ -3671,86 +3672,86 @@ regular_print:
*/
yyval = yyvsp[-1];
}
-#line 3675 "awkgram.c"
+#line 3676 "awkgram.c"
break;
case 123: /* fcall_expression_list: fcall_expression_list error fcall_exp */
-#line 1615 "awkgram.y"
+#line 1616 "awkgram.y"
{
/* Ditto */
yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);
}
-#line 3684 "awkgram.c"
+#line 3685 "awkgram.c"
break;
case 124: /* fcall_expression_list: fcall_expression_list comma error */
-#line 1620 "awkgram.y"
+#line 1621 "awkgram.y"
{
/* Ditto */
if (yyvsp[-1] != NULL)
yyvsp[-2]->comment = yyvsp[-1];
yyval = yyvsp[-2];
}
-#line 3695 "awkgram.c"
+#line 3696 "awkgram.c"
break;
case 125: /* fcall_exp: exp */
-#line 1629 "awkgram.y"
+#line 1630 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3701 "awkgram.c"
+#line 3702 "awkgram.c"
break;
case 126: /* fcall_exp: typed_regexp */
-#line 1630 "awkgram.y"
+#line 1631 "awkgram.y"
{ yyval = list_create(yyvsp[0]); }
-#line 3707 "awkgram.c"
+#line 3708 "awkgram.c"
break;
case 127: /* opt_fcall_exp: %empty */
-#line 1635 "awkgram.y"
+#line 1636 "awkgram.y"
{ yyval = NULL; }
-#line 3713 "awkgram.c"
+#line 3714 "awkgram.c"
break;
case 128: /* opt_fcall_exp: fcall_exp */
-#line 1636 "awkgram.y"
+#line 1637 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3719 "awkgram.c"
+#line 3720 "awkgram.c"
break;
case 129: /* exp: variable assign_operator exp */
-#line 1642 "awkgram.y"
+#line 1643 "awkgram.y"
{
if (do_lint && yyvsp[0]->lasti->opcode == Op_match_rec)
lintwarn_ln(yyvsp[-1]->source_line,
_("regular expression on right of assignment"));
yyval = mk_assignment(yyvsp[-2], yyvsp[0], yyvsp[-1]);
}
-#line 3730 "awkgram.c"
+#line 3731 "awkgram.c"
break;
case 130: /* exp: variable ASSIGN typed_regexp */
-#line 1649 "awkgram.y"
+#line 1650 "awkgram.y"
{
yyval = mk_assignment(yyvsp[-2], list_create(yyvsp[0]),
yyvsp[-1]);
}
-#line 3738 "awkgram.c"
+#line 3739 "awkgram.c"
break;
case 131: /* exp: exp LEX_AND exp */
-#line 1653 "awkgram.y"
+#line 1654 "awkgram.y"
{ yyval = mk_boolean(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3744 "awkgram.c"
+#line 3745 "awkgram.c"
break;
case 132: /* exp: exp LEX_OR exp */
-#line 1655 "awkgram.y"
+#line 1656 "awkgram.y"
{ yyval = mk_boolean(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3750 "awkgram.c"
+#line 3751 "awkgram.c"
break;
case 133: /* exp: exp MATCHOP typed_regexp */
-#line 1657 "awkgram.y"
+#line 1658 "awkgram.y"
{
if (yyvsp[-2]->lasti->opcode == Op_match_rec)
warning_ln(yyvsp[-1]->source_line,
@@ -3763,11 +3764,11 @@ regular_print:
bcfree(yyvsp[0]);
yyval = list_append(yyvsp[-2], yyvsp[-1]);
}
-#line 3767 "awkgram.c"
+#line 3768 "awkgram.c"
break;
case 134: /* exp: exp MATCHOP exp */
-#line 1670 "awkgram.y"
+#line 1671 "awkgram.y"
{
if (yyvsp[-2]->lasti->opcode == Op_match_rec)
warning_ln(yyvsp[-1]->source_line,
@@ -3784,11 +3785,11 @@ regular_print:
yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]),
yyvsp[-1]);
}
}
-#line 3788 "awkgram.c"
+#line 3789 "awkgram.c"
break;
case 135: /* exp: exp LEX_IN simple_variable */
-#line 1687 "awkgram.y"
+#line 1688 "awkgram.y"
{
if (do_lint_old)
lintwarn_ln(yyvsp[-1]->source_line,
@@ -3798,91 +3799,91 @@ regular_print:
yyvsp[-1]->expr_count = 1;
yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]), yyvsp[-1]);
}
-#line 3802 "awkgram.c"
+#line 3803 "awkgram.c"
break;
case 136: /* exp: exp a_relop exp */
-#line 1697 "awkgram.y"
+#line 1698 "awkgram.y"
{
if (do_lint && yyvsp[0]->lasti->opcode == Op_match_rec)
lintwarn_ln(yyvsp[-1]->source_line,
_("regular expression on right of comparison"));
yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]), yyvsp[-1]);
}
-#line 3813 "awkgram.c"
+#line 3814 "awkgram.c"
break;
case 137: /* exp: exp '?' exp ':' exp */
-#line 1704 "awkgram.y"
+#line 1705 "awkgram.y"
{ yyval = mk_condition(yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1],
yyvsp[0]); }
-#line 3819 "awkgram.c"
+#line 3820 "awkgram.c"
break;
case 138: /* exp: common_exp */
-#line 1706 "awkgram.y"
+#line 1707 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3825 "awkgram.c"
+#line 3826 "awkgram.c"
break;
case 139: /* assign_operator: ASSIGN */
-#line 1711 "awkgram.y"
+#line 1712 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3831 "awkgram.c"
+#line 3832 "awkgram.c"
break;
case 140: /* assign_operator: ASSIGNOP */
-#line 1713 "awkgram.y"
+#line 1714 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3837 "awkgram.c"
+#line 3838 "awkgram.c"
break;
case 141: /* assign_operator: SLASH_BEFORE_EQUAL ASSIGN */
-#line 1715 "awkgram.y"
+#line 1716 "awkgram.y"
{
yyvsp[0]->opcode = Op_assign_quotient;
yyval = yyvsp[0];
}
-#line 3846 "awkgram.c"
+#line 3847 "awkgram.c"
break;
case 142: /* relop_or_less: RELOP */
-#line 1723 "awkgram.y"
+#line 1724 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3852 "awkgram.c"
+#line 3853 "awkgram.c"
break;
case 143: /* relop_or_less: '<' */
-#line 1725 "awkgram.y"
+#line 1726 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3858 "awkgram.c"
+#line 3859 "awkgram.c"
break;
case 144: /* a_relop: relop_or_less */
-#line 1730 "awkgram.y"
+#line 1731 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3864 "awkgram.c"
+#line 3865 "awkgram.c"
break;
case 145: /* a_relop: '>' */
-#line 1732 "awkgram.y"
+#line 1733 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3870 "awkgram.c"
+#line 3871 "awkgram.c"
break;
case 146: /* common_exp: simp_exp */
-#line 1737 "awkgram.y"
+#line 1738 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3876 "awkgram.c"
+#line 3877 "awkgram.c"
break;
case 147: /* common_exp: simp_exp_nc */
-#line 1739 "awkgram.y"
+#line 1740 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 3882 "awkgram.c"
+#line 3883 "awkgram.c"
break;
case 148: /* common_exp: common_exp simp_exp */
-#line 1741 "awkgram.y"
+#line 1742 "awkgram.y"
{
int count = 2;
bool is_simple_var = false;
@@ -3936,47 +3937,47 @@ regular_print:
max_args = count;
}
}
-#line 3940 "awkgram.c"
+#line 3941 "awkgram.c"
break;
case 150: /* simp_exp: simp_exp '^' simp_exp */
-#line 1800 "awkgram.y"
+#line 1801 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3946 "awkgram.c"
+#line 3947 "awkgram.c"
break;
case 151: /* simp_exp: simp_exp '*' simp_exp */
-#line 1802 "awkgram.y"
+#line 1803 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3952 "awkgram.c"
+#line 3953 "awkgram.c"
break;
case 152: /* simp_exp: simp_exp '/' simp_exp */
-#line 1804 "awkgram.y"
+#line 1805 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3958 "awkgram.c"
+#line 3959 "awkgram.c"
break;
case 153: /* simp_exp: simp_exp '%' simp_exp */
-#line 1806 "awkgram.y"
+#line 1807 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3964 "awkgram.c"
+#line 3965 "awkgram.c"
break;
case 154: /* simp_exp: simp_exp '+' simp_exp */
-#line 1808 "awkgram.y"
+#line 1809 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3970 "awkgram.c"
+#line 3971 "awkgram.c"
break;
case 155: /* simp_exp: simp_exp '-' simp_exp */
-#line 1810 "awkgram.y"
+#line 1811 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 3976 "awkgram.c"
+#line 3977 "awkgram.c"
break;
case 156: /* simp_exp: LEX_GETLINE opt_variable input_redir */
-#line 1812 "awkgram.y"
+#line 1813 "awkgram.y"
{
/*
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
@@ -3990,29 +3991,29 @@ regular_print:
_("non-redirected `getline' undefined inside
END action"));
yyval = mk_getline(yyvsp[-2], yyvsp[-1], yyvsp[0],
redirect_input);
}
-#line 3994 "awkgram.c"
+#line 3995 "awkgram.c"
break;
case 157: /* simp_exp: variable INCREMENT */
-#line 1826 "awkgram.y"
+#line 1827 "awkgram.y"
{
yyvsp[0]->opcode = Op_postincrement;
yyval = mk_assignment(yyvsp[-1], NULL, yyvsp[0]);
}
-#line 4003 "awkgram.c"
+#line 4004 "awkgram.c"
break;
case 158: /* simp_exp: variable DECREMENT */
-#line 1831 "awkgram.y"
+#line 1832 "awkgram.y"
{
yyvsp[0]->opcode = Op_postdecrement;
yyval = mk_assignment(yyvsp[-1], NULL, yyvsp[0]);
}
-#line 4012 "awkgram.c"
+#line 4013 "awkgram.c"
break;
case 159: /* simp_exp: '(' expression_list r_paren LEX_IN simple_variable */
-#line 1836 "awkgram.y"
+#line 1837 "awkgram.y"
{
if (do_lint_old) {
/* first one is warning so that second one comes out if
warnings are fatal */
@@ -4033,64 +4034,64 @@ regular_print:
yyval = list_append(list_merge(t, yyvsp[0]), yyvsp[-1]);
}
}
-#line 4037 "awkgram.c"
+#line 4038 "awkgram.c"
break;
case 160: /* simp_exp_nc: common_exp IO_IN LEX_GETLINE opt_variable */
-#line 1862 "awkgram.y"
+#line 1863 "awkgram.y"
{
yyval = mk_getline(yyvsp[-1], yyvsp[0], yyvsp[-3],
yyvsp[-2]->redir_type);
bcfree(yyvsp[-2]);
}
-#line 4046 "awkgram.c"
+#line 4047 "awkgram.c"
break;
case 161: /* simp_exp_nc: simp_exp_nc '^' simp_exp */
-#line 1868 "awkgram.y"
+#line 1869 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 4052 "awkgram.c"
+#line 4053 "awkgram.c"
break;
case 162: /* simp_exp_nc: simp_exp_nc '*' simp_exp */
-#line 1870 "awkgram.y"
+#line 1871 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 4058 "awkgram.c"
+#line 4059 "awkgram.c"
break;
case 163: /* simp_exp_nc: simp_exp_nc '/' simp_exp */
-#line 1872 "awkgram.y"
+#line 1873 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 4064 "awkgram.c"
+#line 4065 "awkgram.c"
break;
case 164: /* simp_exp_nc: simp_exp_nc '%' simp_exp */
-#line 1874 "awkgram.y"
+#line 1875 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 4070 "awkgram.c"
+#line 4071 "awkgram.c"
break;
case 165: /* simp_exp_nc: simp_exp_nc '+' simp_exp */
-#line 1876 "awkgram.y"
+#line 1877 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 4076 "awkgram.c"
+#line 4077 "awkgram.c"
break;
case 166: /* simp_exp_nc: simp_exp_nc '-' simp_exp */
-#line 1878 "awkgram.y"
+#line 1879 "awkgram.y"
{ yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }
-#line 4082 "awkgram.c"
+#line 4083 "awkgram.c"
break;
case 167: /* non_post_simp_exp: regexp */
-#line 1883 "awkgram.y"
+#line 1884 "awkgram.y"
{
yyval = list_create(yyvsp[0]);
}
-#line 4090 "awkgram.c"
+#line 4091 "awkgram.c"
break;
case 168: /* non_post_simp_exp: '!' simp_exp */
-#line 1887 "awkgram.y"
+#line 1888 "awkgram.y"
{
if (yyvsp[0]->opcode == Op_match_rec) {
yyvsp[0]->opcode = Op_nomatch;
@@ -4122,11 +4123,11 @@ regular_print:
}
}
}
-#line 4126 "awkgram.c"
+#line 4127 "awkgram.c"
break;
case 169: /* non_post_simp_exp: '(' exp r_paren */
-#line 1919 "awkgram.y"
+#line 1920 "awkgram.y"
{
// Always include. Allows us to lint warn on
// print "foo" > "bar" 1
@@ -4134,31 +4135,31 @@ regular_print:
// print "foo" > ("bar" 1)
yyval = list_append(yyvsp[-1], bcalloc(Op_parens, 1,
sourceline));
}
-#line 4138 "awkgram.c"
+#line 4139 "awkgram.c"
break;
case 170: /* non_post_simp_exp: LEX_BUILTIN '(' opt_fcall_expression_list
r_paren */
-#line 1927 "awkgram.y"
+#line 1928 "awkgram.y"
{
yyval = snode(yyvsp[-1], yyvsp[-3]);
if (yyval == NULL)
YYABORT;
}
-#line 4148 "awkgram.c"
+#line 4149 "awkgram.c"
break;
case 171: /* non_post_simp_exp: LEX_LENGTH '(' opt_fcall_expression_list
r_paren */
-#line 1933 "awkgram.y"
+#line 1934 "awkgram.y"
{
yyval = snode(yyvsp[-1], yyvsp[-3]);
if (yyval == NULL)
YYABORT;
}
-#line 4158 "awkgram.c"
+#line 4159 "awkgram.c"
break;
case 172: /* non_post_simp_exp: LEX_LENGTH */
-#line 1939 "awkgram.y"
+#line 1940 "awkgram.y"
{
static bool warned = false;
@@ -4171,45 +4172,45 @@ regular_print:
if (yyval == NULL)
YYABORT;
}
-#line 4175 "awkgram.c"
+#line 4176 "awkgram.c"
break;
case 175: /* non_post_simp_exp: INCREMENT variable */
-#line 1954 "awkgram.y"
+#line 1955 "awkgram.y"
{
yyvsp[-1]->opcode = Op_preincrement;
yyval = mk_assignment(yyvsp[0], NULL, yyvsp[-1]);
}
-#line 4184 "awkgram.c"
+#line 4185 "awkgram.c"
break;
case 176: /* non_post_simp_exp: DECREMENT variable */
-#line 1959 "awkgram.y"
+#line 1960 "awkgram.y"
{
yyvsp[-1]->opcode = Op_predecrement;
yyval = mk_assignment(yyvsp[0], NULL, yyvsp[-1]);
}
-#line 4193 "awkgram.c"
+#line 4194 "awkgram.c"
break;
case 177: /* non_post_simp_exp: YNUMBER */
-#line 1964 "awkgram.y"
+#line 1965 "awkgram.y"
{
yyval = list_create(yyvsp[0]);
}
-#line 4201 "awkgram.c"
+#line 4202 "awkgram.c"
break;
case 178: /* non_post_simp_exp: YSTRING */
-#line 1968 "awkgram.y"
+#line 1969 "awkgram.y"
{
yyval = list_create(yyvsp[0]);
}
-#line 4209 "awkgram.c"
+#line 4210 "awkgram.c"
break;
case 179: /* non_post_simp_exp: '-' simp_exp */
-#line 1972 "awkgram.y"
+#line 1973 "awkgram.y"
{
if (yyvsp[0]->lasti->opcode == Op_push_i
&& (yyvsp[0]->lasti->memory->flags & STRING) == 0
@@ -4224,11 +4225,11 @@ regular_print:
yyval = list_append(yyvsp[0], yyvsp[-1]);
}
}
-#line 4228 "awkgram.c"
+#line 4229 "awkgram.c"
break;
case 180: /* non_post_simp_exp: '+' simp_exp */
-#line 1987 "awkgram.y"
+#line 1988 "awkgram.y"
{
if (yyvsp[0]->lasti->opcode == Op_push_i
&& (yyvsp[0]->lasti->memory->flags & STRING) == 0
@@ -4246,20 +4247,20 @@ regular_print:
yyval = list_append(yyvsp[0], yyvsp[-1]);
}
}
-#line 4250 "awkgram.c"
+#line 4251 "awkgram.c"
break;
case 181: /* func_call: direct_func_call */
-#line 2008 "awkgram.y"
+#line 2009 "awkgram.y"
{
func_use(yyvsp[0]->lasti->func_name, FUNC_USE);
yyval = yyvsp[0];
}
-#line 4259 "awkgram.c"
+#line 4260 "awkgram.c"
break;
case 182: /* func_call: '@' direct_func_call */
-#line 2013 "awkgram.y"
+#line 2014 "awkgram.y"
{
/* indirect function call */
INSTRUCTION *f, *t;
@@ -4293,11 +4294,11 @@ regular_print:
yyval = list_prepend(yyvsp[0], t);
at_seen--;
}
-#line 4297 "awkgram.c"
+#line 4298 "awkgram.c"
break;
case 183: /* direct_func_call: FUNC_CALL '(' opt_fcall_expression_list
r_paren */
-#line 2050 "awkgram.y"
+#line 2051 "awkgram.y"
{
NODE *n;
char *name = yyvsp[-3]->func_name;
@@ -4330,49 +4331,49 @@ regular_print:
yyval = list_append(t, yyvsp[-3]);
}
}
-#line 4334 "awkgram.c"
+#line 4335 "awkgram.c"
break;
case 184: /* opt_variable: %empty */
-#line 2086 "awkgram.y"
+#line 2087 "awkgram.y"
{ yyval = NULL; }
-#line 4340 "awkgram.c"
+#line 4341 "awkgram.c"
break;
case 185: /* opt_variable: variable */
-#line 2088 "awkgram.y"
+#line 2089 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 4346 "awkgram.c"
+#line 4347 "awkgram.c"
break;
case 186: /* delete_subscript_list: %empty */
-#line 2093 "awkgram.y"
+#line 2094 "awkgram.y"
{ yyval = NULL; }
-#line 4352 "awkgram.c"
+#line 4353 "awkgram.c"
break;
case 187: /* delete_subscript_list: delete_subscript SUBSCRIPT */
-#line 2095 "awkgram.y"
+#line 2096 "awkgram.y"
{ yyval = yyvsp[-1]; }
-#line 4358 "awkgram.c"
+#line 4359 "awkgram.c"
break;
case 188: /* delete_subscript: delete_exp_list */
-#line 2100 "awkgram.y"
+#line 2101 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 4364 "awkgram.c"
+#line 4365 "awkgram.c"
break;
case 189: /* delete_subscript: delete_subscript delete_exp_list */
-#line 2102 "awkgram.y"
+#line 2103 "awkgram.y"
{
yyval = list_merge(yyvsp[-1], yyvsp[0]);
}
-#line 4372 "awkgram.c"
+#line 4373 "awkgram.c"
break;
case 190: /* delete_exp_list: bracketed_exp_list */
-#line 2109 "awkgram.y"
+#line 2110 "awkgram.y"
{
INSTRUCTION *ip = yyvsp[0]->lasti;
int count = ip->sub_count; /* # of SUBSEP-seperated
expressions */
@@ -4386,11 +4387,11 @@ regular_print:
sub_counter++; /* count # of dimensions */
yyval = yyvsp[0];
}
-#line 4390 "awkgram.c"
+#line 4391 "awkgram.c"
break;
case 191: /* bracketed_exp_list: '[' expression_list ']' */
-#line 2126 "awkgram.y"
+#line 2127 "awkgram.y"
{
INSTRUCTION *t = yyvsp[-1];
if (yyvsp[-1] == NULL) {
@@ -4404,41 +4405,41 @@ regular_print:
yyvsp[0]->sub_count = count_expressions(&t, false);
yyval = list_append(t, yyvsp[0]);
}
-#line 4408 "awkgram.c"
+#line 4409 "awkgram.c"
break;
case 192: /* subscript: bracketed_exp_list */
-#line 2143 "awkgram.y"
+#line 2144 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 4414 "awkgram.c"
+#line 4415 "awkgram.c"
break;
case 193: /* subscript: subscript bracketed_exp_list */
-#line 2145 "awkgram.y"
+#line 2146 "awkgram.y"
{
yyval = list_merge(yyvsp[-1], yyvsp[0]);
}
-#line 4422 "awkgram.c"
+#line 4423 "awkgram.c"
break;
case 194: /* subscript_list: subscript SUBSCRIPT */
-#line 2152 "awkgram.y"
+#line 2153 "awkgram.y"
{ yyval = yyvsp[-1]; }
-#line 4428 "awkgram.c"
+#line 4429 "awkgram.c"
break;
case 195: /* simple_variable: NAME */
-#line 2157 "awkgram.y"
+#line 2158 "awkgram.y"
{
yyvsp[0]->opcode = Op_push;
yyvsp[0]->memory = variable(yyvsp[0]->source_line,
yyvsp[0]->lextok, Node_var_new);
yyval = list_create(yyvsp[0]);
}
-#line 4438 "awkgram.c"
+#line 4439 "awkgram.c"
break;
case 196: /* simple_variable: NAME subscript_list */
-#line 2163 "awkgram.y"
+#line 2164 "awkgram.y"
{
char *arr = yyvsp[-1]->lextok;
@@ -4447,11 +4448,11 @@ regular_print:
yyvsp[-1]->opcode = Op_push_array;
yyval = list_prepend(yyvsp[0], yyvsp[-1]);
}
-#line 4451 "awkgram.c"
+#line 4452 "awkgram.c"
break;
case 197: /* variable: simple_variable */
-#line 2175 "awkgram.y"
+#line 2176 "awkgram.y"
{
INSTRUCTION *ip = yyvsp[0]->nexti;
if (ip->opcode == Op_push
@@ -4463,85 +4464,85 @@ regular_print:
} else
yyval = yyvsp[0];
}
-#line 4467 "awkgram.c"
+#line 4468 "awkgram.c"
break;
case 198: /* variable: '$' non_post_simp_exp opt_incdec */
-#line 2187 "awkgram.y"
+#line 2188 "awkgram.y"
{
yyval = list_append(yyvsp[-1], yyvsp[-2]);
if (yyvsp[0] != NULL)
mk_assignment(yyvsp[-1], NULL, yyvsp[0]);
}
-#line 4477 "awkgram.c"
+#line 4478 "awkgram.c"
break;
case 199: /* opt_incdec: INCREMENT */
-#line 2196 "awkgram.y"
+#line 2197 "awkgram.y"
{
yyvsp[0]->opcode = Op_postincrement;
}
-#line 4485 "awkgram.c"
+#line 4486 "awkgram.c"
break;
case 200: /* opt_incdec: DECREMENT */
-#line 2200 "awkgram.y"
+#line 2201 "awkgram.y"
{
yyvsp[0]->opcode = Op_postdecrement;
}
-#line 4493 "awkgram.c"
+#line 4494 "awkgram.c"
break;
case 201: /* opt_incdec: %empty */
-#line 2204 "awkgram.y"
+#line 2205 "awkgram.y"
{ yyval = NULL; }
-#line 4499 "awkgram.c"
+#line 4500 "awkgram.c"
break;
case 202: /* l_brace: '{' opt_nls */
-#line 2208 "awkgram.y"
+#line 2209 "awkgram.y"
{ yyval = yyvsp[0]; }
-#line 4505 "awkgram.c"
+#line 4506 "awkgram.c"
break;
case 203: /* r_brace: '}' opt_nls */
-#line 2212 "awkgram.y"
+#line 2213 "awkgram.y"
{ yyval = yyvsp[0]; yyerrok; }
-#line 4511 "awkgram.c"
+#line 4512 "awkgram.c"
break;
case 204: /* r_paren: ')' */
-#line 2216 "awkgram.y"
+#line 2217 "awkgram.y"
{ yyerrok; }
-#line 4517 "awkgram.c"
+#line 4518 "awkgram.c"
break;
case 205: /* opt_semi: %empty */
-#line 2221 "awkgram.y"
+#line 2222 "awkgram.y"
{ yyval = NULL; }
-#line 4523 "awkgram.c"
+#line 4524 "awkgram.c"
break;
case 207: /* semi: ';' */
-#line 2226 "awkgram.y"
+#line 2227 "awkgram.y"
{ yyerrok; }
-#line 4529 "awkgram.c"
+#line 4530 "awkgram.c"
break;
case 208: /* colon: ':' */
-#line 2230 "awkgram.y"
+#line 2231 "awkgram.y"
{ yyval = yyvsp[0]; yyerrok; }
-#line 4535 "awkgram.c"
+#line 4536 "awkgram.c"
break;
case 209: /* comma: ',' opt_nls */
-#line 2234 "awkgram.y"
+#line 2235 "awkgram.y"
{ yyval = yyvsp[0]; yyerrok; }
-#line 4541 "awkgram.c"
+#line 4542 "awkgram.c"
break;
-#line 4545 "awkgram.c"
+#line 4546 "awkgram.c"
default: break;
}
@@ -4734,7 +4735,7 @@ yyreturnlab:
return yyresult;
}
-#line 2236 "awkgram.y"
+#line 2237 "awkgram.y"
struct token {
@@ -7518,6 +7519,9 @@ mk_function(INSTRUCTION *fi, INSTRUCTION *def)
}
if (do_pretty_print) {
+ if (namespace_chain == NULL)
+ push_ns_onto_namespace_chain(NULL);
+
fi[3].nexti = namespace_chain;
namespace_chain = NULL;
(void) list_prepend(def, instruction(Op_exec_count));
@@ -7541,6 +7545,18 @@ mk_function(INSTRUCTION *fi, INSTRUCTION *def)
return fi;
}
+/* push_ns_onto_namespace_chain --- update the namespace chain */
+
+static void
+push_ns_onto_namespace_chain(INSTRUCTION *comment)
+{
+ INSTRUCTION *new_ns = instruction(Op_K_namespace);
+ new_ns->comment = comment;
+ new_ns->ns_name = estrdup(current_namespace, strlen(current_namespace));
+ new_ns->nexti = namespace_chain;
+ namespace_chain = new_ns;
+}
+
/*
* install_function:
* install function name in the symbol table.
@@ -9394,11 +9410,7 @@ set_namespace(INSTRUCTION *ns, INSTRUCTION *comment)
efree(ns->lextok);
// save info and push on front of list of namespaces seen
- INSTRUCTION *new_ns = instruction(Op_K_namespace);
- new_ns->comment = comment;
- new_ns->ns_name = estrdup(current_namespace, strlen(current_namespace));
- new_ns->nexti = namespace_chain;
- namespace_chain = new_ns;
+ push_ns_onto_namespace_chain(comment);
ns->lextok = NULL;
bcfree(ns);
diff --git a/awkgram.y b/awkgram.y
index fc7a9ba3..4a36421f 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -63,6 +63,7 @@ static char *tokexpand(void);
static NODE *set_profile_text(NODE *n, const char *str, size_t len);
static int check_qualified_special(char *token);
static char *qualify_name(const char *name, size_t len);
+static void push_ns_onto_namespace_chain(INSTRUCTION *comment);
static INSTRUCTION *trailing_comment;
static INSTRUCTION *outer_comment;
static INSTRUCTION *interblock_comment;
@@ -5016,6 +5017,9 @@ mk_function(INSTRUCTION *fi, INSTRUCTION *def)
}
if (do_pretty_print) {
+ if (namespace_chain == NULL)
+ push_ns_onto_namespace_chain(NULL);
+
fi[3].nexti = namespace_chain;
namespace_chain = NULL;
(void) list_prepend(def, instruction(Op_exec_count));
@@ -5039,6 +5043,18 @@ mk_function(INSTRUCTION *fi, INSTRUCTION *def)
return fi;
}
+/* push_ns_onto_namespace_chain --- update the namespace chain */
+
+static void
+push_ns_onto_namespace_chain(INSTRUCTION *comment)
+{
+ INSTRUCTION *new_ns = instruction(Op_K_namespace);
+ new_ns->comment = comment;
+ new_ns->ns_name = estrdup(current_namespace, strlen(current_namespace));
+ new_ns->nexti = namespace_chain;
+ namespace_chain = new_ns;
+}
+
/*
* install_function:
* install function name in the symbol table.
@@ -6892,11 +6908,7 @@ set_namespace(INSTRUCTION *ns, INSTRUCTION *comment)
efree(ns->lextok);
// save info and push on front of list of namespaces seen
- INSTRUCTION *new_ns = instruction(Op_K_namespace);
- new_ns->comment = comment;
- new_ns->ns_name = estrdup(current_namespace, strlen(current_namespace));
- new_ns->nexti = namespace_chain;
- namespace_chain = new_ns;
+ push_ns_onto_namespace_chain(comment);
ns->lextok = NULL;
bcfree(ns);
diff --git a/pc/ChangeLog b/pc/ChangeLog
index bb0248fc..7ad4039b 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2024-08-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Regenerated after adding new test.
+
2024-08-11 Eli Zaretskii <eliz@gnu.org>
* Makefile.tst (NEED_TESTOUTCMP, printf-corners): Use
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index d6d0d81c..b864792f 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -222,7 +222,7 @@ GAWK_EXT_TESTS = \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
- typeof4 typeof5 typeof6 unicode1 watchpoint1 \
+ typeof4 typeof5 typeof6 unicode1 watchpoint1 nsprof3 \
re_test typeof7 typeof8 dbugarray1 dbugarray2 dbugarray3 dbugarray4
ARRAYDEBUG_TESTS = arrdbg
@@ -273,7 +273,7 @@ NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2
muldimposix posix_compare
# List of tests that need --pretty-print
-NEED_PRETTY = lintplus2 nsprof1 nsprof2 \
+NEED_PRETTY = lintplus2 nsprof1 nsprof2 nsprof3 \
profile4 profile5 profile8 profile9 profile10 profile11 profile13 \
profile14 profile15 profile16 profile17
@@ -3655,6 +3655,11 @@ unicode1:
AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$?
>>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+nsprof3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 ||
echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
re_test:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index 7c0f50c0..3ce8559f 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2024-08-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): New test, nsprof3.
+ * nsprof3.awk, nsprof3.ok: New files.
+
2024-08-11 Eli Zaretskii <eliz@gnu.org>
* Makefile.am (NEED_TESTOUTCMP): Add printf-corners.
diff --git a/test/Makefile.am b/test/Makefile.am
index 9237e369..5ee6a36c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -953,6 +953,8 @@ EXTRA_DIST = \
nsprof1.ok \
nsprof2.awk \
nsprof2.ok \
+ nsprof3.awk \
+ nsprof3.ok \
nulinsrc.awk \
nulinsrc.ok \
nulrsend.awk \
@@ -1594,7 +1596,7 @@ GAWK_EXT_TESTS = \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
- typeof4 typeof5 typeof6 unicode1 watchpoint1 \
+ typeof4 typeof5 typeof6 unicode1 watchpoint1 nsprof3 \
re_test typeof7 typeof8 dbugarray1 dbugarray2 dbugarray3 dbugarray4
ARRAYDEBUG_TESTS = arrdbg
@@ -1645,7 +1647,7 @@ NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2
muldimposix posix_compare
# List of tests that need --pretty-print
-NEED_PRETTY = lintplus2 nsprof1 nsprof2 \
+NEED_PRETTY = lintplus2 nsprof1 nsprof2 nsprof3 \
profile4 profile5 profile8 profile9 profile10 profile11 profile13 \
profile14 profile15 profile16 profile17
diff --git a/test/Makefile.in b/test/Makefile.in
index abee02e8..135807b2 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1217,6 +1217,8 @@ EXTRA_DIST = \
nsprof1.ok \
nsprof2.awk \
nsprof2.ok \
+ nsprof3.awk \
+ nsprof3.ok \
nulinsrc.awk \
nulinsrc.ok \
nulrsend.awk \
@@ -1858,7 +1860,7 @@ GAWK_EXT_TESTS = \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
- typeof4 typeof5 typeof6 unicode1 watchpoint1 \
+ typeof4 typeof5 typeof6 unicode1 watchpoint1 nsprof3 \
re_test typeof7 typeof8 dbugarray1 dbugarray2 dbugarray3 dbugarray4
ARRAYDEBUG_TESTS = arrdbg
@@ -1909,7 +1911,7 @@ NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2
muldimposix posix_compare
# List of tests that need --pretty-print
-NEED_PRETTY = lintplus2 nsprof1 nsprof2 \
+NEED_PRETTY = lintplus2 nsprof1 nsprof2 nsprof3 \
profile4 profile5 profile8 profile9 profile10 profile11 profile13 \
profile14 profile15 profile16 profile17
@@ -5468,6 +5470,11 @@ unicode1:
AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$?
>>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+nsprof3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 ||
echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
re_test:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index cb6992a1..48f10028 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -2333,6 +2333,11 @@ unicode1:
AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$?
>>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+nsprof3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 ||
echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
re_test:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/nsprof3.awk b/test/nsprof3.awk
new file mode 100644
index 00000000..2b67383c
--- /dev/null
+++ b/test/nsprof3.awk
@@ -0,0 +1,12 @@
+function a() { print "awk::a" }
+function b() { print "awk::b" }
+
+@namespace "foo"
+
+function a() { awk::a() }
+function b() { awk::b() }
+
+@namespace "bar"
+
+function a() { awk::a() }
+function b() { awk::b() }
diff --git a/test/nsprof3.ok b/test/nsprof3.ok
new file mode 100644
index 00000000..b63f1b48
--- /dev/null
+++ b/test/nsprof3.ok
@@ -0,0 +1,36 @@
+
+function a()
+{
+ print "awk::a"
+}
+
+function b()
+{
+ print "awk::b"
+}
+
+@namespace "bar"
+
+
+function a()
+{
+ awk::a()
+}
+
+function b()
+{
+ awk::b()
+}
+
+@namespace "foo"
+
+
+function a()
+{
+ awk::a()
+}
+
+function b()
+{
+ awk::b()
+}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +
awkgram.c | 866 +++++++++++++++++++------------------
awkgram.y | 22 +-
doc/ChangeLog | 6 +
doc/gawk.info | 1259 ++++++++++++++++++++++++++++--------------------------
doc/gawk.texi | 71 ++-
pc/ChangeLog | 4 +
pc/Makefile.tst | 9 +-
test/ChangeLog | 5 +
test/Makefile.am | 6 +-
test/Makefile.in | 11 +-
test/Maketests | 5 +
test/nsprof3.awk | 12 +
test/nsprof3.ok | 36 ++
14 files changed, 1250 insertions(+), 1067 deletions(-)
create mode 100644 test/nsprof3.awk
create mode 100644 test/nsprof3.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5510-g28fa4da6,
Arnold Robbins <=