diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-04-22 07:16:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-04-22 07:16:10 -0700 |
commit | 6d02c842eb739056d9fd8b11b28d3bfd6fe5a4d8 (patch) | |
tree | 851cdeebfa447324f192ff58b756125ff082ea31 | |
parent | 2a17e1010bb973323601346456db227bc5475d5f (diff) | |
download | cppawk-6d02c842eb739056d9fd8b11b28d3bfd6fe5a4d8.tar.gz cppawk-6d02c842eb739056d9fd8b11b28d3bfd6fe5a4d8.tar.bz2 cppawk-6d02c842eb739056d9fd8b11b28d3bfd6fe5a4d8.zip |
man page: note issue with backslash continuation.
-rw-r--r-- | cppawk.1 | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -285,6 +285,29 @@ to encode the quote: /abc\e042/ +Another area of an incompatibility is that newlines are significant in +the Awk grammar, and some Awk programs use backslash-newline escape +sequences in order to turn significant newlines into insignificant +newlines. Though the C preprocessor recognizes and consumes backslash-newline +sequences it may, unfortunately, replace them with an unescaped newlines. So +the backslash line continuation technique is not reliably available to +.B cppawk +programs. A clumsy workaround which works with GNU +.I cpp +is this: + +.ft B + #define BS \e\e + /pattern/ BS + { action } +.ft R + +Some Awk code uses backslash continuations in order to turn +These are significant Awk has significant newlines +in numerous places in the grammar which can change the meaning of the +code or introduce a syntax error, unless they are escaped with a backslash. +This backlash escaping is + Awk implementations reports errors against lines an anonymous filename associated with the preprocessed stream, rather than the original lines in the original file. Although the preprocessed output indicates source file and line |