diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-11-18 23:00:31 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-11-18 23:00:31 +0200 |
commit | 6f3612539c425da2bc1d34db621696e6a273b01c (patch) | |
tree | 9623b3ac2c54a93e5eed3be2b1dda7f4e4bf0e47 /bisonfix.awk | |
parent | 4e3701015635401df2fc4da58abaab7645f4ebd3 (diff) | |
download | egawk-6f3612539c425da2bc1d34db621696e6a273b01c.tar.gz egawk-6f3612539c425da2bc1d34db621696e6a273b01c.tar.bz2 egawk-6f3612539c425da2bc1d34db621696e6a273b01c.zip |
Bring latest byte code gawk into git. Hurray!
Diffstat (limited to 'bisonfix.awk')
-rw-r--r-- | bisonfix.awk | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bisonfix.awk b/bisonfix.awk index ba071ef4..a759d25b 100644 --- a/bisonfix.awk +++ b/bisonfix.awk @@ -19,18 +19,24 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -/^#if \(! defined \(yyoverflow\) \\/ { +BEGIN { sfile = ARGV[1] ; delete ARGV[1] } + +/^#if.*\\$/ { line = $0 sub(/\\$/, "", line) getline line2 - sub(/\\$/, "", line2) - getline line3 - - line = line line2 line3 + while (line2 ~ /\\$/) { + line = line line2 + sub(/\\$/, "", line) + getline line2 + } + line = line line2 + sub(/\\$/, "", line) print line next } -/^#line.*y\.tab\.c/ { sub(/y.tab.c/, "awkgram.c") } +/^#line.*y\.tab\.c/ { sub(/y.tab/, sfile) } { print } + |