diff options
author | Larry Wall <larry@wall.org> | 1999-10-06 02:55:57 -0700 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-08 02:31:13 +0000 |
commit | 2d2e263d835bab7638308fed2b56967f4815cad6 (patch) | |
tree | e51fc6f58005128ecbea0cb280149a4d15e0e0d6 /toke.c | |
parent | 0a30450eff33ad0d9a30d3e5e9e92dce35ee33b7 (diff) | |
download | perl-2d2e263d835bab7638308fed2b56967f4815cad6.tar.gz |
add suggested patch =~ s/NOTOP/OP_NOT/ with tests
Message-Id: <199910061655.JAA11333@kiev.wall.org>
Subject: Re: [ID 19991001.004] apparent parsing error with not(arg)
p4raw-id: //depot/perl@4312
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -120,7 +120,7 @@ int* yychar_pointer = NULL; * 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 @@ -4227,7 +4227,10 @@ Perl_yylex(pTHX) OPERATOR(USE); case KEY_not: - OPERATOR(NOTOP); + if (*s == '(' || (s = skipspace(s), *s == '(')) + FUN1(OP_NOT); + else + OPERATOR(NOTOP); case KEY_open: s = skipspace(s); |