diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 1110 | ||||
-rw-r--r-- | doc/gawk.texi | 24 | ||||
-rw-r--r-- | doc/gawktexi.in | 24 |
4 files changed, 613 insertions, 550 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index efb3728e..f29633d8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2021-09-09 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Interval Expressions): Add some notes borrowed from + Paul Eggert in the grep documentation. + 2021-08-26 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Strong Regexp Constants): Document behavior diff --git a/doc/gawk.info b/doc/gawk.info index a71a01d3..e6f85e82 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -3983,17 +3983,33 @@ practice to always escape them with a backslash. Then the regexp constants are valid and work the way you want them to, using any version of 'awk'.(1) - Finally, when '{' and '}' appear in regexp constants in a way that -cannot be interpreted as an interval expression (such as '/q{a}/'), then -they stand for themselves. + When '{' and '}' appear in regexp constants in a way that cannot be +interpreted as an interval expression (such as '/q{a}/'), then they +stand for themselves. As mentioned, interval expressions were not traditionally available in 'awk'. In March of 2019, BWK 'awk' (finally) acquired them. - - Nonetheless, because they were not available for so many decades, -'gawk' continues to not supply them when in compatibility mode (*note +Nonetheless, because they were not available for so many decades, 'gawk' +continues to not supply them when in compatibility mode (*note Options::). + POSIX says that interval expressions containing repetition counts +greater than 255 produce unspecified results. + + In the manual for GNU 'grep', Paul Eggert notes the following: + + Interval expressions may be implemented internally via repetition. + For example, '^(a|bc){2,4}$' might be implemented as + '^(a|bc)(a|bc)((a|bc)(a|bc)?)?$'. A large repetition count may + exhaust memory or greatly slow matching. Even small counts can + cause problems if cascaded; for example, 'grep -E + ".*{10,}{10,}{10,}{10,}{10,}"' is likely to overflow a stack. + Fortunately, regular expressions like these are typically + artificial, and cascaded repetitions do not conform to POSIX so + cannot be used in portable programs anyway. + +This same caveat applies to 'gawk'. + ---------- Footnotes ---------- (1) Use two backslashes if you're using a string constant with a @@ -36347,6 +36363,8 @@ Index * EBCDIC <2>: History summary. (line 20) * effective group ID of gawk user: Auto-set. (line 172) * effective user ID of gawk user: Auto-set. (line 180) +* Eggert, Paul: Interval Expressions. + (line 36) * egrep utility: Bracket Expressions. (line 34) * egrep utility <1>: Egrep Program. (line 6) * egrep.awk program: Egrep Program. (line 76) @@ -38574,546 +38592,546 @@ Node: Regexp Operators174320 Node: Regexp Operator Details174805 Ref: Regexp Operator Details-Footnote-1182169 Node: Interval Expressions182316 -Ref: Interval Expressions-Footnote-1183737 -Node: Bracket Expressions183835 -Ref: table-char-classes186311 -Node: Leftmost Longest189637 -Node: Computed Regexps190940 -Node: GNU Regexp Operators194367 -Node: Case-sensitivity198104 -Ref: Case-sensitivity-Footnote-1200970 -Ref: Case-sensitivity-Footnote-2201205 -Node: Regexp Summary201313 -Node: Reading Files202779 -Node: Records205048 -Node: awk split records206123 -Node: gawk split records210823 -Ref: gawk split records-Footnote-1215897 -Node: Fields215934 -Node: Nonconstant Fields218675 -Ref: Nonconstant Fields-Footnote-1220911 -Node: Changing Fields221115 -Node: Field Separators227146 -Node: Default Field Splitting229844 -Node: Regexp Field Splitting230962 -Node: Single Character Fields234639 -Node: Command Line Field Separator235699 -Node: Full Line Fields238917 -Ref: Full Line Fields-Footnote-1240439 -Ref: Full Line Fields-Footnote-2240485 -Node: Field Splitting Summary240586 -Node: Constant Size242660 -Node: Fixed width data243392 -Node: Skipping intervening246859 -Node: Allowing trailing data247657 -Node: Fields with fixed data248694 -Node: Splitting By Content250212 -Ref: Splitting By Content-Footnote-1253995 -Node: More CSV254158 -Node: Testing field creation255750 -Node: Multiple Line257375 -Node: Getline263652 -Node: Plain Getline266121 -Node: Getline/Variable268694 -Node: Getline/File269845 -Node: Getline/Variable/File271233 -Ref: Getline/Variable/File-Footnote-1272838 -Node: Getline/Pipe272926 -Node: Getline/Variable/Pipe275630 -Node: Getline/Coprocess276765 -Node: Getline/Variable/Coprocess278032 -Node: Getline Notes278774 -Node: Getline Summary281571 -Ref: table-getline-variants281995 -Node: Read Timeout282743 -Ref: Read Timeout-Footnote-1286649 -Node: Retrying Input286707 -Node: Command-line directories287906 -Node: Input Summary288812 -Node: Input Exercises291984 -Node: Printing292418 -Node: Print294252 -Node: Print Examples295709 -Node: Output Separators298489 -Node: OFMT300506 -Node: Printf301862 -Node: Basic Printf302647 -Node: Control Letters304221 -Node: Format Modifiers309383 -Node: Printf Examples315398 -Node: Redirection317884 -Node: Special FD324725 -Ref: Special FD-Footnote-1327893 -Node: Special Files327967 -Node: Other Inherited Files328584 -Node: Special Network329585 -Node: Special Caveats330445 -Node: Close Files And Pipes331394 -Ref: table-close-pipe-return-values338301 -Ref: Close Files And Pipes-Footnote-1339114 -Ref: Close Files And Pipes-Footnote-2339262 -Node: Nonfatal339414 -Node: Output Summary341752 -Node: Output Exercises342974 -Node: Expressions343653 -Node: Values344841 -Node: Constants345519 -Node: Scalar Constants346210 -Ref: Scalar Constants-Footnote-1348720 -Node: Nondecimal-numbers348970 -Node: Regexp Constants351971 -Node: Using Constant Regexps352497 -Node: Standard Regexp Constants353119 -Node: Strong Regexp Constants356307 -Node: Variables359731 -Node: Using Variables360388 -Node: Assignment Options362298 -Node: Conversion364769 -Node: Strings And Numbers365293 -Ref: Strings And Numbers-Footnote-1368356 -Node: Locale influences conversions368465 -Ref: table-locale-affects371223 -Node: All Operators371841 -Node: Arithmetic Ops372470 -Node: Concatenation375186 -Ref: Concatenation-Footnote-1378033 -Node: Assignment Ops378140 -Ref: table-assign-ops383131 -Node: Increment Ops384444 -Node: Truth Values and Conditions387904 -Node: Truth Values388978 -Node: Typing and Comparison390026 -Node: Variable Typing390846 -Ref: Variable Typing-Footnote-1397309 -Ref: Variable Typing-Footnote-2397381 -Node: Comparison Operators397458 -Ref: table-relational-ops397877 -Node: POSIX String Comparison401372 -Ref: POSIX String Comparison-Footnote-1403067 -Ref: POSIX String Comparison-Footnote-2403206 -Node: Boolean Ops403290 -Ref: Boolean Ops-Footnote-1407772 -Node: Conditional Exp407864 -Node: Function Calls409600 -Node: Precedence413477 -Node: Locales417136 -Node: Expressions Summary418768 -Node: Patterns and Actions421341 -Node: Pattern Overview422461 -Node: Regexp Patterns424138 -Node: Expression Patterns424680 -Node: Ranges428461 -Node: BEGIN/END431569 -Node: Using BEGIN/END432330 -Ref: Using BEGIN/END-Footnote-1435084 -Node: I/O And BEGIN/END435190 -Node: BEGINFILE/ENDFILE437503 -Node: Empty440734 -Node: Using Shell Variables441051 -Node: Action Overview443325 -Node: Statements445650 -Node: If Statement447498 -Node: While Statement448993 -Node: Do Statement451021 -Node: For Statement452169 -Node: Switch Statement455340 -Node: Break Statement457781 -Node: Continue Statement459873 -Node: Next Statement461700 -Node: Nextfile Statement464083 -Node: Exit Statement466772 -Node: Built-in Variables469175 -Node: User-modified470308 -Node: Auto-set478075 -Ref: Auto-set-Footnote-1494882 -Ref: Auto-set-Footnote-2495088 -Node: ARGC and ARGV495144 -Node: Pattern Action Summary499357 -Node: Arrays501787 -Node: Array Basics503116 -Node: Array Intro503960 -Ref: figure-array-elements505935 -Ref: Array Intro-Footnote-1508639 -Node: Reference to Elements508767 -Node: Assigning Elements511231 -Node: Array Example511722 -Node: Scanning an Array513481 -Node: Controlling Scanning516503 -Ref: Controlling Scanning-Footnote-1522959 -Node: Numeric Array Subscripts523275 -Node: Uninitialized Subscripts525459 -Node: Delete527078 -Ref: Delete-Footnote-1529830 -Node: Multidimensional529887 -Node: Multiscanning532982 -Node: Arrays of Arrays534573 -Node: Arrays Summary539341 -Node: Functions541434 -Node: Built-in542472 -Node: Calling Built-in543625 -Node: Boolean Functions545621 -Node: Numeric Functions546175 -Ref: Numeric Functions-Footnote-1550202 -Ref: Numeric Functions-Footnote-2550850 -Ref: Numeric Functions-Footnote-3550898 -Node: String Functions551170 -Ref: String Functions-Footnote-1575685 -Ref: String Functions-Footnote-2575813 -Ref: String Functions-Footnote-3576061 -Node: Gory Details576148 -Ref: table-sub-escapes577939 -Ref: table-sub-proposed579458 -Ref: table-posix-sub580821 -Ref: table-gensub-escapes582362 -Ref: Gory Details-Footnote-1583185 -Node: I/O Functions583339 -Ref: table-system-return-values589793 -Ref: I/O Functions-Footnote-1591873 -Ref: I/O Functions-Footnote-2592021 -Node: Time Functions592141 -Ref: Time Functions-Footnote-1602812 -Ref: Time Functions-Footnote-2602880 -Ref: Time Functions-Footnote-3603038 -Ref: Time Functions-Footnote-4603149 -Ref: Time Functions-Footnote-5603261 -Ref: Time Functions-Footnote-6603488 -Node: Bitwise Functions603754 -Ref: table-bitwise-ops604348 -Ref: Bitwise Functions-Footnote-1610411 -Ref: Bitwise Functions-Footnote-2610584 -Node: Type Functions610775 -Node: I18N Functions613729 -Node: User-defined615380 -Node: Definition Syntax616192 -Ref: Definition Syntax-Footnote-1621886 -Node: Function Example621957 -Ref: Function Example-Footnote-1624879 -Node: Function Calling624901 -Node: Calling A Function625489 -Node: Variable Scope626447 -Node: Pass By Value/Reference629441 -Node: Function Caveats632085 -Ref: Function Caveats-Footnote-1634132 -Node: Return Statement634252 -Node: Dynamic Typing637231 -Node: Indirect Calls638161 -Ref: Indirect Calls-Footnote-1648416 -Node: Functions Summary648544 -Node: Library Functions651249 -Ref: Library Functions-Footnote-1654856 -Ref: Library Functions-Footnote-2654999 -Node: Library Names655170 -Ref: Library Names-Footnote-1658837 -Ref: Library Names-Footnote-2659060 -Node: General Functions659146 -Node: Strtonum Function660328 -Node: Assert Function663350 -Node: Round Function666676 -Node: Cliff Random Function668216 -Node: Ordinal Functions669232 -Ref: Ordinal Functions-Footnote-1672295 -Ref: Ordinal Functions-Footnote-2672547 -Node: Join Function672757 -Ref: Join Function-Footnote-1674527 -Node: Getlocaltime Function674727 -Node: Readfile Function678469 -Node: Shell Quoting680446 -Node: Isnumeric Function681874 -Node: Data File Management683262 -Node: Filetrans Function683894 -Node: Rewind Function687990 -Node: File Checking689899 -Ref: File Checking-Footnote-1691233 -Node: Empty Files691434 -Node: Ignoring Assigns693413 -Node: Getopt Function694963 -Ref: Getopt Function-Footnote-1710186 -Node: Passwd Functions710386 -Ref: Passwd Functions-Footnote-1719225 -Node: Group Functions719313 -Ref: Group Functions-Footnote-1727211 -Node: Walking Arrays727418 -Node: Library Functions Summary730426 -Node: Library Exercises731832 -Node: Sample Programs732297 -Node: Running Examples733067 -Node: Clones733795 -Node: Cut Program735019 -Node: Egrep Program745159 -Node: Id Program754160 -Node: Split Program764107 -Ref: Split Program-Footnote-1774000 -Node: Tee Program774173 -Node: Uniq Program776963 -Node: Wc Program784551 -Node: Bytes vs. Characters784938 -Node: Using extensions786486 -Node: wc program787240 -Node: Miscellaneous Programs792105 -Node: Dupword Program793318 -Node: Alarm Program795348 -Node: Translate Program800203 -Ref: Translate Program-Footnote-1804768 -Node: Labels Program805038 -Ref: Labels Program-Footnote-1808389 -Node: Word Sorting808473 -Node: History Sorting812545 -Node: Extract Program814770 -Node: Simple Sed822824 -Node: Igawk Program825898 -Ref: Igawk Program-Footnote-1840229 -Ref: Igawk Program-Footnote-2840431 -Ref: Igawk Program-Footnote-3840553 -Node: Anagram Program840668 -Node: Signature Program843730 -Node: Programs Summary844977 -Node: Programs Exercises846191 -Ref: Programs Exercises-Footnote-1850321 -Node: Advanced Features850407 -Node: Nondecimal Data852538 -Node: Boolean Typed Values854136 -Node: Array Sorting856017 -Node: Controlling Array Traversal856722 -Ref: Controlling Array Traversal-Footnote-1865090 -Node: Array Sorting Functions865208 -Ref: Array Sorting Functions-Footnote-1870582 -Node: Two-way I/O870778 -Ref: Two-way I/O-Footnote-1878504 -Ref: Two-way I/O-Footnote-2878691 -Node: TCP/IP Networking878773 -Node: Profiling881891 -Node: Extension Philosophy891200 -Node: Advanced Features Summary892679 -Node: Internationalization894694 -Node: I18N and L10N896368 -Node: Explaining gettext897055 -Ref: Explaining gettext-Footnote-1902947 -Ref: Explaining gettext-Footnote-2903132 -Node: Programmer i18n903297 -Ref: Programmer i18n-Footnote-1908246 -Node: Translator i18n908295 -Node: String Extraction909089 -Ref: String Extraction-Footnote-1910221 -Node: Printf Ordering910307 -Ref: Printf Ordering-Footnote-1913093 -Node: I18N Portability913157 -Ref: I18N Portability-Footnote-1915613 -Node: I18N Example915676 -Ref: I18N Example-Footnote-1918951 -Ref: I18N Example-Footnote-2919024 -Node: Gawk I18N919133 -Node: I18N Summary919782 -Node: Debugger921123 -Node: Debugging922123 -Node: Debugging Concepts922564 -Node: Debugging Terms924373 -Node: Awk Debugging926948 -Ref: Awk Debugging-Footnote-1927893 -Node: Sample Debugging Session928025 -Node: Debugger Invocation928559 -Node: Finding The Bug929945 -Node: List of Debugger Commands936419 -Node: Breakpoint Control937752 -Node: Debugger Execution Control941446 -Node: Viewing And Changing Data944808 -Node: Execution Stack948349 -Node: Debugger Info949986 -Node: Miscellaneous Debugger Commands954057 -Node: Readline Support959119 -Node: Limitations960015 -Node: Debugging Summary962569 -Node: Namespaces963848 -Node: Global Namespace964959 -Node: Qualified Names966357 -Node: Default Namespace967356 -Node: Changing The Namespace968097 -Node: Naming Rules969711 -Node: Internal Name Management971559 -Node: Namespace Example972601 -Node: Namespace And Features975163 -Node: Namespace Summary976598 -Node: Arbitrary Precision Arithmetic978075 -Node: Computer Arithmetic979562 -Ref: table-numeric-ranges983328 -Ref: table-floating-point-ranges983821 -Ref: Computer Arithmetic-Footnote-1984479 -Node: Math Definitions984536 -Ref: table-ieee-formats987512 -Node: MPFR features988079 -Node: FP Math Caution989797 -Ref: FP Math Caution-Footnote-1990869 -Node: Inexactness of computations991238 -Node: Inexact representation992269 -Node: Comparing FP Values993629 -Node: Errors accumulate994870 -Node: Strange values996326 -Ref: Strange values-Footnote-1998914 -Node: Getting Accuracy999019 -Node: Try To Round1001729 -Node: Setting precision1002628 -Ref: table-predefined-precision-strings1003325 -Node: Setting the rounding mode1005155 -Ref: table-gawk-rounding-modes1005529 -Ref: Setting the rounding mode-Footnote-11009460 -Node: Arbitrary Precision Integers1009639 -Ref: Arbitrary Precision Integers-Footnote-11012814 -Node: Checking for MPFR1012963 -Node: POSIX Floating Point Problems1014437 -Ref: POSIX Floating Point Problems-Footnote-11018722 -Node: Floating point summary1018760 -Node: Dynamic Extensions1020950 -Node: Extension Intro1022503 -Node: Plugin License1023769 -Node: Extension Mechanism Outline1024566 -Ref: figure-load-extension1025005 -Ref: figure-register-new-function1026570 -Ref: figure-call-new-function1027662 -Node: Extension API Description1029724 -Node: Extension API Functions Introduction1031437 -Ref: table-api-std-headers1033273 -Node: General Data Types1037522 -Ref: General Data Types-Footnote-11046228 -Node: Memory Allocation Functions1046527 -Ref: Memory Allocation Functions-Footnote-11051028 -Node: Constructor Functions1051127 -Node: API Ownership of MPFR and GMP Values1054780 -Node: Registration Functions1056093 -Node: Extension Functions1056793 -Node: Exit Callback Functions1062115 -Node: Extension Version String1063365 -Node: Input Parsers1064028 -Node: Output Wrappers1076749 -Node: Two-way processors1081261 -Node: Printing Messages1083526 -Ref: Printing Messages-Footnote-11084697 -Node: Updating ERRNO1084850 -Node: Requesting Values1085589 -Ref: table-value-types-returned1086326 -Node: Accessing Parameters1087434 -Node: Symbol Table Access1088671 -Node: Symbol table by name1089183 -Ref: Symbol table by name-Footnote-11092207 -Node: Symbol table by cookie1092335 -Ref: Symbol table by cookie-Footnote-11096520 -Node: Cached values1096584 -Ref: Cached values-Footnote-11100120 -Node: Array Manipulation1100273 -Ref: Array Manipulation-Footnote-11101364 -Node: Array Data Types1101401 -Ref: Array Data Types-Footnote-11104059 -Node: Array Functions1104151 -Node: Flattening Arrays1108649 -Node: Creating Arrays1115625 -Node: Redirection API1120392 -Node: Extension API Variables1123225 -Node: Extension Versioning1123936 -Ref: gawk-api-version1124365 -Node: Extension GMP/MPFR Versioning1126096 -Node: Extension API Informational Variables1127724 -Node: Extension API Boilerplate1128797 -Node: Changes from API V11132771 -Node: Finding Extensions1134343 -Node: Extension Example1134902 -Node: Internal File Description1135700 -Node: Internal File Ops1139780 -Ref: Internal File Ops-Footnote-11151130 -Node: Using Internal File Ops1151270 -Ref: Using Internal File Ops-Footnote-11153653 -Node: Extension Samples1153927 -Node: Extension Sample File Functions1155456 -Node: Extension Sample Fnmatch1163105 -Node: Extension Sample Fork1164592 -Node: Extension Sample Inplace1165810 -Node: Extension Sample Ord1169436 -Node: Extension Sample Readdir1170272 -Ref: table-readdir-file-types1171161 -Node: Extension Sample Revout1172228 -Node: Extension Sample Rev2way1172817 -Node: Extension Sample Read write array1173557 -Node: Extension Sample Readfile1175499 -Node: Extension Sample Time1176594 -Node: Extension Sample API Tests1178346 -Node: gawkextlib1178838 -Node: Extension summary1181756 -Node: Extension Exercises1185458 -Node: Language History1186700 -Node: V7/SVR3.11188356 -Node: SVR41190508 -Node: POSIX1191942 -Node: BTL1193323 -Node: POSIX/GNU1194052 -Node: Feature History1199830 -Node: Common Extensions1217005 -Node: Ranges and Locales1218288 -Ref: Ranges and Locales-Footnote-11222904 -Ref: Ranges and Locales-Footnote-21222931 -Ref: Ranges and Locales-Footnote-31223166 -Node: Contributors1223389 -Node: History summary1229386 -Node: Installation1230766 -Node: Gawk Distribution1231710 -Node: Getting1232194 -Node: Extracting1233157 -Node: Distribution contents1234795 -Node: Unix Installation1241275 -Node: Quick Installation1241957 -Node: Compiling with MPFR1244438 -Node: Shell Startup Files1245130 -Node: Additional Configuration Options1246219 -Node: Configuration Philosophy1248534 -Node: Non-Unix Installation1250903 -Node: PC Installation1251363 -Node: PC Binary Installation1252201 -Node: PC Compiling1252636 -Node: PC Using1253753 -Node: Cygwin1257306 -Node: MSYS1258530 -Node: VMS Installation1259132 -Node: VMS Compilation1259851 -Ref: VMS Compilation-Footnote-11261080 -Node: VMS Dynamic Extensions1261138 -Node: VMS Installation Details1262823 -Node: VMS Running1265085 -Node: VMS GNV1269364 -Node: Bugs1270078 -Node: Bug definition1270958 -Node: Bug address1273462 -Node: Usenet1276850 -Node: Performance bugs1277859 -Node: Asking for help1280780 -Node: Maintainers1282742 -Node: Other Versions1283936 -Node: Installation summary1291788 -Node: Notes1293152 -Node: Compatibility Mode1293946 -Node: Additions1294728 -Node: Accessing The Source1295653 -Node: Adding Code1297090 -Node: New Ports1303309 -Node: Derived Files1307684 -Ref: Derived Files-Footnote-11313344 -Ref: Derived Files-Footnote-21313379 -Ref: Derived Files-Footnote-31313977 -Node: Future Extensions1314091 -Node: Implementation Limitations1314749 -Node: Extension Design1315959 -Node: Old Extension Problems1317103 -Ref: Old Extension Problems-Footnote-11318621 -Node: Extension New Mechanism Goals1318678 -Ref: Extension New Mechanism Goals-Footnote-11322042 -Node: Extension Other Design Decisions1322231 -Node: Extension Future Growth1324344 -Node: Notes summary1324950 -Node: Basic Concepts1326108 -Node: Basic High Level1326789 -Ref: figure-general-flow1327071 -Ref: figure-process-flow1327756 -Ref: Basic High Level-Footnote-11331057 -Node: Basic Data Typing1331242 -Node: Glossary1334570 -Node: Copying1366457 -Node: GNU Free Documentation License1404000 -Node: Index1429120 +Ref: Interval Expressions-Footnote-1184516 +Node: Bracket Expressions184614 +Ref: table-char-classes187090 +Node: Leftmost Longest190416 +Node: Computed Regexps191719 +Node: GNU Regexp Operators195146 +Node: Case-sensitivity198883 +Ref: Case-sensitivity-Footnote-1201749 +Ref: Case-sensitivity-Footnote-2201984 +Node: Regexp Summary202092 +Node: Reading Files203558 +Node: Records205827 +Node: awk split records206902 +Node: gawk split records211602 +Ref: gawk split records-Footnote-1216676 +Node: Fields216713 +Node: Nonconstant Fields219454 +Ref: Nonconstant Fields-Footnote-1221690 +Node: Changing Fields221894 +Node: Field Separators227925 +Node: Default Field Splitting230623 +Node: Regexp Field Splitting231741 +Node: Single Character Fields235418 +Node: Command Line Field Separator236478 +Node: Full Line Fields239696 +Ref: Full Line Fields-Footnote-1241218 +Ref: Full Line Fields-Footnote-2241264 +Node: Field Splitting Summary241365 +Node: Constant Size243439 +Node: Fixed width data244171 +Node: Skipping intervening247638 +Node: Allowing trailing data248436 +Node: Fields with fixed data249473 +Node: Splitting By Content250991 +Ref: Splitting By Content-Footnote-1254774 +Node: More CSV254937 +Node: Testing field creation256529 +Node: Multiple Line258154 +Node: Getline264431 +Node: Plain Getline266900 +Node: Getline/Variable269473 +Node: Getline/File270624 +Node: Getline/Variable/File272012 +Ref: Getline/Variable/File-Footnote-1273617 +Node: Getline/Pipe273705 +Node: Getline/Variable/Pipe276409 +Node: Getline/Coprocess277544 +Node: Getline/Variable/Coprocess278811 +Node: Getline Notes279553 +Node: Getline Summary282350 +Ref: table-getline-variants282774 +Node: Read Timeout283522 +Ref: Read Timeout-Footnote-1287428 +Node: Retrying Input287486 +Node: Command-line directories288685 +Node: Input Summary289591 +Node: Input Exercises292763 +Node: Printing293197 +Node: Print295031 +Node: Print Examples296488 +Node: Output Separators299268 +Node: OFMT301285 +Node: Printf302641 +Node: Basic Printf303426 +Node: Control Letters305000 +Node: Format Modifiers310162 +Node: Printf Examples316177 +Node: Redirection318663 +Node: Special FD325504 +Ref: Special FD-Footnote-1328672 +Node: Special Files328746 +Node: Other Inherited Files329363 +Node: Special Network330364 +Node: Special Caveats331224 +Node: Close Files And Pipes332173 +Ref: table-close-pipe-return-values339080 +Ref: Close Files And Pipes-Footnote-1339893 +Ref: Close Files And Pipes-Footnote-2340041 +Node: Nonfatal340193 +Node: Output Summary342531 +Node: Output Exercises343753 +Node: Expressions344432 +Node: Values345620 +Node: Constants346298 +Node: Scalar Constants346989 +Ref: Scalar Constants-Footnote-1349499 +Node: Nondecimal-numbers349749 +Node: Regexp Constants352750 +Node: Using Constant Regexps353276 +Node: Standard Regexp Constants353898 +Node: Strong Regexp Constants357086 +Node: Variables360510 +Node: Using Variables361167 +Node: Assignment Options363077 +Node: Conversion365548 +Node: Strings And Numbers366072 +Ref: Strings And Numbers-Footnote-1369135 +Node: Locale influences conversions369244 +Ref: table-locale-affects372002 +Node: All Operators372620 +Node: Arithmetic Ops373249 +Node: Concatenation375965 +Ref: Concatenation-Footnote-1378812 +Node: Assignment Ops378919 +Ref: table-assign-ops383910 +Node: Increment Ops385223 +Node: Truth Values and Conditions388683 +Node: Truth Values389757 +Node: Typing and Comparison390805 +Node: Variable Typing391625 +Ref: Variable Typing-Footnote-1398088 +Ref: Variable Typing-Footnote-2398160 +Node: Comparison Operators398237 +Ref: table-relational-ops398656 +Node: POSIX String Comparison402151 +Ref: POSIX String Comparison-Footnote-1403846 +Ref: POSIX String Comparison-Footnote-2403985 +Node: Boolean Ops404069 +Ref: Boolean Ops-Footnote-1408551 +Node: Conditional Exp408643 +Node: Function Calls410379 +Node: Precedence414256 +Node: Locales417915 +Node: Expressions Summary419547 +Node: Patterns and Actions422120 +Node: Pattern Overview423240 +Node: Regexp Patterns424917 +Node: Expression Patterns425459 +Node: Ranges429240 +Node: BEGIN/END432348 +Node: Using BEGIN/END433109 +Ref: Using BEGIN/END-Footnote-1435863 +Node: I/O And BEGIN/END435969 +Node: BEGINFILE/ENDFILE438282 +Node: Empty441513 +Node: Using Shell Variables441830 +Node: Action Overview444104 +Node: Statements446429 +Node: If Statement448277 +Node: While Statement449772 +Node: Do Statement451800 +Node: For Statement452948 +Node: Switch Statement456119 +Node: Break Statement458560 +Node: Continue Statement460652 +Node: Next Statement462479 +Node: Nextfile Statement464862 +Node: Exit Statement467551 +Node: Built-in Variables469954 +Node: User-modified471087 +Node: Auto-set478854 +Ref: Auto-set-Footnote-1495661 +Ref: Auto-set-Footnote-2495867 +Node: ARGC and ARGV495923 +Node: Pattern Action Summary500136 +Node: Arrays502566 +Node: Array Basics503895 +Node: Array Intro504739 +Ref: figure-array-elements506714 +Ref: Array Intro-Footnote-1509418 +Node: Reference to Elements509546 +Node: Assigning Elements512010 +Node: Array Example512501 +Node: Scanning an Array514260 +Node: Controlling Scanning517282 +Ref: Controlling Scanning-Footnote-1523738 +Node: Numeric Array Subscripts524054 +Node: Uninitialized Subscripts526238 +Node: Delete527857 +Ref: Delete-Footnote-1530609 +Node: Multidimensional530666 +Node: Multiscanning533761 +Node: Arrays of Arrays535352 +Node: Arrays Summary540120 +Node: Functions542213 +Node: Built-in543251 +Node: Calling Built-in544404 +Node: Boolean Functions546400 +Node: Numeric Functions546954 +Ref: Numeric Functions-Footnote-1550981 +Ref: Numeric Functions-Footnote-2551629 +Ref: Numeric Functions-Footnote-3551677 +Node: String Functions551949 +Ref: String Functions-Footnote-1576464 +Ref: String Functions-Footnote-2576592 +Ref: String Functions-Footnote-3576840 +Node: Gory Details576927 +Ref: table-sub-escapes578718 +Ref: table-sub-proposed580237 +Ref: table-posix-sub581600 +Ref: table-gensub-escapes583141 +Ref: Gory Details-Footnote-1583964 +Node: I/O Functions584118 +Ref: table-system-return-values590572 +Ref: I/O Functions-Footnote-1592652 +Ref: I/O Functions-Footnote-2592800 +Node: Time Functions592920 +Ref: Time Functions-Footnote-1603591 +Ref: Time Functions-Footnote-2603659 +Ref: Time Functions-Footnote-3603817 +Ref: Time Functions-Footnote-4603928 +Ref: Time Functions-Footnote-5604040 +Ref: Time Functions-Footnote-6604267 +Node: Bitwise Functions604533 +Ref: table-bitwise-ops605127 +Ref: Bitwise Functions-Footnote-1611190 +Ref: Bitwise Functions-Footnote-2611363 +Node: Type Functions611554 +Node: I18N Functions614508 +Node: User-defined616159 +Node: Definition Syntax616971 +Ref: Definition Syntax-Footnote-1622665 +Node: Function Example622736 +Ref: Function Example-Footnote-1625658 +Node: Function Calling625680 +Node: Calling A Function626268 +Node: Variable Scope627226 +Node: Pass By Value/Reference630220 +Node: Function Caveats632864 +Ref: Function Caveats-Footnote-1634911 +Node: Return Statement635031 +Node: Dynamic Typing638010 +Node: Indirect Calls638940 +Ref: Indirect Calls-Footnote-1649195 +Node: Functions Summary649323 +Node: Library Functions652028 +Ref: Library Functions-Footnote-1655635 +Ref: Library Functions-Footnote-2655778 +Node: Library Names655949 +Ref: Library Names-Footnote-1659616 +Ref: Library Names-Footnote-2659839 +Node: General Functions659925 +Node: Strtonum Function661107 +Node: Assert Function664129 +Node: Round Function667455 +Node: Cliff Random Function668995 +Node: Ordinal Functions670011 +Ref: Ordinal Functions-Footnote-1673074 +Ref: Ordinal Functions-Footnote-2673326 +Node: Join Function673536 +Ref: Join Function-Footnote-1675306 +Node: Getlocaltime Function675506 +Node: Readfile Function679248 +Node: Shell Quoting681225 +Node: Isnumeric Function682653 +Node: Data File Management684041 +Node: Filetrans Function684673 +Node: Rewind Function688769 +Node: File Checking690678 +Ref: File Checking-Footnote-1692012 +Node: Empty Files692213 +Node: Ignoring Assigns694192 +Node: Getopt Function695742 +Ref: Getopt Function-Footnote-1710965 +Node: Passwd Functions711165 +Ref: Passwd Functions-Footnote-1720004 +Node: Group Functions720092 +Ref: Group Functions-Footnote-1727990 +Node: Walking Arrays728197 +Node: Library Functions Summary731205 +Node: Library Exercises732611 +Node: Sample Programs733076 +Node: Running Examples733846 +Node: Clones734574 +Node: Cut Program735798 +Node: Egrep Program745938 +Node: Id Program754939 +Node: Split Program764886 +Ref: Split Program-Footnote-1774779 +Node: Tee Program774952 +Node: Uniq Program777742 +Node: Wc Program785330 +Node: Bytes vs. Characters785717 +Node: Using extensions787265 +Node: wc program788019 +Node: Miscellaneous Programs792884 +Node: Dupword Program794097 +Node: Alarm Program796127 +Node: Translate Program800982 +Ref: Translate Program-Footnote-1805547 +Node: Labels Program805817 +Ref: Labels Program-Footnote-1809168 +Node: Word Sorting809252 +Node: History Sorting813324 +Node: Extract Program815549 +Node: Simple Sed823603 +Node: Igawk Program826677 +Ref: Igawk Program-Footnote-1841008 +Ref: Igawk Program-Footnote-2841210 +Ref: Igawk Program-Footnote-3841332 +Node: Anagram Program841447 +Node: Signature Program844509 +Node: Programs Summary845756 +Node: Programs Exercises846970 +Ref: Programs Exercises-Footnote-1851100 +Node: Advanced Features851186 +Node: Nondecimal Data853317 +Node: Boolean Typed Values854915 +Node: Array Sorting856796 +Node: Controlling Array Traversal857501 +Ref: Controlling Array Traversal-Footnote-1865869 +Node: Array Sorting Functions865987 +Ref: Array Sorting Functions-Footnote-1871361 +Node: Two-way I/O871557 +Ref: Two-way I/O-Footnote-1879283 +Ref: Two-way I/O-Footnote-2879470 +Node: TCP/IP Networking879552 +Node: Profiling882670 +Node: Extension Philosophy891979 +Node: Advanced Features Summary893458 +Node: Internationalization895473 +Node: I18N and L10N897147 +Node: Explaining gettext897834 +Ref: Explaining gettext-Footnote-1903726 +Ref: Explaining gettext-Footnote-2903911 +Node: Programmer i18n904076 +Ref: Programmer i18n-Footnote-1909025 +Node: Translator i18n909074 +Node: String Extraction909868 +Ref: String Extraction-Footnote-1911000 +Node: Printf Ordering911086 +Ref: Printf Ordering-Footnote-1913872 +Node: I18N Portability913936 +Ref: I18N Portability-Footnote-1916392 +Node: I18N Example916455 +Ref: I18N Example-Footnote-1919730 +Ref: I18N Example-Footnote-2919803 +Node: Gawk I18N919912 +Node: I18N Summary920561 +Node: Debugger921902 +Node: Debugging922902 +Node: Debugging Concepts923343 +Node: Debugging Terms925152 +Node: Awk Debugging927727 +Ref: Awk Debugging-Footnote-1928672 +Node: Sample Debugging Session928804 +Node: Debugger Invocation929338 +Node: Finding The Bug930724 +Node: List of Debugger Commands937198 +Node: Breakpoint Control938531 +Node: Debugger Execution Control942225 +Node: Viewing And Changing Data945587 +Node: Execution Stack949128 +Node: Debugger Info950765 +Node: Miscellaneous Debugger Commands954836 +Node: Readline Support959898 +Node: Limitations960794 +Node: Debugging Summary963348 +Node: Namespaces964627 +Node: Global Namespace965738 +Node: Qualified Names967136 +Node: Default Namespace968135 +Node: Changing The Namespace968876 +Node: Naming Rules970490 +Node: Internal Name Management972338 +Node: Namespace Example973380 +Node: Namespace And Features975942 +Node: Namespace Summary977377 +Node: Arbitrary Precision Arithmetic978854 +Node: Computer Arithmetic980341 +Ref: table-numeric-ranges984107 +Ref: table-floating-point-ranges984600 +Ref: Computer Arithmetic-Footnote-1985258 +Node: Math Definitions985315 +Ref: table-ieee-formats988291 +Node: MPFR features988858 +Node: FP Math Caution990576 +Ref: FP Math Caution-Footnote-1991648 +Node: Inexactness of computations992017 +Node: Inexact representation993048 +Node: Comparing FP Values994408 +Node: Errors accumulate995649 +Node: Strange values997105 +Ref: Strange values-Footnote-1999693 +Node: Getting Accuracy999798 +Node: Try To Round1002508 +Node: Setting precision1003407 +Ref: table-predefined-precision-strings1004104 +Node: Setting the rounding mode1005934 +Ref: table-gawk-rounding-modes1006308 +Ref: Setting the rounding mode-Footnote-11010239 +Node: Arbitrary Precision Integers1010418 +Ref: Arbitrary Precision Integers-Footnote-11013593 +Node: Checking for MPFR1013742 +Node: POSIX Floating Point Problems1015216 +Ref: POSIX Floating Point Problems-Footnote-11019501 +Node: Floating point summary1019539 +Node: Dynamic Extensions1021729 +Node: Extension Intro1023282 +Node: Plugin License1024548 +Node: Extension Mechanism Outline1025345 +Ref: figure-load-extension1025784 +Ref: figure-register-new-function1027349 +Ref: figure-call-new-function1028441 +Node: Extension API Description1030503 +Node: Extension API Functions Introduction1032216 +Ref: table-api-std-headers1034052 +Node: General Data Types1038301 +Ref: General Data Types-Footnote-11047007 +Node: Memory Allocation Functions1047306 +Ref: Memory Allocation Functions-Footnote-11051807 +Node: Constructor Functions1051906 +Node: API Ownership of MPFR and GMP Values1055559 +Node: Registration Functions1056872 +Node: Extension Functions1057572 +Node: Exit Callback Functions1062894 +Node: Extension Version String1064144 +Node: Input Parsers1064807 +Node: Output Wrappers1077528 +Node: Two-way processors1082040 +Node: Printing Messages1084305 +Ref: Printing Messages-Footnote-11085476 +Node: Updating ERRNO1085629 +Node: Requesting Values1086368 +Ref: table-value-types-returned1087105 +Node: Accessing Parameters1088213 +Node: Symbol Table Access1089450 +Node: Symbol table by name1089962 +Ref: Symbol table by name-Footnote-11092986 +Node: Symbol table by cookie1093114 +Ref: Symbol table by cookie-Footnote-11097299 +Node: Cached values1097363 +Ref: Cached values-Footnote-11100899 +Node: Array Manipulation1101052 +Ref: Array Manipulation-Footnote-11102143 +Node: Array Data Types1102180 +Ref: Array Data Types-Footnote-11104838 +Node: Array Functions1104930 +Node: Flattening Arrays1109428 +Node: Creating Arrays1116404 +Node: Redirection API1121171 +Node: Extension API Variables1124004 +Node: Extension Versioning1124715 +Ref: gawk-api-version1125144 +Node: Extension GMP/MPFR Versioning1126875 +Node: Extension API Informational Variables1128503 +Node: Extension API Boilerplate1129576 +Node: Changes from API V11133550 +Node: Finding Extensions1135122 +Node: Extension Example1135681 +Node: Internal File Description1136479 +Node: Internal File Ops1140559 +Ref: Internal File Ops-Footnote-11151909 +Node: Using Internal File Ops1152049 +Ref: Using Internal File Ops-Footnote-11154432 +Node: Extension Samples1154706 +Node: Extension Sample File Functions1156235 +Node: Extension Sample Fnmatch1163884 +Node: Extension Sample Fork1165371 +Node: Extension Sample Inplace1166589 +Node: Extension Sample Ord1170215 +Node: Extension Sample Readdir1171051 +Ref: table-readdir-file-types1171940 +Node: Extension Sample Revout1173007 +Node: Extension Sample Rev2way1173596 +Node: Extension Sample Read write array1174336 +Node: Extension Sample Readfile1176278 +Node: Extension Sample Time1177373 +Node: Extension Sample API Tests1179125 +Node: gawkextlib1179617 +Node: Extension summary1182535 +Node: Extension Exercises1186237 +Node: Language History1187479 +Node: V7/SVR3.11189135 +Node: SVR41191287 +Node: POSIX1192721 +Node: BTL1194102 +Node: POSIX/GNU1194831 +Node: Feature History1200609 +Node: Common Extensions1217784 +Node: Ranges and Locales1219067 +Ref: Ranges and Locales-Footnote-11223683 +Ref: Ranges and Locales-Footnote-21223710 +Ref: Ranges and Locales-Footnote-31223945 +Node: Contributors1224168 +Node: History summary1230165 +Node: Installation1231545 +Node: Gawk Distribution1232489 +Node: Getting1232973 +Node: Extracting1233936 +Node: Distribution contents1235574 +Node: Unix Installation1242054 +Node: Quick Installation1242736 +Node: Compiling with MPFR1245217 +Node: Shell Startup Files1245909 +Node: Additional Configuration Options1246998 +Node: Configuration Philosophy1249313 +Node: Non-Unix Installation1251682 +Node: PC Installation1252142 +Node: PC Binary Installation1252980 +Node: PC Compiling1253415 +Node: PC Using1254532 +Node: Cygwin1258085 +Node: MSYS1259309 +Node: VMS Installation1259911 +Node: VMS Compilation1260630 +Ref: VMS Compilation-Footnote-11261859 +Node: VMS Dynamic Extensions1261917 +Node: VMS Installation Details1263602 +Node: VMS Running1265864 +Node: VMS GNV1270143 +Node: Bugs1270857 +Node: Bug definition1271737 +Node: Bug address1274241 +Node: Usenet1277629 +Node: Performance bugs1278638 +Node: Asking for help1281559 +Node: Maintainers1283521 +Node: Other Versions1284715 +Node: Installation summary1292567 +Node: Notes1293931 +Node: Compatibility Mode1294725 +Node: Additions1295507 +Node: Accessing The Source1296432 +Node: Adding Code1297869 +Node: New Ports1304088 +Node: Derived Files1308463 +Ref: Derived Files-Footnote-11314123 +Ref: Derived Files-Footnote-21314158 +Ref: Derived Files-Footnote-31314756 +Node: Future Extensions1314870 +Node: Implementation Limitations1315528 +Node: Extension Design1316738 +Node: Old Extension Problems1317882 +Ref: Old Extension Problems-Footnote-11319400 +Node: Extension New Mechanism Goals1319457 +Ref: Extension New Mechanism Goals-Footnote-11322821 +Node: Extension Other Design Decisions1323010 +Node: Extension Future Growth1325123 +Node: Notes summary1325729 +Node: Basic Concepts1326887 +Node: Basic High Level1327568 +Ref: figure-general-flow1327850 +Ref: figure-process-flow1328535 +Ref: Basic High Level-Footnote-11331836 +Node: Basic Data Typing1332021 +Node: Glossary1335349 +Node: Copying1367236 +Node: GNU Free Documentation License1404779 +Node: Index1429899 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 90159fdb..6f4bee43 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -6101,17 +6101,37 @@ regexp constants are valid and work the way you want them to, using any version of @command{awk}.@footnote{Use two backslashes if you're using a string constant with a regexp operator or function.} -Finally, when @samp{@{} and @samp{@}} appear in regexp constants +When @samp{@{} and @samp{@}} appear in regexp constants in a way that cannot be interpreted as an interval expression (such as @code{/q@{a@}/}), then they stand for themselves. As mentioned, interval expressions were not traditionally available in @command{awk}. In March of 2019, BWK @command{awk} (finally) acquired them. - Nonetheless, because they were not available for so many decades, @command{gawk} continues to not supply them when in compatibility mode (@pxref{Options}). +POSIX says that interval expressions containing repetition counts greater +than 255 produce unspecified results. + +@cindex Eggert, Paul +In the manual for GNU @command{grep}, Paul Eggert notes the following: + +@quotation +Interval expressions may be implemented internally via repetition. +For example, @samp{^(a|bc)@{2,4@}$} might be implemented as +@samp{^(a|bc)(a|bc)((a|bc)(a|bc)?)?$}. A large repetition count may +exhaust memory or greatly slow matching. Even small counts can cause +problems if cascaded; for example, @samp{grep -E +".*@{10,@}@{10,@}@{10,@}@{10,@}@{10,@}"} is likely to overflow a +stack. Fortunately, regular expressions like these are typically +artificial, and cascaded repetitions do not conform to POSIX so cannot +be used in portable programs anyway. +@end quotation + +@noindent +This same caveat applies to @command{gawk}. + @node Bracket Expressions @section Using Bracket Expressions @cindex bracket expressions diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 337ac92d..03b8ccda 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -5829,17 +5829,37 @@ regexp constants are valid and work the way you want them to, using any version of @command{awk}.@footnote{Use two backslashes if you're using a string constant with a regexp operator or function.} -Finally, when @samp{@{} and @samp{@}} appear in regexp constants +When @samp{@{} and @samp{@}} appear in regexp constants in a way that cannot be interpreted as an interval expression (such as @code{/q@{a@}/}), then they stand for themselves. As mentioned, interval expressions were not traditionally available in @command{awk}. In March of 2019, BWK @command{awk} (finally) acquired them. - Nonetheless, because they were not available for so many decades, @command{gawk} continues to not supply them when in compatibility mode (@pxref{Options}). +POSIX says that interval expressions containing repetition counts greater +than 255 produce unspecified results. + +@cindex Eggert, Paul +In the manual for GNU @command{grep}, Paul Eggert notes the following: + +@quotation +Interval expressions may be implemented internally via repetition. +For example, @samp{^(a|bc)@{2,4@}$} might be implemented as +@samp{^(a|bc)(a|bc)((a|bc)(a|bc)?)?$}. A large repetition count may +exhaust memory or greatly slow matching. Even small counts can cause +problems if cascaded; for example, @samp{grep -E +".*@{10,@}@{10,@}@{10,@}@{10,@}@{10,@}"} is likely to overflow a +stack. Fortunately, regular expressions like these are typically +artificial, and cascaded repetitions do not conform to POSIX so cannot +be used in portable programs anyway. +@end quotation + +@noindent +This same caveat applies to @command{gawk}. + @node Bracket Expressions @section Using Bracket Expressions @cindex bracket expressions |