);
$alphanum_cmp_op_re = qr/$alphanum_cmp_op_re/x;
-my $binary_op_re = '(?: NOT \s+)? (?:' . join ('|', qw/IN BETWEEN R?LIKE/) . ')';
+my $binary_op_re = '(?: NOT \s+)? (?:' . join ('|', qw/IN BETWEEN [RI]?LIKE REGEXP/) . ')';
$binary_op_re = join "\n\t|\n",
"$op_look_behind (?i: $binary_op_re | AS ) $op_look_ahead",
$alphanum_cmp_op_re,
my @left;
while (1) { # left-associative parsing
- if ( ! @$tokens
+ if (! @$tokens
or
($state == PARSE_IN_PARENS && $tokens->[0] eq ')')
or
}
# unary op keywords
- elsif ( $token =~ $unary_op_re ) {
+ elsif ($token =~ $unary_op_re) {
my $op = uc $token;
# normalize RNO explicitly
$op = 'ROW_NUMBER() OVER' if $op =~ /^$rno_re$/;
- my @right = $self->_recurse_parse ($tokens, PARSE_RHS);
+ my @right = $self->_recurse_parse($tokens, PARSE_RHS);
push @left, [ $op => \@right ];
}
# expression terminator keywords
- elsif ( $token =~ $expr_start_re ) {
+ elsif ($token =~ $expr_start_re) {
my $op = uc $token;
my @right = $self->_recurse_parse($tokens, PARSE_IN_EXPR);
}
# a '?'
- elsif ( $token =~ $placeholder_re) {
+ elsif ($token =~ $placeholder_re) {
push @left, [ -PLACEHOLDER => [ $token ] ];
}
and
$tokens->[0] !~ $all_std_keywords_re
and
- ! ( @$tokens > 1 and $tokens->[1] eq '(' )
+ ! (@$tokens > 1 and $tokens->[1] eq '(')
) {
push @lits, [ -LITERAL => [ shift @$tokens ] ];
}