On Jun 22, 2009, at 5:58 AM, Lowell Thomas wrote:
> Terence Parr wrote:
>> 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!
>
> Just some ruminations here.

>
>
> Maybe I’m being too pessimistic here but I really don’t hold out a  
> lot of
> hope for automated debugging of grammars. An algorithm writes the  
> parser but
> a human writes the grammar. There is no algorithm I know of that can  
> take a
> spoken-word specification and generate a grammar. And fixing a  
> defective
> grammar is more of the same type of human activity. Until algorithms  
> can
> generate grammars I don’t think algorithms will be more than modestly
> helpful in finding and analyzing errors and printing cogent error  
> messages.
> This reasoning is not original to me. It is essentially the same  
> argument as
> Frederick P. Brooks, Jr.’s (“The Mythical Man-Month”) famous and
> controversial “No silver bullet” hypothesis.

Hi Lowell. I was talking about syntax error reporting and parser  
recovery at runtime not debugging :)

Ter


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

Reply via email to