On Jun 18, 2009, at 6:20 PM, Michaeljohn Clement wrote:
> I think generating acceptable error messages from a parser alone is an
> interesting hard problem.  It might be possible to do some statistical
> analysis on a corpus of valid inputs and then derive heuristics to
> suggestwhat the most likely error in the input string might be.

Has anyone thought of parsing backwards from the end towards the  
detected error location? If you parse forwards and backwards you might  
be able to zoom in on a problem area. Of course if there are lots of  
errors following the first one, it won't help you too much. It's sort  
of what a human does though, isn't it? We look down a few tokens and  
work our way back up to see if we can make sense of things.

The other thing I wondered about. Can we launch a whole bunch of  
threads using multiple core to sniff the input to improve error  
analysis? Maybe we launch parsers at multiple points in the input  
stream and then use the interpretation that yields the fewest errors.

Just random thoughts. Let's use those cores, man! Right now, all they  
do is run Pandora and instant messaging for me. ;)

Ter

_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to