-
Notifications
You must be signed in to change notification settings - Fork 560
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
apparent parsing error with not(arg) #670
Comments
From sburke@netadventure.netThis Of course, I simply do this instead: Perlop says not() is the equivalent of "!" except for the very low Here's my version info: Characteristics of this binary (from libperl): I get identical results on a box with this config info: lachler ~ musca:pts/24 3: perl -V Characteristics of this binary (from libperl): And even on MacPerl 5.2.0r4 (patchlevel 5.004) with the following -V: Characteristics of this binary (from libperl): -- |
From @TimToadySean M. Burke writes: Hmm. I wonder how many programs we'll break by fixing this. Nevertheless, here's something resembling a patch, if we decide to Inline Patch--- /kiev/src/perl5.005_61our/toke.c Fri Sep 24 16:06:45 1999
+++ toke.c Wed Oct 6 10:39:00 1999
@@ -120,7 +120,7 @@
* LOOPX : loop exiting command (goto, last, dump, etc)
* FTST : file test operator
* FUN0 : zero-argument function
- * FUN1 : not used
+ * FUN1 : not used, except for not, which isn't a UNIOP
* BOop : bitwise or or xor
* BAop : bitwise and
* SHop : shift operator
@@ -4096,7 +4104,10 @@
OPERATOR(USE);
case KEY_not:
- OPERATOR(NOTOP);
+ if (*s == '(' || (s = skipspace(s), *s == '('))
+ FUN1(NOTOP);
+ else
+ OPERATOR(NOTOP);
case KEY_open:
s = skipspace(s);
Larry |
Migrated from rt.perl.org#1550 (status was 'resolved')
Searchable as RT1550$
The text was updated successfully, but these errors were encountered: