Actually, I made some other changes:

use Data::Dumper::Concise; # For Dumper().

And:

sub My_Actions::do_attribute
{
my($hash, $t1, $t2, $t3) = @_;

=pod

print "do_attribute()\n";
print '$t1: ', Dumper($t1);
print '$t2: ', Dumper($t2);
print '$t3: ', Dumper($t3);

=cut

return [$t1, $t2, $t3];
}

sub My_Actions::do_basic {
    my ($hash, $t1, $t2, $t3, $t4 ) = @_;

=pod

print "do_basic()\n";
print '$t1: ', Dumper($t1);
print '$t2: ', Dumper($t2);
print '$t3: ', Dumper($t3);
print '$t4: ', Dumper($t4);

=cut

return [$t1, $t2, $t3, $t4];
}

The output is:

Setting trace_terminals option
Setting trace_values option
Lexer "L0" accepted lexeme L1c1-3: '*IF'; value="*IF"
Lexer "L0" discarded lexeme L1c4: ws
Lexer "L0" accepted lexeme L1c5-10: '*VALUE'; value="*VALUE"
Lexer "L0" discarded lexeme L1c11: ws
Lexer "L0" accepted lexeme L1c12-33: id; value="i5OS_IOA_Cache_Battery"
Lexer "L0" accepted lexeme L1c34: '.'; value="."
Lexer "L0" accepted lexeme L1c35-39: id; value="State"
Lexer "L0" discarded lexeme L1c40: ws
Lexer "L0" accepted lexeme L1c41-43: '*EQ'; value="*EQ"
Lexer "L0" discarded lexeme L1c44: ws
Lexer "L0" forgave lexeme L1c45-49: id; value="Error"
Lexer "L0" accepted lexeme L1c45-49: literal_word; value="Error"
Popping 4 values to evaluate R2:4@1-7C11@6, rule: 2: basic_condition -> 
[Lex-1] attribute comparison compare_string
Calculated and pushed value: [
  '*VALUE',
  [
    [
      'i5OS_IOA_Cache_Battery'
    ],
    '.',
    [
      'State'
    ]
  ],
  [
    '*EQ'
  ],
  [
    [
      'Error'
    ]
  ]
]

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to