in reply to Rec::Descent Woes - Parsing JavaScript Files and Other Issues

I've never acctually used Parse::RecDescent, but I've written parses like this before. The first thing that jumps out at me is your handler for functions...
function_method: 'function' identifier paren_statement brace { $return = $item[2]; }
Assuming this does what I think it does, you're throwing away the function signature and body by only returning $item[2]. You might try this instead...
function_method: 'function' identifier paren_statement brace { $return = \@item; }
with your existing flatten_recurse method, I think that will do what you want (allthough you'll probably be mising the parens and braces since it looks like you you throw those out when you parse paren_statement and brace_statement)

The power of writting Parsers like this is that you can build your data structures as you parse the file. By flattening out the results from your parser, you're throwing away a lot of the functionality you could have. Considering your goal, you might want to make all of your handlers just return \@item, that should cause your parser to build "a complete parse tree" of your javascript files. Then you can walk it and do whatever you want with it.

Update: Don't try \@item. On a whim I installed Parse::RecDescent to see if I was right, and ran into a deep recursion problem. Evidently @item is a more complicated array then I thought (i figured it was just the individual tokens ... now i'm curios to go read the docs and understand how this module works).
Bottom line: dmmiller2k is probably right, your grammer seems very specific in some ways and very general in others -- you should try to make it more specific about the things you care about, and more general about the things you don't.