fork download
  1. #!/usr/bin/perl
  2. #!/usr/bin/perl
  3.  
  4. my $input = '(((';
  5.  
  6. grammar Test {
  7. token TOP {
  8. <down>*
  9. }
  10.  
  11. token down {
  12. ^\($
  13. }
  14. }
  15.  
  16. class TestActions {
  17. method TOP ($/) {
  18. make @<down>>>.ast;
  19. }
  20. method down ($/) {
  21. make 1;
  22. }
  23. }
  24.  
  25. my $actions = TestActions.new;
  26. my $res = Test.parse($input, :$actions);
  27. say $res.made;
  28.  
Runtime error #stdin #stdout #stderr 1.88s 190400KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
No such method 'made' for invocant of type 'Any'
  in block  at prog.pl:27