in reply to Where does $4 come from here?

You seem to have miscounted. There are five items in the production, and four of them occur before the one that uses $3 and $4.

  1. GRAMPROG
  2. { PL_parser->expect = XSTATE; }
  3. remember
  4. stmtseq
  5. { newPROG(block_end($3,$4)); $$ = 0; }

Replies are listed 'Best First'.
Re^2: Where does $4 come from here?
by PerlOnTheWay (Monk) on Jul 27, 2011 at 08:46 UTC

    Oops! I nver know code blocks should be couted as $1-9 ... Thanks @ikegami ! Cheers!