help-bison
[Top][All Lists]
Advanced

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

Re: yyerror() location tracking


From: Tom Stellard
Subject: Re: yyerror() location tracking
Date: Sun, 17 Jan 2010 13:50:44 -0800
User-agent: Mutt/1.5.16 (2007-06-09)

On Sun, Jan 17, 2010 at 02:14:14PM -0500, Joel E. Denny wrote:
> On Sun, 17 Jan 2010, Joel E. Denny wrote:
> 
> > The section of the manual you want is:
> > 
> >   
> > http://www.gnu.org/software/bison/manual/html_node/Error-Reporting.html#Error-Reporting
> > 
> > As you'll read there, to convince the deterministic parser in C to pass a 
> > location to yyerror, you need to specify %define api.pure, at least one 
> > %lex-param, and at least one %parse-param.  The %lex-param and 
> > %parse-param can be the same.
> 
> Whoops, you don't need a %lex-param.  But of course you need to activate 
> locations with, for example, %locations.
> 
> > The yyerror prototype is confusing.  We've been considering ways to 
> > alleviate this problem, but we're not done yet.

Thanks for your reply.  I added a %parse-param, and now it is working
as expected. 

-Tom




reply via email to

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