in reply to Re^4: Parse::RecDescent and auto{actions,trees} and stuff
in thread Parse::RecDescent and auto{actions,trees} and stuff

Because you assumes cpu_num returns a number ($arg[0]-1), but it returns a blessed object when <autotree> is used.

Replies are listed 'Best First'.
Re^6: Parse::RecDescent and auto{actions,trees} and stuff
by mattford63 (Sexton) on Jul 17, 2008 at 16:51 UTC

    I see. So I tried to fix (so it will run, not necessarily do want I want) by doing this.

    cpu_num: int { $item[1] }

    i.e., fixing the return value so that the recursion works assuming as an action is specified <autotree> won't overwrite it.

    However it still fails...

    UPDATE: I just reliased I needed to do the same of int: for it too leap into life. :-)

    I guess I need to somehow manually bless the lines with actions defined in order to flush out my parse tree....

      I find it very valuable to seperate tokens from non-token rules. And I find very little worth in <auto...>
      cpus : INT cpu_list[ $item[1] ] { [ $item[0], $item[2] ] } INT : /\d+/ # Add "{ $item[1] }" if using "<auto...>"