elsif ( $expecting == UNKNOWN ) { # indeterminate, must guess..
my $msg;
( $is_pattern, $msg ) =
- $self->guess_if_pattern_or_division( $i, $rtokens, $rtoken_map,
- $max_token_index );
+ $self->guess_if_pattern_or_division( $i, $rtokens, $rtoken_type,
+ $rtoken_map, $max_token_index );
if ($msg) {
$self->write_diagnostics("DIVIDE:$msg\n");
# /(.*)/ && (print $1,"\n");
my $msg;
( $is_pattern, $msg ) =
- $self->guess_if_pattern_or_conditional( $i, $rtokens, $rtoken_map,
- $max_token_index );
+ $self->guess_if_pattern_or_conditional( $i, $rtokens,
+ $rtoken_type, $rtoken_map, $max_token_index );
if ($msg) { $self->write_logfile_entry($msg) }
}
$found_target, $here_doc_target, $here_quote_character, $i,
$saw_error
)
- = $self->find_here_doc( $expecting, $i, $rtokens, $rtoken_map,
- $max_token_index );
+ = $self->find_here_doc( $expecting, $i, $rtokens, $rtoken_type,
+ $rtoken_map, $max_token_index );
if ($found_target) {
push @{$rhere_target_list},
$found_target, $here_doc_target, $here_quote_character, $i,
$saw_error
)
- = $self->find_here_doc( $expecting, $i, $rtokens, $rtoken_map,
- $max_token_index );
+ = $self->find_here_doc( $expecting, $i, $rtokens, $rtoken_type,
+ $rtoken_map, $max_token_index );
if ($found_target) {
$quoted_string_1,
$quoted_string_2,
$rtokens,
+ $rtoken_type,
$rtoken_map,
$max_token_index,
# msg = a warning or diagnostic message
# USES GLOBAL VARIABLES: $last_nonblank_token
- my ( $self, $i, $rtokens, $rtoken_map, $max_token_index ) = @_;
+ my ( $self, $i, $rtokens, $rtoken_type, $rtoken_map, $max_token_index ) =
+ @_;
my $is_pattern = 0;
my $msg = "guessing that ? after $last_nonblank_token starts a ";
$ibeg,
$in_quote,
$rtokens,
+ $rtoken_type,
$quote_character,
$quote_pos,
$quote_depth,
# $is_pattern = 0 if probably division, =1 if probably a pattern
# msg = a warning or diagnostic message
# USES GLOBAL VARIABLES: $last_nonblank_token
- my ( $self, $i, $rtokens, $rtoken_map, $max_token_index ) = @_;
+ my ( $self, $i, $rtokens, $rtoken_type, $rtoken_map, $max_token_index ) =
+ @_;
my $is_pattern = 0;
my $msg = "guessing that / after $last_nonblank_token starts a ";
my $ibeg = $i;
$ibeg,
$in_quote,
$rtokens,
+ $rtoken_type,
$quote_character,
$quote_pos,
$quote_depth,
# $i - unchanged if not here doc,
# or index of the last token of the here target
# $saw_error - flag noting unbalanced quote on here target
- my ( $self, $expecting, $i, $rtokens, $rtoken_map, $max_token_index ) = @_;
+ my ( $self, $expecting, $i, $rtokens, $rtoken_type, $rtoken_map,
+ $max_token_index )
+ = @_;
my $ibeg = $i;
my $found_target = 0;
$i_next_nonblank,
$in_quote,
$rtokens,
+ $rtoken_type,
$here_quote_character,
$quote_pos,
$quote_depth,
$quoted_string_1,
$quoted_string_2,
$rtokens,
+ $rtoken_type,
$rtoken_map,
$max_token_index,
$ibeg,
$in_quote,
$rtokens,
+ $rtoken_type,
$quote_character,
$quote_pos,
$quote_depth,
$ibeg,
$in_quote,
$rtokens,
+ $rtoken_type,
$quote_character,
$quote_pos,
$quote_depth,
$i_beg,
$in_quote,
$rtokens,
+ $rtoken_type,
$beginning_tok,
$quote_pos,
$quote_depth,
while ( $i < $max_token_index ) {
$tok = $rtokens->[ ++$i ];
- if ( $tok !~ /^\s*$/ ) {
+ ##if ( $tok !~ /^\s*$/ ) {
+ if ( $rtoken_type->[$i] ne 'b' ) {
if ( ( $tok eq '#' ) && ($allow_quote_comments) ) {
$i = $max_token_index;