-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build IANA tz database 2022b #149
Comments
A more compact one-liner test case: jhawk@lrr ~ % echo foo | /usr/bin/awk '{stdoff_column = 2 * /^Zone/ + 1}'
/usr/bin/awk: syntax error at source line 1
context is
{stdoff_column = 2 * /^Zone/ >>> + <<< 1}
/usr/bin/awk: illegal statement at source line 1 Versus gawk: jhawk@lrr ~ % echo foo | gawk '{stdoff_column = 2 * /^Zone/ + 1}'
jhawk@lrr ~ % |
The current Single UNIX Specification page for awk says
I presume that That spec speaks of "ERE tokens", which appear to be of the form "/ere/", but I don't see any specification of what an "ERE token" is in the spec. |
See Lexical Conventions in the spec:
|
Placing the regex in parens makes the yacc grammar happy and appears to produce the correct result. |
The obvious fix is to simply add add:
to the end of the |
hi deborah, thanks for the report. |
Yes, unfortunately I tested 20190529 incorrectly and so I mistakenly told Deborah that 20190529 did not have the bug. Sorry about that. I.e., this is not a regression (though it is still a bug). For what it's worth, Solaris 10 /usr/bin/nawk (which has a version string saying "Oct 11, 1989") has the same bug. And similarly for Solaris 10 /usr/bin/awk (aka "oawk"), which has no version string but is even older. Evidently the bug has been around for a while. |
yep, I've tested all those, including sol 8/10 nawk, awk, as well as MKS awk which solaris shipped as sys5 awk. |
@millert obvious fix gives us 225 reduce/reduce. we can remove |
@plan9 The grammar is definitely an area where "Here there be dragons." Tread very, very, carefully. |
The latest commit (as of this report) of onetrueawk cannot built release 2022b of the IANA tz database.
Steps to reproduce
make rearguard_tarballs
Result:
Regression:
Works in FreeBSD 13.0 (earlier commit of onetrueawk, version 20190529)
Works with gawk among others
The text was updated successfully, but these errors were encountered: