my %OP_IS_FT_ACCESS; # /F-+/
my %OP_IS_NUMCOMPARE; # /S</
my %OP_IS_DIRHOP; # /Fd/
+my %OP_IS_INFIX_BIT; # /S\|/
my $OCSHIFT = 8;
my $OASHIFT = 12;
$OP_IS_FILETEST{$op} = $opnum{$op} if $arg =~ s/-//;
$OP_IS_FT_ACCESS{$op} = $opnum{$op} if $arg =~ s/\+//;
}
- elsif ($arg =~ /^S</) {
+ elsif ($arg =~ /^S./) {
$OP_IS_NUMCOMPARE{$op} = $opnum{$op} if $arg =~ s/<//;
+ $OP_IS_INFIX_BIT {$op} = $opnum{$op} if $arg =~ s/\|//;
}
my $argnum = ($arg =~ s/\?//) ? 8 : 0;
die "op = $op, arg = $arg\n"
gen_op_is_macro( \%OP_IS_FT_ACCESS, 'OP_IS_FILETEST_ACCESS');
gen_op_is_macro( \%OP_IS_NUMCOMPARE, 'OP_IS_NUMCOMPARE');
gen_op_is_macro( \%OP_IS_DIRHOP, 'OP_IS_DIRHOP');
+gen_op_is_macro( \%OP_IS_INFIX_BIT, 'OP_IS_INFIX_BIT');
sub gen_op_is_macro {
my ($op_is, $macname) = @_;
# scalar - S list - L array - A
# hash - H sub (CV) - C file - F
# socket - Fs filetest - F- filetest_access - F-+
-# num-compare - S< dirhandle - DF
+# num-compare - S< dirhandle - DF infix bitwise - S|
# reference - R
# "?" denotes an optional operand.
sne string ne ck_null ifs2 S S
scmp string comparison (cmp) ck_null ifsT2 S S
-bit_and bitwise and (&) ck_bitop fst2 S S
-bit_xor bitwise xor (^) ck_bitop fst2 S S
-bit_or bitwise or (|) ck_bitop fst2 S S
-nbit_and numeric bitiwse and (&) ck_bitop fsT2 S S
-nbit_xor numeric bitwise xor (^) ck_bitop fsT2 S S
-nbit_or numeric bitwise or (|) ck_bitop fsT2 S S
-sbit_and string bitiwse and (&) ck_bitop fst2 S S
-sbit_xor string bitwise xor (^) ck_bitop fst2 S S
-sbit_or string bitwise or (|) ck_bitop fst2 S S
+bit_and bitwise and (&) ck_bitop fst2 S S|
+bit_xor bitwise xor (^) ck_bitop fst2 S S|
+bit_or bitwise or (|) ck_bitop fst2 S S|
+nbit_and numeric bitiwse and (&) ck_bitop fsT2 S S|
+nbit_xor numeric bitwise xor (^) ck_bitop fsT2 S S|
+nbit_or numeric bitwise or (|) ck_bitop fsT2 S S|
+sbit_and string bitiwse and (&) ck_bitop fst2 S S|
+sbit_xor string bitwise xor (^) ck_bitop fst2 S S|
+sbit_or string bitwise or (|) ck_bitop fst2 S S|
negate negation (-) ck_null Ifst1 S
i_negate integer negation (-) ck_null ifst1 S