A POSIX-compliant AWK interpreter written in Go, with CSV support
Full Changelog: https://github.com/benhoyt/goawk/compare/v1.26.0...v1.27.0
Full Changelog: https://github.com/benhoyt/goawk/compare/v1.25.0...v1.26.0
This release includes several minor changes:
system()
and close()
for pipes more closely match Gawk's. Internal refactoring of the input and output stream implementation to make this happen. See issues #203 #204 #205 and thanks @juster!\u
Unicode string escape that's been added to onetrueawk and Gawk recently. #212This release contains several minor fixes and the addition of --csv
(it's an alias for -i csv
). This is for compatibility with onetrueawk and Gawk, which are both adding that option soon.
It also contains a minor backwards-incompatible change: in CSV input mode (-i csv
), the behaviour of the two-argument form of split()
now parses using CSV splitting, rather than FS. This is also in line with the upcoming --csv
feature of onetrueawk and Gawk. This is very unlikely to affect anyone, as CSV mode is relatively recent, and it seems unlikely that anyone is using the two-argument form of split()
in CSV mode in any case.
Full list of changes:
{ blocks }
with just semicolons in them in https://github.com/benhoyt/goawk/pull/192 -- thanks @raygard for the bug reportexit
without status code doesn't set exit code in https://github.com/benhoyt/goawk/pull/193 -- thanks @raygard for the bug reportsplit()
respect CSV input mode in https://github.com/benhoyt/goawk/pull/198
--csv
option, in line with upcoming AWK and Gawk feature in https://github.com/benhoyt/goawk/pull/199
--csv
in https://github.com/benhoyt/goawk/pull/200
This is a patch version that fixes panics when compiling AWK code that uses complex, mutually-recursive functions (fixed in PR #187). Thanks @xonixx for the test case.
This is patch release to fix a bug where mutually-recursive functions would cause an "undefined function" error in the resolver (PR #184). Thanks @xonixx for the bug report (#183).
This is a patch release that fixes a bug in 1.23.0 -- there was a bug that caused a panic in the resolver step with code like function f1(A) {} function f2(x, A) { x[0]; f1(a); f2(a) }
. Fixed in #178.
While we're at it, also fix a panic with certain obscure regexes (#179) and limit ARGC
to a reasonable maximum (#180).
All three of these issues were found by fuzzing: go test ./interp -fuzz=FuzzSource
This release adds a single new feature: support for length(array)
in addition to length(string)
(#176). Calling length()
on an array is quite useful and is supported by all other awk versions (onetrueawk, Gawk, mawk, busybox awk, frawk). In addition, it's been accepted for inclusion into POSIX, though not yet added to the main spec (which seems to take forever).
This release also includes a complete rewrite of the type resolver (#175). Before the code was quite messy and hard to read, now with the two passes I think it's easier to understand and work with. It was certainly easier to add the length(array)
feature with the rewritten resolver than before.
A fairly minor release, fixing some edge cases and adding support for nextfile
:
$++lvalue
not an error (#168)toString()
at runtime (#169)cond && var=value
and similar expressions (#170)(a)++b
parsing issue; pretty-print precedence (#172)nextfile
(#173)See full list of commits.
Significant changes in this release:
-d
, -da
, and -dt
print to stdout and exit (https://github.com/benhoyt/goawk/pull/155). Thanks, @xonixx.