in reply to RecDescent help

Each production returns the result of its last rule, so
character: /\w/ {print "Character: $item[1]\n"}

returns the result of the { print ... } action. You want

character: /\w/ { print "Character: $item[1]\n" } { $item[1] }

Of course, it doesn't make much sense to print in a production the parser might backtrack through the production.

But what's up with "chatterbox"? Why not use IRC like everyone else?

Browsers don't speak IRC, they speak HTTP (mostly).

And the chatterbox is associated with an IRC channel.

Replies are listed 'Best First'.
Re^2: RecDescent help
by ikaruga (Novice) on Jan 20, 2010 at 21:28 UTC
    Oh I see. That makes sense. I was just doing that to do a quick debug. So what is the IRC channel of perlmonks?
      I don't know. I don't use it.