help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print expected tokens in yyerror function.


From: Claudio Saavedra
Subject: Re: Print expected tokens in yyerror function.
Date: Sat, 29 Mar 2008 08:50:23 -0300

El dom, 09-03-2008 a las 16:50 +0100, Hans Aberg escribió:
> 
> It prints something like that (or used to), but the LALR(1) that  
> Bison uses compacts the statements in a way that when an error token  
> appears in the input, additional reduction can be performed. So to  
> get a fully correct error handling, including tokens, LR without this
> type of compaction, or some search algorithm would be needed.

The Burke-Fisher technique uses a deferred parsing mechanism to simulate
a limited degree of unparsing. With this, errors, that are detected
after some reductions and shifts take place, can still be detected and
properly diagnosed and fixed.

This do works with Bison's LALR algorithm and table compactation. I have
a bison skeleton that works this way, and I'll be publishing it pretty
soon.

Greetings,

Claudio

-- 
Claudio Saavedra <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]