in reply to Parse::RecDescent tutorial

The problem is that 'return()' finishes parsing.

Parse::RecDescent works with a variable $return to give back results from subrules to parent rules. If you change the three occurences of "return" inside the grammar (but not inside the sub 'expression') to "$return=" the parser works

Replies are listed 'Best First'.
Re^2: Parse::RecDescent tutorial
by thunders (Priest) on Aug 05, 2009 at 16:17 UTC
    Thanks jethro++! That fixed it!