Is this even possible?

[email protected] (Chris Krum) Wed, 21 Apr 2004 22:30:31 -0700
Newsgroups perl.recdescent
Message-ID <[email protected]>
I need to parse a language called "JAM Procedure Language". The 
language isn't overly complex but I don't want to have to try to figure 
out the grammar from scratch. What I'd like to do instead is to write a 
grammar that can tell me what it doesn't understand when it parses a 
file. That way I can look at the code it doesn't understand and define 
rules to break it down further and then run it again. But so far, my 
rule for UNKNOWN simply consumes the remainder of the input and tells 
me "Congratulations, you have a file full of who knows what." Is it 
possible to define a rule that won't consume everything in sight and 
still match an undefined block of code?

Thanks in advance,
Chris.